I tried building the installer image from the current stock Debian on a RK3588 Pocket Reform with nix 2.32.2, but it wouldn’t build using unstable nixpkgs due to the error below. It seems to be complaining that the kernel patches don’t have a name attribute? Might be some change in unstable.
$ nix --extra-experimental-features nix-command --extra-experimental-features flakes build .#
error:
… while calling the ‘derivationStrict’ builtin
at «nix-internal»/derivation-internal.nix:37:12:
36|
37| strict = derivationStrict drvAttrs;
| ^
38|
… while evaluating derivation 'nixos-image-25.11pre-git-aarch64-linux.img'
whose name attribute is located at «github:nixos/nixpkgs/2fb006b87f04c4d3bdf08cfdbc7fab9c13d94a15?narHash=sha256-kJ8lIZsiPOmbkJypG%2BB5sReDXSD1KGu2VEPNqhRa/ew%3D»/pkgs/stdenv/generic/make-derivation.nix:544:13
… while evaluating attribute 'buildCommand' of derivation 'nixos-image-25.11pre-git-aarch64-linux.img'
at «github:nixos/nixos-hardware/7467f155fcba189eb088a7601f44fbef7688669b?narHash=sha256-rNHeoG3ZrA94jczyLSjxCtu67YYPYIlXXr0uhG3wNxM%3D»/mnt/reform/rk3588/installer.nix:193:11:
192| inherit (config.installerImage) compressImage;
193| buildCommand = ''
| ^
194| mkdir -p $out/nix-support $out/installer-image
… while evaluating the option `system.build.toplevel':
… while evaluating definitions from `/nix/store/xjjq52iwslhz6lbc621a31v0nfdhr5ks-source/nixos/modules/system/activation/top-level.nix':
… while evaluating the option `assertions':
… while evaluating definitions from `/nix/store/xjjq52iwslhz6lbc621a31v0nfdhr5ks-source/nixos/modules/system/boot/kernel.nix':
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: attribute 'name' missing
at «github:nixos/nixpkgs/2fb006b87f04c4d3bdf08cfdbc7fab9c13d94a15?narHash=sha256-kJ8lIZsiPOmbkJypG%2BB5sReDXSD1KGu2VEPNqhRa/ew%3D»/pkgs/os-specific/linux/kernel/build.nix:564:69:
563| else
564| " (with patches: " + lib.concatStringsSep ", " (map (x: x.name) kernelPatches) + ")"
| ^
565| );
I was able to get further by using nixos-25.05:
$ cat flake.nix
{
inputs.nixpkgs.url = “github:nixos/nixpkgs/nixos-25.05”;
inputs.nixos-hardware.url = “github:nixos/nixos-hardware”;
inputs.flake-utils.url = “github:numtide/flake-utils”;
outputs = { self, nixpkgs, nixos-hardware, flake-utils, … }:
flake-utils.lib.eachDefaultSystem (system:
rec {
packages.default = packages.installer;
packages.installer = (import “${nixpkgs}/nixos” {
configuration =
{ config, … }: {
imports = [
“${nixos-hardware}/mnt/reform/rk3588/installer.nix”
];
system.stateVersion = "25.05";
};
inherit system;
}).config.system.build.image;
});
}
However this now gives an error when building mnt-reform-firmware-rk3855-dsi.drv (../rkbin/tools/boot_merger: cannot execute binary file: Exec format error). I am pretty sure this is due to boot_merger being compiled for x86_64 as discussed here: Building MNT Reform RK3588 U-Boot
I ran out of time to troubleshoot this but based on what I’m seeing, in order to build on a non-x86_64 machine, I guess that U-Boot (and therefore the install image) will need to be built using qemu or cross-compiling? Is this correct?