Signed EFI-stub kernel build scripts
These scripts are used to build my own kernels on my gentoo machines. They boot with Secure Boot enabled, with own signatures. How to set these up, can be read here: UEFI Secure Boot entry of brotWiki
makekernel.sh
I use makekernel.sh to build a new bootable kernel, when gentoo gets a new version. It gets the config from the currently linked version of /usr/src/linux, saves that to /usr/src/config-$KVER, links the newest kernel, builds it, creates an initramfs and puts all that together as a huge efi-blob. It is then signed and saved in /boot/efi, also it generates a new systemd-boot config file.
create_complete_efi_build.sh
This is my script for just building the kernel, when fiddling around in linus git tree. You should be inside the kernel directory and the kernel should be already configured. Then it does everything like above, resulting in a bootable signed kernel on the efi partition