Skip to content

Commit bf25d87

Browse files
authored
Merge pull request NixOS#249069 from amjoseph-nixpkgs/pr/lib/systems/ubootArch
lib.systems: add ubootArch
2 parents 6c681f1 + a97e8fc commit bf25d87

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

lib/systems/default.nix

+6
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,12 @@ rec {
178178
else if final.isLoongArch64 then "loongarch"
179179
else final.parsed.cpu.name;
180180

181+
# https://source.denx.de/u-boot/u-boot/-/blob/9bfb567e5f1bfe7de8eb41f8c6d00f49d2b9a426/common/image.c#L81-106
182+
ubootArch =
183+
if final.isx86_32 then "x86" # not i386
184+
else if final.isMips64 then "mips64" # uboot *does* distinguish between mips32/mips64
185+
else final.linuxArch; # other cases appear to agree with linuxArch
186+
181187
qemuArch =
182188
if final.isAarch32 then "arm"
183189
else if final.isS390 && !final.isS390x then null

pkgs/build-support/kernel/make-initrd-ng.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ in
5454
# guess may not align with u-boot's nomenclature correctly, so it can
5555
# be overridden.
5656
# See https://gitlab.denx.de/u-boot/u-boot/-/blob/9bfb567e5f1bfe7de8eb41f8c6d00f49d2b9a426/common/image.c#L81-106 for a list.
57-
, uInitrdArch ? stdenvNoCC.hostPlatform.linuxArch
57+
, uInitrdArch ? stdenvNoCC.hostPlatform.ubootArch
5858

5959
# The name of the compression, as recognised by u-boot.
6060
# See https://gitlab.denx.de/u-boot/u-boot/-/blob/9bfb567e5f1bfe7de8eb41f8c6d00f49d2b9a426/common/image.c#L195-204 for a list.

0 commit comments

Comments
 (0)