Skip to content

Commit

Permalink
u-boot: 2023.07.02 -> 2023.10
Browse files Browse the repository at this point in the history
U-boot seems to have a dtc and libfdt implementation that works better
with their build system. Use that instead. Builds fail when specifying
`DTC=<our dtc>`.
  • Loading branch information
jmbaur committed Oct 3, 2023
1 parent 49b6a1e commit f91bec0
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 33 deletions.
49 changes: 25 additions & 24 deletions pkgs/misc/uboot/0001-configs-rpi-allow-for-bigger-kernels.patch
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
From 3d0ce353cf62efea11aa88f814aa23bf8c04acc9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Milan=20P=C3=A4ssler?= <[email protected]>
Date: Mon, 11 Jan 2021 15:13:10 +0100
From 05769cd401f443f29547dbacd1b722e9a099b66b Mon Sep 17 00:00:00 2001
From: Jared Baur <[email protected]>
Date: Mon, 2 Oct 2023 18:32:34 -0700
Subject: [PATCH] configs/rpi: allow for bigger kernels

---
include/configs/rpi.h | 16 ++++++++--------
board/raspberrypi/rpi/rpi.env | 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
Expand All @@ -25,21 +25,22 @@ 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) \
boot_targets=mmc usb pxe dhcp
--
2.29.2
2.42.0

12 changes: 3 additions & 9 deletions pkgs/misc/uboot/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
, lib
, bc
, bison
, dtc
, fetchFromGitHub
, fetchpatch
, fetchurl
Expand All @@ -25,10 +24,10 @@
}:

let
defaultVersion = "2023.07.02";
defaultVersion = "2023.10";
defaultSrc = fetchurl {
url = "https://ftp.denx.de/pub/u-boot/u-boot-${defaultVersion}.tar.bz2";
hash = "sha256-a2pIWBwUq7D5W9h8GvTXQJIkBte4AQAqn5Ryf93gIdU=";
hash = "sha256-4A5sbwFOBGEBc50I0G8yiBHOvPWuEBNI9AnLvVXOaQA=";
};
buildUBoot = lib.makeOverridable ({
version ? null
Expand Down Expand Up @@ -60,12 +59,10 @@ let
ncurses # tools/kwboot
bc
bison
dtc
flex
installShellFiles
openssl
(buildPackages.python3.withPackages (p: [
p.libfdt
p.setuptools # for pkg_resources
p.pyelftools
]))
Expand All @@ -84,10 +81,7 @@ let

enableParallelBuilding = true;

makeFlags = [
"DTC=dtc"
"CROSS_COMPILE=${stdenv.cc.targetPrefix}"
] ++ extraMakeFlags;
makeFlags = [ "CROSS_COMPILE=${stdenv.cc.targetPrefix}" ] ++ extraMakeFlags;

passAsFile = [ "extraConfig" ];

Expand Down

0 comments on commit f91bec0

Please sign in to comment.