Merge pull request #17 from gregkh/bootkernel

feat(coreos-bootkernel) add coreos-bootkernel ebuild
This commit is contained in:
Greg Kroah-Hartman 2013-06-12 18:34:53 -07:00
commit 6ad8262d5b
5 changed files with 2831 additions and 2 deletions

File diff suppressed because it is too large Load Diff

View File

@ -85,6 +85,14 @@ get_build_cfg() {
echo "$(cros-workon_get_build_dir)/.config"
}
get_boot_kernel() {
if [[ "${PN}" =~ boot ]] ; then
echo "true"
else
echo "false"
fi
}
get_build_arch() {
if [ "${ARCH}" = "arm" ] ; then
case "${CHROMEOS_KERNEL_SPLITCONFIG}" in
@ -232,6 +240,12 @@ cros-kernel2_src_configure() {
local config
local cfgarch="$(get_build_arch)"
if [ "$(get_boot_kernel)" = "true" ] ; then
boot="_boot"
else
boot=""
fi
if [ -n "${CHROMEOS_KERNEL_CONFIG}" ]; then
config="${S}/${CHROMEOS_KERNEL_CONFIG}"
else
@ -257,7 +271,7 @@ cros-kernel2_src_configure() {
chromeos/scripts/prepareconfig ${config} \
"$(get_build_cfg)" || die
else
config="$(defconfig_dir)/${cfgarch}_defconfig"
config="$(defconfig_dir)/${cfgarch}_defconfig${boot}"
ewarn "Can't prepareconfig, falling back to default " \
"${config}"
cp "${config}" "$(get_build_cfg)" || die
@ -442,7 +456,9 @@ cros-kernel2_src_install() {
ln -sf $(basename "${zimage_bin}") zImage || die
fi
if [ ! -e "${D}/boot/vmlinuz" ]; then
ln -sf "vmlinuz-${version}" "${D}/boot/vmlinuz" || die
if [ "$(get_boot_kernel)" = "false" ]; then
ln -sf "vmlinuz-${version}" "${D}/boot/vmlinuz" || die
fi
fi
# Check the size of kernel image and issue warning when image size is near

View File

@ -0,0 +1,3 @@
Go read the README in coreos-kernel for more information on how to setup the
git tree, this one is identical to that (for the kernel source), but it uses a
different kernel configuration.

View File

@ -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
}

View File

@ -0,0 +1,37 @@
From: Greg Kroah-Hartman <greg@kroah.com>
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)