diff options
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/linux-build.eclass | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/eclass/linux-build.eclass b/eclass/linux-build.eclass index 6127631b..c03f8d10 100644 --- a/eclass/linux-build.eclass +++ b/eclass/linux-build.eclass @@ -171,6 +171,10 @@ _linux-build_src_prepare_build() { emake defconfig "${myopt[@]}" fi + if _linux-build_configval EFI_STUB && ! _linux-build_configval CMDLINE ; then + die "CONFIG_EFI_STUB=y requires CONFIG_CMDLINE" + fi + if _linux-build_configval CMDLINE_BOOL && _linux-build_configval CMDLINE ; then einfo "Creating kernel.arg" einfo " CONFIG_CMDLINE='${CONFIG_CMDLINE}'" @@ -429,14 +433,23 @@ _linux-build_src_install_build() { fi insinto "/boot/${KV_FULL}" - newins "${BUILDDIR}/.config" kernel.cfg - newins "${BUILDDIR}/System.map" System.map + newins "${BUILDDIR}/.config" kernel.cfg + newins "${BUILDDIR}/System.map" System.map case "$(tc-arch-kernel)" in x86) newins "${BUILDDIR}/arch/$(tc-arch-kernel)/boot/bzImage" kernel.img ;; arm|arm64) newins "${BUILDDIR}/arch/$(tc-arch-kernel)/boot/Image" kernel.img ;; esac + if _linux-build_configval EFI_STUB ; then + insinto "/boot/EFI/linux" + + case "$(tc-arch-kernel)" in + x86) newins "${BUILDDIR}/arch/$(tc-arch-kernel)/boot/bzImage" "${KV_FULL}.efi" ;; + arm|arm64) newins "${BUILDDIR}/arch/$(tc-arch-kernel)/boot/Image" "${KV_FULL}.efi" ;; + esac + fi + if _linux-build_configval CMDLINE_BOOL && _linux-build_configval CMDLINE ; then insinto "/boot/${KV_FULL}" doins "${WORKDIR}/boot/kernel.arg" |