Re: Steppingstone and bootloader - part II

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Steve,
I have some good news, then! I based my response on the fact that we're
using a DOC chip that utilizes a ~1kb initial bootloader to load a
secondary bootloader. I did not write this part myself, but after
double-checking with the guy who wrote the code and set up the project
he confirms It's all compiled and linked with PB5 tools only. We use a
pxa270 so it might be compiler/linker dependant, but looking at the
resulting 0x800 byte .nb0 file, I see a nice continous chunk of code
without the 4kb jump.

So, the good thing is it can be done! He admitted he'd tweaked around
for quite a while berofe everything fell into place but here's the .bib
file he produced:

MEMORY

; Name Start Size Type
; ------- -------- -------- ----
IPLBOOT 00000000 00001800 RAMIMAGE
RAM 00004000 00000800 RAM

CONFIG
BOOTJUMP=NONE
COMPRESSION=ON
PROFILE=OFF
KERNELFIXUPS=ON
SRE=ON
ROMFLAGS=0
ROMSTART=00001000
ROMSIZE=800
ROMWIDTH=32

MODULES

; Name Path
Memory Type
; ------ ----------------------------------------------
-----------
nk.exe
$(_TARGETPLATROOT)\target\$(_TGTCPU)\$(WINCEDEBUG)\iplboot.exe IPLBOOT


He also mentioned that he had to tweak the startup code a little with a
jump and some DCD "padding". Here's a snippet:
<snip>
STARTUPTEXT

LEAF_ENTRY StartUp

ALIGN 32

b Start ; Seems necessary to start by branch

DCD 0, 0, 0 ; @4
DCD 0, 0, 0, 0 ; @10

Start

bl PREINIT

bl INITGPIO

</snip>

Henrik Viklund

.



Relevant Pages

  • Re: what is the functionality of kernelrelocate() of eboot code?
    ... The bootloader is copied to RAM, but the bootloader doesn't know it. ... why the relocation should be needed for ram based boot code and global ... From the bootloadermainthe kernelrelocate() is located at the ...
    (microsoft.public.windowsce.platbuilder)
  • Re: XIP - Execute in Place (For Bootloader)
    ... then the bootloader will not get copied to the RAM from the Flash. ... I would like to execute the Bootloader from the Flash Memory itself ... How to make the Bootloader to Execute from the Flash Memory itself ...
    (comp.arch.embedded)
  • Re: Relocate from nor to ddr CE 5.0
    ... it depends on the bootloader implementation; ... programmed into flash. ... but the image info says it belongs to ram. ... blt CODEINRAM ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Free x86 C compiler wanted
    ... bootloader would copy the code from PROM to RAM then branch to the ... it may be a problem of your bootloader? ... Why at all do you copy the program into the RAM, ... AFAIR the entry point of an COM file simply is the first byte. ...
    (comp.compilers)
  • Re: Question on bootloader Relocation?
    ... The bootloader must copy itself to RAM and jump there. ... > However StartUp routine suppose to run from RESET vector, ... > RAMIMAGE in the BIB file as SDRAM address that implicitly menas if we need ...
    (microsoft.public.windowsce.platbuilder)