There are a number of ways the absolute path to a source file can make
it into the compiler output, some of which can prevent cached results
from being used when compiling related code in different locations.
The default source directory $S contains the package version so paths
need to be relative to it in order to work between package versions.
initrd-switch-root.target was too late, we get potentially killed during
the cleanup steps before that. We also need to write files before
reloading etc since we may influence that in ignition-files.
Enable building arm64 qemu user mode emulation (qemu-aarch64) in
the SDK to allow for running target utilities like ldconfig during
the image build stage.
Signed-off-by: Geoff Levand <geoff@infradead.org>
This reverts commit 8c6bf0063605ecee4b82eba6c2f956f2b91af447.
A required package has not been added yet:
emerge: there are no ebuilds to satisfy "sec-policy/selinux-dbus"
dependency required by "sys-apps/dbus-1.8.16-r1::coreos[selinux]"
Most operations are manipulating the build directory, making everything
overly verbose by having to reference $KBUILD_OUTPUT constantly. The
only command that actually needs to run from source directory is `make`.
Using ccache alone offers almost as much speedup as preserving the build
directory and avoids problems caused by skipping `make clean` between
major kernel versions as is the case with 4.0 to 4.1.
The symlinks the kernel build adds to the modules directory are always
absolute, forever preserving the value of $ROOT a binary package was
built with. Instead use a relative link for source, pointing to the
location coreos-sources gets installed to. For build just create a
directory containing .config which the linux-info eclass can use to
check kernel features during builds, allowing us to migrate away from
having to set up the /var/cache build directory even when the kernel
wasn't built.
For both cases they are irrelevant for production builds and can be
confusing to users so mask them.
This eclass now assumes it is used in conjunction with USE=symlink-usr
and installs modules directly to /usr/lib/modules instead of depending
on the /lib symlink. This makes no significant impact other than
silencing a warning portage emits about the relative source symlink.
Instead of leaving a reference defconfig in the cached build output use
the generic savedconfig system. This also provides a mechanism for
overriding the default defconfig locally but I don't know if anyone will
find that useful.
This is a temporary hack for upgrading to 4.1. Later it should be
dropped again or we should just drop caching the kernel build directory
between builds, relying on ccache to keep kernel builds speedy instead.