Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update buildroot to 2024.02.3 LTS release #65

Merged
merged 1 commit into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any particular reason we are moving off bci-base? A 15.6 version of it does exist https://registry.suse.com/repositories/bci-bci-base-15sp6?tag=15.6.

Copy link
Member Author

@brandond brandond Jul 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They're the same image.

brandond@dev01:~$ skopeo inspect --raw docker://registry.suse.com/suse/sle15:15.6 | sha256sum
0b0aa0d0fd58bc617120898436ff0661fac936158f52a444afef6a25a07fc4d9  -
brandond@dev01:~$ skopeo inspect --raw docker://registry.suse.com/bci/bci-base:15.6 | sha256sum
0b0aa0d0fd58bc617120898436ff0661fac936158f52a444afef6a25a07fc4d9  -

This just addresses the inconsistency between the fossa and build steps.

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