move kernel series status into series dir

Signed-off-by: Avi Deitcher <avi@deitcher.net>
This commit is contained in:
Avi Deitcher 2024-03-03 12:49:17 +02:00
parent de6978908f
commit 3e7df6c869
8 changed files with 18 additions and 16 deletions

View File

@ -333,7 +333,8 @@ Finally, test that you can build the kernel with that config as `make build-<ver
If you want to add a new kernel version within an existing series, e.g. `5.15.27` already exists If you want to add a new kernel version within an existing series, e.g. `5.15.27` already exists
and you want to add (or replace it with) `5.15.148`, apply the following process. and you want to add (or replace it with) `5.15.148`, apply the following process.
1. Modify the list of kernels inside the `Makefile` to include the new version, and, optionally, remove the old one, or move it to deprecated. 1. Determine the series, i.e. the kernel major.minor version, followed by `x`. E.g. for `5.15.148`, the series is `5.15.x`.
1. Modify the `KERNEL_VERSION` in the `build-args` file in the series directory to the new version. E.g. `5.15.x/build-args`.
1. Create a new `linuxkit/kconfig` container image: `make kconfig`. This is not pushed out. 1. Create a new `linuxkit/kconfig` container image: `make kconfig`. This is not pushed out.
1. Run a container based on `linuxkit/kconfig`. 1. Run a container based on `linuxkit/kconfig`.
```sh ```sh
@ -344,7 +345,6 @@ docker run --rm -ti -v $(pwd):/src linuxkit/kconfig
1. If the config file has changed, copy it out of the container and check it in, e.g. `cp .config /src/5.15.x/config-x86_64`. 1. If the config file has changed, copy it out of the container and check it in, e.g. `cp .config /src/5.15.x/config-x86_64`.
1. Repeat for other architectures. 1. Repeat for other architectures.
1. Commit the changed config files. 1. Commit the changed config files.
1. Modify the `KERNEL_VERSION` in the `build-args` file in the series directory to the new version. E.g. `5.15.x/build-args`.
1. Test that you can build the kernel with that config as `make build-<version>`, e.g. `make build-5.15.148`. 1. Test that you can build the kernel with that config as `make build-<version>`, e.g. `make build-5.15.148`.
## Adding a new kernel series ## Adding a new kernel series
@ -360,12 +360,10 @@ KERNEL_VERSION=<version>
KERNEL_SERIES=<series> KERNEL_SERIES=<series>
BUILD_IMAGE=linuxkit/alpine:<builder> BUILD_IMAGE=linuxkit/alpine:<builder>
``` ```
1. Update the list of kernels to build in the `Makefile`
Since the last major series likely is the best basis for the new one, subject to additional modifications, you can use Since the last major series likely is the best basis for the new one, subject to additional modifications, you can use
the previous one as a starting point. the previous one as a starting point.
1. Modify the list of kernels inside the `Makefile` to include the new version. You do not need to specify the series anywhere, as the `Makefile` calculates it. E.g. adding `7.0.5` will cause it to calculate the series as `7.0.x` automatically.
1. Make the directory for the new series, e.g. `mkdir 7.0.x` 1. Make the directory for the new series, e.g. `mkdir 7.0.x`
1. Create a new `linuxkit/kconfig` container image: `make kconfig`. This is not pushed out. 1. Create a new `linuxkit/kconfig` container image: `make kconfig`. This is not pushed out.
1. Run a container based on `linuxkit/kconfig`. 1. Run a container based on `linuxkit/kconfig`.

0
kernel/5.10.x/deprecated Normal file
View File

View File

0
kernel/5.11.x/deprecated Normal file
View File

3
kernel/5.15.x/build-args Normal file
View File

@ -0,0 +1,3 @@
KERNEL_VERSION=5.15.27
KERNEL_SERIES=5.15.x
BUILD_IMAGE=linuxkit/alpine:146f540f25cd92ec8ff0c5b0c98342a9a95e479e

0
kernel/5.15.x/deprecated Normal file
View File

0
kernel/5.4.x/deprecated Normal file
View File

View File

@ -76,21 +76,22 @@ baseimage = $(ORG)/$(IMAGE)$(call baseimageextension,$(1))
uniq = $(if $1,$(firstword $1) $(call uniq,$(filter-out $(firstword $1),$1))) uniq = $(if $1,$(firstword $1) $(call uniq,$(filter-out $(firstword $1),$1)))
# DEPRECATED : all kernel versions (actually series) marked as deprecated
# You might still be able to build them, but they are not built by default or supported
DEPRECATED_list=$(wildcard */deprecated)
DEPRECATED := $(patsubst %/deprecated,%,$(DEPRECATED_list))
# #
# Kernel versions to build. # KERNELS : all potential kernel versions, based on the build-args files
# Use all for kernels to be built on all platforms; use KERNELS_x86_64 or KERNELS_aarch64 for platform-specific kernels
KERNELS_all=6.6.13 5.15.27
KERNELS_x86_64=
KERNELS_aarch64=
# deprecated versions. You might still be able to build them, but they are not built by default or supported # first find all known build-args files
# Use all for kernels to be built on all platforms; use DEPRECATED_x86_64 or DEPRECATED_aarch64 for platform-specific kernels KERNELS_buildargfiles=$(wildcard */build-args)
DEPRECATED_all=5.10.104 5.11.4-rt # get their directories
DEPRECATED_x86_64=5.4.172 KERNELS_alldirs=$(patsubst %/build-args,%,$(KERNELS_buildargfiles))
DEPRECATED_aarch64= # remove any directories that are marked as deprecated; what is left is valid dirs
KERNELS_validdirs=$(filter-out $(DEPRECATED),$(KERNELS_alldirs))
# get the values from the valid dirs
KERNELS=$(shell awk -F= '/^KERNEL_VERSION=/ {print $$2}' $(addsuffix /build-args,$(KERNELS_validdirs)))
KERNELS?=$(KERNELS_all) $(KERNELS_$(ARCH))
DEPRECATED?=$(DEPRECATED_all) $(DEPRECATED_$(ARCH))
# we build all tools across all platforms and kernels that we build # we build all tools across all platforms and kernels that we build
TOOLS=bcc perf TOOLS=bcc perf