diff options
author | Yann E. MORIN <yann.morin.1998@free.fr> | 2013-04-11 12:17:53 +0000 |
---|---|---|
committer | Peter Korsgaard <jacmet@sunsite.dk> | 2013-04-12 14:43:22 +0200 |
commit | 5fd27fc84998c6683728353f57dc7c6000e5b4c3 (patch) | |
tree | 37211ef76e8f92096174cc1f267aff3a304f5054 /fs/ext2/genext2fs.sh | |
parent | aaefab09c7573f81a83c164ce2daca35b6a420e6 (diff) | |
download | buildroot-novena-5fd27fc84998c6683728353f57dc7c6000e5b4c3.tar.gz buildroot-novena-5fd27fc84998c6683728353f57dc7c6000e5b4c3.zip |
fs/ext2: add support for ext2 rev0 and rev1
Some bootloaders have a buggy ext2 support, and require ext2 rev1
instead of the traditional ext2 rev0 that genext2fs produces.
tune2fs accepts only one '-O list' at a time, so we need to construct
a list of -O options.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Arnout Vandecappelle <arnout@mind.be>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'fs/ext2/genext2fs.sh')
-rwxr-xr-x | fs/ext2/genext2fs.sh | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/fs/ext2/genext2fs.sh b/fs/ext2/genext2fs.sh index c2049f56c..76f454c3c 100755 --- a/fs/ext2/genext2fs.sh +++ b/fs/ext2/genext2fs.sh @@ -78,15 +78,21 @@ e2tunefsck() { } # 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" |