From 04b06091d2133aeb5584ab36a5874d5a3aee372e Mon Sep 17 00:00:00 2001 From: Benjamin Gilbert Date: Thu, 19 Jan 2017 16:31:59 -0800 Subject: [PATCH 1/3] sys-kernel: Update README for current implementation --- .../coreos-overlay/sys-kernel/README | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/README b/sdk_container/src/third_party/coreos-overlay/sys-kernel/README index f734d7ee23..183a85d432 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-kernel/README +++ b/sdk_container/src/third_party/coreos-overlay/sys-kernel/README @@ -1,11 +1,11 @@ -The kernel is provided in two parts: coreos-sources and coreos-kernel. +The kernel is provided in three parts: coreos-sources, coreos-modules, +and coreos-kernel. coreos-sources is a traditional Gentoo kernel source ebuild, which -installs to ${ROOT}/usr/src/linux-${PV}. No extra revision or name is -added since, like the upstream vanilla-sources, we don't ship patches. +installs to ${ROOT}/usr/src/linux-${PV}-coreos${COREOS_SOURCE_REVISION}. -coreos-kernel uses the installed sources to build a kernel image and all -modules. The kernel config is searched for in the files directory based +coreos-modules uses the installed sources to build the kernel modules. +The kernel config is searched for in the files directory based on the ebuild version and revision. For example version 3.12.4-r2: - amd64_defconfig-3.12.4-r2 - amd64_defconfig-3.12.4 @@ -19,7 +19,10 @@ for using the same rules - for example: - commonconfig-3.12 - commonconfig -Currently our dracut based initrd (bootengine) gets built directly into +coreos-kernel uses the installed sources and coreos-modules to build the +kernel image and initramfs. + +Currently our dracut based initramfs (bootengine) gets built directly into the kernel image, including all kernel modules. (go go modular kernels!) This reason for this screwy scheme never came to pass and should be fixed eventually. The current grub bootloader already includes logic for @@ -27,5 +30,5 @@ initrds but the old configure_bootloaders and coreos-postinst scripts need to be updated in order to support existing installs. The coreos-firmware package is a magic version of the upstream -linux-firmware ebuild which scans the modules installed by coreos-kernel +linux-firmware ebuild which scans the modules installed by coreos-modules and only installs files modules declare as required. From 413c889b5926c61791728d21b26f19b77808939c Mon Sep 17 00:00:00 2001 From: Benjamin Gilbert Date: Wed, 25 Jan 2017 14:50:10 -0800 Subject: [PATCH 2/3] sys-kernel: Fix minor inaccuracy in README --- .../src/third_party/coreos-overlay/sys-kernel/README | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/README b/sdk_container/src/third_party/coreos-overlay/sys-kernel/README index 183a85d432..fb0d796bf2 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-kernel/README +++ b/sdk_container/src/third_party/coreos-overlay/sys-kernel/README @@ -23,11 +23,10 @@ coreos-kernel uses the installed sources and coreos-modules to build the kernel image and initramfs. Currently our dracut based initramfs (bootengine) gets built directly into -the kernel image, including all kernel modules. (go go modular kernels!) -This reason for this screwy scheme never came to pass and should be -fixed eventually. The current grub bootloader already includes logic for -initrds but the old configure_bootloaders and coreos-postinst scripts -need to be updated in order to support existing installs. +the kernel image. The reason for this screwy scheme never came to pass and +should be fixed eventually. The current grub bootloader already includes +logic for initrds but the old configure_bootloaders and coreos-postinst +scripts need to be updated in order to support existing installs. The coreos-firmware package is a magic version of the upstream linux-firmware ebuild which scans the modules installed by coreos-modules From 4bf33f4bcf09e0a84c78a63a9071e2bc411a1dce Mon Sep 17 00:00:00 2001 From: Benjamin Gilbert Date: Wed, 25 Jan 2017 15:16:15 -0800 Subject: [PATCH 3/3] sys-kernel/README: Document use of slot operators in coreos-kernel --- .../src/third_party/coreos-overlay/sys-kernel/README | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/README b/sdk_container/src/third_party/coreos-overlay/sys-kernel/README index fb0d796bf2..143f31d051 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-kernel/README +++ b/sdk_container/src/third_party/coreos-overlay/sys-kernel/README @@ -20,7 +20,11 @@ for using the same rules - for example: - commonconfig coreos-kernel uses the installed sources and coreos-modules to build the -kernel image and initramfs. +kernel image and initramfs. Many of its build dependencies are copied into +the initramfs by dracut, and several of these are significant enough that we +want to rebuild coreos-kernel whenever they change. Such packages set their +sub-slot to their ${PVR}, and then coreos-kernel DEPENDs on them using a +slot operator (":=") to force a rebuild whenever their sub-slot changes. Currently our dracut based initramfs (bootengine) gets built directly into the kernel image. The reason for this screwy scheme never came to pass and