Compare commits

...

9 Commits

Author SHA1 Message Date
Dustin 6258df154c ci: Add CAP_CHROOT to build container
dustin/photoframe2/pipeline/head This commit looks good Details
This is needed in order to run `passwd -R` to clear the root password
in the target filesystem.
2024-12-30 17:57:04 -06:00
Dustin 735600a31f ci: Use persistent volumes for portage, binpkgs
Recompiling the entire OS for every build takes way too long for
development purposes.  Since we build binary packages anyway, let's keep
them around between builds by storing them on a Kubernetes persistent
volume.

Eventually, I want add a build parameter to wipe out the binary package
storage to force a from-scratch build.  We'll use that option for robust
periodic builds, once development has slowed down.
2024-12-30 17:57:04 -06:00
Dustin 4ded67f1f4 Update Aimee OS 2024-12-30 17:57:04 -06:00
Dustin aede5cd116 ci: Clear env to run build
We don't need any of the environment variables Jenkins sets, and some of
them (like `GIT_COMMIT`) interfere with building packages.
2024-12-30 17:57:04 -06:00
Dustin 10d2d4fd7d Update aimee-os 2024-12-30 17:57:04 -06:00
Dustin 1faeebe66d portage: Install-mask systemd-nsresourced
I don't know what this is for; I think it has something to do with
containers, possibly for `systemd-npsawn`?  It spawns a bunch of
processes and wastes several megabytes of RAM.
2024-12-30 17:57:04 -06:00
Dustin 04232e6a06 customize: Add script
Deleting the initial password for `root` so we can log in to the serial
console for debugging.

Enabling _wpa_supplicant_ to connect to WiFi automatically.
2024-12-30 17:57:04 -06:00
Dustin b7937e98a6 Add Rasperry Pi WiFi support
We need the Broadcom firmware from the _linux-firmware_ package (and
nothing else).  We also need _wpa_supplicant_, to configure the WiFi
connection.  Finally, we need to configure _systemd-networkd_ to manage
the network device.
2024-12-30 17:57:04 -06:00
Dustin 588467d31c config: Set rootflags
Need to add `rootwait` because the Raspberry Pi SD card reader is really
slow and does not initialize in time for the kernel to load the root
filesystem from it.
2024-12-30 17:57:04 -06:00
13 changed files with 70 additions and 6 deletions

@ -1 +1 @@
Subproject commit 79e69cf70df3586bd4ef4b15f577b42719380f38 Subproject commit 554063e1f4e316a6d3087a27076e0c6d5a34fca1

8
ci/Jenkinsfile vendored
View File

@ -9,9 +9,15 @@ pipeline {
} }
stages { stages {
stage('Prepare') {
steps {
sh '. ./prepare.sh'
}
}
stage('Build') { stage('Build') {
steps { steps {
sh 'make -C aimee-os CONFIGDIR=${PWD} O=/build' sh 'env -i PATH="${PATH}" make -C aimee-os CONFIGDIR=${PWD} O=/build'
} }
} }
} }

View File

@ -13,6 +13,7 @@ spec:
capabilities: capabilities:
add: add:
- CAP_SETFCAP - CAP_SETFCAP
- CAP_SYS_CHROOT
volumeMounts: volumeMounts:
- mountPath: /build - mountPath: /build
name: workspace-volume name: workspace-volume
@ -21,12 +22,21 @@ spec:
name: workspace-volume name: workspace-volume
subPath: gentoo subPath: gentoo
- mountPath: /usr/aarch64-unknown-linux-gnu/var/cache/binpkgs - mountPath: /usr/aarch64-unknown-linux-gnu/var/cache/binpkgs
name: workspace-volume name: binpkgs
subPath: binpkgs subPath: photoframe2
- mountPath: /var/cache/binpkgs - mountPath: /var/cache/binpkgs
name: workspace-volume name: binpkgs
subPath: binpkgs subPath: photoframe2
- mountPath: /var/cache/distfiles - mountPath: /var/cache/distfiles
name: workspace-volume name: workspace-volume
subPath: distfiles subPath: distfiles
- mountPath: /var/db/repos/gentoo
name: portage
hostUsers: false hostUsers: false
volumes:
- name: binpkgs
persistentVolumeClaim:
claimName: binpkgs
- name: portage
persistentVolumeClaim:
claimName: portage

1
config
View File

@ -3,3 +3,4 @@ profile=default/linux/arm64/23.0/systemd
kernel_pkg=sys-kernel/raspberrypi-sources kernel_pkg=sys-kernel/raspberrypi-sources
kernel_defconfig=bcm2835 kernel_defconfig=bcm2835
device_tree=broadcom/bcm2711-rpi-4-b.dtb device_tree=broadcom/bcm2711-rpi-4-b.dtb
rootflags='ro rootwait=4'

6
customize.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh
# vim: set sw=4 ts=4 sts=4 et :
passwd -R /mnt/gentoo -d root
systemctl --root=/mnt/gentoo enable wpa_supplicant@wlan0

View File

@ -0,0 +1 @@
net-wireless/wpa_supplicant

1
installonly.packages Normal file
View File

@ -0,0 +1 @@
sys-kernel/linux-firmware

View File

@ -0,0 +1 @@
d wpa_supplicant

View File

@ -0,0 +1,11 @@
[Match]
Type=ether wlan
[Network]
DHCP=yes
[DHCPv4]
UseDomains=yes
[DHCPv6]
UseDomains=yes

View File

@ -0,0 +1 @@
INSTALL_MASK="${INSTALL_MASK} /usr/lib/systemd/systemd-nsresourced* /usr/lib/systemd/system/systemd-nsresourced.*"

View File

@ -0,0 +1 @@
sys-kernel/linux-firmware linux-fw-redistributable

View File

@ -0,0 +1,17 @@
# symlink targets have to be specified explicity
../cypress/cyfmac43455-sdio.bin
../cypress/cyfmac43455-sdio.clm_blob
brcm/brcmfmac43455-sdio.AW-CM256SM.txt
brcm/brcmfmac43455-sdio.MINIX-NEO Z83-4.txt
brcm/brcmfmac43455-sdio.Raspberry Pi Foundation-Raspberry Pi 4 Model B.txt
brcm/brcmfmac43455-sdio.Raspberry Pi Foundation-Raspberry Pi Compute Module 4.txt
brcm/brcmfmac43455-sdio.acepc-t8.txt
brcm/brcmfmac43455-sdio.beagle,am5729-beagleboneai.txt
brcm/brcmfmac43455-sdio.bin
brcm/brcmfmac43455-sdio.clm_blob
brcm/brcmfmac43455-sdio.raspberrypi,3-model-a-plus.txt
brcm/brcmfmac43455-sdio.raspberrypi,3-model-b-plus.txt
brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt
cypress/cyfmac43455-sdio.bin
cypress/cyfmac43455-sdio.clm_blob

8
prepare.sh Normal file
View File

@ -0,0 +1,8 @@
#!/bin/sh
if [ ! -f /var/db/repos/gentoo/metadata/timestamp ]; then
emerge-webrsync
fi
if [ "$(find /var/db/repos/gentoo/metadata -newermt '-24 hours' | wc -l)" -eq 0 ]; then
emaint sync
fi