From 6f45fe51ba5fb4c9bb44efb8fad8c7f84a3cbbb0 Mon Sep 17 00:00:00 2001 From: misuzu Date: Wed, 22 Jan 2025 16:10:57 +0200 Subject: [PATCH] fix u-boot build --- flake.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index bc35de1..297f74c 100644 --- a/flake.nix +++ b/flake.nix @@ -38,14 +38,19 @@ "CROSS_COMPILE=${super.stdenv.cc.targetPrefix}" "OPENSBI=${self.opensbi}/share/opensbi/lp64/generic/firmware/fw_dynamic.bin" ]; - }).overrideAttrs (super: { - nativeBuildInputs = super.nativeBuildInputs ++ [ + }).overrideAttrs (prevAttrs: { + nativeBuildInputs = prevAttrs.nativeBuildInputs ++ [ self.buildPackages.spl-tool ]; - patches = [ ]; + patches = [ + (super.fetchpatch { + url = "https://raw.githubusercontent.com/1715173329/openwrt-official/4e68103c4eb93d3f9b9359742c3c377ee2844943/package/boot/uboot-rockchip/patches/002-scripts-dtc-pylibfdt-libfdt-i_shipped-Use-SWIG_AppendOutp.patch"; + hash = "sha256-N97cXu2XmCdoA6sSAbBM9s/1GcUMZfgP7iOMaYydcPo="; + }) + ]; installPhase = '' spl_tool -c -f spl/u-boot-spl.bin - ${super.installPhase} + ${prevAttrs.installPhase} ''; });