This time around our changes take a slightly different approach. Instead
of editing the ebuild to undo things done in the common eblit code the
eblits are edited directly, allowing for better customization. Also,
managing locales is now different. Inside the SDK all locales are built
at compile time, avoiding the need for locale-gen which is slow and
complicates setup of the SDK chroot. For cross-compiled targets (CoreOS
itself) final images don't include locale info either, again no need for
locale-gen.
The SDK is a bit bigger now, the compressed tarball is 20MB bigger and
200MB bigger extracted on disk. Considering how big it already is this
shouldn't be that big of a deal.
With this changeset one can build a kernel module out-of-tree in a dev
image in the usual fashion:
```
~# cat Makefile
obj-m := noop.o
~# make -C /lib/modules/4.3.0-coreos-r1/build M=$PWD
make: Entering directory '/usr/lib64/modules/4.3.0-coreos-r1/build'
CC [M] /tmp/noop/noop.o
Building modules, stage 2.
MODPOST 1 modules
CC /tmp/noop/noop.mod.o
LD [M] /tmp/noop/noop.ko
make: Leaving directory '/usr/lib64/modules/4.3.0-coreos-r1/build'
~#
```
/lib/modules/$(uname -r)/source is now populated with a stripped source
tree (headers, scripts, Makefiles...), prod images may build out-of-tree
modules by simply bind mounting these directories into a toolchain
container without needing kernel source.
Note that this build directory is being populated from the _actual_
$KBUILD_OUTPUT used in producing the kernel in the image, which has simply
been `make clean`ed and stripped down:
```
/lib/modules/4.3.0-coreos-r1/build# ls -la
drwxr-xr-x 5 root root 4096 Nov 25 11:56 .
drwxr-xr-x 4 root root 4096 Nov 25 11:56 ..
-rw-r--r-- 1 root root 108265 Nov 25 11:52 .config
-rw-r--r-- 1 root root 2 Nov 25 11:55 .version
-rw-r--r-- 1 root root 578 Nov 25 11:54 Makefile
-rw-r--r-- 1 root root 617170 Nov 25 11:55 Module.symvers
drwxr-xr-x 3 root root 4096 Nov 25 11:23 arch
-rw-r--r-- 1 root root 23280 Nov 25 11:52 defconfig
drwxr-xr-x 4 root root 4096 Nov 25 11:23 include
drwxr-xr-x 6 root root 4096 Nov 25 11:56 scripts
lrwxrwxrwx 1 root root 9 Nov 25 11:56 source -> ../source
/lib/modules/4.3.0-coreos-r1/build#
```