diff options
| author | Karel Kočí <cynerd@email.cz> | 2017-11-17 22:03:18 +0100 | 
|---|---|---|
| committer | Karel Kočí <cynerd@email.cz> | 2017-11-17 22:03:18 +0100 | 
| commit | f066121b5722fb03bd87519b1c32ecee27e08fc6 (patch) | |
| tree | 8ab678e208645d2a2a5804080e5f0c3992d8a617 | |
| parent | dfbe777ef7c2b285e7e2b8c8f1145849baab89c2 (diff) | |
| download | gentoo-personal-overlay-f066121b5722fb03bd87519b1c32ecee27e08fc6.tar.gz gentoo-personal-overlay-f066121b5722fb03bd87519b1c32ecee27e08fc6.tar.bz2 gentoo-personal-overlay-f066121b5722fb03bd87519b1c32ecee27e08fc6.zip | |
Add posibility to have no initramfs to linux
| -rw-r--r-- | sys-boot/myinitramfs/myinitramfs-1.2-r2.ebuild (renamed from sys-boot/myinitramfs/myinitramfs-1.2.ebuild) | 8 | ||||
| -rw-r--r-- | sys-kernel/linux/linux-4.13.13-r2.ebuild (renamed from sys-kernel/linux/linux-4.13.13-r1.ebuild) | 11 | 
2 files changed, 12 insertions, 7 deletions
| diff --git a/sys-boot/myinitramfs/myinitramfs-1.2.ebuild b/sys-boot/myinitramfs/myinitramfs-1.2-r2.ebuild index 8d1ed52..ebdc6c5 100644 --- a/sys-boot/myinitramfs/myinitramfs-1.2.ebuild +++ b/sys-boot/myinitramfs/myinitramfs-1.2-r2.ebuild @@ -5,9 +5,10 @@  EAPI=6 +VER="${PV%-r*}" +  DESCRIPTION="My personal initramfs (verry simple with encryption support)" -HOMEPAGE="" -SRC_URI="" +S="${WORKDIR}/myinitramfs-${VER}"  LICENSE="GPLv2"  SLOT="0" @@ -18,7 +19,8 @@ DEPEND="sys-fs/cryptsetup  sys-fs/btrfs-progs  sys-apps/linux-misc-apps  sys-apps/busybox[static]" -RDEPEND="${DEPENDS}" +RDEPEND="${DEPENDS} +sys-kernel/linux[initramfs]"  src_unpack() {  	# Well we have no sources so just create empty directory diff --git a/sys-kernel/linux/linux-4.13.13-r1.ebuild b/sys-kernel/linux/linux-4.13.13-r2.ebuild index e931a39..6d7bb59 100644 --- a/sys-kernel/linux/linux-4.13.13-r1.ebuild +++ b/sys-kernel/linux/linux-4.13.13-r2.ebuild @@ -14,7 +14,7 @@ S="${WORKDIR}/linux-stable-${VER}"  LICENSE="GPLv2"  SLOT="${PV}"  KEYWORDS="amd64 ~x86" -IUSE="virt" +IUSE="virt +initramfs"  DEPEND="sys-devel/bc" @@ -55,7 +55,7 @@ sysfile() {  		SYSLINUX="${ROOT}/boot/EFI/BOOT/syslinux.cfg"  		PFIX="../../.."  	elif [ -f "${ROOT}/boot/extlinux.cfg" ]; then -		SYSLINUX="${ROOT}/boot/extlinux.cfg" +		SYSLINUX="${ROOT}/boot/extlinux.conf"  		PFIX="."  	else  		eerror "Can't locate syslinux configuration!" @@ -66,10 +66,13 @@ pkg_postinst() {  	sysfile  	# Add label to syslinux config if there is non yet  	if ! grep -q "^LABEL gentoo-${PV}$" "${SYSLINUX}"; then +		if $(use initramfs); then +			INITRD="\tINITRD ${PFIX}/initramfs-gentoo\n" +		fi  		ARGS="$(grep -E "^# ARGS: " "${SYSLINUX}" | sed 's/^# ARGS: //')"  		if [ -n "$ARGS" ]; then -			sed -i "/^## Dynamic labels ##$/a LABEL gentoo-${PV}\n\tMENU LABEL Gentoo ${PV}\n\tLINUX ${PFIX}/bzlinux-${PV}\n\tAPPEND ${ARGS}\n\tINITRD ${PFIX}/initramfs-gentoo\n" "${SYSLINUX}" || eerror "Adding label to syslinux configuration failed!" -			sed -i "/^## Dynamic recovery labels ##$/a LABEL gentoo-${PV}-recovery\n\tMENU LABEL Gentoo ${PV} - Recovery\n\tLINUX ${PFIX}/bzlinux-${PV}\n\tAPPEND ${ARGS} recovery\n\tINITRD ${PFIX}/initramfs-gentoo\n" "${SYSLINUX}" || eerror "Adding recovery label to syslinux configuration failed!" +			sed -i "/^## Dynamic labels ##$/a LABEL gentoo-${PV}\n\tMENU LABEL Gentoo ${PV}\n\tLINUX ${PFIX}/bzlinux-${PV}\n\tAPPEND ${ARGS}\n$INITRD" "${SYSLINUX}" || eerror "Adding label to syslinux configuration failed!" +			sed -i "/^## Dynamic recovery labels ##$/a LABEL gentoo-${PV}-recovery\n\tMENU LABEL Gentoo ${PV} - Recovery\n\tLINUX ${PFIX}/bzlinux-${PV}\n\tAPPEND ${ARGS} recovery\n$INITRD" "${SYSLINUX}" || eerror "Adding recovery label to syslinux configuration failed!"  		else  			eerror "Adding label to syslinux configuration failed as there are no arguments"  		fi | 
