diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2020-05-25 16:17:25 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2020-06-20 13:22:30 +0100 |
commit | 961ab994f8d564986b5e8796fc5d73f7b40a3ee5 (patch) | |
tree | f71b3354b10d4ccc868e95899aac0f360625b378 /sys-kernel | |
parent | Bump ICE v3.7.4 (diff) | |
download | portage-961ab994f8d564986b5e8796fc5d73f7b40a3ee5.tar.bz2 portage-961ab994f8d564986b5e8796fc5d73f7b40a3ee5.tar.xz portage-961ab994f8d564986b5e8796fc5d73f7b40a3ee5.zip |
bzImage proto
Diffstat (limited to 'sys-kernel')
-rw-r--r-- | sys-kernel/bzImage/Manifest | 1 | ||||
-rw-r--r-- | sys-kernel/bzImage/bzImage-0.ebuild | 77 |
2 files changed, 78 insertions, 0 deletions
diff --git a/sys-kernel/bzImage/Manifest b/sys-kernel/bzImage/Manifest new file mode 100644 index 0000000..7d91b88 --- /dev/null +++ b/sys-kernel/bzImage/Manifest @@ -0,0 +1 @@ +EBUILD bzImage-0.ebuild 1730 BLAKE2B 522a27a1b1ca50c7cc9e90b1fb792e9d5ac2205834588104f3da333e21401385343f8d419aabcbe417fd7b663ae87d457cd4e5ebd2236e320aded1dd7791f2dc SHA512 bb155fc7578c53b82e14ff3cbbb41018d4272fcad4199c1d417b12ca0278922a04a7b7925a6b4e9df3a70c107dec9fbf2a7a3fdea415847efeafc82e18116627 diff --git a/sys-kernel/bzImage/bzImage-0.ebuild b/sys-kernel/bzImage/bzImage-0.ebuild new file mode 100644 index 0000000..a953d1a --- /dev/null +++ b/sys-kernel/bzImage/bzImage-0.ebuild @@ -0,0 +1,77 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +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="" +RESTRICT="userpriv" + +LICENSE="" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="lvm mdadm dmraid +e2fs zfs btrfs iscsi +busybox cryptsetup gpg netboot" + +DEPEND=" +sys-kernel/gentoo-sources:=[symlink] +sys-kernel/genkernel-next[dmraid=,cryptsetup=,gpg=,iscsi=,mdadm=] +" +RDEPEND="${DEPEND}" +BDEPEND="" + +enableif() { + usex $1 --${2:-$1} --no-${2:-$1} +} + +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 $WORKDIR/.config || die "Failed to copy config" + elif [[ -f /proc/config.gz ]] ; then + einfo "Using running config..." + zcat /proc/config.gz > $WORKDIR/.config || die "Failed to copy config" + else + einfo "Using default config..." + fi +} + +src_install() { + GENKERNELOPTS=" + --kernel-outputdir=$WORKDIR + --logfile=$TMP/genkernel.log + --tempdir=$TMP/tmp + --kernel-cc=/usr/lib/ccache/bin/cc + --utils-cc=/usr/lib/ccache/bin/cc + --bootdir=${D}/boot + --module-prefix=${D} + $(enableif lvm) + $(enableif mdadm) + $(enableif dmraid) + $(enableif e2fs e2fsprogs) + $(enableif zfs) + $(enableif btrfs) + $(enableif iscsi) + $(enableif busybox) + $(enableif cryptsetup luks) + $(enableif gpg) + $(enableif netboot) + " + + addwrite /etc/kernels + addwrite /var/lib/genkernel + addwrite /etc/ld.so.cache~ + addwrite /etc/ld.so.cache + mkdir ${D}/boot + genkernel --no-clean $GENKERNELOPTS all +} + +pkg_postinst() { + grub-mkconfig -o /boot/grub/grub.cfg +} + |