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.
19 lines
379 B
Bash
Executable File
19 lines
379 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
BOARD_DIR=$(dirname "$0")
|
|
|
|
genimage_tmp=$(mktemp -d)
|
|
trap 'rm -rf "${genimage_tmp}"' EXIT
|
|
|
|
mkdir -p "${genimage_tmp}"/rootfs "${genimage_tmp}"/tmp
|
|
|
|
cd "${BINARIES_DIR}"
|
|
genimage \
|
|
--rootpath "${genimage_tmp}/rootfs" \
|
|
--tmppath "${genimage_tmp}/tmp" \
|
|
--inputpath "${BINARIES_DIR}" \
|
|
--outputpath "${BINARIES_DIR}" \
|
|
--config "${BOARD_DIR}"/genimage.cfg
|