Hi.
Recently I have been messing around with my openwrt build for generic x86-64
.
I have figured out that doing this:
- building the initramfs in
.cpio.gz
format - uncompressing the image and mounting it
- running this command:
sudo ukify build \ --stub /usr/lib/systemd/boot/efi/linuxx64.efi.stub \ --linux tmp/boot/vmlinuz \ --initrd openwrt-x86-64-rootfs.cpio.gz \ --cmdline cmdline \ --output bootx64.efi
- then signing the image with a cert using
sbsign
- finally deleting everything off of
/kernel
partition and replacing it with the single signed UKI image
I can then effectively use OpenWRT with Secure Boot still on in the firmware.
I wanted to have Secure Boot with OpenWRT - adding a shim proved to be troublesome,
so I went the UKI route.
I was wondering what the best approach for upstreaming this to OpenWRT official repo would be - is adding a bash script (for example scripts/ukify-and-sign.sh
) a reasonable option?
Or should this functionality rather be in the form of a package?
I would appreciate some guidance. I would like to make this a contribution to OpenWRT repo, but I'm not yet sure what exact form it should take.