mirror of
https://github.com/reactos/reactos.git
synced 2024-11-04 22:00:55 +00:00
[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. svn path=/trunk/; revision=49736
This commit is contained in:
parent
b9c9c55b77
commit
ba9136a9ff
1 changed files with 41 additions and 3 deletions
|
@ -13,15 +13,47 @@
|
||||||
NESTED_ENTRY _start
|
NESTED_ENTRY _start
|
||||||
PROLOG_END _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.
|
* First word is size of program to load.
|
||||||
* Second word is load address of program. Since DDR is not initialized,
|
* Second word is load address of program. Since DDR is not initialized,
|
||||||
* we load to SDRAM at 40200000h. Max 64K.
|
* we load to SDRAM at 40200000h. Max 64K.
|
||||||
*/
|
*/
|
||||||
.word 0x8000
|
.word 0x8000
|
||||||
.word 0x40200000
|
.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
|
#endif
|
||||||
|
|
||||||
/* Load C entrypoint and setup LLB stack */
|
/* Load C entrypoint and setup LLB stack */
|
||||||
|
@ -31,8 +63,14 @@
|
||||||
ENTRY_END _start
|
ENTRY_END _start
|
||||||
|
|
||||||
L_BootStackEnd:
|
L_BootStackEnd:
|
||||||
|
#ifdef _BEAGLE_ // This is only used for TI BootROM on Beagle/Emulator for now
|
||||||
.long 0x00010000
|
.long 0x00010000
|
||||||
|
#elif _ZOOM2_ // On ZOOM2 RAM starts at 0x80000000, not 0
|
||||||
|
.long 0x81014000
|
||||||
|
#else
|
||||||
|
#error Stack Address Not Defined
|
||||||
|
#endif
|
||||||
|
|
||||||
L_LlbStartup:
|
L_LlbStartup:
|
||||||
.long LlbStartup
|
.long LlbStartup
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue