Skip to content

Commit

Permalink
Update buildroot to 2024.02.3 LTS release
Browse files Browse the repository at this point in the history
* Update to release 2024.02.3.
* Update build env to SLE 15.6.
* Drop local package for slirp4netns, is has been upstreamed.
* Add xargs from findutils; it has always been built but not included
* Drop xargs applet from busybox, it has always been included but not
  linked.
* Drop ppc64 and s390x since we are no longer producing K3s for these
  platforms. We'll leave riscv64 since it may be coming at some point in
  the future.

Signed-off-by: Brad Davidson <[email protected]>
  • Loading branch information
brandond committed Jul 9, 2024
1 parent be4d58e commit 56c2c4a
Show file tree
Hide file tree
Showing 19 changed files with 646 additions and 480 deletions.
99 changes: 1 addition & 98 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ steps:
path: /var/run/docker.sock

- name: fossa
image: registry.suse.com/suse/sle15:15.3
image: registry.suse.com/suse/sle15:15.6
failure: ignore
environment:
FOSSA_API_KEY:
Expand Down Expand Up @@ -160,103 +160,6 @@ volumes:
host:
path: /var/run/docker.sock

---
kind: pipeline
type: docker
name: k3s-root-linux-ppc64le

platform:
os: linux
arch: amd64

steps:
- name: build-ppc64le
image: rancher/dapper:v0.5.0
commands:
- dapper ci
environment:
BUILDARCH: ppc64le
VERBOSE: "0"
volumes:
- name: docker
path: /var/run/docker.sock

