wip(rpi4): park the Pi 4 sketch — superseded by the Pi 5 machinery in #87
Never-committed working tree state found in the dev worktree: a Pi 4 hardware module, a setup walkthrough, an upboard-serial refactor, and flake wiring that does not evaluate (aarch64 packages block nested inside packages.x86_64-linux; pkgs-aarch64 built with `inherit aarch64` instead of `system`, so it is really x86; references a nixosConfigurations.rpi4-installed that is never defined). Parked verbatim for reference. The real Pi 4 target is rebuilt on top of #87's mkPiInstalled/mkPiImage shape in feat/rpi4-target. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013A6683cCHnQxFUosx1krY4
This commit is contained in:
parent
cb236703d6
commit
7e59951fcc
7 changed files with 533 additions and 4 deletions
31
flake.nix
31
flake.nix
|
|
@ -5,6 +5,9 @@
|
|||
# Stable NixOS for the ATM OS base
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
|
||||
|
||||
# Stable NixOS for the ATM OS base (aarch64) — Raspberry Pi 4
|
||||
nixpkgs-aarch64.url = "github:NixOS/nixpkgs/nixos-25.11";
|
||||
|
||||
# Unstable for Electron, Node.js, pnpm (latest versions)
|
||||
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
|
||||
|
|
@ -38,15 +41,22 @@
|
|||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, nixpkgs-unstable, flake-utils, rust-overlay, devenv, determinate, atm-tui }:
|
||||
outputs = { self, nixpkgs, nixpkgs-unstable, nixpkgs-aarch64, flake-utils, rust-overlay, devenv, determinate, atm-tui }:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
|
||||
aarch64 = "aarch64-linux";
|
||||
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
|
||||
pkgs-aarch64 = import nixpkgs-aarch64 {
|
||||
inherit aarch64;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
|
||||
pkgs-unstable = import nixpkgs-unstable {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
|
|
@ -504,6 +514,25 @@
|
|||
'';
|
||||
|
||||
# Backwards compat
|
||||
|
||||
# aarch64-linux packages (Raspberry Pi 4)
|
||||
packages.${aarch64} = {
|
||||
# ATM app derivation for Raspberry Pi 4
|
||||
atm-app-rpi4 = mkAtmApp { model = "rpi4"; fiatCode = "USD"; };
|
||||
|
||||
# Raspberry Pi 4 disk image (aarch64)
|
||||
# Note: Raspberry Pi 4 uses the Raspberry Pi firmware bootloader,
|
||||
# not systemd-boot. The image is built for aarch64 and booted via
|
||||
# the rpi-bootloader (rpi-firmware). Requires an SD card with GPT
|
||||
# partition table (ESP + ext4 root).
|
||||
disk-image-rpi4 = import (nixpkgs-aarch64 + "/nixos/lib/make-disk-image.nix") {
|
||||
pkgs = pkgs-aarch64; inherit lib;
|
||||
config = self.nixosConfigurations.rpi4-installed.config;
|
||||
format = "raw";
|
||||
partitionTableType = "efi";
|
||||
diskSize = "auto";
|
||||
};
|
||||
};
|
||||
iso = self.nixosConfigurations.douro.config.system.build.isoImage;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue