[ros-diffs] [sir_richard] 49736: [ARMLLB]: Add uImage header which uBoot expects on the images it can load nicely (using "go" will not give us ATAGs, "bootm" requires this header). It's a static header instead...

sir_richard at svn.reactos.org sir_richard at svn.reactos.org
Tue Nov 23 16:43:33 UTC 2010


Author: sir_richard
Date: Tue Nov 23 16:43:32 2010
New Revision: 49736

URL: http://svn.reactos.org/svn/reactos?rev=49736&view=rev
Log:
[ARMLLB]: Add uImage header which uBoot expects on the images it can load nicely (using "go" will not give us ATAGs, "bootm" requires this header). It's a static header instead of requiring the mkImage tool, since we can disable data checksums in uBoot. We basically fake being a Linux kernel and the LLB handles the ATAGs.
[ARMLLB]: Add boot stack for Zoom2.

Modified:
    trunk/reactos/boot/armllb/boot.s

Modified: trunk/reactos/boot/armllb/boot.s
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/boot.s?rev=49736&r1=49735&r2=49736&view=diff
==============================================================================
--- trunk/reactos/boot/armllb/boot.s [iso-8859-1] (original)
+++ trunk/reactos/boot/armllb/boot.s [iso-8859-1] Tue Nov 23 16:43:32 2010
@@ -13,15 +13,47 @@
     NESTED_ENTRY _start
     PROLOG_END _start
     
-#ifdef _OMAP3_
+#ifdef _BEAGLE_ // This is only used for TI BootROM on Beagle/Emulator for now
     /*
-     * On OMAP3, the boot is directly from TI BootROM that reads NAND flash.
+     * On Beagle, the boot is directly from TI BootROM that reads NAND flash.
      * First word is size of program to load.
      * Second word is load address of program. Since DDR is not initialized,
      * we load to SDRAM at 40200000h. Max 64K.
      */
     .word 0x8000
     .word 0x40200000
+#elif _ZOOM2_
+	/*
+	 * On ZOOM2, we currently load from u-boot to make bring-up easier.
+	 *
+	 * In order to get ATAG and all that goodness, we have to fool u-boot into
+	 * thinking we are a Linux ARM kernel.
+	 *
+	 * So this is a 'fake' uImage-format header, which will make u-boot grok our
+	 * image and correctly execute it.
+	 *
+	 * Note that a data checksum is in the header, but thankfully we can disable
+	 * the check.
+	 *
+	 * There's also a header checksum, but as long as there's no need to modify
+	 * this header, we can leave it static.
+	 *
+	 * Finally, note that the "Image String" is sized as a 32-byte array in the
+	 * uImage header format. The string chosen below is not only accurate, but
+	 * also happens to fit exactly in 32 bytes, meaning we don't need to pad.
+	 */
+	.word 0x56190527 // Header Magic
+	.word 0x5E4B8444 // Checksum
+	.word 0x483BE54C // Timestamp
+	.word 0x0CA10000 // Image size (64K)
+	.word 0x00000081 // Load address
+	.word 0x40000081 // Entrypoint
+	.word 0x90873DD8 // Data Checksum ('setenv verify n' must be set!)
+	.byte 5 		 // Linux OS
+	.byte 2 		 // ARM
+	.byte 2 		 // Kernel
+	.byte 0 		 // No compression
+	.ascii "ReactOS ARM Low-Level Bootloader" 
 #endif
 
     /* Load C entrypoint and setup LLB stack */
@@ -31,8 +63,14 @@
     ENTRY_END _start
 
 L_BootStackEnd:
+#ifdef _BEAGLE_ // This is only used for TI BootROM on Beagle/Emulator for now
     .long 0x00010000
-        
+#elif _ZOOM2_ // On ZOOM2 RAM starts at 0x80000000, not 0
+	.long 0x81014000
+#else
+#error Stack Address Not Defined
+#endif
+
 L_LlbStartup:
     .long LlbStartup
 




More information about the Ros-diffs mailing list