Skip to content

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

@az143

Description

@az143

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions