mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-30 01:51:09 +02:00
feat(coreos-bootkernel) add coreos-bootkernel ebuild
This is a separate kernel package, and configuration, for the "boot" kernel. It reuses the same eclass for kernel builds, but does two things differently for boot kernels: - no boot/vmlinuz symlink - picks the boot version of the kernel configuration.
This commit is contained in:
parent
6c2393fcc5
commit
9bd4fb24b0
2748
sdk_container/src/third_party/coreos-overlay/eclass/cros-kernel/x86_64_defconfig_boot
vendored
Normal file
2748
sdk_container/src/third_party/coreos-overlay/eclass/cros-kernel/x86_64_defconfig_boot
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@ -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
|
||||
|
3
sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-bootkernel/README
vendored
Normal file
3
sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-bootkernel/README
vendored
Normal 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.
|
@ -0,0 +1,26 @@
|
||||
# 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-bootkernel
|
||||
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
|
||||
}
|
@ -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)
|
Loading…
x
Reference in New Issue
Block a user