[haiku-commits] Re: haiku: hrev49100 - src/system/boot/platform/u-boot build/jam/board/rpi2 build/jam/board/beagle

  • From: "Adrien Destugues" <pulkomandy@xxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 24 Apr 2015 12:55:00 +0000

24 avril 2015 14:47 "kallisti5" <kallisti5@xxxxxxxxxxx> a écrit:

On 2015-04-23 19:31, revol@xxxxxxx wrote:

hrev49100 adds 1 changeset to branch 'master'
old head: 8361c0f11a24c782a7ab21e8f26a5f0236ec6a4c
new head: a2ddc1c06e44c238f5d0492cb50450e5c8923d71
overview:
http://cgit.haiku-os.org/haiku/log/?qt=range&q=a2ddc1c06e44+%5E8361c0f11a24

----------------------------------------------------------------------------

a2ddc1c06e44: Fix CompileDTS rule to locate the device tree blob
properly

This avoids having to call it from the BoardSetup files.

[ François Revol
<revol@xxxxxxx> ]

diff --git a/src/system/boot/platform/u-boot/Jamfile
b/src/system/boot/platform/u-boot/Jamfile
index d169fe9..a2e84e1 100644
--- a/src/system/boot/platform/u-boot/Jamfile
+++ b/src/system/boot/platform/u-boot/Jamfile
@@ -248,13 +248,15 @@ BuildUImage haiku_loader_linux.ub : haiku_loader
:
-a $(HAIKU_BOARD_LOADER_BASE) -e $(HAIKU_BOARD_LOADER_ENTRY_LINUX)
-n 'haiku_loader $(TARGET_BOOT_BOARD)' ;

-local fdtBinary = [ FDirName $(HAIKU_OUTPUT_DIR)
$(HAIKU_BOARD_FDT_NAME).dtb ] ;
-CompileDTS $(fdtBinary) : [ FDirName $(HAIKU_TOP) src data dts arch
$(TARGET_ARCH) $(HAIKU_BOARD_FDT_NAME).dts ] ;
-
-BuildUImage haiku_loader_nbsd.ub : haiku_loader $(tgzArchive)
$(fdtBinary) :
- -A $(TARGET_ARCH) -O $(uImageFakeOS) -T multi -C none
- -a $(HAIKU_BOARD_LOADER_BASE) -e $(HAIKU_BOARD_LOADER_ENTRY_NBSD)
- -n 'haiku_loader $(TARGET_BOOT_BOARD)' ;
+if $(HAIKU_BOARD_FDT_NAME) {
+ local fdtBinary = $(HAIKU_BOARD_FDT_NAME).dtb ;
+ CompileDTS $(fdtBinary) : [ FDirName $(HAIKU_TOP) src data dts arch
$(TARGET_ARCH) $(HAIKU_BOARD_FDT_NAME).dts ] ;
+
+ BuildUImage haiku_loader_nbsd.ub : haiku_loader $(tgzArchive)
$(fdtBinary) :
+ -A $(TARGET_ARCH) -O $(uImageFakeOS) -T multi -C none
+ -a $(HAIKU_BOARD_LOADER_BASE) -e $(HAIKU_BOARD_LOADER_ENTRY_NBSD)
+ -n 'haiku_loader $(TARGET_BOOT_BOARD)' ;
+}

if $(HAIKU_BOARD_SDIMAGE_UBOOT_SCRIPT_NAME) {
BuildUImageScript $(HAIKU_BOARD_SDIMAGE_UBOOT_SCRIPT_NAME) :

How does this fix it? The Raspberry Pi and beagle use the linux u-boot
image.

They are loaded differently:
For the NetBSD image, the FDT is built inside the single uImage. In Linux case,
you need to load it separately from u-boot then give its location to the kernel.

The code above only fixes the inclusion in the NetBSD image, but François also
added a missing MakeLocate which makes the CompileDTS code work again in either
case (so there is no need to repeat it in the board specific files).

--
Adrien.

Other related posts: