grub2: Support setting rootflags in config
The `AIMEEOS_DEFAULT_ROOTFLAGS` kconfig option can be used to set the default value for the `rootflags` GRUB2 environment variable. The value of this variable will be passed along as command-line arguments to whatever kernel is chosen at boot. Since post-image scripts do not have access to kconfig option values, we need to build the GRUB2 environment file in the `GRUB2_INSTALL_IMAGES_CMDS` script fragment instead.
This commit is contained in:
@@ -8,6 +8,6 @@ kernel_filename=$1
|
||||
cat > "${TARGET_DIR}"/boot/grub.cfg <<EOF
|
||||
menuentry "Aimee OS ${vers} (Buildroot ${br2_vers}) on \$dev" --class gnu-linux --id "id-\$partuuid" "\$dev" "\$partuuid" {
|
||||
set root="\$2"
|
||||
linux "/boot/${kernel_filename}" root=PARTUUID=\$3 ro
|
||||
linux "/boot/${kernel_filename}" root=PARTUUID=\$3 ro \$rootflags
|
||||
}
|
||||
EOF
|
||||
|
||||
Reference in New Issue
Block a user