Commit Graph

3244 Commits

Author SHA1 Message Date
Rolf Neugebauer
6cfadcd26e test: Add a simple test/example for compiling a kernel module
The test is currently not hooked up, but it pulls the latest 4.9.x
kernel image, builds a simple kernel module against it and then creates
a test package containing the kernel module and a shell script.

The shell script prints out the 'modinfo' and then tries to 'insmod'
the module. It checks the output of 'dmesg' of the load succeeded.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-05-03 16:46:12 +01:00
Rolf Neugebauer
ffc0ed6a7c kernel: Fix kernel header build
Add more files to 'kernel-dev.tar' to enable building kernel
modules against the kernel.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-05-03 16:46:12 +01:00
Justin Cormack
3bd53067fb Update yaml files with new ca-certificates
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-05-03 16:43:24 +01:00
Justin Cormack
26f7d6ebdd Update ca-certificates to use new Alpine base image
This is what the other images should look like in future.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-05-03 16:42:28 +01:00
Justin Cormack
edfac0e8fb Add a base Alpine package that includes a package mirror
This means that we limit to one place where we use network access
in building, and in future all other package builds can be deterministic.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-05-03 16:29:53 +01:00
Justin Cormack
7698d1c344 Merge pull request #1762 from justincormack/remove-base
Remove unused mkimage-base
2017-05-03 14:38:45 +01:00
Justin Cormack
fa90764b55 Remove unused mkimage-base
We have not used this for ages, we use Go code in `moby` tool to
do this now.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-05-03 14:27:05 +01:00
Rolf Neugebauer
6c2974d49d Merge pull request #1756 from ijc25/kubernetes
projects/kubernetes: Fixup boot-*.sh
2017-05-03 09:30:58 +01:00
Ian Campbell
bb50dd9781 projects/kubernetes: Allow linuxkit to pick default backend
Drop `hyperkit` from the `linuxkit run` invocation, thus causing the linuxkit
tool to pick the platform's default backend (which is qemu on my Linux system,
which works better than hyperkit in this environment).

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-05-03 09:11:32 +01:00
Justin Cormack
0325cbe1ec Merge pull request #1758 from rneugeba/qemu
cmd: Unify 'run' cmdline options
2017-05-02 17:16:10 +01:00
Rolf Neugebauer
d2bdd94054 Merge pull request #1757 from rneugeba/kbuild
Update kernel build (and update to 4.4.65)
2017-05-02 17:03:44 +01:00
Rolf Neugebauer
5ce03cc884 cmd: Unify 'run' cmdline options
- Use 'disk-size' for disk size
- Use 'disk' for the path to the disk image
- Use 'fw' for the path to the EFI firmware

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-05-02 17:00:57 +01:00
Justin Cormack
3406d33d7f Merge pull request #1753 from dave-tucker/ci-fixes
Fix CI
2017-05-02 16:52:46 +01:00
Rolf Neugebauer
c9a123ba54 kernel: Update to 4.4.65
The 4.9 and 4.10 series did not get updates

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-05-02 15:20:04 +01:00
Justin Cormack
777eecde89 Merge pull request #1754 from justincormack/docker-clean
Adjust docker-ce package
2017-05-02 14:49:11 +01:00
Justin Cormack
a37fd19f88 Adjust docker-ce package
Bring it into line with official images: remove `jq`, `sfdisk` which
are not needed; we used them for disk mounting but this is down standalone.
Add the tools for other filesystems, which are needed for `dm`, `btrfs`.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-05-02 14:37:04 +01:00
Rolf Neugebauer
f44421042e kernel: Fix DEBUG builds and add default debug targets/images
Building debug kernels (with additional run time checks and debugging)
was broken a few commits back. This adds back support for building debug
kernels.

In addition, it builds and uploads debug kernels for selected kernel
series (4.9.x LTS and latest stable). The tag for these kernels has
a "_dbg" suffix.

Update documentation.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-05-02 14:17:01 +01:00
Dave Tucker
cda03f7e0d Makefile: Use the name provided to upload in run
This fixes an issue introduced in the split of push and run.
Before this commit, an image could be pushed to a custom location from
the presence of the `CLOUDSDK_IMAGE_NAME` variable. The subsquent run
would fail as the name `test-ltp` or `test` had been hard coded in the
Make target. We now use a target-specific variable which is only set if
there is not an existing variable in the environment

Signed-off-by: Dave Tucker <dt@docker.com>
2017-05-02 12:38:27 +01:00
Dave Tucker
ccfbcceebd linuxkit: Make gcp push honour the img-name flag
This fixes a regression where `linuxkit push gcp` no longer allows for a
custom destination to be provided via the `-img-name` flag or the
`CLOUDSDK_IMAGE_NAME` environment variable

Signed-off-by: Dave Tucker <dt@docker.com>
2017-05-02 12:36:09 +01:00
Rolf Neugebauer
5ab5f31e14 kernel: Simplify/restructure Dockerfile
- Use a RUN command per artefact created
- Use WORKDIR to avoid "cd /linux" on every RUN command
- Copy all relevant build artefacts to /out
- Only create one additional layer in final stage
- Add System.map to output image

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-05-02 10:33:45 +01:00
Justin Cormack
34d508562d Merge pull request #1749 from justincormack/report-30-april
Development report for 30 April 2017
2017-05-01 13:25:37 +01:00
Justin Cormack
c31fb17c81 Merge pull request #1748 from justincormack/empty-base
Remove stray .gitignore in base/
2017-05-01 12:34:08 +01:00
Justin Cormack
b99bebdf22 Merge pull request #1750 from solidnerd/fix-typo-kernel-md
Fix typo in docs/kernels.md
2017-05-01 12:33:58 +01:00
Justin Cormack
73c399ae9b Development report for 30 April 2017
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-05-01 12:33:33 +01:00
solidnerd
c252305cda
Fix typo in docs/kernels.md
Signed-off-by: solidnerd <niclas@mietz.io>
2017-05-01 13:21:35 +02:00
Justin Cormack
89ec219395 Remove stray .gitignore in base/
This directory was supposed to be removed.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-05-01 12:06:16 +01:00
Justin Cormack
0a2fa3eec6 Merge pull request #1744 from rneugeba/kernels-up
Add CentOS/Fedora kernels. Fix/Improve kernel images
2017-05-01 10:01:57 +01:00
Rolf Neugebauer
721ffeeccd docs: Update kernel doc with info about supported kernels
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-30 12:51:32 +01:00
Rolf Neugebauer
83201bacbe kernels: Add script to convert Fedora kernels
We only convert kernels from Fedora 2* as they have 4.x kernels.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-30 12:01:54 +01:00
Rolf Neugebauer
4defc9f134 kernels: Clean after creating an image
Remove the image and the intermediate images. Otherwise, especially
for the initial runs, the disk fills up quickly.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-30 11:18:53 +01:00
Rolf Neugebauer
f145a3cee7 kernels: Run depmod on modules before packaging
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-30 11:16:14 +01:00
Rolf Neugebauer
eeb8ee058c kernels: Add script to convert CentOS kernels
We only convert CentOS 7 kernels for now. CentOS 6 is too
old for most of our purposes.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-30 11:16:14 +01:00
Justin Cormack
7ec84e1ed2 Merge pull request #1743 from deitch/encrypted-swap
Add support for encrypted swap
2017-04-30 09:47:05 +01:00
Avi Deitcher
aebd255755 Add support for encrypted swap
Update examples/swap.yml to use latest linuxkit/swap image
Add comment to examples/swap.yml how to enable encryption
Add encrypt options to README
Make encrypted swap the default

Signed-off-by: Avi Deitcher <avi@deitcher.net>
2017-04-30 11:07:56 +03:00
Justin Cormack
805be09669 Merge pull request #1736 from deitch/fix-swap-example
use updated kernel and correct path in examples/swap.yml
2017-04-29 20:56:54 +01:00
Avi Deitcher
f72a2e7bef use updated kernel and correct path in examples/swap.yml
for swap.sh, take any command-line options, not just those with an arg
that in turn requires a new hash on the example

Use latest 4.9.x kernel to keep in line with other examples

Replace (bash) herestring with (posix) heredoc in swap.sh, and update hash to match

Signed-off-by: Avi Deitcher <avi@deitcher.net>
2017-04-29 22:18:42 +03:00
Rolf Neugebauer
4ff7be375e kernels: Tweak the ubuntu script a little
No actual source change, just make it easier to enable
kernel headers should they be needed.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-29 13:11:52 +01:00
Rolf Neugebauer
31d84a6380 kernels: Add System.map to kernel hub image
Also, don't fail if the headers are not installed

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-29 13:11:52 +01:00
Rolf Neugebauer
47ed84ee68 kernels: Don't pull to check if image exists on hub
Doing a "docker pull" to check if an image exist on hub
takes a long time for the number of images, in particular
in the linuxkit/kernel-mainline repo.

Instead, get a list of tags on Hub and check that way. This
does not check if the image was signed, but should be good
enough.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-29 11:24:01 +01:00
Justin Cormack
facdf93bac Merge pull request #1741 from justincormack/swap-hash
Update tag for swap package, having pushed to hub
2017-04-28 19:34:53 +01:00
Justin Cormack
462a5dfd5e Update tag for swap package, having pushed to hub
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-28 19:05:06 +01:00
Rolf Neugebauer
6708264c7a Merge pull request #1740 from rneugeba/kern-fix
kernels: Fix annoying error in shell scripts
2017-04-28 18:28:33 +01:00
Rolf Neugebauer
835a3d2e4d kernels: Fix annoying error in shell scripts
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-28 17:51:36 +01:00
Rolf Neugebauer
f54d884183 Merge pull request #1738 from rneugeba/kernels
Add support for building mainline, Ubuntu and Debian kernel packages
2017-04-28 17:32:21 +01:00
Rolf Neugebauer
4f5c5aca7a kernels: Add support for creating Debian kernel packages
This only pulls in 4.x kernels and does not include the
headers to build modules against.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-28 17:07:28 +01:00
Rolf Neugebauer
5b28cfafb2 kernels: Add support for creating ubuntu kernel packages
This only covers the 4.x Ubuntu kernels and for now does
not include the headers to build modules against.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-28 17:07:24 +01:00
Rolf Neugebauer
82c7118de9 kernels: Create LinuKit kernel images from Ubuntu mainline
The Ubuntu mainline PPA has kernel.org based kernels for many
kernel releaseis.  This commit adds suport for downloading and
converting the 3.16.x long long term support kernel as well
as the current 4.x series.  The "mainline.sh" script only
downloads/processes kernels which have not yet been put on
Hub.

The kernels are stored under "linuxkit/kernel-mainline" and are
tagged with the kernel version.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-28 17:07:24 +01:00
Justin Cormack
ab1ae3f271 Merge pull request #1733 from justincormack/bzimage-to-kernel
Change to use kernel not bzImage everywhere
2017-04-28 16:47:48 +01:00
Justin Cormack
6155e8c8bc Change to use kernel not bzImage everywhere
Previously we hardcoded `bzImage` which is not used for all
use cases or architectures.

fix #1630

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-28 16:24:15 +01:00
Justin Cormack
95613b9d93 Merge pull request #1734 from justincormack/build-pull
Pull images on CI
2017-04-28 15:36:59 +01:00