Name: pocketds-initramfs Version: 20260430 Release: 3%{?dist} Summary: Dracut module replicating the ROCKNIX busybox initramfs for AYANEO Pocket DS License: GPL-2.0-or-later URL: https://github.com/ROCKNIX/distribution # dracut module Source0: module-setup.sh Source1: parse-pocketds.sh Source2: pocketds-mount-flash.sh Source3: pocketds-mount-sysroot.sh Source4: pocketds-mount-storage.sh Source5: pocketds-prepare-pivot.sh Source6: pocketds-kernel-overlays.sh # real-root helpers Source10: kernel-overlays-setup Source11: pocketds-fs-resize # units + dracut config Source20: kernel-overlays-setup.service Source21: pocketds-fs-resize.service Source30: 50-pocketds.conf BuildArch: noarch # `%%{_unitdir}` and the `%%systemd_*` scriptlet macros live in # systemd-rpm-macros; the COPR minimal aarch64 buildroot doesn't pull it # in implicitly, so we ask for it explicitly. (Build 10412640 failed with # `error: File must begin with "/": %%{_unitdir}/...` for that reason.) BuildRequires: systemd-rpm-macros Requires: gawk Requires: dracut Requires: systemd Requires: util-linux Requires: e2fsprogs Requires: dosfstools Requires: parted Requires: kmod Requires: coreutils # we use plymouth for the splash if it's installed; not a hard dep Recommends: plymouth %description A dracut module (90pocketds) that recreates the boot contract used by ROCKNIX's busybox initramfs: * boot= default PARTLABEL=ROCKNIX, FAT, mounted ro at /flash * disk= default PARTLABEL=STORAGE, mounted rw at /storage * SYSTEM_IMAGE= default 'SYSTEM', loop-mounted from /flash as /sysroot when no real root= is given (or when `live` is on cmdline) * BOOT_IMAGE= informational, dropped into /run/pocketds/env * toram copy SYSTEM into a tmpfs before loop-mounting * live ignore disk=, mount tmpfs at /storage * overlay per-MAC overlay subdirectory on disk= * nofsck skip fsck on flash/disk * nosplash do not draw a Plymouth splash After mounting, /flash and /storage are moved into /sysroot and dracut's standard switch_root chain hands off to systemd. The package also installs: * /usr/sbin/kernel-overlays-setup -- ROCKNIX kernel-overlays-setup, adapted for a Fedora real-root layout. Runs at sysinit time as a oneshot, and may be re-run by hand after dropping a new overlay into /storage/.cache/kernel-overlays/. * /usr/sbin/pocketds-fs-resize -- first-boot grow of PARTLABEL=STORAGE to fill the disk. Triggered by the marker file /storage/.please_resize_me. Cmdline parity with ROCKNIX's init script (packages/sysutils/busybox/scripts/init): this module reads exactly the same tokens, so an existing ROCKNIX grub.cfg / syslinux.cfg / extlinux.conf can be reused verbatim against a Fedora kernel + initramfs. %prep # nothing to unpack %build # nothing to build %install # dracut module install -d %{buildroot}%{_prefix}/lib/dracut/modules.d/91pocketds install -m 0755 %{SOURCE0} %{buildroot}%{_prefix}/lib/dracut/modules.d/91pocketds/module-setup.sh install -m 0755 %{SOURCE1} %{buildroot}%{_prefix}/lib/dracut/modules.d/91pocketds/parse-pocketds.sh install -m 0755 %{SOURCE2} %{buildroot}%{_prefix}/lib/dracut/modules.d/91pocketds/pocketds-mount-flash.sh install -m 0755 %{SOURCE3} %{buildroot}%{_prefix}/lib/dracut/modules.d/91pocketds/pocketds-mount-sysroot.sh install -m 0755 %{SOURCE4} %{buildroot}%{_prefix}/lib/dracut/modules.d/91pocketds/pocketds-mount-storage.sh install -m 0755 %{SOURCE5} %{buildroot}%{_prefix}/lib/dracut/modules.d/91pocketds/pocketds-prepare-pivot.sh install -m 0755 %{SOURCE6} %{buildroot}%{_prefix}/lib/dracut/modules.d/91pocketds/pocketds-kernel-overlays.sh # real-root helpers install -D -m 0755 %{SOURCE10} %{buildroot}%{_sbindir}/kernel-overlays-setup install -D -m 0755 %{SOURCE11} %{buildroot}%{_sbindir}/pocketds-fs-resize # systemd units install -D -m 0644 %{SOURCE20} %{buildroot}%{_unitdir}/kernel-overlays-setup.service install -D -m 0644 %{SOURCE21} %{buildroot}%{_unitdir}/pocketds-fs-resize.service # dracut config install -D -m 0644 %{SOURCE30} %{buildroot}%{_sysconfdir}/dracut.conf.d/50-pocketds.conf # Ship empty /usr/lib/kernel-overlays/base so the dracut hook always has a # real directory to look at, even before pocketds-firmware lays down content. install -d %{buildroot}%{_prefix}/lib/kernel-overlays/base/lib/modules install -d %{buildroot}%{_prefix}/lib/kernel-overlays/base/lib/firmware %files %{_prefix}/lib/dracut/modules.d/91pocketds/ %{_sbindir}/kernel-overlays-setup %{_sbindir}/pocketds-fs-resize %{_unitdir}/kernel-overlays-setup.service %{_unitdir}/pocketds-fs-resize.service %config(noreplace) %{_sysconfdir}/dracut.conf.d/50-pocketds.conf %dir %{_prefix}/lib/kernel-overlays %dir %{_prefix}/lib/kernel-overlays/base %dir %{_prefix}/lib/kernel-overlays/base/lib %dir %{_prefix}/lib/kernel-overlays/base/lib/modules %dir %{_prefix}/lib/kernel-overlays/base/lib/firmware %post %systemd_post kernel-overlays-setup.service %systemd_post pocketds-fs-resize.service # Rebuild the running kernel's initramfs so the new module is picked up. if [ $1 -ge 1 ] && [ -d /lib/modules/$(uname -r) ]; then /usr/bin/dracut --force --regenerate-all >/dev/null 2>&1 || : fi %preun %systemd_preun kernel-overlays-setup.service %systemd_preun pocketds-fs-resize.service %postun %systemd_postun_with_restart kernel-overlays-setup.service %systemd_postun pocketds-fs-resize.service %changelog * Fri May 01 2026 Ayaneo Pocket DS Fedora port - 20260430-3 - Add BuildRequires: systemd-rpm-macros so %%{_unitdir} resolves on the COPR fedora-44-aarch64 builder (build 10412640 failed at the binary stage with "error: File must begin with /": %%{_unitdir}/...). Same fix shape as pocketds-userspace -2. * Fri May 01 2026 Ayaneo Pocket DS Fedora port - 20260430-2 - No spec changes; this is a layout-only fix for the COPR rpkg SRPM build (build 10412630 failed with "error: Bad file: .../module-setup.sh: No such file or directory" x12). The git repo previously kept Source files under module/, bin/, unit/, conf/ subdirs, but RPM resolves Source: lines by basename in _sourcedir, so rpkg / rpmbuild -bs couldn't find them. The repo is now flat — all 12 sources next to the spec — and the Source0..30 references in the spec are unchanged. * Thu Apr 30 2026 Ayaneo Pocket DS Fedora port - 20260430-1 - Initial Fedora package, dracut translation of ROCKNIX packages/sysutils/busybox/scripts/{init,functions,kernel-overlays-setup,fs-resize}