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

create_disk: add support for bootfs_metadata_csum_seed image.yaml knob #2228

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/create_disk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ os_name=$(getconfig "osname")
rootfs_size=$(getconfig "rootfs-size")
buildid=$(getconfig "buildid")
imgid=$(getconfig "imgid")
bootfs_metadata_csum_seed=$(getconfig_def "bootfs_metadata_csum_seed" "false")

set -x

Expand Down Expand Up @@ -157,6 +158,14 @@ udevtrig
root_dev="${disk}${ROOTPN}"

bootargs=
# If the bootfs_metadata_csum_seed image.yaml knob is set to true then
# we'll enable the metadata_csum_seed filesystem feature. This is
# gated behind an image.yaml knob because support for this feature
# flag was only recently added to grub.
# https://lists.gnu.org/archive/html/grub-devel/2021-06/msg00031.html
if [ "${bootfs_metadata_csum_seed}" == "true" ]; then
bootargs="-O metadata_csum_seed"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need some spacing here or below in the ext4verity path to separate option flags.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, the local version of my patch (on my aarch64 machine) had that, but I missed it when I made the changes on my desktop and pushed them up. fix in #2230

fi
case "${bootfs}" in
ext4verity)
# Need blocks to match host page size; TODO
Expand Down