###############################################################################
comment "Legacy options removed in 2017.05"
+config BR2_TARGET_ROOTFS_EXT2_EXTRA_BLOCKS
+ int "extra size in blocks has been removed"
+ default 0
+ help
+ Since the support for auto calculation of the filesystem size has been
+ removed, this option is now useless and must be 0.
+ You may want to check that BR2_TARGET_ROOTFS_EXT2_BLOCKS matchs
+ your needs.
+
+config BR2_TARGET_ROOTFS_EXT2_EXTRA_BLOCKS_WRAP
+ bool
+ default y if BR2_TARGET_ROOTFS_EXT2_EXTRA_BLOCKS != 0
+ select BR2_LEGACY
+
config BR2_PACKAGE_SYSTEMD_KDBUS
bool "systemd-kdbus has been removed"
select BR2_LEGACY
config BR2_TARGET_ROOTFS_EXT2_LABEL
string "filesystem label"
+# 61440 = 60MB, i.e usually small enough to fit on a 64MB media
config BR2_TARGET_ROOTFS_EXT2_BLOCKS
- int "exact size in blocks (leave at 0 for auto calculation)"
- default 0
+ int "exact size in blocks"
+ default 61440
config BR2_TARGET_ROOTFS_EXT2_INODES
int "exact number of inodes (leave at 0 for auto calculation)"
default 0
-config BR2_TARGET_ROOTFS_EXT2_EXTRA_BLOCKS
- int "extra size in blocks" if BR2_TARGET_ROOTFS_EXT2_BLOCKS = 0
- default 0
- help
- Enter here the number of extra blocks of free space you
- want on your filesystem. By default, Buildroot will not
- leave much space free.
-
config BR2_TARGET_ROOTFS_EXT2_EXTRA_INODES
int "extra inodes" if BR2_TARGET_ROOTFS_EXT2_INODES = 0
default 0
ifneq ($(strip $(BR2_TARGET_ROOTFS_EXT2_BLOCKS)),0)
EXT2_OPTS += -b $(BR2_TARGET_ROOTFS_EXT2_BLOCKS)
endif
-EXT2_OPTS += -B $(BR2_TARGET_ROOTFS_EXT2_EXTRA_BLOCKS)
ifneq ($(strip $(BR2_TARGET_ROOTFS_EXT2_INODES)),0)
EXT2_OPTS += -i $(BR2_TARGET_ROOTFS_EXT2_INODES)
# Default values
gen=2
rev=1
- nb_extra_blocks=0
nb_extra_inodes=0
- while getopts :hb:B:i:I:r:d:o:G:R:l:u: OPT; do
+ while getopts :hb:i:I:r:d:o:G:R:l:u: OPT; do
case "${OPT}" in
h) help; exit 0;;
b) nb_blocks=${OPTARG};;
- B) nb_extra_blocks=${OPTARG};;
i) nb_inodes=${OPTARG};;
I) nb_extra_inodes=${OPTARG};;
r) nb_res_blocks=${OPTARG};;
fi
nb_inodes=$((nb_inodes+nb_extra_inodes))
- # calculate needed blocks
- if [ -z "${nb_blocks}" ]; then
- # size ~= superblock, block+inode bitmaps, inodes (8 per block),
- # blocks; we scale inodes / blocks with 10% to compensate for
- # bitmaps size + slack
- nb_blocks=$(du -s -k "${root_dir}" |sed -r -e 's/[[:space:]]+.*$//')
- nb_blocks=$((500+(nb_blocks+nb_inodes/8)*11/10))
- if [ ${gen} -ge 3 ]; then
- # we add 1300 blocks (a bit more than 1 MiB, assuming 1KiB blocks)
- # for the journal
- # Note: I came to 1300 blocks after trial-and-error checks. YMMV.
- nb_blocks=$((nb_blocks+1300))
- fi
- fi
- nb_blocks=$((nb_blocks+nb_extra_blocks))
-
# Upgrade to rev1 if needed
if [ ${rev} -ge 1 ]; then
tune2fs_O_opts+=",filetype,sparse_super"