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:
2025-08-26 21:35:32 -05:00
parent 20c92961d6
commit 8a2d305b04
4 changed files with 10 additions and 5 deletions

View File

@@ -30,3 +30,8 @@ config AIMEEOS_RPI
select BR2_TARGET_GRUB2_ARM_EFI
help
Support running Aimee OS on Rasperry Pi devices
config AIMEEOS_DEFAULT_ROOTFLAGS
string "Default kernel command line argumens"
help
Additional command line arguments to pass to the kernel by default.