about summary refs log tree commit diff
path: root/nixpkgs/pkgs/misc/uboot
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/misc/uboot')
-rw-r--r--nixpkgs/pkgs/misc/uboot/0001-configs-rpi-allow-for-bigger-kernels.patch50
-rw-r--r--nixpkgs/pkgs/misc/uboot/default.nix28
2 files changed, 46 insertions, 32 deletions
diff --git a/nixpkgs/pkgs/misc/uboot/0001-configs-rpi-allow-for-bigger-kernels.patch b/nixpkgs/pkgs/misc/uboot/0001-configs-rpi-allow-for-bigger-kernels.patch
index 3a6fbeaef411..b90cc6ef0781 100644
--- a/nixpkgs/pkgs/misc/uboot/0001-configs-rpi-allow-for-bigger-kernels.patch
+++ b/nixpkgs/pkgs/misc/uboot/0001-configs-rpi-allow-for-bigger-kernels.patch
@@ -1,17 +1,8 @@
-From 3d0ce353cf62efea11aa88f814aa23bf8c04acc9 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Milan=20P=C3=A4ssler?= <milan@petabyte.dev>
-Date: Mon, 11 Jan 2021 15:13:10 +0100
-Subject: [PATCH] configs/rpi: allow for bigger kernels
-
----
- include/configs/rpi.h | 16 ++++++++--------
- 1 file changed, 8 insertions(+), 8 deletions(-)
-
-diff --git a/include/configs/rpi.h b/include/configs/rpi.h
-index 834f1cd..10ab1e7 100644
---- a/include/configs/rpi.h
-+++ b/include/configs/rpi.h
-@@ -153,20 +153,20 @@
+diff --git a/board/raspberrypi/rpi/rpi.env b/board/raspberrypi/rpi/rpi.env
+index 30228285ed..0327ef74fa 100644
+--- a/board/raspberrypi/rpi/rpi.env
++++ b/board/raspberrypi/rpi/rpi.env
+@@ -55,11 +55,11 @@ dfu_alt_info+=zImage fat 0 1
   * more than ~700M away from the start of the kernel image but this number can
   * be larger OR smaller depending on e.g. the 'vmalloc=xxxM' command line
   * parameter given to the kernel. So reserving memory from low to high
@@ -25,21 +16,20 @@ index 834f1cd..10ab1e7 100644
 + * only 64M, the remaining 8M starting at 0x04800000 should allow reasonably
 + * sized initrds before they start colliding with U-Boot.
   */
- #define ENV_MEM_LAYOUT_SETTINGS \
- 	"fdt_high=" FDT_HIGH "\0" \
- 	"initrd_high=" INITRD_HIGH "\0" \
- 	"kernel_addr_r=0x00080000\0" \
--	"scriptaddr=0x02400000\0" \
--	"pxefile_addr_r=0x02500000\0" \
--	"fdt_addr_r=0x02600000\0" \
--	"ramdisk_addr_r=0x02700000\0"
-+	"scriptaddr=0x04500000\0" \
-+	"pxefile_addr_r=0x04600000\0" \
-+	"fdt_addr_r=0x04700000\0" \
-+	"ramdisk_addr_r=0x04800000\0"
+ #ifdef CONFIG_ARM64
+ fdt_high=ffffffffffffffff
+@@ -69,9 +69,9 @@ fdt_high=ffffffff
+ initrd_high=ffffffff
+ #endif
+ kernel_addr_r=0x00080000
+-scriptaddr=0x02400000
+-pxefile_addr_r=0x02500000
+-fdt_addr_r=0x02600000
+-ramdisk_addr_r=0x02700000
++scriptaddr=0x04500000
++pxefile_addr_r=0x04600000
++fdt_addr_r=0x04700000
++ramdisk_addr_r=0x04800000
  
- #if CONFIG_IS_ENABLED(CMD_MMC)
- 	#define BOOT_TARGET_MMC(func) \
--- 
-2.29.2
+ boot_targets=mmc usb pxe dhcp
 
diff --git a/nixpkgs/pkgs/misc/uboot/default.nix b/nixpkgs/pkgs/misc/uboot/default.nix
index 617b71a6b2a1..8063c663d3f7 100644
--- a/nixpkgs/pkgs/misc/uboot/default.nix
+++ b/nixpkgs/pkgs/misc/uboot/default.nix
@@ -13,6 +13,7 @@
 , meson-tools
 , ncurses
 , openssl
+, rkbin
 , swig
 , which
 , python3
@@ -21,15 +22,16 @@
 , armTrustedFirmwareAllwinnerH616
 , armTrustedFirmwareRK3328
 , armTrustedFirmwareRK3399
+, armTrustedFirmwareRK3588
 , armTrustedFirmwareS905
 , buildPackages
 }:
 
 let
-  defaultVersion = "2023.07.02";
+  defaultVersion = "2024.01";
   defaultSrc = fetchurl {
     url = "https://ftp.denx.de/pub/u-boot/u-boot-${defaultVersion}.tar.bz2";
-    hash = "sha256-a2pIWBwUq7D5W9h8GvTXQJIkBte4AQAqn5Ryf93gIdU=";
+    hash = "sha256-uZYR8e0je/NUG9yENLaMlqbgWWcGH5kkQ8swqr6+9bM=";
   };
 
   # Dependencies for the tools need to be included as either native or cross,
@@ -371,6 +373,20 @@ in {
     filesToInstall = ["u-boot-sunxi-with-spl.bin"];
   };
 
+  ubootOrangePi5 = buildUBoot {
+    defconfig = "orangepi-5-rk3588s_defconfig";
+    extraMeta.platforms = ["aarch64-linux"];
+    BL31 = "${armTrustedFirmwareRK3588}/bl31.elf";
+    ROCKCHIP_TPL = rkbin.TPL_RK3588;
+
+    # FIXME: applied upstream, remove in 2024.04
+    extraConfig = ''
+      CONFIG_ROCKCHIP_SPI_IMAGE=y
+    '';
+
+    filesToInstall = [ "u-boot.itb" "idbloader.img" "u-boot-rockchip.bin" "u-boot-rockchip-spi.bin" ];
+  };
+
   ubootOrangePiPc = buildUBoot {
     defconfig = "orangepi_pc_defconfig";
     extraMeta.platforms = ["armv7l-linux"];
@@ -515,6 +531,14 @@ in {
     filesToInstall = ["u-boot.bin"];
   };
 
+  ubootRock5ModelB = buildUBoot {
+    defconfig = "rock5b-rk3588_defconfig";
+    extraMeta.platforms = ["aarch64-linux"];
+    BL31 = "${armTrustedFirmwareRK3588}/bl31.elf";
+    ROCKCHIP_TPL = rkbin.TPL_RK3588;
+    filesToInstall = [ "u-boot.itb" "idbloader.img" "u-boot-rockchip.bin" "u-boot-rockchip-spi.bin" ];
+  };
+
   ubootRock64 = buildUBoot {
     defconfig = "rock64-rk3328_defconfig";
     extraMeta.platforms = [ "aarch64-linux" ];