linux-ampere-fourier: bootstrap PKGBUILD (CoolPi GenBook RK3588) #15

Merged
marfrit merged 1 commits from claude-noether/marfrit-packages:noether/linux-ampere-fourier-bootstrap into main 2026-05-15 16:49:45 +00:00
Contributor

Sibling to kernel-agent PR #8 (scope-tagged board patches + fleet/ampere.yaml manifest). This PR ships the makepkg-side recipe.

Issue #6 ask #1 only

VP9 enablement (ask #2) and AV1 dec integration (ask #3) deferred to a separate session per user direction.

Baseline

marfrit/linux-rk3588-marfrit @ f8f3ad9 (mainline v7.0-rc3 + 18 commits):

Author Count Scope
Markus Fritsche 10 board DTS + Kconfig + suspend/wakeup + Bluetooth
Shawn Lin 4 phy: rockchip-snps-pcie3 stability series
Cristian Ciocaltea 2 clk + dw-dp bridge (Collabora)
Sebastian Reichel 1 Rock 5 ITX hdmirx (unused by ampere; comes along for free in baseline)
Pedro Alves 1 CLK_SET_RATE_PARENT VOP2 fix

The 6 board-relevant patches are scope-tagged in marfrit/kernel-agent per PR #8. The 12 others are "cherry-picks-in-baseline" for now; splitting them is a future iteration.

Why the kernel source isn't fetched from a URL

Boltzmann's working clone is shallow (Gitea refuses shallow pushes). A 260MB tarball doesn't belong in marfrit-packages. So this PR ships prebuild.sh that produces the tarball locally from $LINUX_RK3588_MARFRIT_TREE (default ~/src/linux-rockchip) just before makepkg runs. Idempotent w/ sha256 check.

Future iteration will host the tarball on Gitea release assets or packages.reauktion.de/sources/ and switch source to URL.

Build flow

cd arch/linux-ampere-fourier
./prebuild.sh           # produces linux-rk3588-marfrit-f8f3ad9.tar.gz (260MB)
makepkg -s --noconfirm  # native aarch64 build; no distcc

Native make on either ampere (8C/2.4GHz, 32GB, native arch) or boltzmann (RK3588, same uarch). Fermi as fallback.

ampere-specific differences vs fresnel

fresnel ampere
Boot partition /boot/ (root partition) /boot/firmware/ (vfat on mmcblk0p1)
DTB layout dtbs/rockchip/<dtb> subdir flat <dtb> in /boot/firmware/
Number of mkinitcpio presets 2 (default + fallback) 1 (default only — /boot/firmware ~1G is too tight for both)
Extlinux path /boot/extlinux/extlinux.conf /boot/firmware/extlinux/extlinux.conf

The PKGBUILD, preset, hook, and extlinux-add script are all adapted accordingly.

Files

  • PKGBUILD — recipe (linux-rk3588-marfrit @ f8f3ad9)
  • config — snapshot of ampere's /proc/config.gz (running 7.0.0-rc3-ARCH+)
  • linux-ampere-fourier.preset — mkinitcpio preset, /boot/firmware/ paths
  • extlinux-add.hook — alpm hook, fires on /boot/firmware/Image* changes
  • extlinux-add.sh — idempotent managed-label injector
  • prebuild.sh — source-staging helper
  • README.md — build + install runbook

Sequencing after merge

  1. On boltzmann (or ampere): clone updated marfrit-packages
  2. cd arch/linux-ampere-fourier && ./prebuild.sh && makepkg -s --noconfirm
  3. Sign + publish kernel + headers via marfrit-publish
  4. On ampere: pacman -S linux-ampere-fourier linux-ampere-fourier-headers
  5. Verify the managed label appears in extlinux.conf, reboot via u-boot menu to test, flip default when confident

Bot: claude-noether

Sibling to **kernel-agent PR #8** (scope-tagged board patches + `fleet/ampere.yaml` manifest). This PR ships the makepkg-side recipe. ## Issue #6 ask #1 only VP9 enablement (ask #2) and AV1 dec integration (ask #3) deferred to a separate session per user direction. ## Baseline `marfrit/linux-rk3588-marfrit @ f8f3ad9` (mainline v7.0-rc3 + 18 commits): | Author | Count | Scope | |---|---|---| | Markus Fritsche | 10 | board DTS + Kconfig + suspend/wakeup + Bluetooth | | Shawn Lin | 4 | phy: rockchip-snps-pcie3 stability series | | Cristian Ciocaltea | 2 | clk + dw-dp bridge (Collabora) | | Sebastian Reichel | 1 | Rock 5 ITX hdmirx (unused by ampere; comes along for free in baseline) | | Pedro Alves | 1 | CLK_SET_RATE_PARENT VOP2 fix | The 6 board-relevant patches are scope-tagged in `marfrit/kernel-agent` per PR #8. The 12 others are "cherry-picks-in-baseline" for now; splitting them is a future iteration. ## Why the kernel source isn't fetched from a URL Boltzmann's working clone is shallow (Gitea refuses shallow pushes). A 260MB tarball doesn't belong in `marfrit-packages`. So this PR ships `prebuild.sh` that produces the tarball locally from `$LINUX_RK3588_MARFRIT_TREE` (default `~/src/linux-rockchip`) just before `makepkg` runs. Idempotent w/ sha256 check. Future iteration will host the tarball on Gitea release assets or `packages.reauktion.de/sources/` and switch source to URL. ## Build flow ```sh cd arch/linux-ampere-fourier ./prebuild.sh # produces linux-rk3588-marfrit-f8f3ad9.tar.gz (260MB) makepkg -s --noconfirm # native aarch64 build; no distcc ``` Native make on either ampere (8C/2.4GHz, 32GB, native arch) or boltzmann (RK3588, same uarch). Fermi as fallback. ## ampere-specific differences vs fresnel | | fresnel | ampere | |---|---|---| | Boot partition | `/boot/` (root partition) | `/boot/firmware/` (vfat on mmcblk0p1) | | DTB layout | `dtbs/rockchip/<dtb>` subdir | flat `<dtb>` in /boot/firmware/ | | Number of mkinitcpio presets | 2 (default + fallback) | 1 (default only — /boot/firmware ~1G is too tight for both) | | Extlinux path | `/boot/extlinux/extlinux.conf` | `/boot/firmware/extlinux/extlinux.conf` | The PKGBUILD, preset, hook, and extlinux-add script are all adapted accordingly. ## Files - `PKGBUILD` — recipe (linux-rk3588-marfrit @ f8f3ad9) - `config` — snapshot of ampere's /proc/config.gz (running 7.0.0-rc3-ARCH+) - `linux-ampere-fourier.preset` — mkinitcpio preset, /boot/firmware/ paths - `extlinux-add.hook` — alpm hook, fires on /boot/firmware/Image* changes - `extlinux-add.sh` — idempotent managed-label injector - `prebuild.sh` — source-staging helper - `README.md` — build + install runbook ## Sequencing after merge 1. On boltzmann (or ampere): clone updated marfrit-packages 2. `cd arch/linux-ampere-fourier && ./prebuild.sh && makepkg -s --noconfirm` 3. Sign + publish kernel + headers via `marfrit-publish` 4. On ampere: `pacman -S linux-ampere-fourier linux-ampere-fourier-headers` 5. Verify the managed label appears in extlinux.conf, reboot via u-boot menu to test, flip `default` when confident Bot: claude-noether
claude-noether added 1 commit 2026-05-15 16:19:54 +00:00
Sibling to kernel-agent PR #8 which lands the scope-tagged board
patches + fleet/ampere.yaml manifest. This PR carries the
makepkg-side recipe.

## Baseline

marfrit/linux-rk3588-marfrit @ f8f3ad9 (mainline v7.0-rc3 + 18 commits):
  10 by Markus Fritsche  (board DTS + Kconfig + suspend/wakeup + bt)
   4 by Shawn Lin        (phy: rockchip-snps-pcie3 stability)
   2 by Cristian Ciocaltea (clk + dw-dp bridge — Collabora)
   1 by Sebastian Reichel (Rock 5 ITX hdmirx — unused by ampere)
   1 by Pedro Alves      (CLK_SET_RATE_PARENT VOP2 fix)

The 6 board-relevant patches (pwm15 pinctrl + RK806 power-off +
genbook pwm-fan/speaker/USB-C/lid) are scope-tagged in
kernel-agent. The 12 others are 'cherry-picks-in-baseline'
currently — splitting them into scope-tagged patches is a
follow-up.

## Source distribution

The kernel tree isn't pushable to Gitea (boltzmann's working clone
is shallow). Tarball (260MB) doesn't belong in marfrit-packages
either. Pragmatic shortcut: ship prebuild.sh that produces the
tarball locally from $LINUX_RK3588_MARFRIT_TREE (default
~/src/linux-rockchip) just before makepkg runs. PKGBUILD source
array references the tarball by name; makepkg picks it up from
the PKGBUILD dir.

