Linux kernel EFI stub requires absolute EFI path to the initrd,
this way we can set it without hardcoding the $PLATFORM_DIR
architecture ('x64' or 'x32') for which the application was built (boot
loaders may have both 32-bit and 64-bit versions and it may be different
architecture that the one Linux is running).
architecture ('x64' or 'x32') for which the application was built (boot
loaders may have both 32-bit and 64-bit versions and it may be different
architecture that the one Linux is running).
+ EFI path to this directory (\EFI\...) will be available as
+ '@EFI_PLATFORM_PATH@' for setting the $ARGS module parameter.
modules in /etc/efi-boot/update.d
.................................
modules in /etc/efi-boot/update.d
.................................
name)
* BINARY – name of the EFI binary installed in /boot/efi/EFI/$PLATFORM_DIR
or a path to any EFI binary existing on the EFI system partition
name)
* BINARY – name of the EFI binary installed in /boot/efi/EFI/$PLATFORM_DIR
or a path to any EFI binary existing on the EFI system partition
- * ARGS – command line arguments for the EFI application
+ * ARGS – command line arguments for the EFI application (can contain
+ '@EFI_PLATFORM_PATH@' and '@ARCH@' macros)
* ARCH – architecture the binary is built for
The module may define more configurable variables, but should use own unique
* ARCH – architecture the binary is built for
The module may define more configurable variables, but should use own unique
* '$DESTDIR' variable – defines the directory where the files should be
copied to that will be /boot/efi/EFI/$PLATFORM_DIR
* '$DESTDIR' variable – defines the directory where the files should be
copied to that will be /boot/efi/EFI/$PLATFORM_DIR
* 'update_file' function – copies a file to the EFI partition
Usage:
* 'update_file' function – copies a file to the EFI partition
Usage:
- DESTDIR="/boot/efi/EFI/$(echo -n "$PLATFORM_DIR"|sed -e's/@ARCH@/'"$efi_arch"'/')"
+
+ PLATFORM_PATH="EFI/$(echo -nE "$PLATFORM_DIR"|sed -e's/@ARCH@/'"$efi_arch"'/')"
+ local escaped_EFI_PLATFORM_PATH="$(echo -nE "$PLATFORM_PATH"|sed -e's;/;\\\\;g')"
+ DESTDIR="/boot/efi/$PLATFORM_PATH"
+ ARGS="$(echo -nE "$ARGS"|sed -e's/@ARCH@/'"$efi_arch"'/;s/@EFI_PLATFORM_PATH@/'"$escaped_EFI_PLATFORM_PATH"'/g')"
+
+ verbose "ARGS: '$ARGS'"
+
mkdir -p "$DESTDIR"
verbose "Updating $LABEL..."
mkdir -p "$DESTDIR"
verbose "Updating $LABEL..."