summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBertrand Jacquin <bertrand@jacquin.bzh>2020-09-22 22:29:18 +0100
committerBertrand Jacquin <bertrand@jacquin.bzh>2020-10-18 00:21:13 +0100
commit00dcc9408c0b0bb33c333cead5e607e6ea56940f (patch)
tree1dc77bca69a4acb9b9a9ba98cacddd26867365b3
parenteclass/linux-build: support KERNEL_ZSTD (diff)
downloadportage-00dcc9408c0b0bb33c333cead5e607e6ea56940f.tar.xz
eclass/linux-build: support EFI_STUB
-rw-r--r--eclass/linux-build.eclass17
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"