As much as I like not seeing the i8042 error in the kernel log on
platforms without it I foresee someone being really ticked off with me
for making this a module when dracut fails without loading the PS/2 and
keyboard modules making the rescue shell kinda hard to use unless a
serial console is also available.
Yeah, well, fair enough future me. You win.
The kernel is much more particular about how it handles the cpio format
than GNU's cpio tool. Two things:
- Don't use the -depth option to find, cpio documentation recommends
using it (the directory comes after the contents so set the
permissions on the dir last in case it is overly restrictive) but the
kernel thinks the other direction and doesn't put things into a
directory that does not (yet) exist.
- Don't add anything under /lib which is a symlink in the original
file. Adding /lib as a directory later replaces the earlier /lib
symlink. Again the user space tool thinks in the other direction and
will happily dereference the symlink while extracting, preserving it.
CPIO CPIO CPIO!
Lots of changes here, some things of note:
- Switch from built-in to modules for much of the kernel.
- Enable more features, mostly in power management and networking.
- Remove no_firmware.patch, this was added back when we had two
different kernels which would conflict if both installed firmware.
- Stop disabling OUTOFTREE_BUILD now that we don't patch the source.
So far this is just compile tested so it is marked ~amd64 for now.
STRIP_MASK wasn't updated to the new vmlinux location earlier.
RESTRICT=binchecks disables checks that only make sense for user space
binaries. This silences a bogus scanelf error.
If OUTOFTREE_BUILD=1 (currently disabled but that will change) the
kernel will use the existing checkout as the source tree rather than
cloning another tree. If someone built anything in that tree and .config
exists the build will fail complaining that the source isn't clean.
Instead of failing just disable OUTOFTREE and emit a warning.
OUTOFTREE combined with INCREMENTAL makes successive kernel builds
pretty much no-ops (just re-linking modules and bzImage).
Build only bzImage instead of the default 'all' which also will re-link
all of the modules which is pointless and just causes the initramfs and
rootfs to become out of sync.
Since we need to both bundle modules into the initramfs as well as
bundle the initramfs into the kernel image we need to update a pre-built
image with the user space tools as part of the kernel build process.
This seemed the best scheme, the alternatives were:
- Unpack bootengine.cpio to a temporary directory, build and install
kernel modules into that temporary directory, pass that directory
plus a config file listing what device nodes to the kernel build.
- Build kernel modules and generate a fresh bootengine.cpio using the
update-bootengine tool. This would require calling sudo (and breaking
out of the sandbox in the process) in the middle of the ebuild.
The use flag kernel_sources conflicts with the special meaning of the
use flag prefix kernel_ which is reserved for defining the host kernel,
for example kernel_linux. Also a couple other ebuilds in Gentoo have a
source use flag so let's just follow that pattern instead.
We do not currently support or care about things like arm, device trees,
smatch, and other things that massively complicate this eclass. Remove
them so making further changes is simple. Features can always be added
back later.
This makes it possible to have multiple kernel ebuilds in the tree at
once since the defconfig can be versioned along side the ebuilds instead
of being global.
Not sure how this managed to work in the past, perhaps the test for
using Google's common.mk used to always fail but now works properly?
In any case, we don't use clang any more.