...and add straw man implementations of kernel_config.base and
kernel_config.x86 as examples.
First, splitting the build: to avoid duplication, we split the build into
three parts: a "source" stage, a "config" stage, and a "build" stage. The
"source" stage allows us to use a cached image, so we don't have to
re-download the kernel source every time. The "config" step applies our
patches and generates (and checks) the kernel config. I've left this as a
separate step for now so that we can build just an image with a config in
it, without having to ^C the build. However there's no real reason it needs
to be a separate step, assuming that this kernel config design is
acceptable. The third step is the actual kernel build.
Then there is kernel config management: the bulk of it occurs in
makeconfig.sh, with the idea being that we can specify base, arch, and
version specific config options as necessary.
The config files themselves are lists of options (both positive and
negative). We include the negative options, because we want to explicitly
turn off things that are on in the default config (e.g. CONFIG_USELIB), and
it seems cleaner to do things this way then to have some sort of negative
options list.
The options files are sorted with the default behavior of the "sort"
command, which ignores comment lines, meaning that negative options and
positive options are inline with each other. I don't have a strong opinion
on whether or not to group all negative options, or whether this default
behavior makes sense, so I just left it.
Finally, obviously the .base and .x86 files are incomplete. I mostly
selected a few options with interesting dependencies or special issues
(CONFIG_PANIC_ON_OOPS) with how we manage things, so as to demo how
everything would work. It's not really clear to me that there's a good way
to generate e.g. kernel_config.base, without a lot of painstaking work
(which I'm happy to do if we agree this is a good approach).
Signed-off-by: Tycho Andersen <tycho@docker.com>
This is just a direct import of the current kernel/ directory, with a
slight splitting up of the dockerfiles to build a kernel-source and kernel
image.
Signed-off-by: Tycho Andersen <tycho@docker.com>
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>
It is not longer used by any package. Some projects
still use it and I haven't updated their builds but they
should continue to work.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
There is no need for start-stop-daemon since this package
is using containerd. Remove it and update the init
package to alpine:edge
Also use the git tree hash for the package hash while at it.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
Directly install the required packages from the Alpine base
image to compile the rngd package.
Also use the git tree hash for the package hash while at it.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
Directly install the required packages from the Alpine base
image to compile the toybox-media package.
Also use the git tree hash for the package hash while at it.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
Use the alpine base image and install the tools to compile
tini manually. This removes the dependency on c-compile.
Also use the git tree hash for the package hash while at it.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
In the WIP code in `moby` we now have a standard base tarball format,
that includes the kernel and cmdline as files in `/boot` so that the
entire output of the yaml file can default to a single tarball. Then
this can be split back up by LinuxKit into initrd, kernel and cmdline
as needed. This will probably become the only output of the `moby build`
stage, with a `moby package` stage dealing with output formats.
We may remove the output format specification from the yaml file as well,
and just have it in the command.
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
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>
this removes all test targets from the top level makefile with the
exception of `make test` that now calls `$(MAKE) -C test`.
all tests now use `moby run` by instead of the older `./scripts`.
this removes the need for dedicated qemu/hyperkit test targets.
Signed-off-by: Dave Tucker <dt@docker.com>
This builds the dhcpcd package from a fixed Alpine 3.5 base and adds
the dhcpcd daemon from the Alpine base image. This should make the
build reproducible and allows us to use the git tree hash.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
This makes it easier for CI to grab artifacts from the ephemeral build
VMs and provides a stable location so they can be used in subsequent
tests. For example, running the LTP tests.
Signed-off-by: Dave Tucker <dt@docker.com>
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>