Embedded Linux image build tooling for the chromebook kevin
Main boot support is for efistub via u-boot on libreboot firmware.
OS support is focused on Ubuntu at the moment, but this should work with any deb-like distro.
Effort will be made to keep this compatiable with default google firmware,
but note that I no longer have hardware to test against
(unless I reflash back, which I could be convinced to do.)
(but it'd be more fun if you libreboot'ed too)
Any modern linux with docker installed
A decent amount of (fast) storage
./build-potassium.sh
# or run individual scripts
alias potassium="./scripts/container-exec.sh"
potassium scripts/kernel/download.sh
potassium scripts/rootfs/debootstrap.sh
# you can skip build steps if they've already run / are still clean
BUILD_SKIP_STEPS="kernel" potassium scripts/build.sh
# or skip sub-steps of a build step
KERNEL_BUILD_SKIP_STEPS="download patch" potassium scripts/build-steps/kernel.sh
# start over - must be set to "cleanall"
CLEAN_BUILD="cleanall" ./build-potassium.sh
# etc
# Your target
# Currently only kevin and ubuntu lunar are supported,
# and it will remain the default
TARGET="kevin-lunar"
# Target config (ex targets/kevin-lunar/target.conf)
# is (re)read early in the execution of each build step
# You can specify things there instead of at runtime
# Dangerous!
# When set to "cleanall" will rm -rf your entire tmpdir!
CLEAN_BUILD=false
# skip build steps
# scripts/build.sh
# BUILD_STEPS=("kernel" "rootfs" "bootloader" "image")
# ex: we want to skip rootfs step alltogether
BUILD_SKIP_STEPS="rootfs"
# scripts/build-steps/kernel.sh
# KERNEL_BUILD_STEPS=("download" "patch" "configure" "compile" "package")
# ex: we want to skip kernel download/config but still want to compile/package
KERNEL_BUILD_SKIP_STEPS="download patch configure"
# scripts/build-steps/rootfs.sh
# ROOTFS_BUILD_STEPS=("debootstrap")
ROOTFS_BUILD_SKIP_STEPS=""
./scripts/container-exec.sh bash
./scripts/container-exec.sh scripts/kernel/nconfig.sh
# do your thing with nconfig
# save it to "newconfig"
# then diffconfig it like such
./scripts/container-exec.sh bash
# inside container
cd tmp/kevin-lunar-cmdline/dst/kernel
make defconfig
source/scripts/diffconfig -m .config newconfig | tee targets/kevin-lunar-cmdline/kernel/diffconfig
# users root, ubuntu
# password potassium
# change it in scripts/roots/base-setup.sh
# wayland recommended
apt install ubuntu-desktop
kevin = K = potassium