From 0d2159f560d1dbbf14c81e87e18e06431d7062b1 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 12 Jun 2013 10:13:47 -0700 Subject: [PATCH] fix(sys-kernel/coreos-kernel) no more firmware files The kernel package should not be building any firmware files, as they are not needed in virtual machines, _and_ the firmware file locations are not versioned, preventing multiple kernels to be installed at the same time. This change adds a patch to the kernel to not traverse into the firmware directory at all, and patches the eclass to not do the firmare_install build process. --- .../coreos-overlay/eclass/cros-kernel2.eclass | 1 - .../coreos-kernel-3.9.5-r2.ebuild | 25 +++++++++++++ .../coreos-kernel/files/no_firmware.patch | 37 +++++++++++++++++++ 3 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-kernel/coreos-kernel-3.9.5-r2.ebuild create mode 100644 sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-kernel/files/no_firmware.patch diff --git a/sdk_container/src/third_party/coreos-overlay/eclass/cros-kernel2.eclass b/sdk_container/src/third_party/coreos-overlay/eclass/cros-kernel2.eclass index c98c402258..aeb8100f53 100644 --- a/sdk_container/src/third_party/coreos-overlay/eclass/cros-kernel2.eclass +++ b/sdk_container/src/third_party/coreos-overlay/eclass/cros-kernel2.eclass @@ -408,7 +408,6 @@ cros-kernel2_src_install() { if cros_chkconfig_present MODULES; then kmake INSTALL_MOD_PATH="${D}" modules_install fi - kmake INSTALL_MOD_PATH="${D}" firmware_install local version=$(kernelversion) if use arm; then diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-kernel/coreos-kernel-3.9.5-r2.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-kernel/coreos-kernel-3.9.5-r2.ebuild new file mode 100644 index 0000000000..95978ba7e9 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-kernel/coreos-kernel-3.9.5-r2.ebuild @@ -0,0 +1,25 @@ +# Copyright 1999-2013 Gentoo Foundation +# 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 +CROS_WORKON_COMMIT="da3093ad9f44ba53c3f254b4392f3c742dee41d3" +CROS_WORKON_TREE="0ff44b050e7f57e7d3743a44af2c9211da30bdb4" +CROS_WORKON_REPO="git://github.com" +CROS_WORKON_PROJECT="coreos/linux" +inherit cros-workon cros-kernel2 + +DEPEND=" + sys-devel/bc +" + +DESCRIPTION="CoreOS kernel" +HOMEPAGE="http://www.kernel.org" +SRC_URI="${KERNEL_URI}" + +KEYWORDS="amd64 arm x86" +IUSE="deblob" + +src_prepare() { + epatch "${FILESDIR}"/no_firmware.patch +} diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-kernel/files/no_firmware.patch b/sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-kernel/files/no_firmware.patch new file mode 100644 index 0000000000..da04cc8963 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-kernel/files/no_firmware.patch @@ -0,0 +1,37 @@ +From: Greg Kroah-Hartman +Subject: [PATCH] firmware: disable the firmware path entirely + +We really don't want to build firmware images into the kernel package at +all, so rip out all references to the firmware directory that we can +fine. + + +diff --git a/Makefile b/Makefile +index 8818c95..0beba841 100644 +--- a/Makefile ++++ b/Makefile +@@ -519,7 +519,7 @@ scripts: scripts_basic include/config/auto.conf include/config/tristate.conf \ + + # Objects we will link into vmlinux / subdirs we need to visit + init-y := init/ +-drivers-y := drivers/ sound/ firmware/ ++drivers-y := drivers/ sound/ + net-y := net/ + libs-y := lib/ + core-y := usr/ +@@ -944,7 +944,6 @@ modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin + $(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order + @$(kecho) ' Building modules, stage 2.'; + $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost +- $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.fwinst obj=firmware __fw_modbuild + + modules.builtin: $(vmlinux-dirs:%=%/modules.builtin) + $(Q)$(AWK) '!x[$$0]++' $^ > $(objtree)/modules.builtin +@@ -980,7 +979,6 @@ _modinst_: + # boot script depmod is the master version. + PHONY += _modinst_post + _modinst_post: _modinst_ +- $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.fwinst obj=firmware __fw_modinst + $(call cmd,depmod) + + ifeq ($(CONFIG_MODULE_SIG), y)