Bump buildroot to 2019.02
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
menu "Filesystem images"
|
||||
|
||||
source "fs/axfs/Config.in"
|
||||
source "fs/btrfs/Config.in"
|
||||
source "fs/cloop/Config.in"
|
||||
source "fs/cpio/Config.in"
|
||||
source "fs/cramfs/Config.in"
|
||||
source "fs/ext2/Config.in"
|
||||
source "fs/f2fs/Config.in"
|
||||
source "fs/initramfs/Config.in"
|
||||
source "fs/iso9660/Config.in"
|
||||
source "fs/jffs2/Config.in"
|
||||
|
||||
50
bsp/buildroot/fs/btrfs/Config.in
Normal file
50
bsp/buildroot/fs/btrfs/Config.in
Normal file
@@ -0,0 +1,50 @@
|
||||
config BR2_TARGET_ROOTFS_BTRFS
|
||||
bool "btrfs root filesystem"
|
||||
select BR2_PACKAGE_HOST_BTRFS_PROGS
|
||||
help
|
||||
Build a btrfs root filesystem. If you enable this option, you
|
||||
probably want to enable the btrfs-progs package too.
|
||||
|
||||
if BR2_TARGET_ROOTFS_BTRFS
|
||||
|
||||
config BR2_TARGET_ROOTFS_BTRFS_LABEL
|
||||
string "filesystem label"
|
||||
|
||||
config BR2_TARGET_ROOTFS_BTRFS_SIZE
|
||||
string "filesystem size"
|
||||
default "100m"
|
||||
help
|
||||
The size of the filesystem image in bytes.
|
||||
Suffix with k, m, g or t for power-of-two kilo-, mega-, giga-
|
||||
or terabytes.
|
||||
|
||||
config BR2_TARGET_ROOTFS_BTRFS_SIZE_SECTOR
|
||||
string "sector size"
|
||||
default "4096"
|
||||
help
|
||||
This value should be set to the page size in bytes. The
|
||||
default value of 4096 is the the most common page size for
|
||||
most systems. If the sectorsize differs from the page size,
|
||||
the created filesystem may not be mountable by the kernel.
|
||||
Therefore it is recommended to leave this value at
|
||||
4096. Unless you know that your kernel uses a different page
|
||||
size. Suffix with k for power-of-two kilobytes.
|
||||
|
||||
config BR2_TARGET_ROOTFS_BTRFS_SIZE_NODE
|
||||
string "btree node size"
|
||||
default "16384"
|
||||
help
|
||||
The tree block size in which btrfs stores metadata in bytes.
|
||||
This must be a multiple of the sectorsize, but not larger
|
||||
than 64KiB (65536).
|
||||
Suffix with k for power-of-two kilobytes.
|
||||
|
||||
config BR2_TARGET_ROOTFS_BTRFS_FEATURES
|
||||
string "Filesystem Features"
|
||||
help
|
||||
A comma separated string of features that can be enabled
|
||||
during creation time.
|
||||
For a list of available options, use:
|
||||
`.../host/bin/mkfs.btrfs -O list-all`
|
||||
|
||||
endif # BR2_TARGET_ROOTFS_BTRFS
|
||||
36
bsp/buildroot/fs/btrfs/btrfs.mk
Normal file
36
bsp/buildroot/fs/btrfs/btrfs.mk
Normal file
@@ -0,0 +1,36 @@
|
||||
################################################################################
|
||||
#
|
||||
# Build the btrfs root filesystem image
|
||||
#
|
||||
################################################################################
|
||||
|
||||
BTRFS_SIZE = $(call qstrip,$(BR2_TARGET_ROOTFS_BTRFS_SIZE))
|
||||
ifeq ($(BR2_TARGET_ROOTFS_BTRFS)-$(BTRFS_SIZE),y-)
|
||||
$(error BR2_TARGET_ROOTFS_BTRFS_SIZE cannot be empty)
|
||||
endif
|
||||
|
||||
BTRFS_SIZE_NODE = $(call qstrip,$(BR2_TARGET_ROOTFS_BTRFS_SIZE_NODE))
|
||||
BTRFS_SIZE_SECTOR = $(call qstrip,$(BR2_TARGET_ROOTFS_BTRFS_SIZE_SECTOR))
|
||||
BTRFS_FEATURES = $(call qstrip,$(BR2_TARGET_ROOTFS_BTRFS_FEATURES))
|
||||
# qstrip results in stripping consecutive spaces into a single one. So the
|
||||
# variable is not qstrip-ed to preserve the integrity of the string value.
|
||||
BTRFS_LABEL := $(subst ",,$(BR2_TARGET_ROOTFS_BTRFS_LABEL))
|
||||
# ")
|
||||
|
||||
BTRFS_OPTS = \
|
||||
-f \
|
||||
-r '$(TARGET_DIR)' \
|
||||
-L '$(BTRFS_LABEL)' \
|
||||
--byte-count '$(BTRFS_SIZE)' \
|
||||
$(if $(BTRFS_SIZE_NODE),--nodesize '$(BTRFS_SIZE_NODE)') \
|
||||
$(if $(BTRFS_SIZE_SECTOR),--sectorsize '$(BTRFS_SIZE_SECTOR)') \
|
||||
$(if $(BTRFS_FEATURES),--features '$(BTRFS_FEATURES)')
|
||||
|
||||
ROOTFS_BTRFS_DEPENDENCIES = host-btrfs-progs
|
||||
|
||||
define ROOTFS_BTRFS_CMD
|
||||
$(RM) -f $@
|
||||
$(HOST_DIR)/bin/mkfs.btrfs $(BTRFS_OPTS) $@
|
||||
endef
|
||||
|
||||
$(eval $(rootfs))
|
||||
@@ -28,20 +28,57 @@
|
||||
# macro will automatically generate a compressed filesystem image.
|
||||
|
||||
FS_DIR = $(BUILD_DIR)/buildroot-fs
|
||||
FAKEROOT_SCRIPT = $(FS_DIR)/fakeroot.fs
|
||||
FULL_DEVICE_TABLE = $(FS_DIR)/device_table.txt
|
||||
ROOTFS_DEVICE_TABLES = $(call qstrip,$(BR2_ROOTFS_DEVICE_TABLE) \
|
||||
$(BR2_ROOTFS_STATIC_DEVICE_TABLE))
|
||||
USERS_TABLE = $(FS_DIR)/users_table.txt
|
||||
|
||||
ROOTFS_USERS_TABLES = $(call qstrip,$(BR2_ROOTFS_USERS_TABLES))
|
||||
|
||||
ROOTFS_FULL_DEVICES_TABLE = $(FS_DIR)/full_devices_table.txt
|
||||
ROOTFS_FULL_USERS_TABLE = $(FS_DIR)/full_users_table.txt
|
||||
|
||||
ifeq ($(BR2_REPRODUCIBLE),y)
|
||||
define ROOTFS_REPRODUCIBLE
|
||||
find $(TARGET_DIR) -print0 | xargs -0 -r touch -hd @$(SOURCE_DATE_EPOCH)
|
||||
endef
|
||||
endif
|
||||
|
||||
ROOTFS_COMMON_DEPENDENCIES = \
|
||||
host-fakeroot host-makedevs \
|
||||
$(BR2_TAR_HOST_DEPENDENCY) \
|
||||
$(if $(PACKAGES_USERS)$(ROOTFS_USERS_TABLES),host-mkpasswd)
|
||||
|
||||
.PHONY: rootfs-common
|
||||
rootfs-common: $(ROOTFS_COMMON_DEPENDENCIES) target-finalize
|
||||
@$(call MESSAGE,"Generating root filesystems common tables")
|
||||
rm -rf $(FS_DIR)
|
||||
mkdir -p $(FS_DIR)
|
||||
|
||||
$(call PRINTF,$(PACKAGES_USERS)) >> $(ROOTFS_FULL_USERS_TABLE)
|
||||
ifneq ($(ROOTFS_USERS_TABLES),)
|
||||
cat $(ROOTFS_USERS_TABLES) >> $(ROOTFS_FULL_USERS_TABLE)
|
||||
endif
|
||||
|
||||
$(call PRINTF,$(PACKAGES_PERMISSIONS_TABLE)) > $(ROOTFS_FULL_DEVICES_TABLE)
|
||||
ifneq ($(ROOTFS_DEVICE_TABLES),)
|
||||
cat $(ROOTFS_DEVICE_TABLES) >> $(ROOTFS_FULL_DEVICES_TABLE)
|
||||
endif
|
||||
ifeq ($(BR2_ROOTFS_DEVICE_CREATION_STATIC),y)
|
||||
$(call PRINTF,$(PACKAGES_DEVICES_TABLE)) >> $(ROOTFS_FULL_DEVICES_TABLE)
|
||||
endif
|
||||
|
||||
rootfs-common-show-depends:
|
||||
@echo $(ROOTFS_COMMON_DEPENDENCIES)
|
||||
|
||||
# Since this function will be called from within an $(eval ...)
|
||||
# all variable references except the arguments must be $$-quoted.
|
||||
define inner-rootfs
|
||||
|
||||
# extra deps
|
||||
ROOTFS_$(2)_DEPENDENCIES += host-fakeroot host-makedevs \
|
||||
$$(if $$(PACKAGES_USERS)$$(ROOTFS_USERS_TABLES),host-mkpasswd)
|
||||
ROOTFS_$(2)_IMAGE_NAME ?= rootfs.$(1)
|
||||
ROOTFS_$(2)_FINAL_IMAGE_NAME = $$(strip $$(ROOTFS_$(2)_IMAGE_NAME))
|
||||
ROOTFS_$(2)_DIR = $$(FS_DIR)/$(1)
|
||||
ROOTFS_$(2)_TARGET_DIR = $$(ROOTFS_$(2)_DIR)/target
|
||||
|
||||
ROOTFS_$(2)_DEPENDENCIES += rootfs-common
|
||||
|
||||
ifeq ($$(BR2_TARGET_ROOTFS_$(2)_GZIP),y)
|
||||
ROOTFS_$(2)_COMPRESS_EXT = .gz
|
||||
@@ -72,42 +109,37 @@ ROOTFS_$(2)_COMPRESS_EXT = .xz
|
||||
ROOTFS_$(2)_COMPRESS_CMD = xz -9 -C crc32 -c
|
||||
endif
|
||||
|
||||
$$(BINARIES_DIR)/rootfs.$(1): target-finalize $$(ROOTFS_$(2)_DEPENDENCIES)
|
||||
@$$(call MESSAGE,"Generating root filesystem image rootfs.$(1)")
|
||||
rm -rf $(FS_DIR)
|
||||
mkdir -p $(FS_DIR)
|
||||
$$(foreach hook,$$(ROOTFS_$(2)_PRE_GEN_HOOKS),$$(call $$(hook))$$(sep))
|
||||
$$(BINARIES_DIR)/$$(ROOTFS_$(2)_FINAL_IMAGE_NAME): ROOTFS=$(2)
|
||||
$$(BINARIES_DIR)/$$(ROOTFS_$(2)_FINAL_IMAGE_NAME): FAKEROOT_SCRIPT=$$(ROOTFS_$(2)_DIR)/fakeroot
|
||||
$$(BINARIES_DIR)/$$(ROOTFS_$(2)_FINAL_IMAGE_NAME): $$(ROOTFS_$(2)_DEPENDENCIES)
|
||||
@$$(call MESSAGE,"Generating filesystem image $$(ROOTFS_$(2)_FINAL_IMAGE_NAME)")
|
||||
mkdir -p $$(@D)
|
||||
rm -rf $$(ROOTFS_$(2)_DIR)
|
||||
mkdir -p $$(ROOTFS_$(2)_DIR)
|
||||
rsync -auH \
|
||||
--exclude=/$$(notdir $$(TARGET_DIR_WARNING_FILE)) \
|
||||
$$(BASE_TARGET_DIR)/ \
|
||||
$$(TARGET_DIR)
|
||||
|
||||
echo '#!/bin/sh' > $$(FAKEROOT_SCRIPT)
|
||||
echo "set -e" >> $$(FAKEROOT_SCRIPT)
|
||||
|
||||
echo "chown -h -R 0:0 $$(TARGET_DIR)" >> $$(FAKEROOT_SCRIPT)
|
||||
ifneq ($$(ROOTFS_USERS_TABLES),)
|
||||
cat $$(ROOTFS_USERS_TABLES) >> $$(USERS_TABLE)
|
||||
endif
|
||||
$$(call PRINTF,$$(PACKAGES_USERS)) >> $$(USERS_TABLE)
|
||||
PATH=$$(BR_PATH) $$(TOPDIR)/support/scripts/mkusers $$(USERS_TABLE) $$(TARGET_DIR) >> $$(FAKEROOT_SCRIPT)
|
||||
ifneq ($$(ROOTFS_DEVICE_TABLES),)
|
||||
cat $$(ROOTFS_DEVICE_TABLES) > $$(FULL_DEVICE_TABLE)
|
||||
ifeq ($$(BR2_ROOTFS_DEVICE_CREATION_STATIC),y)
|
||||
$$(call PRINTF,$$(PACKAGES_DEVICES_TABLE)) >> $$(FULL_DEVICE_TABLE)
|
||||
endif
|
||||
endif
|
||||
$$(call PRINTF,$$(PACKAGES_PERMISSIONS_TABLE)) >> $$(FULL_DEVICE_TABLE)
|
||||
echo "$$(HOST_DIR)/bin/makedevs -d $$(FULL_DEVICE_TABLE) $$(TARGET_DIR)" >> $$(FAKEROOT_SCRIPT)
|
||||
PATH=$$(BR_PATH) $$(TOPDIR)/support/scripts/mkusers $$(ROOTFS_FULL_USERS_TABLE) $$(TARGET_DIR) >> $$(FAKEROOT_SCRIPT)
|
||||
echo "$$(HOST_DIR)/bin/makedevs -d $$(ROOTFS_FULL_DEVICES_TABLE) $$(TARGET_DIR)" >> $$(FAKEROOT_SCRIPT)
|
||||
$$(foreach s,$$(call qstrip,$$(BR2_ROOTFS_POST_FAKEROOT_SCRIPT)),\
|
||||
echo "echo '$$(TERM_BOLD)>>> Executing fakeroot script $$(s)$$(TERM_RESET)'" >> $$(FAKEROOT_SCRIPT); \
|
||||
echo $$(EXTRA_ENV) $$(s) $$(TARGET_DIR) $$(BR2_ROOTFS_POST_SCRIPT_ARGS) >> $$(FAKEROOT_SCRIPT)$$(sep))
|
||||
$$(foreach hook,$$(ROOTFS_PRE_CMD_HOOKS),\
|
||||
$$(call PRINTF,$$($$(hook))) >> $$(FAKEROOT_SCRIPT)$$(sep))
|
||||
ifeq ($$(BR2_REPRODUCIBLE),y)
|
||||
echo "find $$(TARGET_DIR) -print0 | xargs -0 -r touch -hd @$$(SOURCE_DATE_EPOCH)" >> $$(FAKEROOT_SCRIPT)
|
||||
endif
|
||||
$$(call PRINTF,$$(ROOTFS_$(2)_CMD)) >> $$(FAKEROOT_SCRIPT)
|
||||
$$(foreach hook,$$(ROOTFS_POST_CMD_HOOKS),\
|
||||
|
||||
$$(foreach hook,$$(ROOTFS_$(2)_PRE_GEN_HOOKS),\
|
||||
$$(call PRINTF,$$($$(hook))) >> $$(FAKEROOT_SCRIPT)$$(sep))
|
||||
$$(call PRINTF,$$(ROOTFS_REPRODUCIBLE)) >> $$(FAKEROOT_SCRIPT)
|
||||
$$(call PRINTF,$$(ROOTFS_$(2)_CMD)) >> $$(FAKEROOT_SCRIPT)
|
||||
chmod a+x $$(FAKEROOT_SCRIPT)
|
||||
rm -f $$(TARGET_DIR_WARNING_FILE)
|
||||
PATH=$$(BR_PATH) $$(HOST_DIR)/bin/fakeroot -- $$(FAKEROOT_SCRIPT)
|
||||
$$(INSTALL) -m 0644 support/misc/target-dir-warning.txt $$(TARGET_DIR_WARNING_FILE)
|
||||
$(Q)rm -rf $$(TARGET_DIR)
|
||||
ifneq ($$(ROOTFS_$(2)_COMPRESS_CMD),)
|
||||
PATH=$$(BR_PATH) $$(ROOTFS_$(2)_COMPRESS_CMD) $$@ > $$@$$(ROOTFS_$(2)_COMPRESS_EXT)
|
||||
endif
|
||||
@@ -116,7 +148,7 @@ endif
|
||||
rootfs-$(1)-show-depends:
|
||||
@echo $$(ROOTFS_$(2)_DEPENDENCIES)
|
||||
|
||||
rootfs-$(1): $$(BINARIES_DIR)/rootfs.$(1)
|
||||
rootfs-$(1): $$(BINARIES_DIR)/$$(ROOTFS_$(2)_FINAL_IMAGE_NAME)
|
||||
|
||||
.PHONY: rootfs-$(1) rootfs-$(1)-show-depends
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
config BR2_TARGET_ROOTFS_CPIO
|
||||
bool "cpio the root filesystem (for use as an initial RAM filesystem)"
|
||||
help
|
||||
Build a cpio archive of the root filesystem. This is typically
|
||||
used for an initial RAM filesystem that is passed to the kernel
|
||||
by the bootloader.
|
||||
Build a cpio archive of the root filesystem. This is typically
|
||||
used for an initial RAM filesystem that is passed to the
|
||||
kernel by the bootloader.
|
||||
|
||||
if BR2_TARGET_ROOTFS_CPIO
|
||||
|
||||
|
||||
@@ -15,14 +15,16 @@ endef
|
||||
else
|
||||
# devtmpfs does not get automounted when initramfs is used.
|
||||
# Add a pre-init script to mount it before running init
|
||||
# We must have /dev/console very early, even before /init runs,
|
||||
# for stdin/stdout/stderr
|
||||
define ROOTFS_CPIO_ADD_INIT
|
||||
if [ ! -e $(TARGET_DIR)/init ]; then \
|
||||
$(INSTALL) -m 0755 fs/cpio/init $(TARGET_DIR)/init; \
|
||||
fi
|
||||
mkdir -p $(TARGET_DIR)/dev
|
||||
mknod -m 0622 $(TARGET_DIR)/dev/console c 5 1
|
||||
endef
|
||||
|
||||
PACKAGES_PERMISSIONS_TABLE += /dev/console c 622 0 0 5 1 - - -$(sep)
|
||||
|
||||
endif # BR2_ROOTFS_DEVICE_CREATION_STATIC
|
||||
|
||||
ROOTFS_CPIO_PRE_GEN_HOOKS += ROOTFS_CPIO_ADD_INIT
|
||||
|
||||
@@ -3,4 +3,24 @@ config BR2_TARGET_ROOTFS_CRAMFS
|
||||
help
|
||||
Build a cramfs root filesystem
|
||||
|
||||
http://sourceforge.net/projects/cramfs/
|
||||
https://github.com/npitre/cramfs-tools
|
||||
|
||||
if BR2_TARGET_ROOTFS_CRAMFS
|
||||
|
||||
config BR2_TARGET_ROOTFS_CRAMFS_XIP
|
||||
bool "Support XIP of all ELF files"
|
||||
help
|
||||
For ELF files, uncompressed and properly aligned data blocks
|
||||
will be automatically be mapped directly into user space
|
||||
whenever possible providing eXecute-In-Place (XIP) from ROM
|
||||
of read-only segments. Data segments mapped read-write
|
||||
(hence they have to be copied to RAM) may still be
|
||||
compressed in the cramfs image in the same file along with
|
||||
non compressed read-only segments. Both MMU and no-MMU
|
||||
systems are supported. This is particularly handy for tiny
|
||||
embedded systems with very tight memory constraints.
|
||||
|
||||
The CRAMFS_MTD Kconfig option must also be enabled in a
|
||||
4.15+ kernel.
|
||||
|
||||
endif # BR2_TARGET_ROOTFS_CRAMFS
|
||||
|
||||
@@ -5,9 +5,17 @@
|
||||
################################################################################
|
||||
|
||||
ifeq ($(BR2_ENDIAN),"BIG")
|
||||
CRAMFS_OPTS = -b
|
||||
CRAMFS_OPTS = -B
|
||||
else
|
||||
CRAMFS_OPTS = -l
|
||||
CRAMFS_OPTS = -L
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TARGET_ROOTFS_CRAMFS_XIP),y)
|
||||
ifeq ($(BR2_USE_MMU),y)
|
||||
CRAMFS_OPTS += -X -X
|
||||
else
|
||||
CRAMFS_OPTS += -X
|
||||
endif
|
||||
endif
|
||||
|
||||
define ROOTFS_CRAMFS_CMD
|
||||
|
||||
@@ -49,11 +49,11 @@ config BR2_TARGET_ROOTFS_EXT2_SIZE
|
||||
default BR2_TARGET_ROOTFS_EXT2_BLOCKS if BR2_TARGET_ROOTFS_EXT2_BLOCKS_WRAP # legacy 2017.08
|
||||
default "60M"
|
||||
help
|
||||
The size of the filesystem image. If it does not have a suffix,
|
||||
it is interpreted as power-of-two kilobytes. If it is suffixed
|
||||
by 'k', 'm', 'g', 't' (either upper-case or lower-case), then
|
||||
it is interpreted in power-of-two kilobytes, megabytes,
|
||||
gigabytes, terabytes, etc.
|
||||
The size of the filesystem image. If it does not have a
|
||||
suffix, it is interpreted as power-of-two kilobytes. If it is
|
||||
suffixed by 'k', 'm', 'g', 't' (either upper-case or
|
||||
lower-case), then it is interpreted in power-of-two kilobytes,
|
||||
megabytes, gigabytes, terabytes, etc.
|
||||
|
||||
config BR2_TARGET_ROOTFS_EXT2_INODES
|
||||
int "exact number of inodes (leave at 0 for auto calculation)"
|
||||
@@ -65,15 +65,16 @@ config BR2_TARGET_ROOTFS_EXT2_RESBLKS
|
||||
help
|
||||
The number of blocks on the filesystem (as a percentage of the
|
||||
total number of blocks), that are reserved for use by root.
|
||||
Traditionally, this has been 5%, and all ext-related tools still
|
||||
default to reserving 5% when creating a new ext filesystem.
|
||||
Traditionally, this has been 5%, and all ext-related tools
|
||||
still default to reserving 5% when creating a new ext
|
||||
filesystem.
|
||||
|
||||
config BR2_TARGET_ROOTFS_EXT2_MKFS_OPTIONS
|
||||
string "additional mke2fs options"
|
||||
default "-O ^64bit"
|
||||
help
|
||||
Specify a space-separated list of mke2fs options, including any
|
||||
ext2/3/4 filesystem features.
|
||||
Specify a space-separated list of mke2fs options, including
|
||||
any ext2/3/4 filesystem features.
|
||||
|
||||
For more information about the mke2fs options, see the manual
|
||||
page mke2fs(8).
|
||||
@@ -91,7 +92,8 @@ choice
|
||||
prompt "Compression method"
|
||||
default BR2_TARGET_ROOTFS_EXT2_NONE
|
||||
help
|
||||
Select compressor for ext2/3/4 filesystem of the root filesystem
|
||||
Select compressor for ext2/3/4 filesystem of the root
|
||||
filesystem
|
||||
|
||||
config BR2_TARGET_ROOTFS_EXT2_NONE
|
||||
bool "no compression"
|
||||
|
||||
59
bsp/buildroot/fs/f2fs/Config.in
Normal file
59
bsp/buildroot/fs/f2fs/Config.in
Normal file
@@ -0,0 +1,59 @@
|
||||
config BR2_TARGET_ROOTFS_F2FS
|
||||
bool "f2fs root filesystem"
|
||||
select BR2_PACKAGE_HOST_F2FS_TOOLS
|
||||
help
|
||||
Build a f2fs root filesystem. If you enable this option, you
|
||||
probably want to enable the f2fs-tools package too.
|
||||
|
||||
if BR2_TARGET_ROOTFS_F2FS
|
||||
|
||||
config BR2_TARGET_ROOTFS_F2FS_LABEL
|
||||
string "filesystem label"
|
||||
|
||||
config BR2_TARGET_ROOTFS_F2FS_SIZE
|
||||
string "filesystem size"
|
||||
default "100M"
|
||||
help
|
||||
The size of the filesystem image in bytes.
|
||||
Suffix with K, M, G or T for power-of-two kilo-, mega-, giga-
|
||||
or terabytes.
|
||||
|
||||
config BR2_TARGET_ROOTFS_F2FS_COLD_FILES
|
||||
string "extension list for cold files"
|
||||
help
|
||||
Specify a comma separated file extension list in order f2fs
|
||||
to treat them as cold files. The default list includes most
|
||||
of multimedia file extensions such as jpg, gif, mpeg, mkv,
|
||||
and so on.
|
||||
|
||||
config BR2_TARGET_ROOTFS_F2FS_HOT_FILES
|
||||
string "extension list for hot files"
|
||||
help
|
||||
Specify a comma separated file extension list in order f2fs
|
||||
to treat them as hot files. The default list includes only
|
||||
a db extension.
|
||||
|
||||
config BR2_TARGET_ROOTFS_F2FS_OVERPROVISION
|
||||
int "overprovision ratio"
|
||||
default 0
|
||||
help
|
||||
The percentage over the volume size for overprovision
|
||||
area. This area is hidden to users, and utilized by F2FS
|
||||
cleaner.
|
||||
|
||||
Leave at 0 for autocalculation according to the partition
|
||||
size.
|
||||
|
||||
config BR2_TARGET_ROOTFS_F2FS_DISCARD
|
||||
bool "discard policy"
|
||||
default y
|
||||
help
|
||||
Enable or disable discard policy.
|
||||
|
||||
config BR2_TARGET_ROOTFS_F2FS_FEATURES
|
||||
string "filesystem features"
|
||||
help
|
||||
List of features that the F2FS filesystem should support
|
||||
(e.g "encrypt")
|
||||
|
||||
endif # BR2_TARGET_ROOTFS_F2FS
|
||||
45
bsp/buildroot/fs/f2fs/f2fs.mk
Normal file
45
bsp/buildroot/fs/f2fs/f2fs.mk
Normal file
@@ -0,0 +1,45 @@
|
||||
################################################################################
|
||||
#
|
||||
# Build the f2fs root filesystem image
|
||||
#
|
||||
################################################################################
|
||||
|
||||
F2FS_SIZE = $(call qstrip,$(BR2_TARGET_ROOTFS_F2FS_SIZE))
|
||||
ifeq ($(BR2_TARGET_ROOTFS_F2FS)-$(F2FS_SIZE),y-)
|
||||
$(error BR2_TARGET_ROOTFS_F2FS_SIZE cannot be empty)
|
||||
endif
|
||||
|
||||
# qstrip results in stripping consecutive spaces into a single one. So the
|
||||
# variable is not qstrip-ed to preserve the integrity of the string value.
|
||||
F2FS_LABEL := $(subst ",,$(BR2_TARGET_ROOTFS_F2FS_LABEL))
|
||||
# ")
|
||||
F2FS_COLD_FILES = $(call qstrip,$(BR2_TARGET_ROOTFS_F2FS_COLD_FILES))
|
||||
F2FS_HOT_FILES = $(call qstrip,$(BR2_TARGET_ROOTFS_F2FS_HOT_FILES))
|
||||
|
||||
ifeq ($(BR2_TARGET_ROOTFS_F2FS_DISCARD),y)
|
||||
F2FS_DISCARD = 1
|
||||
else
|
||||
F2FS_DISCARD = 0
|
||||
endif
|
||||
|
||||
F2FS_FEATURES = $(call qstrip,$(BR2_TARGET_ROOTFS_F2FS_FEATURES))
|
||||
|
||||
F2FS_OPTS = \
|
||||
-f \
|
||||
-l "$(F2FS_LABEL)" \
|
||||
-t $(F2FS_DISCARD) \
|
||||
-o $(BR2_TARGET_ROOTFS_F2FS_OVERPROVISION) \
|
||||
$(if $(F2FS_COLD_FILES),-e "$(F2FS_COLD_FILES)") \
|
||||
$(if $(F2FS_HOT_FILES),-E "$(F2FS_HOT_FILES)") \
|
||||
$(if $(F2FS_FEATURES),-O "$(F2FS_FEATURES)")
|
||||
|
||||
ROOTFS_F2FS_DEPENDENCIES = host-f2fs-tools
|
||||
|
||||
define ROOTFS_F2FS_CMD
|
||||
$(RM) -f $@
|
||||
truncate -s $(F2FS_SIZE) $@
|
||||
$(HOST_DIR)/sbin/mkfs.f2fs $(F2FS_OPTS) $@
|
||||
$(HOST_DIR)/sbin/sload.f2fs -f $(TARGET_DIR) $@
|
||||
endef
|
||||
|
||||
$(eval $(rootfs))
|
||||
@@ -10,7 +10,8 @@ config BR2_TARGET_ROOTFS_INITRAMFS
|
||||
A rootfs.cpio file will be generated in the images/ directory.
|
||||
This is the archive that will be included in the kernel image.
|
||||
The default rootfs compression set in the kernel configuration
|
||||
is used, regardless of how buildroot's cpio archive is configured.
|
||||
is used, regardless of how buildroot's cpio archive is
|
||||
configured.
|
||||
|
||||
Note that enabling initramfs together with another filesystem
|
||||
formats doesn't make sense: you would end up having two
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
################################################################################
|
||||
#
|
||||
# Build a kernel with an integrated initial ramdisk
|
||||
# filesystem based on cpio.
|
||||
# Build a kernel with an integrated initial ramdisk filesystem based on cpio.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
|
||||
@@ -35,47 +35,47 @@ ROOTFS_ISO9660_USE_INITRD = YES
|
||||
endif
|
||||
|
||||
ifeq ($(ROOTFS_ISO9660_USE_INITRD),YES)
|
||||
ROOTFS_ISO9660_TARGET_DIR = $(FS_DIR)/rootfs.iso9660.tmp
|
||||
ROOTFS_ISO9660_TMP_TARGET_DIR = $(FS_DIR)/rootfs.iso9660.tmp
|
||||
define ROOTFS_ISO9660_CREATE_TEMPDIR
|
||||
$(RM) -rf $(ROOTFS_ISO9660_TARGET_DIR)
|
||||
mkdir -p $(ROOTFS_ISO9660_TARGET_DIR)
|
||||
$(RM) -rf $(ROOTFS_ISO9660_TMP_TARGET_DIR)
|
||||
mkdir -p $(ROOTFS_ISO9660_TMP_TARGET_DIR)
|
||||
endef
|
||||
ROOTFS_ISO9660_PRE_GEN_HOOKS += ROOTFS_ISO9660_CREATE_TEMPDIR
|
||||
else ifeq ($(BR2_TARGET_ROOTFS_ISO9660_TRANSPARENT_COMPRESSION),y)
|
||||
ROOTFS_ISO9660_DEPENDENCIES += host-zisofs-tools
|
||||
ROOTFS_ISO9660_TARGET_DIR = $(FS_DIR)/rootfs.iso9660.tmp
|
||||
ROOTFS_ISO9660_TMP_TARGET_DIR = $(FS_DIR)/rootfs.iso9660.tmp
|
||||
# This must be early, before we copy the bootloader files.
|
||||
define ROOTFS_ISO9660_MKZFTREE
|
||||
$(RM) -rf $(ROOTFS_ISO9660_TARGET_DIR)
|
||||
$(RM) -rf $(ROOTFS_ISO9660_TMP_TARGET_DIR)
|
||||
$(HOST_DIR)/bin/mkzftree -X -z 9 -p $(PARALLEL_JOBS) \
|
||||
$(TARGET_DIR) \
|
||||
$(ROOTFS_ISO9660_TARGET_DIR)
|
||||
$(ROOTFS_ISO9660_TMP_TARGET_DIR)
|
||||
endef
|
||||
ROOTFS_ISO9660_PRE_GEN_HOOKS += ROOTFS_ISO9660_MKZFTREE
|
||||
ROOTFS_ISO9660_GENISOIMAGE_OPTS += -z
|
||||
else
|
||||
ROOTFS_ISO9660_TARGET_DIR = $(TARGET_DIR)
|
||||
ROOTFS_ISO9660_TMP_TARGET_DIR = $(TARGET_DIR)
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TARGET_ROOTFS_ISO9660_GRUB2),y)
|
||||
ROOTFS_ISO9660_DEPENDENCIES += grub2
|
||||
ROOTFS_ISO9660_BOOTLOADER_CONFIG_PATH = \
|
||||
$(ROOTFS_ISO9660_TARGET_DIR)/boot/grub/grub.cfg
|
||||
$(ROOTFS_ISO9660_TMP_TARGET_DIR)/boot/grub/grub.cfg
|
||||
ROOTFS_ISO9660_BOOT_IMAGE = boot/grub/grub-eltorito.img
|
||||
define ROOTFS_ISO9660_INSTALL_BOOTLOADER
|
||||
$(INSTALL) -D -m 0644 $(BINARIES_DIR)/grub-eltorito.img \
|
||||
$(ROOTFS_ISO9660_TARGET_DIR)/boot/grub/grub-eltorito.img
|
||||
$(ROOTFS_ISO9660_TMP_TARGET_DIR)/boot/grub/grub-eltorito.img
|
||||
endef
|
||||
else ifeq ($(BR2_TARGET_ROOTFS_ISO9660_ISOLINUX),y)
|
||||
ROOTFS_ISO9660_DEPENDENCIES += syslinux
|
||||
ROOTFS_ISO9660_BOOTLOADER_CONFIG_PATH = \
|
||||
$(ROOTFS_ISO9660_TARGET_DIR)/isolinux/isolinux.cfg
|
||||
$(ROOTFS_ISO9660_TMP_TARGET_DIR)/isolinux/isolinux.cfg
|
||||
ROOTFS_ISO9660_BOOT_IMAGE = isolinux/isolinux.bin
|
||||
define ROOTFS_ISO9660_INSTALL_BOOTLOADER
|
||||
$(INSTALL) -D -m 0644 $(BINARIES_DIR)/syslinux/* \
|
||||
$(ROOTFS_ISO9660_TARGET_DIR)/isolinux/
|
||||
$(ROOTFS_ISO9660_TMP_TARGET_DIR)/isolinux/
|
||||
$(INSTALL) -D -m 0644 $(HOST_DIR)/share/syslinux/ldlinux.c32 \
|
||||
$(ROOTFS_ISO9660_TARGET_DIR)/isolinux/ldlinux.c32
|
||||
$(ROOTFS_ISO9660_TMP_TARGET_DIR)/isolinux/ldlinux.c32
|
||||
endef
|
||||
endif
|
||||
|
||||
@@ -96,7 +96,7 @@ endef
|
||||
# Copy the kernel to temporary filesystem
|
||||
define ROOTFS_ISO9660_COPY_KERNEL
|
||||
$(INSTALL) -D -m 0644 $(LINUX_IMAGE_PATH) \
|
||||
$(ROOTFS_ISO9660_TARGET_DIR)/boot/$(LINUX_IMAGE_NAME)
|
||||
$(ROOTFS_ISO9660_TMP_TARGET_DIR)/boot/$(LINUX_IMAGE_NAME)
|
||||
endef
|
||||
|
||||
ifeq ($(ROOTFS_ISO9660_USE_INITRD),YES)
|
||||
@@ -111,7 +111,7 @@ else
|
||||
ROOTFS_ISO9660_DEPENDENCIES += rootfs-cpio
|
||||
define ROOTFS_ISO9660_COPY_INITRD
|
||||
$(INSTALL) -D -m 0644 $(BINARIES_DIR)/rootfs.cpio$(ROOTFS_CPIO_COMPRESS_EXT) \
|
||||
$(ROOTFS_ISO9660_TARGET_DIR)/boot/initrd
|
||||
$(ROOTFS_ISO9660_TMP_TARGET_DIR)/boot/initrd
|
||||
$(SED) "s%__INITRD_PATH__%/boot/initrd%" \
|
||||
$(ROOTFS_ISO9660_BOOTLOADER_CONFIG_PATH)
|
||||
endef
|
||||
@@ -128,12 +128,11 @@ ROOTFS_ISO9660_PRE_GEN_HOOKS += ROOTFS_ISO9660_DISABLE_EXTERNAL_INITRD
|
||||
|
||||
endif # ROOTFS_ISO9660_USE_INITRD
|
||||
|
||||
|
||||
define ROOTFS_ISO9660_CMD
|
||||
$(HOST_DIR)/bin/genisoimage -J -R -b $(ROOTFS_ISO9660_BOOT_IMAGE) \
|
||||
-no-emul-boot -boot-load-size 4 -boot-info-table \
|
||||
$(ROOTFS_ISO9660_GENISOIMAGE_OPTS) \
|
||||
-o $@ $(ROOTFS_ISO9660_TARGET_DIR)
|
||||
-o $@ $(ROOTFS_ISO9660_TMP_TARGET_DIR)
|
||||
endef
|
||||
|
||||
ifeq ($(BR2_TARGET_ROOTFS_ISO9660_HYBRID),y)
|
||||
|
||||
@@ -38,8 +38,8 @@ endchoice
|
||||
|
||||
config BR2_TARGET_ROOTFS_JFFS2_CUSTOM_EBSIZE
|
||||
hex "Erase block size"
|
||||
depends on BR2_TARGET_ROOTFS_JFFS2_CUSTOM
|
||||
default 0x20000
|
||||
depends on BR2_TARGET_ROOTFS_JFFS2_CUSTOM
|
||||
help
|
||||
Set to erase size of memory
|
||||
|
||||
@@ -68,8 +68,8 @@ config BR2_TARGET_ROOTFS_JFFS2_PAD
|
||||
|
||||
config BR2_TARGET_ROOTFS_JFFS2_PADSIZE
|
||||
hex "Pad output size (0x0 = to end of EB)"
|
||||
depends on BR2_TARGET_ROOTFS_JFFS2_PAD
|
||||
default 0x0
|
||||
depends on BR2_TARGET_ROOTFS_JFFS2_PAD
|
||||
help
|
||||
Set to 0x0 to pad to end of erase block.
|
||||
|
||||
@@ -94,19 +94,20 @@ config BR2_TARGET_ROOTFS_JFFS2_SUMMARY
|
||||
config BR2_TARGET_ROOTFS_JFFS2_USE_CUSTOM_PAGESIZE
|
||||
bool "Select custom virtual memory page size"
|
||||
help
|
||||
Use a custom virtual memory page size. Note that this is not related to
|
||||
the flash memory page size. Using this option is only needed if Linux is
|
||||
configured to use a page size different than 4kB.
|
||||
|
||||
Use a custom virtual memory page size. Note that this is not
|
||||
related to the flash memory page size. Using this option is
|
||||
only needed if Linux is configured to use a page size
|
||||
different than 4kB.
|
||||
|
||||
config BR2_TARGET_ROOTFS_JFFS2_CUSTOM_PAGESIZE
|
||||
hex "Virtual memory page size"
|
||||
depends on BR2_TARGET_ROOTFS_JFFS2_USE_CUSTOM_PAGESIZE
|
||||
default 0x1000
|
||||
depends on BR2_TARGET_ROOTFS_JFFS2_USE_CUSTOM_PAGESIZE
|
||||
help
|
||||
Set to virtual memory page size of target system (in bytes). This value
|
||||
should match the virtual page size in Linux (i.e. this should have the
|
||||
same value as the value of the PAGE_SIZE macro in Linux). It is not
|
||||
related to the flash memory page size.
|
||||
Set to virtual memory page size of target system (in bytes).
|
||||
This value should match the virtual page size in Linux (i.e.
|
||||
this should have the same value as the value of the PAGE_SIZE
|
||||
macro in Linux). It is not related to the flash memory page
|
||||
size.
|
||||
|
||||
endif
|
||||
|
||||
@@ -27,5 +27,8 @@ config BR2_TARGET_ROOTFS_SQUASHFS4_LZO
|
||||
config BR2_TARGET_ROOTFS_SQUASHFS4_XZ
|
||||
bool "xz"
|
||||
|
||||
config BR2_TARGET_ROOTFS_SQUASHFS4_ZSTD
|
||||
bool "zstd"
|
||||
|
||||
endchoice
|
||||
endif
|
||||
|
||||
@@ -16,6 +16,8 @@ else ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS4_LZMA),y)
|
||||
ROOTFS_SQUASHFS_ARGS += -comp lzma
|
||||
else ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS4_XZ),y)
|
||||
ROOTFS_SQUASHFS_ARGS += -comp xz
|
||||
else ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS4_ZSTD),y)
|
||||
ROOTFS_SQUASHFS_ARGS += -comp zstd
|
||||
else
|
||||
ROOTFS_SQUASHFS_ARGS += -comp gzip
|
||||
endif
|
||||
|
||||
@@ -50,8 +50,8 @@ endchoice
|
||||
|
||||
config BR2_TARGET_ROOTFS_TAR_OPTIONS
|
||||
string "other random options to pass to tar"
|
||||
depends on BR2_TARGET_ROOTFS_TAR
|
||||
default ""
|
||||
depends on BR2_TARGET_ROOTFS_TAR
|
||||
help
|
||||
Any other flags you want to pass to tar
|
||||
Refer to tar --help for details
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
|
||||
TAR_OPTS := $(call qstrip,$(BR2_TARGET_ROOTFS_TAR_OPTIONS))
|
||||
|
||||
ROOTFS_TAR_DEPENDENCIES = $(BR2_TAR_HOST_DEPENDENCY)
|
||||
|
||||
define ROOTFS_TAR_CMD
|
||||
(cd $(TARGET_DIR); find -print0 | LC_ALL=C sort -z | \
|
||||
tar $(TAR_OPTS) -cf $@ --null --xattrs-include='*' --no-recursion -T - --numeric-owner)
|
||||
|
||||
@@ -18,8 +18,9 @@ config BR2_TARGET_ROOTFS_UBI_SUBSIZE
|
||||
int "sub-page size"
|
||||
default 512
|
||||
help
|
||||
Tells ubinize that the flash supports sub-pages and the sub-page
|
||||
size. Use 0 if sub-pages are not supported on flash chip.
|
||||
Tells ubinize that the flash supports sub-pages and the
|
||||
sub-page size. Use 0 if sub-pages are not supported on flash
|
||||
chip.
|
||||
The value provided here is passed to the -s/--sub-page-size
|
||||
option of ubinize.
|
||||
|
||||
@@ -28,9 +29,9 @@ config BR2_TARGET_ROOTFS_UBI_USE_CUSTOM_CONFIG
|
||||
help
|
||||
Select this option to use a custom ubinize configuration file,
|
||||
rather than the default configuration used by Buildroot (which
|
||||
defines a single dynamic volume marked as auto-resize). Passing
|
||||
a custom ubinize configuration file allows you to create several
|
||||
volumes, specify volume types, etc.
|
||||
defines a single dynamic volume marked as auto-resize).
|
||||
Passing a custom ubinize configuration file allows you to
|
||||
create several volumes, specify volume types, etc.
|
||||
|
||||
As a convenience, buildroot replaces the string
|
||||
"BR2_ROOTFS_UBIFS_PATH" with the path to the built ubifs file.
|
||||
|
||||
@@ -15,16 +15,16 @@ UBI_UBINIZE_OPTS += $(call qstrip,$(BR2_TARGET_ROOTFS_UBI_OPTS))
|
||||
ROOTFS_UBI_DEPENDENCIES = rootfs-ubifs
|
||||
|
||||
ifeq ($(BR2_TARGET_ROOTFS_UBI_USE_CUSTOM_CONFIG),y)
|
||||
UBINIZE_CONFIG_FILE_PATH = $(call qstrip,$(BR2_TARGET_ROOTFS_UBI_CUSTOM_CONFIG_FILE))
|
||||
UBI_UBINIZE_CONFIG_FILE_PATH = $(call qstrip,$(BR2_TARGET_ROOTFS_UBI_CUSTOM_CONFIG_FILE))
|
||||
else
|
||||
UBINIZE_CONFIG_FILE_PATH = fs/ubi/ubinize.cfg
|
||||
UBI_UBINIZE_CONFIG_FILE_PATH = fs/ubi/ubinize.cfg
|
||||
endif
|
||||
|
||||
# don't use sed -i as it misbehaves on systems with SELinux enabled when this is
|
||||
# executed through fakeroot (see #9386)
|
||||
define ROOTFS_UBI_CMD
|
||||
sed 's;BR2_ROOTFS_UBIFS_PATH;$@fs;' \
|
||||
$(UBINIZE_CONFIG_FILE_PATH) > $(BUILD_DIR)/ubinize.cfg
|
||||
$(UBI_UBINIZE_CONFIG_FILE_PATH) > $(BUILD_DIR)/ubinize.cfg
|
||||
$(HOST_DIR)/sbin/ubinize -o $@ $(UBI_UBINIZE_OPTS) $(BUILD_DIR)/ubinize.cfg
|
||||
rm $(BUILD_DIR)/ubinize.cfg
|
||||
endef
|
||||
|
||||
Reference in New Issue
Block a user