fix(sys-kernel/coreos-kernel): Don't install firmware to root filesystem

In preparation for moving to using firmware provided by the
linux-firmware repository instead of linux the kernel ebuild needs to
stop installing the files to avoid conflicts. Also to better ensure that
the firmware package gets rebuilt every time the kernel does bump to
EAPI=5 and set the subslot to the ebuild version/revision. The firmware
package can then depend on the kernel w/ a special slot operator to make
sure it gets rebuilt when the kernel version changes. The firmware
package can then scan the installed modules and only install the
firmware that is required.

(Portage automatic rebuild behavior often makes this sort of rebuild
happen anyway but using subslots makes it a strict requirement.)
This commit is contained in:
Michael Marineau 2014-01-02 18:11:41 -08:00
parent d3bfcc7823
commit 6e4bc8d9c1
4 changed files with 7 additions and 5 deletions

View File

@ -1,13 +1,13 @@
# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
# Distributed under the terms of the GNU General Public License v2
[[ ${EAPI} != "4" ]] && die "Only EAPI=4 is supported"
[[ ${EAPI} != "5" ]] && die "Only EAPI=5 is supported"
inherit cros-workon toolchain-funcs
HOMEPAGE="http://www.chromium.org/"
LICENSE="GPL-2"
SLOT="0"
SLOT="0/${PVR}"
DEPEND="sys-apps/debianutils
sys-devel/bc
@ -195,7 +195,9 @@ cros-kernel2_src_compile() {
cros-kernel2_src_install() {
dodir /boot
kmake INSTALL_PATH="${D}/boot" install
kmake INSTALL_MOD_PATH="${D}" modules_install
# Install firmware to a temporary (bogus) location.
# The linux-firmware package will be used instead.
kmake INSTALL_MOD_PATH="${D}" INSTALL_FW_PATH="${T}/fw" modules_install
local version=$(kernelversion)
if [ ! -e "${D}/boot/vmlinuz" ]; then

View File

@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-kernel/vanilla-sources/vanilla-sources-3.7.5.ebuild,v 1.1 2013/01/28 13:18:54 ago Exp $
EAPI=4
EAPI=5
CROS_WORKON_COMMIT="0507eb5ef5a83ab746677b7f19d6e3a19906c995"
CROS_WORKON_REPO="git://github.com"
CROS_WORKON_PROJECT="coreos/linux"

View File

@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-kernel/vanilla-sources/vanilla-sources-3.7.5.ebuild,v 1.1 2013/01/28 13:18:54 ago Exp $
EAPI=4
EAPI=5
CROS_WORKON_COMMIT="2e8b6ebe08210cda2967c63320fc0052de903efa"
CROS_WORKON_REPO="git://github.com"
CROS_WORKON_PROJECT="coreos/linux"