diff options
author | Trumeet <17158086+Trumeet@users.noreply.github.com> | 2019-11-28 18:18:16 -0800 |
---|---|---|
committer | Trumeet <17158086+Trumeet@users.noreply.github.com> | 2019-11-28 18:18:16 -0800 |
commit | 1139079fd6dedbea035bd64eebe549b8073b7439 (patch) | |
tree | 57be19daae419d0c9c49a34e0a80b035a8f23ced | |
parent | 6b4d23e29a12df0279189643117d7445ec50e6ad (diff) | |
download | efigen-1139079fd6dedbea035bd64eebe549b8073b7439.tar efigen-1139079fd6dedbea035bd64eebe549b8073b7439.tar.gz efigen-1139079fd6dedbea035bd64eebe549b8073b7439.tar.bz2 efigen-1139079fd6dedbea035bd64eebe549b8073b7439.zip |
feat: support customizing stub and output
-rw-r--r-- | README.md | 4 | ||||
-rwxr-xr-x | efigen | 4 | ||||
-rw-r--r-- | efigen.config | 6 |
3 files changed, 13 insertions, 1 deletions
@@ -38,6 +38,10 @@ Default values and descriptions are stated in that file. The default config may * Temp initrd file: `./temp.img` (TODO: Pacman hooks may not be able to write `/tmp`?) +* Output file: `/boot/linux.efi` + +* Stub file: `/usr/lib/systemd/boot/efi/linuxx64.efi.stub` + * and requirements of this package. If the default configuration does not satisfy your situation, you may need to edit the configuration file yourself. @@ -5,6 +5,8 @@ OS_RELEASE_FILE=/usr/lib/os-release KERNEL=/boot/vmlinuz-linux INITRDS=/boot/initramfs-linux.img TEMP_INITRD_IMG=./temp.img +STUB=/usr/lib/systemd/boot/efi/linuxx64.efi.stub +OUTPUT=/boot/linux.efi source /etc/efigen/efigen.config cat $INITRDS > $TEMP_INITRD_IMG objcopy \ @@ -12,5 +14,5 @@ objcopy \ --add-section .cmdline="$CMD_LINE_FILE" --change-section-vma .cmdline=0x30000 \ --add-section .linux="$KERNEL" --change-section-vma .linux=0x40000 \ --add-section .initrd="$TEMP_INITRD_IMG" --change-section-vma .initrd=0x3000000 \ - "/usr/lib/systemd/boot/efi/linuxx64.efi.stub" "/boot/linux.efi" + "$STUB" "$OUTPUT" rm $TEMP_INITRD_IMG diff --git a/efigen.config b/efigen.config index f3da64d..957ebed 100644 --- a/efigen.config +++ b/efigen.config @@ -15,3 +15,9 @@ # Will be deleted after processing. # Must be a path which the hook can write. # TEMP_INITRD_IMG=./temp.img + +# Output file +# OUTPUT=/boot/linux.efi + +# Stub file +# STUB=/usr/lib/systemd/boot/efi/linuxx64.efi.stub |