Leveraging on the binfmt_misc kernel feature, a static qemu-aarch64
executable is required to chroot in the arm64 rootfs.
Signed-off-by: Andrej Rosano <andrej@inversepath.com>
The absolute path to the source tree includes the kernel's version
number and that path then lands in the kernel source code via the
numerous __FILE__ macros in the kernel source. So if the kernel source
version changes, even with a minor revision only, the entire cache can
be invalidated.
Reshuffle the build tree so that $S is a directory of symlinks to the
source and a nested build directory, ensuring the entire build can use
relative paths. A directory of symlinks instead of a single directory
symlink is required to prevent make from resolving the source directory
path to the original versioned path.
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.