No description
  • Shell 84.5%
  • Makefile 8.4%
  • Dockerfile 7.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Brad Davidson 4798b8fd8f Add id-token to release workflow for attest
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2026-06-09 18:27:31 -07:00
.github/workflows Add id-token to release workflow for attest 2026-06-09 18:27:31 -07:00
buildroot Bump buildroot to 2025.02 LTS 2025-09-02 15:01:53 -07:00
iptables-detect Correct redirection error 2020-07-24 08:58:38 -07:00
package Remove upstreamed ipset patch 2026-06-09 14:49:30 -07:00
patches Update buildroot to 2024.02.3 LTS release 2024-07-09 10:07:48 -07:00
scripts Convert CI from dapper+drone to buildx+gha 2026-06-09 14:49:30 -07:00
.dockerignore Initial Commit 2019-01-09 09:11:33 -07:00
.gitignore Remove lingering dapper/drone refs. 2026-06-09 18:27:31 -07:00
Dockerfile Remove lingering dapper/drone refs. 2026-06-09 18:27:31 -07:00
LICENSE Initial Commit 2019-01-09 09:11:33 -07:00
Makefile Remove lingering dapper/drone refs. 2026-06-09 18:27:31 -07:00
README.md Remove lingering dapper/drone refs. 2026-06-09 18:27:31 -07:00

k3s-root

==========

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

Building

k3s-root is built in docker, which means you should be able to simply make on your machine to compile. By default, make will compile for amd64. If you want to compile for other architectures, you can run commands like:

make ARCH=arm64

or alternatively, if you want to compile all architectures at once, you can run:

make all-build

If it is not the first time you build, delete the directories artifacts/ and dist/ to avoid problems when creating the symbolic link in the package step:

sudo rm -r artifacts/ dist/

The default way of building this project is through a docker container using docker buildx. While you may be able to run the build scripts standalone, we do not test or support doing so.

Upgrading to new buildroot version

To upgrade to a new buildroot version:

  1. Check out a new branch for your work: git checkout -B bump-buildroot origin/master
  2. Modify the BUILDROOT_VERSION in scripts/download
  3. 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-io/k3s-root:dev /bin/bash
    2. Run ./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.