if BR2_TARGET_ROOTFS_EXT2
+config BR2_TARGET_ROOTFS_EXT2_2
+ bool
+
choice
bool "ext2/3/4 variant"
- default BR2_TARGET_ROOTFS_EXT2_2
+ default BR2_TARGET_ROOTFS_EXT2_2r0
-config BR2_TARGET_ROOTFS_EXT2_2
- bool "ext2"
+config BR2_TARGET_ROOTFS_EXT2_2r0
+ bool "ext2 (rev0)"
+ select BR2_TARGET_ROOTFS_EXT2_2
+
+config BR2_TARGET_ROOTFS_EXT2_2r1
+ bool "ext2 (rev1)"
+ select BR2_TARGET_ROOTFS_EXT2_2
config BR2_TARGET_ROOTFS_EXT2_3
bool "ext3"
default 3 if BR2_TARGET_ROOTFS_EXT2_3
default 4 if BR2_TARGET_ROOTFS_EXT2_4
+# All ext generations are revision 1, except ext2r0, which is revision 0
+config BR2_TARGET_ROOTFS_EXT2_REV
+ int
+ default 0 if BR2_TARGET_ROOTFS_EXT2_2r0
+ default 1 if !BR2_TARGET_ROOTFS_EXT2_2r0
+
config BR2_TARGET_ROOTFS_EXT2_BLOCKS
int "size in blocks (leave at 0 for auto calculation)"
default 0
ROOTFS_EXT2_DEPENDENCIES = host-genext2fs host-e2fsprogs
-EXT2_ENV = GEN=$(BR2_TARGET_ROOTFS_EXT2_GEN)
+EXT2_ENV = GEN=$(BR2_TARGET_ROOTFS_EXT2_GEN)
+EXT2_ENV += REV=$(BR2_TARGET_ROOTFS_EXT2_REV)
define ROOTFS_EXT2_CMD
PATH=$(TARGET_PATH) $(EXT2_ENV) fs/ext2/genext2fs.sh -d $(TARGET_DIR) $(EXT2_OPTS) $@
}
# Check we know what generation to generate
-case "${GEN}" in
- 2|3|4)
+case "${GEN}:${REV}" in
+ 2:0|2:1|3:1|4:1)
;;
*)
- printf "%s: unknown ext generation to generate\n" "${0##*/}" >&2
+ printf "%s: unknown ext generation '%s' and/or revision '%s'\n" \
+ "${0##*/}" "${GEN}" "${REV}" >&2
exit 1
;;
esac
+# Upgrade to rev1 if needed
+if [ ${REV} -ge 1 ]; then
+ EXT_OPTS_O="${EXT_OPTS_O},filetype"
+fi
+
# Add a journal for ext3 and above
if [ ${GEN} -ge 3 ]; then
EXT_OPTS="${EXT_OPTS} -j -J size=1"