Hardware (#4) - helloworld boot loader from miniSD? (#30) - Message List

helloworld boot loader from miniSD?

I'm like totally new to arm architecture, can anybody here do a quick talk-thru about the boot process for the zip it.

Like for example: yadda yadda after the user presses the turn on button the zipit BIOS looks at a particular sector on the SD and loads it into a particular piece of memory and executes it.

more over does the zipit have a bios? how would I go about accessing the data on the SD chip,... I am guessing thru a bios call right? or maybe hardware ports? but I am talking as thou the arm architecture is no different then the intel's but I never been beyond intel's neigborhood

I am just looking for quick rundown of whats needed for a hello-world boot loader.

  • Message #40

    sooo I am spolied I like information handed over to me, I can still be useful ;)

    anywho, on my quest for a simple "hello world" bootloader for the Z2 I found the following on some asian forum (see below) which was alot of what I was looking for. But now I need like elaboration on the specifics. Like quick talk-thru's on initializing all this stuff. I think I got a couple of documents that would help but they are freaking long and me being a freaking newbie and all, I don't know...

    anyways I think I am getting close to a simple "hello world" bootloader


    blob how to start the xscale pxa27x

    step 1 .../src/blob/start.S _start: b reset -->

    .../src/blob/xlli/mainstone/start.s

    (1) reset: check why reset (2) if (reset = GPIO or power_on or watchdog reset) do following (3)

    if (reset = sleep reset) jump to (4)

    (3) Reads the SCR and LCDR virtural registers and places in SRAM (4) init GPIO (5) init clocks (basic clock, just for boot) (6) init power manager and internal memory (7) init Memory Controller (8) init Interrupt (9) init clocks (only when sleep reset) (10) change the CPU and RAM clocks, proform in high frequence (11) init OS timer (12) if power or battary error (only when sleep reset)

    finish basic init, b normal_boot -->

    step 2 .../src/blob/start.S normal_boot:

    (1) check the first 1MB of SDRAM, it will store the BLOB_START (2) copy form "piggy_start" to SDRAM

    piggy_start = blob-rest-piggy.o

    (3) jump to "BLOB_START" (address: 0xa0300400)

    note : previous program run in FLASH (CPU read cmd and data direct form FLASH) following program will run in SDRAM

    -- >

    step 3 .../src/blob/trampoline.S

    (1) clear SDRAM (just some section, not all) (2) setup the stack (3) jump to main

    note : previous program are assembly following program are C

    -->

    step 4 .../src/blob/main.c

    (1) init_subsystems()

    <1> init flash driever (init_mainstone_flash_driver()) <2> init hardware (set IP address, mainstone_init_hardware()) <3> init serial (serial_default_init()) <4> init icache <5> init led <6> init net (ether_init()) !!!! <8> init command <9> init flash blocks table (in flash.c) <10> find partiton table (in partition.c: ptable_init())

    (2) reload blob, kernel, filesystem. (3) print some welcome info, wait user input, or timeout, start kernel