Commit Graph

752 Commits

Author SHA1 Message Date
Rolf Neugebauer
86deeaff90 kernel: Bring 4.4 x86_64 kernel config more in line with 4.9
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-21 20:43:30 +01:00
Rolf Neugebauer
ba2e6a5bb8 kernel: Add a Dockerfile to make it easier to configure kernels
The new Dockerfile.kconfig can be used, via the 'kconfig' make target
to build a 'linuxkit/kconfig' images. This images contains the patched
source and default kernel configs for all supported kernels.

It's useful to updating the kernel config files.

While at it, also update the alpine base.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-21 20:43:30 +01:00
Rolf Neugebauer
ffcf5db6ee kernel: Use local kernel source if available
The kernel build currently downloads the source tar ball every
time, which is a little tedious when experimenting with kernel
configs or when compiling the kernel multiple times.

This commit adds a new 'fetch' make target which downloads the
kernel sources into ./sources. Then in the Dockerfile we add
the directory and only download the source if it is not present.

The tarballs signature is till checked on each build.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-20 11:41:59 +01:00
Rolf Neugebauer
9362de0adb kernel: Verify kernel config
Since we supply a full .config file we can check that after
make defconfig/oldconfig it hasn't changed. This should catch
cases where a config option has changed between releases.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-20 11:05:35 +01:00
Rolf Neugebauer
72ed2b3a06 kernel: Rename kernel_config-4.x.x to kernel_config-4.x.x-x86_64
Consistently arch suffixes for kernel config.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-20 10:46:28 +01:00
Rolf Neugebauer
5898bc9f0d kernel: Update to 4.9.44/4.4.83
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-18 18:08:32 +01:00
Rolf Neugebauer
516b11d262 kernel: Set DEFAULT_MMAP_MIN_ADDR to 65536/32768
This is a recommended security measure to protect the low portion
of virtual memory. On x86_64 the recommended value is 65536 while
for arm it shouldn't be higher than 32768.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-18 15:18:38 +01:00
Rolf Neugebauer
edf74c249a kernel: Enable CONFIG_ENABLE_MUST_CHECK
This is a compile time option enabling __must_check annotations
for return values.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-18 15:18:38 +01:00
Rolf Neugebauer
3e5ba03cdc kernel: Enable Ethernet Team driver support
While at it also disable an un-used NIC vendor (Netronome).

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-18 15:18:38 +01:00
Rolf Neugebauer
ec7c2fe82d kernel: Align arm64 kernel config more with x86
The resulting kernel boots fine on qemu and on Cavium Thunder,
though the latter still has some issues.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-18 15:18:38 +01:00
Rolf Neugebauer
72c2c7f85b kernel: Set LOCALVERSION to "-linuxkit" on arm64 as well
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-14 11:01:22 +01:00
Rolf Neugebauer
1882939623 kernel: Update to 4.9.43/4.4.82
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-14 10:58:54 +01:00
Rolf Neugebauer
3889f198e5 kernel: Update to 4.9.42/4.4.81
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-14 10:45:56 +01:00
Jason A. Donenfeld
f74477def2 wireguard: version bump
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-10 23:17:22 +02:00
Dennis Chen
7f313870a9 arm64: kernel 4.4.x bringup enablement
Enable DEVPTS_MULTIPLE_INSTANCES in kernel configuration file
to avoid the devpts mounting hang issue during bootup when
running LinuxKit.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
2017-08-09 02:56:36 +00:00
Rolf Neugebauer
4f5582edf2 kernel: Update to 4.9.41/4.4.80
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-08 17:46:21 +01:00
Alex Johnson
97b91cf5f2 Installed the MEGARAID_SAS driver as a kernel module to support the RAID controller in Packet.net type 2 servers
Fixes #1245

Signed-off-by: Alex Johnson <hello@alex-johnson.net>
2017-08-07 13:09:02 -07:00
Rolf Neugebauer
a1892cd8f1 kernel: Convert kernel build to a multi-arch image
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-03 17:36:22 +01:00
Rolf Neugebauer
0714aa7380 kernel: Remove 4.11.x
It has been EOLed today and won't receive any further updates.

The images are still on hub so can be continued to be used
for the time being.

4.12 support is coming soon.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-07-28 20:14:01 +01:00
Rolf Neugebauer
57659aa5dd kernel: Update to 4.9.40/4.4.79
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-07-28 19:25:55 +01:00
Dave Freitag
9152d065b6 Add NFS Debug Modules
- Adding NFS debug modules to kernel_config.debug
- Also updating some dead links in the kernels.md doc file

