Files
linuxkit/alpine/kernel/Makefile
Ian Campbell 7378c6e282 Populate /lib/modules/uname -r
This is less to do with installing modules (which we generally don't expect to
use in Moby) but to populate /lib/modules/`uname -r`/modules.builtin which
turns:

    moby:~# modprobe ip_vs
    modprobe: FATAL: Module ip_vs not found in directory /lib/modules/4.4.14-moby
    moby:~# modprobe nf_nat
    modprobe: FATAL: Module nf_nat not found in directory /lib/modules/4.4.14-moby
    moby:~#

into:

    moby:~# modprobe ip_vs
    moby:~# modprobe nf_nat
    moby:~#

which reduces the amount noise in the logs, e.g. in docker.log:

time="2016-07-04T11:21:58Z" level=warning msg="Running modprobe nf_nat failed with message: `modprobe: WARNING: Module nf_nat not found in directory /lib/modules/4.4.14-moby`, error: exit status 1"

A fair number of these appear in the logs.

This also stops various tools logging about /lib/modules/`uname -r` not
existing (there was one in the boot log until recently I think)

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2016-07-04 15:44:48 +01:00

25 lines
1.2 KiB
Makefile

all: vmlinuz64
vmlinuz64: kernel_config Dockerfile
docker build -t mobykernel:build .
docker run --rm mobykernel:build cat /linux/arch/x86_64/boot/bzImage > $@
docker run --rm mobykernel:build cat /aufs-utils.tar > aufs-utils.tar
docker run --rm mobykernel:build cat /kernel-source-info > kernel-source-info
docker run --rm mobykernel:build cat /kernel-patches.tar > kernel-patches.tar
docker run --rm mobykernel:build cat /kernel-modules.tar > kernel-modules.tar
arm: zImage
zImage: kernel_config.arm Dockerfile
docker build --build-arg ARCH=arm -t mobyarmkernel:build .
docker run --rm mobyarmkernel:build cat /linux/arch/arm/boot/zImage > $@
docker run --rm mobyarmkernel:build cat /aufs-utils.tar > aufs-utils.tar
docker run --rm mobyarmkernel:build cat /kernel-source-info > kernel-source-info
docker run --rm mobyarmkernel:build cat /kernel-patches.tar > kernel-patches.tar
docker run --rm mobyarmkernel:build cat /kernel-modules.tar > kernel-modules.tar
clean:
rm -f zImage vmlinuz64 aufs-utils.tar kernel-source-info kernel-patches.tar
docker images -q mobykernel:build | xargs docker rmi -f || true
docker images -q mobyarmkernel:build | xargs docker rmi -f || true