Accept native SD cards for internal settings alongside legacy NVMe, reject USB ancestry and ambiguous disks, and preserve read-only boot loading with explicit recovery writes. Require built-in MMC drivers, validate cached kernel configuration, and provide SD-only, SD-first and USB-first EEPROM profiles. Expose typed create and inspect commands through fds-flash, reuse the existing cartridge creation code, and document the optional e2fsprogs package dependency. Extend storage, EEPROM, flashing and hardware-test coverage and advance the wiki reference to the published SD guide. Validation: rootfs checks for CLI/development, boot matrix, internal storage, EEPROM, flash, workstation, emulator, make check and wiki checks passed. The full internal suite passed on an unchanged rerun after one unexplained VM shutdown stall. Standalone init-test was blocked by its unavailable pinned upstream kernel. Physical Pi checks remain pending.
57 lines
2.5 KiB
Bash
57 lines
2.5 KiB
Bash
# Local source build: invoked by tools/build-workstation with an explicit checkout.
|
|
pkgname=fds-tools
|
|
_fds_source=${FDS_SOURCE_DIR:?Run make workstation from the FDS checkout}
|
|
pkgver=$("$_fds_source/tools/version")
|
|
pkgrel=1
|
|
pkgdesc='FDS/OS workstation cartridge builder, disk flasher and twelve-bay ARM emulator'
|
|
arch=('x86_64' 'aarch64')
|
|
license=('MIT')
|
|
depends=('glibc' 'gcc-libs' 'xz')
|
|
makedepends=('rust' 'python' 'git')
|
|
optdepends=(
|
|
'bubblewrap: cartridge creation and inspection in a private namespace'
|
|
'erofs-utils: create and inspect cartridge payload filesystems'
|
|
'e2fsprogs: create DATA images with fds-flash'
|
|
'qemu-system-aarch64: run FDS in the emulator'
|
|
'qemu-img: writable emulator DATA overlays'
|
|
)
|
|
options=('!debug' '!strip')
|
|
|
|
build() {
|
|
cd "$_fds_source"
|
|
./tools/build-workstation-binaries
|
|
# Includes the notices of locked dependencies; this is an intentionally
|
|
# complete workspace inventory rather than a claim they all link into tools.
|
|
if [[ -f "$srcdir/RUST-NOTICES.txt" ]]; then rm "$srcdir/RUST-NOTICES.txt"; fi
|
|
python3 tools/rust-notices "$srcdir/RUST-NOTICES.txt"
|
|
}
|
|
|
|
check() {
|
|
local tool
|
|
for tool in fds-cartridge fds-emulator fds-flash; do
|
|
[[ $("$_fds_source/out/workstation/$tool" --version) == "$tool $pkgver" ]]
|
|
"$_fds_source/out/workstation/$tool" --help >/dev/null
|
|
done
|
|
}
|
|
|
|
package() {
|
|
local tool
|
|
for tool in fds-cartridge fds-emulator fds-flash; do
|
|
install -Dm755 "$_fds_source/out/workstation/$tool" "$pkgdir/usr/bin/$tool"
|
|
done
|
|
install -Dm644 "$_fds_source/LICENSE" "$pkgdir/usr/share/licenses/fds-tools/LICENSE"
|
|
install -Dm644 "$srcdir/RUST-NOTICES.txt" "$pkgdir/usr/share/licenses/fds-tools/RUST-NOTICES.txt"
|
|
install -Dm644 "$_fds_source/README.md" "$pkgdir/usr/share/doc/fds-tools/README.md"
|
|
# Package the authoritative manual without submodule Git metadata.
|
|
install -d "$pkgdir/usr/share/doc/fds-tools/fds-os.wiki"
|
|
install -m644 "$_fds_source/fds-os.wiki/"*.md "$_fds_source/fds-os.wiki/"*.png \
|
|
"$pkgdir/usr/share/doc/fds-tools/fds-os.wiki/"
|
|
# Ship source recipes, excluding any locally compiled example output.
|
|
local example
|
|
for example in hello report; do
|
|
install -Dm644 "$_fds_source/examples/software/$example/software.toml" "$pkgdir/usr/share/doc/fds-tools/examples/software/$example/software.toml"
|
|
cp -a "$_fds_source/examples/software/$example/void" "$pkgdir/usr/share/doc/fds-tools/examples/software/$example/"
|
|
done
|
|
install -Dm644 "$_fds_source/examples/software/cartridge.toml" "$pkgdir/usr/share/doc/fds-tools/examples/software/cartridge.toml"
|
|
}
|