mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-31 19:31:07 +02:00
Merge pull request #999 from marineam/kernel
More kernel related updates
This commit is contained in:
commit
93a92510e6
24
sdk_container/src/third_party/coreos-overlay/sys-kernel/README
vendored
Normal file
24
sdk_container/src/third_party/coreos-overlay/sys-kernel/README
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
The kernel is provided in two parts: coreos-sources 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.
|
||||
|
||||
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
|
||||
on the ebuild version and revision. For example version 3.12.4-r2:
|
||||
- amd64_defconfig-3.12.4-r2
|
||||
- amd64_defconfig-3.12.4
|
||||
- amd64_defconfig-3.12
|
||||
- amd64_defconfig
|
||||
|
||||
Currently our dracut based initrd (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 coreos-firmware package is a magic version of the upstream
|
||||
linux-firmware ebuild which scans the modules installed by coreos-kernel
|
||||
and only installs files modules declare as required.
|
@ -1,3 +1,4 @@
|
||||
DIST linux-firmware-20130728.tar.xz 19243912 SHA256 dff71cb96eb286e4cacc0d0fb0337481c285f091b23372a77c147e7125f46a9a SHA512 c86e003177988e58b6eae632d1e7f8022c5e2c848e83b925c1852dc87bce3eb9b94bccf8d33c67f73dc355cf4b02c231dadc53300b6a26ee0e8ca75878059609 WHIRLPOOL a8de4a07d1a48ba2b45d1a9143a015ead11d85498836c3c946fa0386099e66d0f71b05e70a6f230832d19401884f21a4b818b75a873e8b9caf5a19eec5067389
|
||||
DIST linux-firmware-20131230.tar.xz 21214036 SHA256 7189fd4cf954086a349286ca79d9275f6a2d79a7c0fd5c7cf6d41d25a863cc77 SHA512 4fe92db99cfd5bc0806ef5863fa6709501dc2c761b9af92689ff15fa8f9a97ca6086bbb3a79fa97e6bde15f8f67c0ae06eb38323fe5182f5406cf9601c4e6b57 WHIRLPOOL aaac2efb4a205bba80c3bad9c6b7eb38ec4fcde5b0233952eb1f58b6cc6afcf5059fc3738ea8a6f9e02de937bcaaf866ddf8021614ccc2cb067b665466ce2ea5
|
||||
DIST linux-firmware-20140603.tar.xz 23299316 SHA256 f45cb7aa37fd52f65289389ee5b112235e8044bd6f0926f070dfee8c8118b749 SHA512 93add92b2b25fd5001e84e66b4c3e28be4ba99827d45758bc8d251ee359d09d88ae8057978a800b26d32e7711bab14a19191a53fc48faf47b76e172b8d07f464 WHIRLPOOL 6cf7a6d845f545ec176994788ee0bc25b884f33a5d24f599757ce5e6e2cfeae47c796ef968c44f5c6de74c3fa44614b9c7056453923f31275f7b877865bf76e8
|
||||
DIST linux-firmware-20141009.tar.xz 24288396 SHA256 b3423bc48bdb46d89707096d9bed3eb0e59ec9172b52ad61d49d996f49f09f61 SHA512 d599abc518e95834118311428fd5cb3e5de47a25a264397758f8456bb3e1e1ed751d0fbfccc5196bd153c1fa4c0e477a7e2e6706f44ef1ba83bcab94b34d5ca3 WHIRLPOOL fd9f13f951c17fcff4db2981f0a71e91dde8b14639746d92ab51a16720758e1f3044a6c718580b5c662cb5a6e571e23739bceb7a8ea9ffe54d2492216efa4320
|
||||
|
@ -0,0 +1 @@
|
||||
coreos-firmware-99999999.ebuild
|
@ -4,6 +4,11 @@
|
||||
|
||||
EAPI=5
|
||||
|
||||
# Tell linux-info where to find the kernel source/build
|
||||
KERNEL_DIR="${SYSROOT}/usr/src/linux"
|
||||
KBUILD_OUTPUT="${SYSROOT}/var/cache/portage/sys-kernel/coreos-kernel"
|
||||
inherit linux-info
|
||||
|
||||
if [[ ${PV} == 99999999* ]]; then
|
||||
inherit git-2
|
||||
SRC_URI=""
|
||||
@ -21,10 +26,9 @@ LICENSE="GPL-1 GPL-2 GPL-3 BSD freedist"
|
||||
SLOT="0"
|
||||
IUSE=""
|
||||
|
||||
DEPEND="sys-kernel/coreos-kernel:="
|
||||
DEPEND="sys-kernel/coreos-sources
|
||||
>=sys-kernel/coreos-kernel-3.17.6-r1:="
|
||||
RDEPEND="${DEPEND}
|
||||
!=sys-kernel/coreos-kernel-3.12.6
|
||||
!<=sys-kernel/coreos-kernel-3.11.7-r5
|
||||
!sys-kernel/linux-firmware
|
||||
!sys-firmware/alsa-firmware[alsa_cards_ca0132]
|
||||
!sys-firmware/alsa-firmware[alsa_cards_korg1212]
|
||||
@ -76,22 +80,13 @@ src_unpack() {
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# FIXME(marineam): The linux-info eclass would normally be able to
|
||||
# provide version info but since we don't install kernel source code the
|
||||
# way it expects it doesn't work correctly. Will fix this eventually...
|
||||
local kernel_pkg=$(best_version sys-kernel/coreos-kernel)
|
||||
local kernel_ver="${kernel_pkg#sys-kernel/coreos-kernel-}"
|
||||
kernel_ver="${kernel_ver%_*}"
|
||||
kernel_ver="${kernel_ver%-*}"
|
||||
local kernel_mods="${ROOT}/lib/modules/${kernel_ver}"
|
||||
# the actually version may have a + or other extraversion suffix
|
||||
local kernel_mods=$(ls -d1 "${kernel_mods}"* | tail -n1)
|
||||
local kernel_mods="${ROOT}/lib/modules/${KV_FULL}"
|
||||
|
||||
# If any firmware is missing warn but don't raise a fuss. Missing
|
||||
# files either means linux-firmware probably out-of-date but since
|
||||
# this is new and hacky I'm not going to worry too much just yet.
|
||||
|
||||
einfo "Scanning for files required by ${kernel_pkg}"
|
||||
einfo "Scanning for files required by ${KV_FULL}"
|
||||
echo -n > "${T}/firmware-scan"
|
||||
local kofile fwfile
|
||||
for kofile in $(find "${kernel_mods}" -name '*.ko'); do
|
||||
|
@ -1,42 +0,0 @@
|
||||
The kernel tree is managed in git and is just the latest stable kernel.
|
||||
|
||||
To bump to a new version do the following:
|
||||
|
||||
1) Setup a checkout of github.com/coreos/linux
|
||||
|
||||
2) Edit the .git/config to look like this:
|
||||
|
||||
```
|
||||
[core]
|
||||
repositoryformatversion = 0
|
||||
filemode = true
|
||||
bare = false
|
||||
logallrefupdates = true
|
||||
[remote "github"]
|
||||
url = git@github.com:coreos/linux.git
|
||||
fetch = +refs/heads/*:refs/remotes/github/*
|
||||
[branch "master"]
|
||||
remote = github
|
||||
merge = refs/heads/master
|
||||
[remote "linus"]
|
||||
url = git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
|
||||
fetch = +refs/heads/*:refs/remotes/linus/*
|
||||
[remote "stable"]
|
||||
url = https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable
|
||||
fetch = +refs/heads/*:refs/remotes/stable/*
|
||||
```
|
||||
|
||||
3) git fetch --all
|
||||
|
||||
3) git checkout -b 'coreos/v3.10.10'
|
||||
|
||||
4) git reset --hard v3.10.10
|
||||
|
||||
5a) apply any coreos-specific patches that are not yet upstream (i.e. 9p patch)
|
||||
that happened to be in a previous kernel branch.
|
||||
|
||||
6) git push github coreos/v3.10.10
|
||||
|
||||
7) git checkout coreos/master && git reset --hard coreos/v3.10.10 && git push -f github coreos/master
|
||||
|
||||
Then you can bump the hash in the ebuild and move it to the new version here.
|
@ -0,0 +1,8 @@
|
||||
# Copyright 2014 CoreOS, Inc.
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=5
|
||||
inherit coreos-kernel
|
||||
|
||||
DESCRIPTION="CoreOS Linux kernel"
|
||||
KEYWORDS="~amd64"
|
3879
sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-kernel/files/amd64_defconfig-3.18
vendored
Normal file
3879
sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-kernel/files/amd64_defconfig-3.18
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,2 +1,3 @@
|
||||
DIST linux-3.17.tar.xz 80333152 SHA256 f5153ec93c5fcd41b247950e6a9bcbc63fa87beafd112c133a622439a0f76251 SHA512 29c99764e371f7005dbbe2bbe4458b4deeae5297da7e5b719b0f29f6f018629338b608369162ae6bd76bec4d8719cf491257ac57fdd5277cce8941b7f90246a0 WHIRLPOOL 4b0ba9d997f28a317991287160c91c4e4f2245d7e08c7cb9691f67c3838bddb3ab8048b01e841e6659eceb94a269b6bde32f4ca521d999593d0e9473c8559b46
|
||||
DIST linux-3.18.tar.xz 80934708 SHA256 becc413cc9e6d7f5cc52a3ce66d65c3725bc1d1cc1001f4ce6c32b69eb188cbd SHA512 2f0b72466e9bc538a675738aa416573d41bbbd7e3e2ffd5b5b127afde609ebc278cec5a3c37e73479607e957c13f1b4ed9782a3795e0dcc2cf8e550228594009 WHIRLPOOL 81634af631b7d30ccd1f4798f96f44d9aa0ba6609b73f2747eb6aebaf7a99487fb2dbd45767605186182533cb222bfd9236e8dd5e11a04fdb67c211e4e0a91d6
|
||||
DIST patch-3.17.6.xz 249204 SHA256 30d8e0da16ac7cc8be13cd6da72ddc487e8c24fb662caf69da7f6d375fdc1aab SHA512 a6e6dd8224355c8f20843f6ee923e27a1c4794268cce212c9dc9a431d0376da9887161d2924a447007650bf98822a08da4c0f1b76ec8d2bf7c2a1f81b5908d9e WHIRLPOOL 0eb7262570f7a85da2ce7ab4686b9a3f9c90e93d00c66a41b537d4694ea5238bc769675ca81fe19e0e5b35203dba2cf1a93dc7c0677fe39215941f685949e29c
|
||||
|
@ -0,0 +1,19 @@
|
||||
# Copyright 2014 CoreOS, Inc.
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="5"
|
||||
K_NOUSENAME="yes"
|
||||
K_NOSETEXTRAVERSION="yes"
|
||||
ETYPE="sources"
|
||||
inherit kernel-2
|
||||
detect_version
|
||||
|
||||
DESCRIPTION="Full sources for the Linux kernel"
|
||||
HOMEPAGE="http://www.kernel.org"
|
||||
SRC_URI="${KERNEL_URI}"
|
||||
|
||||
KEYWORDS="~amd64"
|
||||
IUSE=""
|
||||
|
||||
# This ebuild is essentially equivalent to the upstream vanilla-sources
|
||||
DEPEND="!sys-kernel/vanilla-sources:${SLOT}"
|
Loading…
x
Reference in New Issue
Block a user