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

  • From: revol@xxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 1 Nov 2014 20:35:24 +0100 (CET)

hrev48202 adds 2 changesets to branch 'master'
old head: 95e9515c4b52d3beba8eff2c11d22918130b17ff
new head: 67555ed8299817d01af0dbcb5fae15aff4d869dc
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=67555ed+%5E95e9515

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

564a073: ARM: move uEnv.txt content to BoardSetup file
  
  That's really where it belongs. Not all boards will need it,
  but for now it's always created.

67555ed: ARM: beagle: Also use the linux entry point
  
  This way U-Boot is able to patch the FDT with the correct RAM size
  before we get to read it.

                                          [ François Revol <revol@xxxxxxx> ]

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

2 files changed, 13 insertions(+), 5 deletions(-)
build/jam/board/beagle/BoardSetup       | 12 ++++++++++++
src/system/boot/platform/u-boot/Jamfile |  6 +-----

############################################################################

Commit:      564a073b01046e3d4d8163c4f6519d11763382fc
URL:         http://cgit.haiku-os.org/haiku/commit/?id=564a073
Author:      François Revol <revol@xxxxxxx>
Date:        Sat Nov  1 18:48:06 2014 UTC

ARM: move uEnv.txt content to BoardSetup file

That's really where it belongs. Not all boards will need it,
but for now it's always created.

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

diff --git a/build/jam/board/beagle/BoardSetup 
b/build/jam/board/beagle/BoardSetup
index a0020dd..2c22fe2 100644
--- a/build/jam/board/beagle/BoardSetup
+++ b/build/jam/board/beagle/BoardSetup
@@ -52,6 +52,15 @@ mloFile = [ DownloadFile $(HAIKU_BOARD_MLO_IMAGE)
 ubootFile = [ DownloadFile $(HAIKU_BOARD_UBOOT_IMAGE)
         : $(HAIKU_BOARD_UBOOT_IMAGE_URL) ] ;
 
+# U-Boot environment
+# We load the uImage 2MB above its final destination, bootm will decode
+# it to the proper location. Our image is smaller than 2MB so this works.
+#HAIKU_BOARD_SDIMAGE_UBOOT_UENV_NAME = uEnv.txt ;
+HAIKU_BOARD_SDIMAGE_UBOOT_UENV = "uenvcmd=run loadImage; run mmcboot; \
+               loadImage=fatload mmc0 0 $(HAIKU_BOARD_LOADER_UIBASE) 
haiku_loader_nbsd.ub \
+               mmcboot=bootm $(HAIKU_BOARD_LOADER_UIBASE)" ;
+
+
 HAIKU_BOARD_SDIMAGE_FILES =
        $(mloFile)
        $(ubootFile)
diff --git a/src/system/boot/platform/u-boot/Jamfile 
b/src/system/boot/platform/u-boot/Jamfile
index cf7a273..a7bddfc 100644
--- a/src/system/boot/platform/u-boot/Jamfile
+++ b/src/system/boot/platform/u-boot/Jamfile
@@ -187,11 +187,7 @@ actions BuildUBootSDImage1
        MTOOLSRC=$(1).mtools mformat -L 32 -v "Haiku" i:
 
        # generate u-boot environment variables
-       # We load the uImage 2MB above its final destination, bootm will decode
-       # it to the proper location. Our image is smaller than 2MB so this 
works.
-       echo 'uenvcmd=run loadImage; run mmcboot;
-               loadImage=fatload mmc0 0 $(HAIKU_BOARD_LOADER_UIBASE) 
haiku_loader_nbsd.ub
-               mmcboot=bootm $(HAIKU_BOARD_LOADER_UIBASE)' > uEnv.txt
+       echo '$(HAIKU_BOARD_SDIMAGE_UBOOT_UENV)' > uEnv.txt
        # populate
        MTOOLSRC=$(1).mtools mcopy $(2[1-]) i:
        MTOOLSRC=$(1).mtools mcopy uEnv.txt i:

############################################################################

Revision:    hrev48202
Commit:      67555ed8299817d01af0dbcb5fae15aff4d869dc
URL:         http://cgit.haiku-os.org/haiku/commit/?id=67555ed
Author:      François Revol <revol@xxxxxxx>
Date:        Sat Nov  1 19:34:38 2014 UTC

ARM: beagle: Also use the linux entry point

This way U-Boot is able to patch the FDT with the correct RAM size
before we get to read it.

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

diff --git a/build/jam/board/beagle/BoardSetup 
b/build/jam/board/beagle/BoardSetup
index 2c22fe2..7731f5d 100644
--- a/build/jam/board/beagle/BoardSetup
+++ b/build/jam/board/beagle/BoardSetup
@@ -13,6 +13,7 @@ HAIKU_BOARD_LOADER_BASE = 0x80800000 ;
 # entry points (raw binary, and netbsd loader emulation)
 HAIKU_BOARD_LOADER_ENTRY_RAW = $(HAIKU_BOARD_LOADER_BASE) ;
 HAIKU_BOARD_LOADER_ENTRY_NBSD = `printf \"obase=16;ibase=16;8 + %x\\n\" 
$(HAIKU_BOARD_LOADER_BASE)|bc` ;
+HAIKU_BOARD_LOADER_ENTRY_LINUX = `printf \"obase=16;ibase=16;10 + %x\\n\" 
$(HAIKU_BOARD_LOADER_BASE)|bc` ;
 
 HAIKU_BOARD_LOADER_ENTRY = $(HAIKU_BOARD_LOADER_ENTRY_NBSD) ;
 HAIKU_BOARD_LOADER_FAKE_OS = netbsd ;
@@ -57,14 +58,16 @@ ubootFile = [ DownloadFile $(HAIKU_BOARD_UBOOT_IMAGE)
 # it to the proper location. Our image is smaller than 2MB so this works.
 #HAIKU_BOARD_SDIMAGE_UBOOT_UENV_NAME = uEnv.txt ;
 HAIKU_BOARD_SDIMAGE_UBOOT_UENV = "uenvcmd=run loadImage; run mmcboot; \
-               loadImage=fatload mmc0 0 $(HAIKU_BOARD_LOADER_UIBASE) 
haiku_loader_nbsd.ub \
-               mmcboot=bootm $(HAIKU_BOARD_LOADER_UIBASE)" ;
-
+               loadImage=fatload mmc0 0 $(HAIKU_BOARD_LOADER_UIBASE) 
haiku_loader_linux.ub; fatload mmc 0 0x80100000 $(HAIKU_BOARD_FDT_NAME).dtb; 
fatload mmc 0 0x81200000 haiku-floppyboot.tgz.ub; \
+               mmcboot=bootm $(HAIKU_BOARD_LOADER_UIBASE) 0x81200000 
0x80100000" ;
 
 HAIKU_BOARD_SDIMAGE_FILES =
        $(mloFile)
        $(ubootFile)
        haiku_loader_nbsd.ub
+       haiku_loader_linux.ub
+       haiku-floppyboot.tgz.ub
+       $(HAIKU_BOARD_FDT_NAME).dtb
 ;
 
 


Other related posts:

  • » [haiku-commits] haiku: hrev48202 - build/jam/board/beagle src/system/boot/platform/u-boot - revol