mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-19 17:26:28 +00:00
commit
329cdb7c7f
173
docs/kernels.md
173
docs/kernels.md
@ -40,21 +40,22 @@ In summary, LinuxKit offers a choice of the following kernels:
|
||||
|
||||
## Compiling external kernel modules
|
||||
|
||||
This section describes how to build external (out-of-tree) kernel modules. It is assumed you have
|
||||
the source available to those modules, and require the correct kernel version headers and compile tools.
|
||||
This section describes how to build external (out-of-tree) kernel
|
||||
modules. It is assumed you have the source available to those modules,
|
||||
and require the correct kernel version headers and compile tools.
|
||||
|
||||
The LinuxKit kernel packages include `kernel-dev.tar` which contains
|
||||
the headers and other files required to compile kernel modules against
|
||||
the specific version of the kernel. Currently, the headers are not
|
||||
included in the initial RAM disk, but it is possible to compile custom
|
||||
modules offline and include then include the modules in the initial
|
||||
RAM disk.
|
||||
modules offline and then include the modules in the initial RAM disk.
|
||||
|
||||
There is a [example](../test/cases/020_kernel/010_kmod_4.9.x), but
|
||||
basically one can use a multi-stage build to compile the kernel
|
||||
modules:
|
||||
|
||||
There is a [example](../test/cases/020_kernel/010_kmod_4.9.x), but basically one can use a
|
||||
multi-stage build to compile the kernel modules:
|
||||
```
|
||||
FROM linuxkit/kernel:4.9.33 AS ksrc
|
||||
# Extract headers and compile module
|
||||
FROM linuxkit/kernel-compile:1b396c221af673757703258159ddc8539843b02b@sha256:6b32d205bfc6407568324337b707d195d027328dbfec554428ea93e7b0a8299b AS build
|
||||
COPY --from=ksrc /kernel-dev.tar /
|
||||
RUN tar xf kernel-dev.tar
|
||||
@ -66,113 +67,89 @@ To use the kernel module, we recommend adding a final stage to the
|
||||
Dockerfile above, which copies the kernel module from the `build`
|
||||
stage and performs a `insmod` as the entry point. You can add this
|
||||
package to the `onboot` section in your YAML
|
||||
file. [kmod.yml](../test/cases/020_kernel/010_kmod_4.9.x/kmod.yml) contains an example for the
|
||||
configuration.
|
||||
file. [kmod.yml](../test/cases/020_kernel/010_kmod_4.9.x/kmod.yml)
|
||||
contains an example for the configuration.
|
||||
|
||||
## Compiling internal kernel modules
|
||||
If you want to compile in-tree kernel modules, i.e. those whose source is already in the
|
||||
kernel tree but have not been included in `linuxkit/kernel`, you have two options:
|
||||
|
||||
1. Follow the external kernel modules process from above
|
||||
2. Modify the kernel config in [../kernel/](../kernel/) and rebuild the kernel.
|
||||
## Modifying the kernel config
|
||||
|
||||
In general, if it is an in-tree module, we prefer to include it in the standard linuxkit kernel
|
||||
distribution, i.e. option 2 above. Once you have it working, please open a Pull Request to include it.
|
||||
Each series of kernels has a config file dedicated to it
|
||||
in [../kernel/](../kernel),
|
||||
e.g.
|
||||
[kernel.config-4.9.x-x86_64](../kernel/kernel_config-4.9.x-x86_64),
|
||||
which is applied during the kernel build process.
|
||||
|
||||
### External Process
|
||||
The `kernel-dev.tar` included with each kernel does *not* include the kernel sources, *only* the headers.
|
||||
To build those modules, you will need to download the kernel source separately and recompile. The
|
||||
in-container process that downloads the source is available in the [Dockerfile](../kernel/Dockerfile).
|
||||
If you need to modify the kernel config, `make kconfig` in
|
||||
the [kernel](../kernel) directory will create a local
|
||||
`linuxkit/kconfig` Docker image, which contains the patched sources
|
||||
for all support kernels and architectures in
|
||||
`/linux-4.<minor>.<rev>`. The kernel source also has the kernel config
|
||||
copied to the default kernel config.
|
||||
|
||||
### Modify Config
|
||||
Building an in-tree module is very similar to building a new modified kernel (see below):
|
||||
Running the image like:
|
||||
|
||||
1. Modify the appropriate `kernel.config-*` file(s)
|
||||
2. Compile
|
||||
```sh
|
||||
docker run --rm -ti -v $(pwd):/src linuxkit/kconfig
|
||||
```
|
||||
|
||||
will give you a interactive shell where you can modify the kernel
|
||||
configuration you want, either by editing the config file, or via
|
||||
`make menuconfig` etc. Once you are done, save the file as `.config`
|
||||
and copy it back to the source tree,
|
||||
e.g. `/src/kernel-config-4.9.x-x86_64`.
|
||||
|
||||
You can also configure other architectures other than the native
|
||||
one. For example to configure the arm64 kernel on x86_64, use:
|
||||
|
||||
```
|
||||
make ARCH=arm64 defconfig
|
||||
make ARCH=arm64 oldconfig # or menuconfig
|
||||
```
|
||||
|
||||
**Note**: We try to keep the differences between kernel versions and
|
||||
architectures to a minimum, so if you make changes to one
|
||||
configuration also try to apply it to the others. The script [kconfig-split.py](../scripts/kconfig-split.py) can be used to compare kernel config files. For example:
|
||||
|
||||
```sh
|
||||
../scripts/kconfig-split.py kernel_config-4.9.x-aarch64 kernel_config-4.9.x-x86_64
|
||||
```
|
||||
|
||||
creates a file with the common and the x86_64 and arm64 specific
|
||||
config options for the 4.9.x kernel series.
|
||||
|
||||
## Building and using custom kernels
|
||||
|
||||
To build and test locally modified kernels, e.g., to try a different
|
||||
kernel config or new patches, the existing kernel build system in the
|
||||
[`../kernel`](../kernel/) can be re-used. For example, assuming the
|
||||
current 4.9 kernel is 4.9.33, you can build a local kernel with:
|
||||
kernel config or new patches, the existing kernel build system in
|
||||
the [`kernel`](../kernel/) directory can be re-used. For example,
|
||||
assuming the current 4.9 kernel is 4.9.33, you can build a local
|
||||
kernel with:
|
||||
|
||||
```
|
||||
```sh
|
||||
make build_4.9.x
|
||||
```
|
||||
|
||||
This will create a local kernel image called
|
||||
`linuxkit/kernel:4.9.33-<hash>-dirty` assuming you haven't committed you local changes. You can then use this in your YAML file as:
|
||||
`linuxkit/kernel:4.9.33-<hash>-dirty` assuming you haven't committed
|
||||
you local changes. You can then use this in your YAML file as:
|
||||
|
||||
```
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.33-<hash>-dirty
|
||||
```
|
||||
|
||||
If you have committed your local changes, the `-dirty` will not be appended. Then you can also override the Hub organisation to use the image elsewhere with:
|
||||
```
|
||||
If you have committed your local changes, the `-dirty` will not be
|
||||
appended. Then you can also override the Hub organisation to use the
|
||||
image elsewhere with:
|
||||
|
||||
```sh
|
||||
make ORG=<your hub org>
|
||||
```
|
||||
|
||||
The image will be uploaded to Hub and can be use in a YAML file as
|
||||
`<your hub org>/kernel:4.9.33` or as `<your hub
|
||||
org>/kernel:4.9.33-<hash>`.
|
||||
|
||||
### Modifying the Config
|
||||
Each series of kernels has a config file dedicated to it in [../kernel/](../kernel), e.g.
|
||||
[kernel.config-4.9.x](../kernel/kernel_config-4.9.x). To build a particular series of kernel:
|
||||
|
||||
1. Create a separate `git` branch (not required but *strongly* recommended)
|
||||
2. Modify the appropriate `kernel.config`, e.g. `kernel.config-4.9.x`
|
||||
3. Run `make build_<series>` with appropriate arguments per this section, e.g. `make build_4.9.x ORG=foo HASH=bar`
|
||||
4. Create a `.yml`, build and test
|
||||
|
||||
You can modify the config in one of two ways:
|
||||
|
||||
* Manually, editing the config file
|
||||
* Using a standard config generator, like `menuconfig`
|
||||
|
||||
Generally, you will manually edit a file if you are a Linux kernel expert and _fully_ understand all of the dependencies, or if the change is minor and you are _highly confident_ there are no dependencies.
|
||||
|
||||
If you wish to use `menuconfig`, which figures out dependencies for you, you will need an environment in which to run it. Fortunately, the linuxkit project's kernel compile process already sets one up for you.
|
||||
To get an appropriate environment:
|
||||
|
||||
1. `cd kernel/`
|
||||
2. Run a build for your desired kernel series, e.g. `make build_4.9.x ORG=foo HASH=bar`
|
||||
3. When you see the output from `make defconfig && make oldconfig` complete, hit `Ctrl-C` to stop the build
|
||||
4. Note the hash from the intermediate container. That intermediate container has all of the tools and source in it, and can be used to build.
|
||||
5. Get a shell in that intermediate container, mounting the current directory in: `docker run -it --rm -v ${PWD}:/src <hash> sh`
|
||||
|
||||
This will give you a read-to-run kernel build environment, with all of the config files in `/src/`.
|
||||
|
||||
For the output of step 4, e.g.:
|
||||
|
||||
```
|
||||
Step X/29 : COMMAND
|
||||
---> b2a4a976d661
|
||||
```
|
||||
|
||||
Once you have your shell, and you want to run the config, you can do the following. We assume you have launched your config container using the steps above, i.e. `docker run -it --rm -v ${PWD}:/src <hash> sh`. The kernel source is in `/linux/`, while the `kernel/` directory from linuxkit is in `/src/`:
|
||||
|
||||
Unless you are building the config from scratch, you probably want to make small modifications to the existing config.
|
||||
|
||||
The appropriate config at `/src/kernel.config-<series>` was already copied over to `/linux/.config` by the build.
|
||||
|
||||
1. `cd /linux`
|
||||
2. `make menuconfig`
|
||||
3. Load in the existing config: On the bottom menu, use the left-right arrow keys to `Load`
|
||||
4. Load it from `.config`
|
||||
5. `Exit` from the `Load` pop-up and make the desired changes
|
||||
6. Save the modified config: On the bottom menu, use the left-right arrow keys to `Save`
|
||||
7. Save it to `.config`
|
||||
8. Exit the menu by selecting `Exit` from the bottom meny as many times as necessary
|
||||
9. Copy the saved config to the mount location: `cp /linux/.config /src/some-saved-name.config` (replace with an appropriate name)
|
||||
10. Exit out of the container
|
||||
11. Check the differences generated by menuconfig with `diff kernel.config-<series> some-saved-name.config`.
|
||||
* If the changes are as you expected, proceed to the next step
|
||||
* If the changes are different, either return to the container and menuconfig, or edit manually
|
||||
12. Copy the new config file to the build location: `cp some-saved-name.config kernel.config-<series>`
|
||||
13. Run your build: `make build_<series>`
|
||||
|
||||
|
||||
|
||||
## Working with Linux kernel patches for LinuxKit
|
||||
|
||||
@ -205,20 +182,25 @@ future.
|
||||
|
||||
### Preparation
|
||||
|
||||
Patches are applied to point releases of the linux stable tree. You need an up-to-date copy of that tree:
|
||||
Patches are applied to point releases of the linux stable tree. You
|
||||
need an up-to-date copy of that tree:
|
||||
|
||||
```sh
|
||||
git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
|
||||
```
|
||||
|
||||
Add it as a remote to a clone of the [LinuxKit clone](https://github.com/linuxkit/linux).
|
||||
|
||||
We use the following variables:
|
||||
- `KITSRC`: Base directory of LinuxKit repository
|
||||
- `LINUXSRC`: Base directory of Linux stable kernel repository
|
||||
e.g.:
|
||||
|
||||
```sh
|
||||
KITSRC=~/src/linuxkit/linuxkit
|
||||
LINUXSRC=~/src/linuxkit/linux
|
||||
```
|
||||
|
||||
to refer to the location of the LinuxKit and Linux kernel trees.
|
||||
|
||||
|
||||
@ -228,6 +210,7 @@ There are different ways to do this, but we recommend applying the
|
||||
patches to the current version and then rebase to the new version. We
|
||||
define the following variables to refer to the current base tag and
|
||||
the new tag you want to rebase the patches to:
|
||||
|
||||
```sh
|
||||
CURTAG=v4.9.14
|
||||
NEWTAG=v4.9.15
|
||||
@ -235,6 +218,7 @@ NEWTAG=v4.9.15
|
||||
|
||||
If you don't already have a branch, it's best to import the current
|
||||
patch set and then rebase:
|
||||
|
||||
```sh
|
||||
cd $LINUXSRC
|
||||
git checkout -b ${NEWTAG}-linuxkit ${CURTAG}
|
||||
@ -249,12 +233,14 @@ conflicts resolve them, then `git add <files>` and `git rebase
|
||||
If you already have linux tree with a `${CURTAG}-linuxkit` branch, you
|
||||
can rebase by creating a new branch from the current branch and then
|
||||
rebase:
|
||||
|
||||
```sh
|
||||
cd $LINUXSRC
|
||||
git checkout ${CURTAG}-linuxkit
|
||||
git branch ${NEWTAG}-linuxkit ${CURTAG}-linuxkit
|
||||
git rebase --onto ${NEWTAG} ${NEWTAG} ${NEWTAG}-linuxkit
|
||||
```
|
||||
|
||||
Again, resolve any conflicts as described above.
|
||||
|
||||
|
||||
@ -271,6 +257,7 @@ If the patch is not cherry-picked try to include as much information
|
||||
in the commit message as possible as to where the patch originated
|
||||
from. The canonical form would be to add a `Origin:` line after the
|
||||
DCO lines, e.g.:
|
||||
|
||||
```
|
||||
Origin: https://patchwork.ozlabs.org/patch/622404/
|
||||
```
|
||||
@ -279,6 +266,7 @@ Origin: https://patchwork.ozlabs.org/patch/622404/
|
||||
|
||||
To export patches to LinuxKit, you should use `git format-patch` from
|
||||
the Linux tree, e.g., something along these lines:
|
||||
|
||||
```sh
|
||||
cd $LINUXSRC
|
||||
rm $KITSRC/kernel/patches-4.9.x/*
|
||||
@ -296,8 +284,11 @@ The simplest way to use the `perf` utility is to add the package to
|
||||
the `init` section in the YAML file. This adds the binary to the root
|
||||
filesystem.
|
||||
|
||||
To use the binary, you can either bind mount it into the `getty` or `ssh` service container or you can access the root filesystem from the `getty` container via `nsenter`:
|
||||
```
|
||||
To use the binary, you can either bind mount it into the `getty` or
|
||||
`ssh` service container or you can access the root filesystem from the
|
||||
`getty` container via `nsenter`:
|
||||
|
||||
```sh
|
||||
nsenter -m/proc/1/ns/mnt ash
|
||||
```
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM linuxkit/alpine:87a0cd10449d72f374f950004467737dbf440630 AS kernel-build
|
||||
FROM linuxkit/alpine:a120ad6aead3fe583eaa20e9b75a05ac1b3487da AS kernel-build
|
||||
RUN apk add \
|
||||
argp-standalone \
|
||||
automake \
|
||||
|
36
kernel/Dockerfile.kconfig
Normal file
36
kernel/Dockerfile.kconfig
Normal file
@ -0,0 +1,36 @@
|
||||
FROM linuxkit/alpine:a120ad6aead3fe583eaa20e9b75a05ac1b3487da AS kernel-build
|
||||
RUN apk add \
|
||||
argp-standalone \
|
||||
build-base \
|
||||
curl \
|
||||
diffutils \
|
||||
ncurses-dev \
|
||||
tar \
|
||||
xz
|
||||
|
||||
ARG KERNEL_VERSIONS
|
||||
|
||||
# There is no simple way to copy directories with wild cards as needed
|
||||
# for patches-*. Copy the entire dir instead.
|
||||
COPY / /
|
||||
|
||||
# Unpack kernels (download if not present)
|
||||
RUN for VERSION in ${KERNEL_VERSIONS}; do \
|
||||
KERNEL_SOURCE=https://www.kernel.org/pub/linux/kernel/v4.x/linux-${VERSION}.tar.xz && \
|
||||
[ -f sources/linux-${VERSION}.tar.xz ] || curl -fSLo sources/linux-${VERSION}.tar.xz ${KERNEL_SOURCE} && \
|
||||
tar xf sources/linux-${VERSION}.tar.xz; \
|
||||
done
|
||||
|
||||
# Apply patches to all kernels and move config files into place
|
||||
RUN for VERSION in ${KERNEL_VERSIONS}; do \
|
||||
SERIES=${VERSION%.*}.x && \
|
||||
cd /linux-${VERSION} && \
|
||||
for patch in /patches-${SERIES}/*.patch; do \
|
||||
echo "Applying $patch" && \
|
||||
patch -p1 < "$patch"; \
|
||||
done && \
|
||||
mv /kernel_config-${SERIES}-x86_64 arch/x86/configs/x86_64_defconfig && \
|
||||
mv /kernel_config-${SERIES}-aarch64 arch/arm64/configs/defconfig; \
|
||||
done
|
||||
|
||||
ENTRYPOINT ["/bin/sh"]
|
@ -49,6 +49,8 @@ COMMIT_LABEL=--label org.opencontainers.image.revision=$(REPO_COMMIT)
|
||||
endif
|
||||
LABELS=$(REPO_LABEL) $(COMMIT_LABEL)
|
||||
|
||||
KERNEL_VERSIONS=
|
||||
|
||||
.PHONY: check tag push
|
||||
# Targets:
|
||||
# fetch: Downloads the kernel sources into ./sources
|
||||
@ -76,6 +78,7 @@ define kernel
|
||||
ifeq ($(3),)
|
||||
sources/linux-$(1).tar.xz: Makefile | sources
|
||||
curl -fsSLo sources/linux-$(1).tar.xz https://www.kernel.org/pub/linux/kernel/v4.x/linux-$(1).tar.xz
|
||||
KERNEL_VERSIONS+=$(1)
|
||||
endif
|
||||
|
||||
build_$(2)$(3): Dockerfile Makefile $(wildcard patches-$(2)/*) $(wildcard kernel_config-$(2)*) kernel_config.debug | sources
|
||||
@ -133,3 +136,9 @@ endef
|
||||
$(eval $(call kernel,4.9.44,4.9.x))
|
||||
$(eval $(call kernel,4.9.44,4.9.x,_dbg))
|
||||
$(eval $(call kernel,4.4.83,4.4.x))
|
||||
|
||||
# Target for kernel config
|
||||
kconfig: | sources
|
||||
docker build --no-cache -f Dockerfile.kconfig \
|
||||
--build-arg KERNEL_VERSIONS="$(KERNEL_VERSIONS)" \
|
||||
-t linuxkit/kconfig .
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -245,6 +245,7 @@ CONFIG_UPROBES=y
|
||||
CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
|
||||
CONFIG_ARCH_USE_BUILTIN_BSWAP=y
|
||||
CONFIG_KRETPROBES=y
|
||||
CONFIG_USER_RETURN_NOTIFIER=y
|
||||
CONFIG_HAVE_IOREMAP_PROT=y
|
||||
CONFIG_HAVE_KPROBES=y
|
||||
CONFIG_HAVE_KRETPROBES=y
|
||||
@ -350,6 +351,7 @@ CONFIG_DEFAULT_DEADLINE=y
|
||||
# CONFIG_DEFAULT_CFQ is not set
|
||||
# CONFIG_DEFAULT_NOOP is not set
|
||||
CONFIG_DEFAULT_IOSCHED="deadline"
|
||||
CONFIG_PREEMPT_NOTIFIERS=y
|
||||
CONFIG_ASN1=y
|
||||
CONFIG_INLINE_SPIN_UNLOCK_IRQ=y
|
||||
CONFIG_INLINE_READ_UNLOCK=y
|
||||
@ -477,7 +479,7 @@ CONFIG_BOUNCE=y
|
||||
CONFIG_VIRT_TO_BUS=y
|
||||
CONFIG_MMU_NOTIFIER=y
|
||||
CONFIG_KSM=y
|
||||
CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
|
||||
CONFIG_DEFAULT_MMAP_MIN_ADDR=65536
|
||||
CONFIG_TRANSPARENT_HUGEPAGE=y
|
||||
CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y
|
||||
# CONFIG_TRANSPARENT_HUGEPAGE_MADVISE is not set
|
||||
@ -747,7 +749,7 @@ CONFIG_IP_PIMSM_V2=y
|
||||
CONFIG_SYN_COOKIES=y
|
||||
CONFIG_NET_IPVTI=m
|
||||
CONFIG_NET_UDP_TUNNEL=y
|
||||
CONFIG_NET_FOU=m
|
||||
CONFIG_NET_FOU=y
|
||||
CONFIG_NET_FOU_IP_TUNNELS=y
|
||||
CONFIG_INET_AH=m
|
||||
CONFIG_INET_ESP=m
|
||||
@ -775,7 +777,7 @@ CONFIG_INET6_IPCOMP=m
|
||||
CONFIG_IPV6_MIP6=m
|
||||
CONFIG_IPV6_ILA=m
|
||||
CONFIG_INET6_XFRM_TUNNEL=m
|
||||
CONFIG_INET6_TUNNEL=m
|
||||
CONFIG_INET6_TUNNEL=y
|
||||
CONFIG_INET6_XFRM_MODE_TRANSPORT=m
|
||||
CONFIG_INET6_XFRM_MODE_TUNNEL=m
|
||||
CONFIG_INET6_XFRM_MODE_BEET=m
|
||||
@ -784,7 +786,7 @@ CONFIG_IPV6_VTI=m
|
||||
CONFIG_IPV6_SIT=m
|
||||
CONFIG_IPV6_SIT_6RD=y
|
||||
CONFIG_IPV6_NDISC_NODETYPE=y
|
||||
CONFIG_IPV6_TUNNEL=m
|
||||
CONFIG_IPV6_TUNNEL=y
|
||||
CONFIG_IPV6_GRE=m
|
||||
CONFIG_IPV6_MULTIPLE_TABLES=y
|
||||
CONFIG_IPV6_SUBTREES=y
|
||||
@ -1334,7 +1336,7 @@ CONFIG_VIRTIO_BLK=y
|
||||
# CONFIG_BLK_DEV_HD is not set
|
||||
# CONFIG_BLK_DEV_RBD is not set
|
||||
# CONFIG_BLK_DEV_RSXX is not set
|
||||
CONFIG_BLK_DEV_NVME=m
|
||||
CONFIG_BLK_DEV_NVME=y
|
||||
|
||||
#
|
||||
# Misc devices
|
||||
@ -1646,12 +1648,17 @@ CONFIG_DUMMY=m
|
||||
# CONFIG_EQUALIZER is not set
|
||||
# CONFIG_NET_FC is not set
|
||||
# CONFIG_IFB is not set
|
||||
# CONFIG_NET_TEAM is not set
|
||||
CONFIG_NET_TEAM=m
|
||||
CONFIG_NET_TEAM_MODE_BROADCAST=m
|
||||
CONFIG_NET_TEAM_MODE_ROUNDROBIN=m
|
||||
CONFIG_NET_TEAM_MODE_RANDOM=m
|
||||
CONFIG_NET_TEAM_MODE_ACTIVEBACKUP=m
|
||||
CONFIG_NET_TEAM_MODE_LOADBALANCE=m
|
||||
CONFIG_MACVLAN=y
|
||||
CONFIG_MACVTAP=y
|
||||
CONFIG_IPVLAN=y
|
||||
CONFIG_VXLAN=y
|
||||
CONFIG_GENEVE=y
|
||||
CONFIG_GENEVE=m
|
||||
# CONFIG_NETCONSOLE is not set
|
||||
# CONFIG_NETPOLL is not set
|
||||
# CONFIG_NET_POLL_CONTROLLER is not set
|
||||
@ -1666,6 +1673,11 @@ CONFIG_NLMON=y
|
||||
#
|
||||
# CAIF transport drivers
|
||||
#
|
||||
CONFIG_VHOST_NET=m
|
||||
CONFIG_VHOST_VSOCK=m
|
||||
CONFIG_VHOST_RING=m
|
||||
CONFIG_VHOST=m
|
||||
# CONFIG_VHOST_CROSS_ENDIAN_LEGACY is not set
|
||||
|
||||
#
|
||||
# Distributed Switch Architecture drivers
|
||||
@ -1687,8 +1699,8 @@ CONFIG_MDIO=m
|
||||
CONFIG_NET_VENDOR_BROADCOM=y
|
||||
# CONFIG_B44 is not set
|
||||
# CONFIG_BCMGENET is not set
|
||||
# CONFIG_BNX2 is not set
|
||||
# CONFIG_CNIC is not set
|
||||
CONFIG_BNX2=m
|
||||
CONFIG_CNIC=m
|
||||
CONFIG_TIGON3=m
|
||||
# CONFIG_BNX2X is not set
|
||||
# CONFIG_BNXT is not set
|
||||
@ -1716,16 +1728,20 @@ CONFIG_IXGBE=m
|
||||
# CONFIG_IXGBE_VXLAN is not set
|
||||
CONFIG_IXGBE_HWMON=y
|
||||
CONFIG_IXGBEVF=m
|
||||
# CONFIG_I40E is not set
|
||||
# CONFIG_I40EVF is not set
|
||||
CONFIG_I40E=m
|
||||
# CONFIG_I40E_VXLAN is not set
|
||||
CONFIG_I40EVF=m
|
||||
# CONFIG_FM10K is not set
|
||||
# CONFIG_NET_VENDOR_I825XX is not set
|
||||
# CONFIG_JME is not set
|
||||
# CONFIG_NET_VENDOR_MARVELL is not set
|
||||
CONFIG_NET_VENDOR_MELLANOX=y
|
||||
# CONFIG_MLX4_EN is not set
|
||||
# CONFIG_MLX4_CORE is not set
|
||||
# CONFIG_MLX5_CORE is not set
|
||||
CONFIG_MLX4_EN=m
|
||||
CONFIG_MLX4_EN_VXLAN=y
|
||||
CONFIG_MLX4_CORE=m
|
||||
CONFIG_MLX4_DEBUG=y
|
||||
CONFIG_MLX5_CORE=m
|
||||
CONFIG_MLX5_CORE_EN=y
|
||||
# CONFIG_MLXSW_CORE is not set
|
||||
# CONFIG_NET_VENDOR_MICREL is not set
|
||||
# CONFIG_NET_VENDOR_MYRI is not set
|
||||
@ -1970,6 +1986,7 @@ CONFIG_HW_RANDOM_INTEL=y
|
||||
CONFIG_HW_RANDOM_AMD=y
|
||||
CONFIG_HW_RANDOM_VIA=y
|
||||
CONFIG_HW_RANDOM_VIRTIO=y
|
||||
CONFIG_HW_RANDOM_TPM=m
|
||||
CONFIG_NVRAM=y
|
||||
# CONFIG_R3964 is not set
|
||||
# CONFIG_APPLICOM is not set
|
||||
@ -1979,7 +1996,16 @@ CONFIG_HPET=y
|
||||
CONFIG_HPET_MMAP=y
|
||||
CONFIG_HPET_MMAP_DEFAULT=y
|
||||
CONFIG_HANGCHECK_TIMER=y
|
||||
# CONFIG_TCG_TPM is not set
|
||||
CONFIG_TCG_TPM=m
|
||||
CONFIG_TCG_TIS=m
|
||||
CONFIG_TCG_TIS_I2C_ATMEL=m
|
||||
CONFIG_TCG_TIS_I2C_INFINEON=m
|
||||
CONFIG_TCG_TIS_I2C_NUVOTON=m
|
||||
CONFIG_TCG_NSC=m
|
||||
CONFIG_TCG_ATMEL=m
|
||||
CONFIG_TCG_INFINEON=m
|
||||
CONFIG_TCG_XEN=m
|
||||
CONFIG_TCG_CRB=m
|
||||
# CONFIG_TELCLOCK is not set
|
||||
CONFIG_DEVPORT=y
|
||||
# CONFIG_XILLYBUS is not set
|
||||
@ -2732,7 +2758,17 @@ CONFIG_RTC_DRV_CMOS=y
|
||||
# CONFIG_RTC_DRV_HID_SENSOR_TIME is not set
|
||||
# CONFIG_DMADEVICES is not set
|
||||
# CONFIG_AUXDISPLAY is not set
|
||||
# CONFIG_UIO is not set
|
||||
CONFIG_UIO=m
|
||||
# CONFIG_UIO_CIF is not set
|
||||
# CONFIG_UIO_PDRV_GENIRQ is not set
|
||||
# CONFIG_UIO_DMEM_GENIRQ is not set
|
||||
# CONFIG_UIO_AEC is not set
|
||||
# CONFIG_UIO_SERCOS3 is not set
|
||||
# CONFIG_UIO_PCI_GENERIC is not set
|
||||
# CONFIG_UIO_NETX is not set
|
||||
# CONFIG_UIO_PRUSS is not set
|
||||
# CONFIG_UIO_MF624 is not set
|
||||
CONFIG_IRQ_BYPASS_MANAGER=m
|
||||
# CONFIG_VIRT_DRIVERS is not set
|
||||
CONFIG_VIRTIO=y
|
||||
|
||||
@ -3177,7 +3213,7 @@ CONFIG_DEBUG_INFO_SPLIT=y
|
||||
# CONFIG_DEBUG_INFO_DWARF4 is not set
|
||||
# CONFIG_GDB_SCRIPTS is not set
|
||||
# CONFIG_ENABLE_WARN_DEPRECATED is not set
|
||||
# CONFIG_ENABLE_MUST_CHECK is not set
|
||||
CONFIG_ENABLE_MUST_CHECK=y
|
||||
CONFIG_FRAME_WARN=1024
|
||||
# CONFIG_STRIP_ASM_SYMS is not set
|
||||
# CONFIG_READABLE_ASM is not set
|
||||
@ -3392,6 +3428,7 @@ CONFIG_X86_DEBUG_FPU=y
|
||||
CONFIG_KEYS=y
|
||||
CONFIG_PERSISTENT_KEYRINGS=y
|
||||
CONFIG_BIG_KEYS=y
|
||||
# CONFIG_TRUSTED_KEYS is not set
|
||||
CONFIG_ENCRYPTED_KEYS=y
|
||||
CONFIG_SECURITY_DMESG_RESTRICT=y
|
||||
CONFIG_SECURITY=y
|
||||
@ -3593,7 +3630,24 @@ CONFIG_PKCS7_MESSAGE_PARSER=y
|
||||
#
|
||||
# CONFIG_SYSTEM_TRUSTED_KEYRING is not set
|
||||
CONFIG_HAVE_KVM=y
|
||||
# CONFIG_VIRTUALIZATION is not set
|
||||
CONFIG_HAVE_KVM_IRQCHIP=y
|
||||
CONFIG_HAVE_KVM_IRQFD=y
|
||||
CONFIG_HAVE_KVM_IRQ_ROUTING=y
|
||||
CONFIG_HAVE_KVM_EVENTFD=y
|
||||
CONFIG_KVM_APIC_ARCHITECTURE=y
|
||||
CONFIG_KVM_MMIO=y
|
||||
CONFIG_KVM_ASYNC_PF=y
|
||||
CONFIG_HAVE_KVM_MSI=y
|
||||
CONFIG_HAVE_KVM_CPU_RELAX_INTERCEPT=y
|
||||
CONFIG_KVM_VFIO=y
|
||||
CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT=y
|
||||
CONFIG_KVM_COMPAT=y
|
||||
CONFIG_HAVE_KVM_IRQ_BYPASS=y
|
||||
CONFIG_VIRTUALIZATION=y
|
||||
CONFIG_KVM=m
|
||||
CONFIG_KVM_INTEL=m
|
||||
CONFIG_KVM_AMD=m
|
||||
# CONFIG_KVM_MMU_AUDIT is not set
|
||||
CONFIG_BINARY_PRINTF=y
|
||||
|
||||
#
|
||||
|
44
scripts/kconfig-split.py
Executable file
44
scripts/kconfig-split.py
Executable file
@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
# This is a slightly modified version of ChromiumOS' splitconfig
|
||||
# https://chromium.googlesource.com/chromiumos/third_party/kernel/+/stabilize-5899.B-chromeos-3.14/chromeos/scripts/splitconfig
|
||||
|
||||
"""See this page for more details:
|
||||
http://dev.chromium.org/chromium-os/how-tos-and-troubleshooting/kernel-configuration
|
||||
"""
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
|
||||
allconfigs = {}
|
||||
|
||||
# Parse config files
|
||||
for config in sys.argv[1:]:
|
||||
|
||||
allconfigs[config] = set()
|
||||
|
||||
for line in open(config):
|
||||
m = re.match("#*\s*CONFIG_(\w+)[\s=](.*)$", line)
|
||||
if not m:
|
||||
continue
|
||||
option, value = m.groups()
|
||||
allconfigs[config].add((option, value))
|
||||
|
||||
# Split out common config options
|
||||
common = allconfigs.values()[0].copy()
|
||||
for config in allconfigs.keys():
|
||||
common &= allconfigs[config]
|
||||
for config in allconfigs.keys():
|
||||
allconfigs[config] -= common
|
||||
|
||||
allconfigs["common"] = common
|
||||
|
||||
# Generate new splitconfigs
|
||||
for config in allconfigs.keys():
|
||||
f = open("split-" + config, "w")
|
||||
for option, value in sorted(list(allconfigs[config])):
|
||||
if value == "is not set":
|
||||
print >>f, "# CONFIG_%s %s" % (option, value)
|
||||
else:
|
||||
print >>f, "CONFIG_%s=%s" % (option, value)
|
||||
f.close()
|
Loading…
Reference in New Issue
Block a user