mirror of
https://github.com/flatcar/scripts.git
synced 2026-02-18 14:12:20 +01:00
feat(bootkernel): merge into regular kernel
This merges the bootkernel into the coreos-kernel. The reason we are doing this is because on Xen, today, we don't have kexec so we need to have a full kernel in this case. This also updates bootengine so that it has the new logic to handle a non-working kexec.
This commit is contained in:
parent
e296e96e52
commit
d97258917e
@ -104,7 +104,6 @@ RDEPEND="${RDEPEND}
|
||||
|
||||
RDEPEND="${RDEPEND}
|
||||
sys-apps/findutils
|
||||
sys-kernel/coreos-bootkernel
|
||||
app-admin/sudo
|
||||
app-admin/rsyslog
|
||||
app-arch/gzip
|
||||
|
||||
@ -240,12 +240,6 @@ 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
|
||||
@ -271,18 +265,16 @@ cros-kernel2_src_configure() {
|
||||
chromeos/scripts/prepareconfig ${config} \
|
||||
"$(get_build_cfg)" || die
|
||||
else
|
||||
config="$(defconfig_dir)/${cfgarch}_defconfig${boot}"
|
||||
config="$(defconfig_dir)/${cfgarch}_defconfig"
|
||||
ewarn "Can't prepareconfig, falling back to default " \
|
||||
"${config}"
|
||||
cp "${config}" "$(get_build_cfg)" || die
|
||||
fi
|
||||
fi
|
||||
|
||||
# if this is the boot kernel, copy the cpio initrd to the output build
|
||||
# directory so we can tack it onto the kernel image itself.
|
||||
if [ "$(get_boot_kernel)" = "true" ]; then
|
||||
cp "${ROOT}"/usr/share/bootengine/bootengine.cpio "$(cros-workon_get_build_dir)" || die "copy of dracut cpio failed."
|
||||
fi
|
||||
# copy the cpio initrd to the output build directory so we can tack it
|
||||
# onto the kernel image itself.
|
||||
cp "${ROOT}"/usr/share/bootengine/bootengine.cpio "$(cros-workon_get_build_dir)" || die "copy of dracut cpio failed."
|
||||
|
||||
# Use default for any options not explitly set in splitconfig
|
||||
yes "" | kmake oldconfig
|
||||
@ -462,11 +454,7 @@ cros-kernel2_src_install() {
|
||||
ln -sf $(basename "${zimage_bin}") zImage || die
|
||||
fi
|
||||
if [ ! -e "${D}/boot/vmlinuz" ]; then
|
||||
if [ "$(get_boot_kernel)" = "false" ]; then
|
||||
ln -sf "vmlinuz-${version}" "${D}/boot/vmlinuz" || die
|
||||
else
|
||||
ln -sf "vmlinuz-${version}" "${D}/boot/vmlinuz-boot_kernel" || die
|
||||
fi
|
||||
ln -sf "vmlinuz-${version}" "${D}/boot/vmlinuz" || die
|
||||
fi
|
||||
|
||||
# Check the size of kernel image and issue warning when image size is near
|
||||
|
||||
1
sdk_container/src/third_party/coreos-overlay/profiles/updates/2Q-2013
vendored
Normal file
1
sdk_container/src/third_party/coreos-overlay/profiles/updates/2Q-2013
vendored
Normal file
@ -0,0 +1 @@
|
||||
move coreos-base/bootengine sys-kernel/bootengine
|
||||
@ -2,7 +2,7 @@
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="4"
|
||||
CROS_WORKON_COMMIT="226fa7710b9439a236574f4cd5baa71f56d649f7"
|
||||
CROS_WORKON_COMMIT="adea6485a0326889163dcacaf6f9d83e084721c8"
|
||||
CROS_WORKON_PROJECT="coreos/bootengine"
|
||||
CROS_WORKON_LOCALNAME="bootengine"
|
||||
CROS_WORKON_OUTOFTREE_BUILD=1
|
||||
@ -1,3 +0,0 @@
|
||||
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.
|
||||
@ -1,25 +0,0 @@
|
||||
# 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="60757f78d6dbd86e935b4de43d61547174228cb7"
|
||||
CROS_WORKON_REPO="git://github.com"
|
||||
CROS_WORKON_PROJECT="coreos/linux"
|
||||
inherit cros-workon cros-kernel2
|
||||
|
||||
DEPEND="
|
||||
sys-devel/bc
|
||||
coreos-base/bootengine
|
||||
"
|
||||
|
||||
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
|
||||
}
|
||||
@ -1,37 +0,0 @@
|
||||
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)
|
||||
@ -10,6 +10,7 @@ inherit cros-workon cros-kernel2
|
||||
|
||||
DEPEND="
|
||||
sys-devel/bc
|
||||
sys-kernel/bootengine
|
||||
"
|
||||
|
||||
DESCRIPTION="CoreOS kernel"
|
||||
Loading…
x
Reference in New Issue
Block a user