Build flow:
  cd arch/linux-ampere-fourier
  ./prebuild.sh           # produces 260MB tarball; idempotent w/ sha check
  makepkg -s --noconfirm

Future iteration: host the tarball on Gitea release assets or
packages.reauktion.de/sources/ and switch source to URL.

## What the PR ships

  PKGBUILD                          — the recipe (linux-rk3588-marfrit @ f8f3ad9)
  config                            — snapshot of ampere's /proc/config.gz
  linux-ampere-fourier.preset       — mkinitcpio preset, /boot/firmware/ paths
  extlinux-add.hook                 — alpm hook, fires on /boot/firmware/Image* changes
  extlinux-add.sh                   — idempotent managed-label injector for
                                     /boot/firmware/extlinux/extlinux.conf
                                     (vfat on mmcblk0p1, ampere-specific path)
  prebuild.sh                       — source-staging helper (see above)
  README.md                         — build + install runbook

## ampere-specific boot path differences vs fresnel

ampere boots from /boot/firmware/ (vfat partition), not /boot/ (root
partition) like fresnel. The PKGBUILD installs Image + initramfs + DTB
under /boot/firmware/ directly. The extlinux-add hook fires on
/boot/firmware/<X> path changes and edits
/boot/firmware/extlinux/extlinux.conf. The mkinitcpio preset writes
initramfs to /boot/firmware/.

Only one PRESET ('default') — no fallback image — because
/boot/firmware is ~1G total and two ~20MB initramfs files plus the
DTB and a couple of kernel-image backups would squeeze it tight.

## Out of scope this PR

- Ask 2 (VP9 enablement) and Ask 3 (AV1 dec) from kernel-agent issue #6
- Build + publish + install (sequenced after this PR + kernel-agent PR #8 merge)
- Splitting the 12 non-board commits into scope-tagged kernel-agent patches
marfrit merged commit efc1bfd66a into main 2026-05-15 16:49:45 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: marfrit/marfrit-packages#15