Signed-off-by: Dave Freitag <dcfreita@us.ibm.com>
2017-07-28 10:48:10 -05:00
Jason A. Donenfeld
5b875bd1d4 wireguard: version bump
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-07-26 04:01:29 +02:00
Rolf Neugebauer
4e4594cb2e kernel: Update to 4.11.12/4.9.39/4.4.78
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-07-24 10:53:45 +01:00
Jason A. Donenfeld
e24cc5c77f wireguard: add into default kernel
This integrates the WireGuard module directly into the kernel build
system.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-07-20 16:51:18 +02:00
Rolf Neugebauer
90d1866bdc Merge pull request #2234 from deitch/kernel-tpm-modules
[WIP] Add TPM module builder options to kernel
2017-07-18 09:59:47 +01:00
Avi Deitcher
19ce7e18a2 Add TPM module builder options to kernel
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2017-07-18 11:01:40 +03:00
Rolf Neugebauer
e1bc6e4c55 kernel: Update to 4.11.11/4.9.38/4.4.77
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-07-17 11:02:12 +01:00
Rolf Neugebauer
759e5a8a51 kernel: Update to 4.11.10/4.9.37
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-07-17 10:54:49 +01:00
Rolf Neugebauer
98615f43e7 kernel: Add 4.11 kernel config options for LCOW
This is a semi-educated guess of which kernel config options
may be needed to run LCOW based on the config file posted here:
2e5c2fac44/kernelconfig/4.11/kconfig_for_4_11

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-07-12 18:16:42 +01:00
Rolf Neugebauer
ed18d81191 kernel: Enable more hardware drivers and KVM
- Enables module for some common 10/40G NICs
  from Broadcom, Intel, and Mellanox
- Enable KVM and related modules

These are targeted to support more bare metal
configuration with LinuxKit.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-07-12 18:16:42 +01:00
Rolf Neugebauer
11e06d3d63 kernel: Update 4.11.x patches
Incorporate the update for the Hyper-V socket patches from
https://github.com/dcui/linux/commits/decui/hv_sock/v4.11/20170511-debug-0628-with-signed-off-by-of-dexuan-fixed
as well as the additional pLCOW requires patches from
2e5c2fac44

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-07-12 18:16:41 +01:00
Rolf Neugebauer
c1e48c37ac Merge pull request #2190 from arm64b/kernel-Makefile-config
ARM64: Add kernel config file for aarch64
2017-07-12 18:12:51 +01:00
Dennis Chen
fb8eb41623 ARM64: Add kernel config file for aarch64
Add the kernel configuration file of arm64.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
2017-07-12 09:10:17 +00:00
Justin Cormack
4b3fc038b7 Merge pull request #2188 from justincormack/never-metadata-i-didnt-like
Add labels for repo and commit to packages
2017-07-11 18:22:15 +01:00
Justin Cormack
ed38adbc90 Add labels for repo and commit to packages
- use image spec metadata https://github.com/opencontainers/image-spec/blob/master/annotations.md
- omit commit if dirty

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-07-11 14:33:59 +01:00
Dennis Chen
e0a8a1d4df ARM64: Adapt the kernel Dockerfile to multiarch support
The original kernel Dockerfile hardcodes the amd64 as the
only arch supported, this patch removes this kind of hardcode
and make the Dockerfile is ready to support both amd64 and
arm64 by using the runtime arch type.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
2017-07-11 12:39:27 +00:00
Rolf Neugebauer
aa9b718d8a kernel: Update to 4.11.9/4.9.36/4.4.76
Added a new patch to the 4.11 and 4.9 kernels based on a patch
submitted to stable: https://patchwork.kernel.org/patch/9829039/

This patch fixes a off-by-one error in the VMBus code.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-07-07 18:41:33 +01:00
Ian Campbell
fe918f8a31 pkg: Run git update-index --refresh before git diff-index.
Otherwise files which have an updated timestamp but no actual changes are
marked as changes because `git diff-index` only uses the `lstat` result and not
the actual file contents. Running `git update-index --refresh` updates the
cache.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-07-03 10:27:31 +01:00
Ian Campbell
c9b5cbf89b kernel: Calculate HASH and DIRTY in the same way as pkg/package.mk
The definition of `$(TAG)` differs from pkg/package.mk and is only the
HASH+DIRTY since the full tag is defined by the kernel macro and varies for
each kernel.

Also `show-tag` is `show-tags` here due to the multiple builds. Individual
`show-tag_FOO` rules are provided similar to the `build_FOO` rules.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-07-03 10:27:31 +01:00
Rolf Neugebauer
699a864302 pkg: Update to new Alpine base
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-07-01 18:11:45 +01:00
Rolf Neugebauer
8cee2cd68b kernel: Update to 4.11.8/4.9.35/4.4.75
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-06-30 18:23:29 +01:00
Rolf Neugebauer
40ea10065c kernel: Tweak kernel build
- Combine 'sign' and 'push' targets like it is done for
  package builds.
- Append '-dirty' to the tag if the repository is dirty.
- Don't push to hub if the repository is dirty.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-06-27 17:43:57 +01:00
Rolf Neugebauer
c12eafeeb2 kernel: Update to 4.11.7/4.9.34/4.4.74
In particular this contains 1be7107fbe18eed3e319 ("mm: larger stack
guard gap, between vmas") which is a fix for CVE-2017-1000364.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-06-27 10:39:23 +01:00
Rolf Neugebauer
492b6c3fdb kernel: Move some less commonly used features to modules
Module loading on hotplug and boot seems to work now, so
move some less commonly used kernel features and drivers
out of the kernel into drivers. Specifically:
- Devices: All non-virtual network device drivers
- Networking: GRE, GENEVE, PPP, non-essential IPv6 protos,
  L2TP, MPLS_GSO, bonding, IPSec (XFRM), openvswitch,
  queueing/schedulers
- FS: SUNRPC, NFS, NFSD, LOCKD, NTFS
- Misc: ATA over Ethernet

Remove Nozomi serial driver. It doesn't seem to be used
on any of our platforms.

The config files were also run through 'make defconfig &&
make oldconfig' to update any missing options.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-06-22 19:32:13 +01:00
Rolf Neugebauer
4d8f8956b3 kernel: Update to 4.11.6/4.9.33/4.4.73
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-06-22 19:32:13 +01:00
Rolf Neugebauer
974bc56886 kernel: Remove elfutils-dev package
It clashes with libelf-dev but libelf-dev is sufficient
to compile the kernel. This also allows us to remove the
'|| true' from the 'apk add', catching errors with the
tools installation.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-06-22 19:32:12 +01:00
Riyaz Faizullabhoy
130800446a alpine: add zfs package
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-06-21 17:54:45 -07:00
Riyaz Faizullabhoy
6b5ef8c70e alpine: include gnupg package
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-06-21 17:49:51 -07:00
Riyaz Faizullabhoy
503c08a6fb Add PGP key for 00411886 (torvalds@linux-foundation.org)
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-06-20 10:05:33 -07:00
Justin Cormack
324605c48c Merge pull request #2068 from mscribe/master
Verify kernel with GPG and sha256 checksum
2017-06-20 09:50:47 -07:00
Nathan Dautenhahn
4c73320c75 Fix spelling errors
inuxkit/kernel -> linuxkit/kernel

sourcs -> sources

Signed-off-by: Nathan Dautenhahn <ndd@cis.upenn.edu>
2017-06-20 05:54:26 -04:00
Bill Kerr
1e1afd77d2
Add PGP keys for 589DA6B1 (greg@kroah.com) and 6092693E (autosigner@kernel.org).
Verify kernel with GPG and sha256 checksum.

Signed-off-by: Bill Kerr <bill@generalbill.com>
2017-06-19 16:29:53 -04:00
Justin Cormack
fc5d707e97 Merge pull request #2043 from m4rcu5/feature/enable-usb-support
Enabling USB drivers on the 4.4.x, 4.9.x and 4.11.x kernels
2017-06-16 09:31:18 -07:00
Marcus van Dam
306b79de4c
Switching the USB drivers to modules
Signed-off-by: Marcus van Dam <marcus@marcusvandam.nl>
2017-06-16 12:03:23 +02:00
Rolf Neugebauer
db2491cac3 kernel: Update to 4.11.5/4.9.32/4.4.72
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-06-15 13:14:54 -07:00
Rolf Neugebauer
ad3456d4d1 Merge pull request #2047 from rn/perf
Remove kernel-compile and add perf package
2017-06-15 11:42:27 -07:00
Tycho Andersen
a4e0a594b1 add a static usermode helper
The binary is used in tandem with CONFIG_STATIC_USERMODEHELPER=y in 4.11+,
see the big comment in the binary for the current whitelist of binaries.

Signed-off-by: Tycho Andersen <tycho@docker.com>
2017-06-15 10:39:52 -07:00
Rolf Neugebauer
0b6f1a72b6 kernel: Build a perf package for 4.11/4.9 kernels
Extract the perf binary from the kernel package and create
a new perf package for each kernel. The perf package uses the
same tags as the kernel package and only contains the perf
binary under /usr/bin. The perf package can be added to the
init section or included as a stage in a multi-stage build
for other packages.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-06-15 10:39:32 -07:00
Rolf Neugebauer
baf32846d8 kernel: Build the perf utility as part of the kernel build
The perf utility is somewhat kernel specific so might as well
compile it when we compile the kernel. The resulting binary
is statically linked (and stripped for size) and is added the
resulting kernel packages.

Although we add alpine packages such as libunwind and other,
it seems that the config detection code for perf/tools does
not detect them.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-06-15 10:39:32 -07:00
Rolf Neugebauer
06c857fb16 kernel: Fix perf compile on 4.11.x/4.9.x kernels
This cherry-picks 120010cb1eea151d38a3e66f5ffc79a0c3110292 ("tools build:
Add test for sched_getcpu()") which replaces a #ifdef based test with
a proper test for the sched_getcpu() function. The macro based condition
does not work on Alpine as it is conditional on GLIBC.

For 4.9 the cherry-pick needed some manual adjustment and also required
commit ef2c3e76d98dfb69a46d870b47656e8e5bac6e2b ("perf jit: Avoid returning
garbage for a ret variable")

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-06-15 10:39:32 -07:00
Rolf Neugebauer
45938186df kernel: Use the alpine base image to compile the kernel
Also add additional tools and libraries useful/needed for
compiling some of the ./tools in the kernel source.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-06-15 10:39:32 -07:00
Marcus van Dam
6df0fd616c
Enabling USB drivers on the 4.4.x, 4.9.x and 4.11.x kernels
Signed-off-by: Marcus van Dam <marcus@marcusvandam.nl>
2017-06-15 08:24:28 +02:00
Justin Cormack
d5ee981a0a re-enable CONFIG_BUG_ON_DATA_CORRUPTION on 4.11 kernel
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-12 14:44:20 +02:00
Rolf Neugebauer
477435f42b kernel: Update to 4.11.4/4.9.31./4.4.71
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-06-07 22:27:16 +01:00
Nico Di Rocco
f9da106c46 Add tg3 module for Broadcom NIC support
Signed-off-by: Nico Di Rocco <dirocco.nico@gmail.com>
2017-06-06 20:55:36 +02:00
Rolf Neugebauer
8d0182e17c kernel: Update to 4.11.3/4.9.30/4.4.70, remove 4.10.x
4.10.x has been EOLed. Remove it from the build and tests.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-05-30 12:32:09 +01:00
Rolf Neugebauer
6f394920a7 kernel: Update to 4.11.2/4.10.17/4.9.29/4.4.69
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-05-22 13:59:03 +01:00
Rolf Neugebauer
fbea0d9fd0 kernel: Remove toybox from kernel Dockerfile
You cna extract/inspect the contents with 'docker save' + 'tar'

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-05-18 18:55:22 +01:00
Rolf Neugebauer
e6f2b68419 kernel: Add vmlinux to debug builds
The vmlinux image is the un-stripped kernel image containing
full debug information which is useful for kernel debugging.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-05-17 11:40:56 +01:00
Rolf Neugebauer
4b50134bde kernel: Make the Docker Hub organisation configurable
For local testinf it is useful to store packages under a different
organisation on the hub (or indeed to select a different registry).
This is enabled by making the ORG configurable when calling make.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-05-16 16:28:16 +01:00
Rolf Neugebauer
0f9ec7f1d2 kernel: Update Hyper-V socket patches for 4.11
While testing the patches on Windows we found some issues
which commit d0e6020dd2b25f8880 ("hvsock: fix a race in
hvs_stream_dequeue()") (cherry-picked as 0009) attempts to
fix.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-05-16 16:24:50 +01:00
Rolf Neugebauer
5f5c27cbba kernel: Update to 4.11.1/4.10.16/4.9.28/4.4.68
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-05-15 10:34:02 +01:00
Rolf Neugebauer
5d88623faf kernel: Fix Hyper-V socket support in 4.11 kernels
In order to enable Hyper-V sockets, the CONFIG_HYPERV_VSOCKETS
option must be set. This is different to the older kernel patches.

In order for the Hyper-V socket code to compile, f3dd3f4797652c311df
("vmbus: introduce in-place packet iterator") needed cherry-picking.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-05-09 20:49:24 +01:00
Rolf Neugebauer
a4c95be30a Merge pull request #1785 from rneugeba/kern-v4.11
kernel: Add initial support for the 4.11 kernel
2017-05-08 17:31:52 +01:00
Rolf Neugebauer
d633913c92 kernel: Add initial support for the 4.11 kernel
This add a new version of the Hyper-V socket support based on
https://github.com/dcui/linux/commits/decui/hv_sock/next-20170504

Note, this changes the Linux side API to Hyper-V sockets as the
support is now based on the VMware/virtio socket implementation.
This means that the Address Family and the addressing changes.

Other patches from the 4.10 kernel are no longer needed as they
were already upstream.

The new Hyper-V socket code has not been tested, but the kernel
boots fine on HyperKit and Hyper-V.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-05-08 17:12:00 +01:00
Rolf Neugebauer
f0e289439f kernel: Update to use new toybox image
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-05-08 16:46:47 +01:00
Rolf Neugebauer
0a3cb6d8ce kernel: Update to 4.4.67/4.9.27/4.10.15
Note, the bugfix for the memory leak on a missing disk on Hyper-V
has been incorporated into 4.9 and 4.10 so has been removed from
our patch queue.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-05-08 10:39:09 +01:00
Rolf Neugebauer
566bb2a1f0 kernel: Update to 4.4.66/4.9.26/4.10.14
This also adds the cherry-picked commit f1c635b439a5c017 ("scsi: storvsc: Workaround
for virtual DVD SCSI version") from 4.11 for the 4.9 and 4.10 kernels. This commit
fixes a crash/memory leak on Hyper-V when no disk drives are attached and if one
boots of a CD-ROM drive.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-05-04 10:58:32 +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
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
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
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
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
Rolf Neugebauer
14b92b363a kernel: Update to 4.4.64/4.9.25/4.10.13
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-27 08:54:17 +01:00
Rolf Neugebauer
6dcb0c1c97 kernel: Update to 4.4.63/4.9.24/4.10.12
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-27 00:43:02 +01:00
Rolf Neugebauer
c2dbeaa932 kernel: Update to 4.4.62/4.9.23/4.10.11
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-26 23:38:59 +01:00
Rolf Neugebauer
35045cdb6b docs: Update kernel documentation
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-26 22:29:47 +01:00
Rolf Neugebauer
6336022fca kernel: Change the kernel suffix to -linuxkit
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-26 22:29:47 +01:00
Rolf Neugebauer
43d981094d kernel: Rework the kernel build
- Use multi-stage builds
- Use a single Dockerfile for all kernels
  Kernel version and series are passed in as arguments
- Use a separate kernel config per kernel version
  These have been copied from kernel_config and ran
  through oldconfig to tidy them up
- Rename patch directories
- Refactor the Makefile to use a template
  - Allows building of all kernels without arguments to make
  - Use git tree hash as the image tag
  - Don't build the image if the tag already exists

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-26 22:29:47 +01:00
Justin Cormack
8e71b5624c Merge pull request #1707 from linuxkit/new-kernel-opts
Add additional kernel options
2017-04-26 14:09:43 +01:00
Justin Cormack
8687ade204 Add additional kernel options
- XFS filesystem support, as we plan to support this
- Quota support, as XFS has good support
- NVMe PCI support
- Per file encryption
- Device Mapper support, with main options
- BTRFS support (as a module, as it slows boot otherwise by several seconds).

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-26 13:57:45 +01:00
Ian Campbell
20cfa2af2c Switch fallback hostname to linuxkit-* from moby-*
This was missed when things were renamed.

The intention with this code was (apparently) to provide a (pseudo)unique
hostname in the case where something more specific was not provided (e.g. by
DHCP). Make this a little clearer by using '(none)' rather than 'linuxkit' as
the default, in the normal case this will be overwritten by something more
specific and if it isn't we will change it to something somewhat unique derived
from the MAC address (as before). nb: '(none)' is already used by Debian so I
think it is a safe choice as the sentinel value.

The use of both CONFIG_DEFAULT_HOSTNAME and the explicit /etc/hostname from
mkimage.sh is likely to be redundant in some cases, but neither seems to
completely cover all cases so keep both.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-04-25 14:09:38 +01:00
Thomas Shaw
e5f929a344 Fix link. Cosmetic. 2017-04-21 20:56:18 -05:00
Rolf Neugebauer
648b6a8a57 kernel: Update to 4.10.10/4.9.22/4.4.61
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-13 23:32:39 -05:00
Rolf Neugebauer
b8b8307725 kernel: Push kernels to the linuxkit org
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-13 18:19:58 -05:00
Tycho Andersen
98666053fa kernel: remove unused makefile line
Going through some unrelated stuff and noticed this.

Signed-off-by: Tycho Andersen <tycho@docker.com>
2017-04-13 15:26:40 -06:00
Rolf Neugebauer
85d6492d5d kernel: Use linuxkit images for compilingi/packaging the kernel
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-12 21:28:17 +01:00
Rolf Neugebauer
201f89de74 kernel: Update to 4.10.9/4.9.21/4.4.60
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-09 22:50:18 +01:00
Riyaz Faizullabhoy
53a7e096dd Sign and verify kernel image on make push
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-04-04 08:33:48 -07:00
Justin Cormack
7cb524029c Add support for AWS ENA network driver
This is a new PV style high performance network driver, added to
4.9 kernel, supporting 20Gb, see
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-03 11:14:34 +01:00
Rolf Neugebauer
43bd19620f kernel: Update to 4.10.8/4.9.20/4.4.59
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-03 11:05:10 +01:00
Ian Campbell
80b3f45973 kernel Enable support for RTL8139 NIC
This is the default NIC provided by virt-install, I think it is also pretty
common on other virtualisation platforms since both the drivers and the
emulation are pretty widespread (IIRC Xen HVM guests used to get this by
default, and may still do).

Personally I'd probably try and remember to switch to virtio (or even e1000) in
preference, but that's one more thing to do.

Bump the image number.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-03-31 15:54:27 +01:00
Ian Campbell
5e293f8479 kernel: Rerun make oldconfig on default kernel config
... and accept the defaults. Doing so enables some hw monitoring on Intel
(which enables some I2C thing) and explicitly disables a few Mellanox options.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-03-31 15:54:22 +01:00
Rolf Neugebauer
87c4092b26 kernel: Add patches to fix VMBus channel ID re-use
On some hv_sock workloads which quickly open/close many connections
occasionally, channel IDs would get re-used while still having work
pending. This can cause a kernel crash on a NULL pointer exception.

The three patches added to the 4.9.x and 4.10.x kernels fixes
these bugs. The patches are being prepared to be upstreamed, but for
now we cherry-picked them from the developers tree.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-30 10:54:05 +01:00
Rolf Neugebauer
730e11757c kernel: Update to 4.4.58/4.9.19/4.10.7
The 4.9.19/4.10.7 kernels include the fix for the VMBus
memory leak, so we don't need to carry these patches anymore.

The patches against 4.9.x/4.10.x now also all have added a
"Origin" line pointing to the git tree the patches were cherry
picked from.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-30 10:29:50 +01:00
Ian Campbell
a83ecd1d45 Enable CONFIG_PRINTK_TIME
This adds a timestamp to the start of the kernel command line. Like this (from
a random system I have lying around, line truncated by me):
[    0.000000] tsc: Detected 2665.038 MHz processor
[    0.000021] Calibrating delay loop (skipped), value calculated using tim...
[    0.000023] pid_max: default: 32768 minimum: 301
[    0.000041] ACPI: Core revision 20160831
[    0.003782] ACPI: 2 ACPI AML tables successfully acquired and loaded

This would be handy in relation to #1403.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-03-28 14:54:13 +01:00
Rolf Neugebauer
d10a41a70a kernel: Update to 4.9.18/4.10.6/4.4.57
For 4.9.18 and 4.10.6 cherry-picked the VMBus leak fix
from Linus' tree instead of char-misc.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-28 13:43:21 +01:00
Justin Cormack
400f4b6c56 Remove syslinux from kernel build deps
Unused. This should not affect anything, and I didnt actually bump
the kernel version; am working on te build in CI for this...

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-27 12:17:09 +01:00
Rolf Neugebauer
130e546fcf kernel: Update kernel to 4.4.45/4.9.17/4.10.5
In 4.10.5 and 4.9.17 include a fix for the VMBus memory leak,
cherry-picked from char-misc: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git/commit/?h=char-misc-linus&id=5e030d5ce9d99a899b648413139ff65bab12b038

This patch was tested with the 4.10.5 kernel and the Hyper-V
Socket stress test. It was forwarded to stable@vger to be
included in one of the next stable releases.

Also remove the CPU ACCT revert as 17.03.1-rc1 is out and has a fix

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-23 17:20:30 +01:00
Rolf Neugebauer
e671d4664f kernel: Add initial support for 4.10.x kernels
Note, this also removes the LTS4.4 build options and replaces
it with a KERNEL= build option to select the kernel to build.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-20 13:50:27 +00:00
Rolf Neugebauer
56bb8a0617 kernel: Update kernel to 4.9.16/4.4.55
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-20 10:36:26 +00:00
Rolf Neugebauer
0dc52bb387 kernel: Remove remaining AUFS bits
Commit c3fc6faa35 removed AUFS support bit missed the kernel
config and a mentioned in the main Makefile.

This commit removes these also.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-19 08:53:40 +00:00
Anil Madhavapeddy
778236fb39 kernel: activate the Mellanox network driver suite
This builds a family of drivers for various Mellonox
cards, sufficient to get a DHCP lease on packet.net
Type2/3 machines (see #1245).

Signed-off-by: Anil Madhavapeddy <anil@docker.com>
2017-03-17 16:10:30 +00:00
Justin Cormack
3de1be069b Merge pull request #1314 from avsm/kernel-docs
Update Kernel README
2017-03-15 18:49:58 +00:00
Anil Madhavapeddy
8f5e7eb2e9 docs: More updates to the kernel README
Signed-off-by: Anil Madhavapeddy <anil@docker.com>
2017-03-15 17:26:47 +00:00
Anil Madhavapeddy
8a8495e86f docs: Update kernel/README to point to ../docs
Signed-off-by: Anil Madhavapeddy <anil@docker.com>
2017-03-15 15:24:57 +00:00
Rolf Neugebauer
158db9950d kernel: Make 'tag' the default target
This is a stop-gap to prevent accidental push of kernel
images to hub until we sort out doing this from CI.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-15 14:31:27 +00:00
Anil Madhavapeddy
38b2fff68b kernel: add igb and ixgb drivers, with vf variants
This lets us boot on packet.net machines and successfully gives
a DHCP lease when installed via iPXE.  See #1245

Signed-off-by: Anil Madhavapeddy <anil@docker.com>
2017-03-15 14:13:54 +00:00
Rolf Neugebauer
a1a45db3d5 kernel: Update kernels to 4.9.15/4.4.54
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-15 10:32:24 +00:00
Rolf Neugebauer
7185191736 kernel: Add the kernel version to the hub image
A given image is pushed to hub twice, once as
kernel:<kernel version>.<major version>.x and once as
kernel:<kernel version>.<major version>.<minor version>-<n>.

The latter is used to decide if a new kernel image is pushed to hub.

Most users should use the former to pick up the latest kernel.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-14 10:54:01 +00:00
Rolf Neugebauer
a968fcde4d kernel: Remove AUFS kernel
We default to overlay, so no need to carry AUFS patches and kernel.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-14 10:51:52 +00:00
Rolf Neugebauer
54cb00edd8 kernel: Pass kernel version as build-arg to docker
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-13 20:15:13 +00:00
Rolf Neugebauer
7020a2d975 kernel: Add Makefile to kernel build dependencies
This will also include it in the sha1 calculation

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-13 20:15:13 +00:00
Rolf Neugebauer
1c10c56138 kernel: Update to 4.9.14/4.4.53
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-13 10:26:28 +00:00
Justin Cormack
edeaf1c7f6 Add back code to push kernel to hub
- Accidentally removed from top level Makefile, now in kernel Makefile.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-07 23:48:46 +00:00
Rolf Neugebauer
1041f95a6e kernel: Update 4.9.x patches
- Remove patch to prevent non-host network namespace to use VSOCK
  This is now handled by SECOMP profiles by docker
- rebase the VMBUS version cherry-picks to Linus' tree.
  This will make it easier to get them into stable

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-07 14:04:53 +00:00
Riyaz Faizullabhoy
e24c8098ff kernel: Update kernel to 4.9.13 and 4.4.52
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-02-28 08:11:07 -08:00
Rolf Neugebauer
e3502065d9 kernel: Update kernel to 4.4.51
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-02-27 13:55:53 -08:00
Rolf Neugebauer
90895783c0 kernel: Update kernel to 4.9.12
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-02-27 13:49:47 -08:00
Justin Cormack
f4a112dc21 Change kernel upload for new tooling
The mobylinux/kernel image now has the bzImage (no longer named vmlinuz64)
and a tarball of the files needed for the initrd, ie modules etc.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-02-20 15:54:02 +00:00
Justin Cormack
5af24d0d8f Kernel 4.9.11, 4.4.50 and AUFS update
Security update, importance low.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-02-20 12:15:39 +00:00
Justin Cormack
c6cfa0e4d3 Clean up kernel Makefile so it has no repetition
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-02-17 17:43:35 +00:00
Ian Campbell
31cf45bfc3 Revert "sched/cpuacct: Show all possible CPUs in cpuacct output" in 4.9 kernel
This change (5ca3726 added in v4.7-rc1) exposed issues described in
https://github.com/docker/docker/issues/28941, since we don't support CPU
hotplug anyway revert the change while we decide on a proper fix.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-02-17 13:19:18 +00:00
Justin Cormack
0b5cad4f14 Update Linux 4.4 to 4.4.49
Security update, low importance.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-02-16 08:47:52 +00:00
Rolf Neugebauer
6396ecdeee kernel: Update to 4.9.10
4.9.10 included several of the VMBus patches we no longer
need to carry.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-02-15 16:50:31 +00:00
Riyaz Faizullabhoy
4daa3b5c88 Bump kernel config test and revert IA32_EMULATION
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-02-13 11:38:14 -08:00
Riyaz Faizullabhoy
87b4688923 Harden kernel config with page poisoning, randomized mem, disabling ia32 and ldt syscall modification
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-02-13 10:13:48 -08:00
Riyaz Faizullabhoy
331719f098 Bump kernel config to 4.9.8
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-02-13 10:13:48 -08:00
Justin Cormack
e25ee0b142 alpine-build-c is only used for kernel builds so rename
Also remove some unecessary packages.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-02-13 16:59:38 +00:00
Justin Cormack
dc8b41eb3f Update kernel to 4.9.9, 4.4.48
Security update, severity low.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-02-13 11:13:34 +00:00
Rolf Neugebauer
5af19ac52b kernel: Rebase kernel patches proper
Regenerate the kernel patches from
https://github.com/rneugeba/linux-stable/

Note, the last two 4.9 patches are no properly
cherry-picked from linux-next. We previously had
0011-Drivers-hv-vmbus-Use-all... from an email.
0012-Drivers-hv-Log-the... is new, but may further aid
debugging version mismatch issues.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-02-06 17:57:26 +00:00
Riyaz Faizullabhoy
46fde10eaf Update kernel to 4.9.8 and 4.4.47
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-02-06 09:14:35 -08:00
Justin Cormack
2470af59a0 Update aufs to 20170206
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-02-06 11:57:30 +00:00
Justin Cormack
3f81edee37 Move kernel directory to top level
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-02-04 09:17:16 +01:00
Justin Cormack
70d8143e48 move kernel under rest of build and pull through aufs tools
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2015-12-17 15:26:42 +00:00
Justin Cormack
fdeb106f3a Build aufs support
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2015-12-17 13:51:43 +00:00
Justin Cormack
b7a7a2e850 tweak kernel config
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2015-12-11 17:44:22 +00:00
Justin Cormack
d89b06a71f slim down kernel config some more; make it support modules, but not ship with any
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2015-12-11 15:43:14 +00:00
Justin Cormack
5e5e4b5549 fix kernel make clean
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2015-12-10 23:49:18 +00:00
Justin Cormack
8693ca9c64 remove -i option since pinata fixed
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2015-12-09 15:48:09 +00:00
Justin Cormack
a9b3c89290 more gitignore files
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2015-12-09 15:35:59 +00:00
Justin Cormack
33056820a4 Add a (non modular) upstream kernel build, for pinata alpha and general testing
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2015-12-02 10:17:51 +00:00