Use custom u-boot build

This commit is contained in:
Rodrigo Arias 2024-01-18 17:58:00 +01:00
parent 5dbb297adf
commit 2f387d3362
2 changed files with 17 additions and 1 deletions

View File

@ -54,7 +54,8 @@
buildInputs = with pkgs; [ qemu ];
# Here we tell the run script where to find the system
NIXOS_SYSTEM_TOPLEVEL = toplevel;
OPENSBI = syspkgs.opensbi;
OPENSBI = syspkgs.opensbi-uboot;
#OPENSBI = syspkgs.opensbi;
};
};
}

View File

@ -20,4 +20,19 @@ final: prev:
});
qemu = prev.qemu.override { rutabagaSupport = false; };
uboot-custom = prev.ubootQemuRiscv64Smode.override {
extraConfig = ''
CONFIG_CMD_QFW=y
'';
};
opensbi-uboot = prev.opensbi.overrideAttrs (old: {
makeFlags = old.makeFlags ++ [
# Build OpenSBI without compressed instructions
"PLATFORM_RISCV_ISA=rv64gv"
# Check with: riscv64-unknown-elf-objdump -d -M no-aliases rotate
"FW_PAYLOAD_PATH=${final.uboot-custom}/u-boot.bin"
];
});
}