- name: github-ppc64le-binary-release
image: plugins/github-release
settings:
api_key:
from_secret: github_token
checksum:
- sha256
checksum_file: CHECKSUMsum-ppc64le.txt
checksum_flatten: true
files:
- dist/k3s-*ppc64le.tar
prerelease: true
when:
event:
- tag
instance:
- drone-publish.k3s.io
ref:
- refs/head/master
- refs/tags/*

volumes:
- name: docker
host:
path: /var/run/docker.sock

---
kind: pipeline
type: docker
name: k3s-root-linux-s390x

platform:
os: linux
arch: amd64

node:
arch: s390x

steps:
- name: build-s390x
image: rancher/dapper:v0.5.7
commands:
- dapper ci
environment:
BUILDARCH: s390x
VERBOSE: "0"
volumes:
- name: docker
path: /var/run/docker.sock

- name: github-s390x-binary-release
image: dweomer/drone-github-release:s390x
settings:
api_key:
from_secret: github_token
checksum:
- sha256
checksum_file: CHECKSUMsum-s390x.txt
checksum_flatten: true
files:
- dist/k3s-*s390x.tar
prerelease: true
when:
event:
- tag
instance:
- drone-publish.k3s.io
ref:
- refs/head/master
- refs/tags/*

volumes:
- name: docker
host:
path: /var/run/docker.sock

---
kind: pipeline
type: docker
Expand Down
10 changes: 7 additions & 3 deletions Dockerfile.dapper
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
FROM registry.suse.com/bci/bci-base:15.4
FROM registry.suse.com/suse/sle15:15.6
RUN zypper remove -y container-suseconnect && \
zypper install -y -t pattern devel_basis && \
zypper remove -y gcc-7 && \
zypper install -y \
bc \
bzip2 \
ccache \
cmake \
gawk \
gcc-c++ \
gcc13 \
gcc13-c++ \
git \
gzip \
hostname \
Expand All @@ -20,7 +22,9 @@ RUN zypper remove -y container-suseconnect && \
subversion \
unzip \
wget \
zstd
zstd && \
ln -sf /usr/bin/gcc-13 /usr/bin/gcc && \
ln -sf /usr/bin/g++-13 /usr/bin/g++

ENV DAPPER_SOURCE /source
ENV DAPPER_OUTPUT ./artifacts ./dist
Expand Down
33 changes: 13 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
# k3s-root
==========

_NOTE: this repository has been recently (2020-11-18) moved out of the github.com/rancher org to github.com/k3s-io
supporting the [acceptance of K3s as a CNCF sandbox project](https://github.com/cncf/toc/pull/447)_.

---

`k3s-root` is based on https://github.com/buildroot/buildroot and provides the userspace binaries for `rancher/k3s`

## Building
Expand All @@ -30,18 +25,16 @@ The default way of building this project is through container using dapper. If y

## Upgrading to new buildroot version

To upgrade to a new buildroot version, you must follow 4 steps:

1 - Modify the BUILDROOT_VERSION in scripts/download

2 - Check what is the busybox version in the new buildroot package. Then, upgrade the package/busybox.config by cloning the [busybox project](https://github.com/mirror/busybox) and then:
```
git checkout $busybox_version
cp $K3S_ROOT_PATH/package/busybox.config .config
make oldconfig
# Choose the new options
cp .config $K3S_ROOT_PATH/package/busybox.config
```
3 - Follow the same steps with the buildroot/ configurations. The command `make oldconfig` also works in the buildroot project

4 - Verify if the upgrade worked correctly by comparing the old tarball and the new one. If the same files are there, then you are set
To upgrade to a new buildroot version:

1. Check out a new branch for your work: `git checkout -B bump-buildroot origin/master`
1. Modify the `BUILDROOT_VERSION` in scripts/download
2. Run `make download` to prepare a Docker image for further work
4. For each target architecture:
1. Start a shell in the resulting image: `docker run --rm -it -e BUILDARCH=<ARCH> k3s-root:bump_buildroot /bin/bash`
2. Run `./scripts/download && ./scripts/patch`
3. Run `cd /usr/src/buildroot && make olddefconfig`
4. Outside the container, split changes to the buildroot `.config` into `buildroot/config` and `buildroot/<ARCH>config`
5. Run `make BUILDARCH=<ARCH>`
6. Verify if the upgrade worked correctly by comparing the old tarball and the new one. If the same files are there, then you are set.
If the build failed, or some files are missing, you may need to remove or adapt patches or config for the new buildroot version.
15 changes: 15 additions & 0 deletions buildroot/amd64config
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ BR2_x86_nocona=y
# BR2_x86_westmere is not set
# BR2_x86_corei7_avx is not set
# BR2_x86_sandybridge is not set
# BR2_x86_ivybridge is not set
# BR2_x86_core_avx2 is not set
# BR2_x86_haswell is not set
# BR2_x86_broadwell is not set
Expand All @@ -62,6 +63,10 @@ BR2_x86_nocona=y
# BR2_x86_goldmont is not set
# BR2_x86_goldmont_plus is not set
# BR2_x86_tremont is not set
# BR2_x86_sierraforest is not set
# BR2_x86_grandridge is not set
# BR2_x86_knightslanding is not set
# BR2_x86_knightsmill is not set
# BR2_x86_skylake_avx512 is not set
# BR2_x86_cannonlake is not set
# BR2_x86_icelake_client is not set
Expand All @@ -72,8 +77,18 @@ BR2_x86_nocona=y
# BR2_x86_sapphirerapids is not set
# BR2_x86_alderlake is not set
# BR2_x86_rocketlake is not set
# BR2_x86_graniterapids is not set
# BR2_x86_graniterapids_d is not set
# BR2_x86_opteron is not set
# BR2_x86_opteron_sse3 is not set
# BR2_x86_barcelona is not set
# BR2_x86_bobcat is not set
# BR2_x86_jaguar is not set
# BR2_x86_bulldozer is not set
# BR2_x86_piledriver is not set
# BR2_x86_steamroller is not set
# BR2_x86_excavator is not set
# BR2_x86_zen is not set
# BR2_x86_zen2 is not set
# BR2_x86_zen3 is not set
# BR2_x86_zen4 is not set
1 change: 1 addition & 0 deletions buildroot/arm64config
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,6 @@ BR2_cortex_a53=y
# BR2_ARM_FPU_VFPV4D16 is not set
BR2_ARM_FPU_FP_ARMV8=y
# BR2_ARM64_PAGE_SIZE_4K is not set
# BR2_ARM64_PAGE_SIZE_16K is not set
BR2_ARM64_PAGE_SIZE_64K=y
BR2_ARM64_PAGE_SIZE="64K"
1 change: 0 additions & 1 deletion buildroot/armconfig
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ BR2_ARM_CPU_ARMV6=y
# armv5 cores
#
# BR2_arm926t is not set
# BR2_iwmmxt is not set
# BR2_xscale is not set

#
Expand Down
Loading

0 comments on commit 56c2c4a

Please sign in to comment.