Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_ext4_options in emmc/functions.sh doesn't disable metadata_csum/64bit on buster image #105

Open
az143 opened this issue Nov 19, 2019 · 1 comment

Comments

@az143
Copy link

az143 commented Nov 19, 2019

the code in question checks if mkeXfs version 1.43 is present and if so it disables metadata_csum and 64bit.

buster and thus your bone-eMMC-flasher-debian-10.1-console-armhf-2019-10-14-1gb.img.xz image has e2fsprogs version 1.44.5, which isn't detected by the current logic.

consequentially all filesystems created with this flasher (and any made with beaglebone-black-make-microSD-flasher-from-eMMC.sh) have these features on and u-boot is unwilling to write to them ("Unsupported feature metadata_csum found, not writing").

btw: your actual image also has these filesystem features enabled.

option one: adjust the version logic to also handle buster's 1.44.5 and up, e.g.

get_ext4_options() {
  # Debian Stretch, Buster e2fsprogs 1.43 and newer:
  # mfks.ext4 default to metadata_csum,64bit disable till u-boot works again..
  unset ext4_options

  # catches 1.43 to 1.49
  if ! LC_ALL=C mkfs.ext4 -V 2>&1|grep mke2fs|cut -f 2 -d " "|grep -Eq '^1\.4[3-9]' ; then
    ext4_options="${mkfs_options}"
  else
    ext4_options="${mkfs_options} -O ^metadata_csum,^64bit"
  fi
}

this works but i find it a bit brittle.

option two: remove the problematic features from the defaults in /etc/mke2fs.conf, and ship that adjusted config file with your image. i.e. mod the ext4 default features line below:

[fs_types]
        ext3 = {
                features = has_journal
        }
        ext4 = {
                features = has_journal,extent,huge_file,flex_bg,metadata_csum,64bit,dir_nlink,extra_isize
                inode_size = 256
        }

personally i'd use that approach as it'll automatically affect all mkfs.ext4 invocations made on that box, no matter whether they go via your flasher helpers or not.

@RobertCNelson
Copy link
Owner

RobertCNelson commented Nov 21, 2019

@az143 sorry, getting back up to speed.. Yes u-boot ext4 options are still broken on u-boot 2019.10? for another board, let's just keep these disabled always.. i think we need to invert the logic.. if wheezy/jessie's mkfs.ext4 is found do the default (as the options make mkfs.ext4 bomb in old mkfs.ext4..), but for everything else disable the options..

Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants