diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2020-06-28 19:45:35 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2020-06-28 19:45:35 +0100 |
commit | a9bcb565207f4d5ebc2fe5341823593c251ef49a (patch) | |
tree | 5cf49307ffad647819dfcd13e0789cee2ef67874 /sys-kernel | |
parent | git-extras bump (diff) | |
download | portage-a9bcb565207f4d5ebc2fe5341823593c251ef49a.tar.bz2 portage-a9bcb565207f4d5ebc2fe5341823593c251ef49a.tar.xz portage-a9bcb565207f4d5ebc2fe5341823593c251ef49a.zip |
Bump bzImage with module support
Diffstat (limited to 'sys-kernel')
-rw-r--r-- | sys-kernel/bzImage/Manifest | 1 | ||||
-rw-r--r-- | sys-kernel/bzImage/bzImage-0.1.ebuild | 111 |
2 files changed, 112 insertions, 0 deletions
diff --git a/sys-kernel/bzImage/Manifest b/sys-kernel/bzImage/Manifest index 7d91b88..0f01578 100644 --- a/sys-kernel/bzImage/Manifest +++ b/sys-kernel/bzImage/Manifest @@ -1 +1,2 @@ +EBUILD bzImage-0.1.ebuild 2593 BLAKE2B 26eae371ca0c85e3b08c8a72aea993ed21f87581e21672ef4a5a6c38c48fc7557f0a70ff766141e15e6221acb2263b4134171ce11af9527810fd46d44cfe28b0 SHA512 dd5d334b22c7dea0ee930f6220da4ba85749c12bd0bc63beab7e51b3a9e91f93075936aecb649fce7da2c0bd10b19b8de9a9a75b8f57df64f6343fa730d51c6f EBUILD bzImage-0.ebuild 1730 BLAKE2B 522a27a1b1ca50c7cc9e90b1fb792e9d5ac2205834588104f3da333e21401385343f8d419aabcbe417fd7b663ae87d457cd4e5ebd2236e320aded1dd7791f2dc SHA512 bb155fc7578c53b82e14ff3cbbb41018d4272fcad4199c1d417b12ca0278922a04a7b7925a6b4e9df3a70c107dec9fbf2a7a3fdea415847efeafc82e18116627 diff --git a/sys-kernel/bzImage/bzImage-0.1.ebuild b/sys-kernel/bzImage/bzImage-0.1.ebuild new file mode 100644 index 0000000..174bfb7 --- /dev/null +++ b/sys-kernel/bzImage/bzImage-0.1.ebuild @@ -0,0 +1,111 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit linux-info + +DESCRIPTION="Build and install a kernel, modules and initramfs with genkernel" +HOMEPAGE="https://git.randomdan.homeip.net/repo/portage/tree/sys-kernel/bzImage" +SRC_URI="" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="lvm mdadm dmraid +e2fs zfs btrfs iscsi +busybox cryptsetup gpg netboot" + +DEPEND=" +sys-kernel/gentoo-sources:= +sys-kernel/genkernel-next[dmraid=,cryptsetup=,gpg=,iscsi=,mdadm=] +" +RDEPEND="" +BDEPEND="${DEPEND}" + +enableif() { + usex $1 --${2:-$1} --no-${2:-$1} +} + +src_prepare() { + if [[ -z ${KBUILD_OUTPUT} ]] ; then + die "KBUILD_OUTPUT must be set" + fi + default +} + +src_unpack() { + mkdir -p ${S} +} + +src_configure() { + local cfg=$(ls -1t /etc/kernels/* | head -n 1) + if [[ -f $cfg ]] ; then + einfo "Using $cfg for config..." + cp $cfg ${S}/.config || die "Failed to copy config" + elif [[ -f /proc/config.gz ]] ; then + einfo "Using running config..." + zcat /proc/config.gz > ${S}/.config || die "Failed to copy config" + else + ewarn "Using default config..." + fi + einfo "Building $KV_FULL" + + GENKERNELOPTS=" + --kerneldir=${KERNEL_DIR} + --kernel-outputdir=${S} + --logfile=${TMP}/genkernel.log + --tempdir=${TMP}/genkernel + --bootdir=${D}/boot + --module-prefix=${D} + --no-save-config + --no-clean + $(enableif lvm) + $(enableif mdadm) + $(enableif dmraid) + $(enableif e2fs e2fsprogs) + $(enableif zfs) + $(enableif btrfs) + $(enableif iscsi) + $(enableif busybox) + $(enableif cryptsetup luks) + $(enableif gpg) + $(enableif netboot) + " + einfo "Base genkernel options ${GENKERNELOPTS}" + set_arch_to_kernel + emake -C ${KERNEL_DIR} O=${S} oldconfig +} + +src_compile() { + emake -C ${KERNEL_DIR} O=${S} bzImage modules +} + +src_install() { + insinto /etc/kernels + newins .config ${KV_FULL} + + addwrite /etc/ld.so.cache~ + addwrite /etc/ld.so.cache + mkdir ${D}/boot + genkernel $GENKERNELOPTS all || die genkernel failed + emake -C ${KERNEL_DIR} O=${S} clean + + dosym ${KBUILD_OUTPUT} /lib/modules/${KV_FULL}/build + insinto ${KBUILD_OUTPUT} + doins -r .config Module.symvers include + insinto ${KBUILD_OUTPUT}/arch + doins -r arch/${ARCH} + exeinto ${KBUILD_OUTPUT}/tools/objtool + doexe tools/objtool/objtool + exeinto ${KBUILD_OUTPUT}/scripts + doexe scripts/kallsyms + exeinto ${KBUILD_OUTPUT}/scripts/basic + doexe scripts/basic/fixdep + exeinto ${KBUILD_OUTPUT}/scripts/kconfig + doexe scripts/kconfig/conf + exeinto ${KBUILD_OUTPUT}/scripts/mod + doexe scripts/mod/mk_elfconfig scripts/mod/modpost +} + +pkg_postinst() { + grub-mkconfig -o /boot/grub/grub.cfg +} + |