From 83c23d937e6b0039cdb5d020c02c1623e79a3abd Mon Sep 17 00:00:00 2001 From: dramforever Date: Wed, 6 Aug 2025 18:32:56 +0800 Subject: [PATCH] ubootVisionFive2: Remove overrideAttrs from opensbi FW_OPTIONS=0 overrides the dynamically set options for no reason, and FW_TEXT_START is not useful now that OpenSBI has dropped support for non-PIE-capable toolchains [1]. [1]: https://github.com/riscv-software-src/opensbi/commit/76d7e9b8ee72c226cd8424d5483827bcf4c792fa --- pkgs/misc/uboot/default.nix | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/pkgs/misc/uboot/default.nix b/pkgs/misc/uboot/default.nix index e36271b47a48..06d872c7caea 100644 --- a/pkgs/misc/uboot/default.nix +++ b/pkgs/misc/uboot/default.nix @@ -845,25 +845,15 @@ in # sf probe; sf update $loadaddr 0 80000 }; - ubootVisionFive2 = - let - opensbi_vf2 = opensbi.overrideAttrs (attrs: { - makeFlags = attrs.makeFlags ++ [ - # Matches u-boot documentation: https://docs.u-boot.org/en/latest/board/starfive/visionfive2.html - "FW_TEXT_START=0x40000000" - "FW_OPTIONS=0" - ]; - }); - in - buildUBoot { - defconfig = "starfive_visionfive2_defconfig"; - extraMeta.platforms = [ "riscv64-linux" ]; - OPENSBI = "${opensbi_vf2}/share/opensbi/lp64/generic/firmware/fw_dynamic.bin"; - filesToInstall = [ - "spl/u-boot-spl.bin.normal.out" - "u-boot.itb" - ]; - }; + ubootVisionFive2 = buildUBoot { + defconfig = "starfive_visionfive2_defconfig"; + extraMeta.platforms = [ "riscv64-linux" ]; + OPENSBI = "${opensbi}/share/opensbi/lp64/generic/firmware/fw_dynamic.bin"; + filesToInstall = [ + "spl/u-boot-spl.bin.normal.out" + "u-boot.itb" + ]; + }; ubootWandboard = buildUBoot { defconfig = "wandboard_defconfig";