- Remove legacy
i9500device files - Build
samsung-jfltedevice image - Verify
samsung-jfltebuild artifacts - [/] Build
samsung-jfltewith OpenRC
- Extract
internal/mkinitfsinto a standalone distro package (peacock-mkinitfs). Standalone repo: PeacockProject/peacock-mkinitfs. The full mkinitfs pipeline (cpio assembly, init wrapper compile, asset templating) now lives there as a cobra-driven binary; the three template/library assets (init.sh.in,init-wrapper.go.in,subparts-mount.sh) are embedded via//go:embed. The Peacock CLI no longer carriesinternal/mkinitfs/orassets/initramfs/; it builds thebase/peacock-mkinitfsport and execs<portDir>/usr/bin/peacock-mkinitfs build ...out-of-process, falling back to$PATHfor dev installs. Template substitution is still Go'stext/template(the{{.RootLabel}}/{{.InitSystem}}/{{if .EnableS4CameraLED}}syntax). Remaining work:- The OpenRC inittab heredoc nested inside
init.sh.in(lines around thecat > /new_root/etc/inittabblock) is still inline shell. Extracting it would require either a separateinittab.templateshipped by the binary or leaving it as generated config — low value, deferred.
- The OpenRC inittab heredoc nested inside
- Replace the
prp/vendor/<device>/rootfs-runtimelookup ininternal/mkinitfs/mkinitfs.gowith a peacock-ports package build.InitConfignow carriesUtilLinuxBuildDir+Lvm2BuildDir;cmd/peacock/build.gobuilds the util-linux + lvm2 ports via the newbuildPortForInitramfshelper (built on top ofbuildPackageInChrootStep) and plumbs the build dirs through.runtimeVendorCandidatesnow consumesUtilLinuxBuildDir; theprp/vendorandprp/outcandidate roots are gone. The dmsetup lookup + lib search now preferLvm2BuildDir/sbin/dmsetupandLvm2BuildDir/{lib,usr/lib,stage/...}with host paths as a final fallback. - Install the canonical subparts-mount shell library into the initramfs.
mkinitfs.Buildnow dropsassets/initramfs/subparts-mount.sh(with legacyprp/initramfs/rootfs/usr/lib/prp/subparts-mount.shfallback) at/usr/lib/peacock/subparts-mount.sh, mode 0755. The embedded init now sources that file and calls thesetup_subparts_root_devwrapper in place of the deleted inlinesetup_prp_like_subparts; thePRP-subparts:log prefix is gone.
- [/] Add
peacock-ports/device/minkernel-<device>packages that pull fromPeacockProject/MinKernel, buildmake -C mk DEVICE=<dev> bootimg-nokernel, and stage the resultingmk-<device>-boot.imgfor the Peacock image stage to flash. Avoids the embedded-mk-binaries problem in this repo entirely. Initial coverage:oppo-a16. More device variants will follow the same pattern. - [/] Add
peacock-ports/device/lk2nd-<device>packages that pull fromPeacockProject/lk2nd_peacockand build the right target (e.g.make TOOLCHAIN_PREFIX=... msm8953 LK2ND_DEVICE=<dev>) for qcom devices. Once these exist, mk and lk2nd are versioned/installed like any other device-firmware port instead of being out-of-tree clones. Initial coverage:xiaomi-daisy(msm8953),samsung-jflte(msm8960/msm8660 — verify). More device variants will follow the same pattern.
-
[/] Bootstrap debian flavor: real apt + debootstrap path.
internal/apt/apt.gonow implementsBootstrap/Setup/Installfor real:debootstrap --foreign --variant=minbase --arch=<dpkg>fills the chroot, qemu-user-static is copied in for foreign-arch second-stage,chroot <root> /debootstrap/debootstrap --second-stagefinishes the fill,/etc/apt/sources.listis generated (bookworm/trixie/sid + -updates + -security),apt-get updateprimes it, thenapt-get install -y --no-install-recommends <pkgs>runs the requested initial packages. Host prereqs (debootstrap,qemu-aarch64-staticfor foreign builds) are checked up front with an actionable error pointing atapt install debootstrap qemu-user-static(Debian/Ubuntu) orpacman -S debootstrap qemu-user-static-binfmt(Arch).Installroutes packages throughbuilder.ResolveBuildDeps(.., "debian")so manifests that still list Arch names get rewritten viapeacock-ports/flavors/debian/aliases.tomlbefore they hit apt.cmd/peacock/flavor.gobuilds the aptConfigfrommanifest.Device.Architectureviaapt.ArchToDpkg. Bootstrap is idempotent: presence of a non-empty/var/lib/dpkg/statusshort- circuits the foreign+second-stage pair. The arch flavor path is unchanged.Punted to a follow-up: secure-apt key handling. We rely on debootstrap to install the keyring and a vanilla
apt-get updateto validate signatures — works on hosts whose clocks are sane, but a separate task should pin the keyring package + verify/etc/apt/trusted.gpg.d/contents end-to-end.Alpine track is being done in parallel and will land separately.
-
[/] Bootstrap alpine flavor: real apk path.
internal/apk/apk.goimplementsBootstrap/Setup/Installfor real:apk add --root <chroot> --initdb --arch <apk-arch> --no-cache --update-cache --repository <mirror>/<version>/main alpine-basefills the chroot,/etc/apk/repositoriesis generated (v3.20 + main/community by default),apk update --root <chroot>primes the cache, thenapk add --root <chroot> --no-cache <pkgs>installs the initial set.Installroutes packages through the alpine alias table atpeacock-ports/flavors/alpine/aliases.toml(loaded inline in internal/apk to avoid an import cycle with internal/builder), so manifests that list Arch names likebase-devel/python/ncursestranslate tobuild-base/python3/ncurses-dev. Bootstrap is idempotent — presence of/etc/alpine-releaseshort-circuits it. Host prereqs checkapk,apk.static,apk-tools-staticin that order and produce an actionable error pointing atapk add apk-tools-static(Alpine),pacman -S apk-tools-static(Arch AUR), or building apk-tools from source on Debian.cmd/peacock/flavor.gobuilds the apkConfigfrommanifest.Device.ArchitectureviaArchToApk. The arch flavor path is unchanged.Punted: signed-package verification beyond apk's default behavior. apk validates signatures against the keys shipped in alpine-keys (pulled by alpine-base) and we pass
--allow-untrustedonly on the initial--initdbstep where keys aren't installed yet. A separate follow-up should audit the Bootstrap-time trust window.
- Commit
assets/conspiracy.pngso the initramfs can include it without relying on a path that varies by checkout. Lookup order is alreadyconspiracy.png,assets/conspiracy.png,prp/assets/conspiracy.pngininternal/mkinitfs/mkinitfs.go:1554-1557; the canonical location going forward isassets/.