These excludes are used in images and I want to use the same checking
code as images do so the build root needs to behave the same way.
This is temporary as I'll switch to installing libc via emerge soon.
Instead of handling toolchain packages in make_chroot and telling
update_chroot to skip the toolchains just depend on update_chroot to do
it properly. Reduces our code duplication by a tiny but worthwhile bit.
Right now there is some funky logic to either use a previous build as a
seed or the current SDK tarball if it happens to have been downloaded.
This is a bit confusing and doesn't work reliably since it is reasonable
for there to be neither a previous build or the current SDK available if
the SDK chroot was created some time ago. Fix this by using the new SDK
library and always use the latest SDK, downloading it if needed.
The current logic for downloading SDK tarballs is in cros_sdk and
written in python which isn't super convenient for re-using in the rest
of our shell scripts. This is a start of rewriting that logic into a
re-usable library but does not yet replace the functionality in cros_sdk.
A number of places refer to these paths and that number is going to
grow. Since the standard pattern is to use environment variables for
commonly used paths it is time to add ones for these:
REPO_CACHE_DIR
REPO_MANIFESTS_DIR
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.