Page 1 of 1

custom bootcode.bin loading ?

Posted: Fri Apr 10, 2015 3:53 pm
by kriss
hi all
i want to code a custom bootcode.bin ;)
my first problem is how the firmware find it ?
does it have a reduced fs driver ?
does it begin to search at first sd card mem block ?
i'd like to avoid fs if possible
my PI2 is not delivered yet so if someone know it i will not have to test all possible process
thanks

Re: custom bootcode.bin loading ?

Posted: Fri Apr 10, 2015 4:18 pm
by ShiftPlusOne
Why?

Re: custom bootcode.bin loading ?

Posted: Fri Apr 10, 2015 4:36 pm
by kriss
i want to do it to init my integrated execution environnement on demand

Re: custom bootcode.bin loading ?

Posted: Fri Apr 10, 2015 5:04 pm
by rpdom
Do you understand how a Pi boots?

The tiny boot ROM on the chip looks for a MS-DOS partition on the card. It then looks for bootcode.bin in that partition, loads and executes it. bootcode.bin effectively is the firmware.

Also, bootcode.bin is GPU code, not ARM code.

Re: custom bootcode.bin loading ?

Posted: Fri Apr 10, 2015 5:06 pm
by fruitoftheloom
kriss wrote:hi all
i want to code a custom bootcode.bin ;)
my first problem is how the firmware find it ?
does it have a reduced fs driver ?
does it begin to search at first sd card mem block ?
i'd like to avoid fs if possible
my PI2 is not delivered yet so if someone know it i will not have to test all possible process
thanks
https://thekandyancode.wordpress.com/20 ... i-boots-up

Re: custom bootcode.bin loading ?

Posted: Fri Apr 10, 2015 5:07 pm
by ShiftPlusOne
Also note that bootcode.bin isn't executed on the ARM, but on the VPU and comes up before anything is really initialized. You'll need to be a bit of a wizard to get anything useful to happen in your own bootcodee.bin. It's possible, but you wouldn't be asking if you were such a wizard. The reason I asked 'why' was to figure out which direction to point you in instead. It's still not clear what you're doing to figure out what the best approach is.

Re: custom bootcode.bin loading ?

Posted: Fri Apr 10, 2015 5:33 pm
by kriss
rpdom : for me a firmware is included in the hardware
bootcode.bin is more as a bios here
i asked for how it is found
i didn't ask for gpu opcodes tables ;)
sure i'm not a wizard shiftplusone but i know what i want
and if i have to become a wizard to have it i'll be a great one ;)
i'll found it by try if no answer is postable
thanks fruit ... and all here

Re: custom bootcode.bin loading ?

Posted: Fri Apr 10, 2015 7:50 pm
by ShiftPlusOne

Re: custom bootcode.bin loading ?

Posted: Fri Apr 10, 2015 8:26 pm
by kriss
thanks again shiftplusone
if i was able to do electronic i surely made a fake µsd card with dynamic data for easy retro-engineering ;)
sadly i have friedrich ataxia ...
anyway if one have some good else link(s) related to what i asked feel free to share here

Re: custom bootcode.bin loading ?

Posted: Wed May 13, 2015 5:05 pm
by kriss
i look at bootcode.bin in hex editor and at offset 200 it begin to be else than 0000 ;)
so is that some padding or is it the gpu code that end at offset 200 ???

Re: custom bootcode.bin loading ?

Posted: Wed May 13, 2015 7:03 pm
by mimi123
The beginning is just unused padding. Check mgottshlag's tools and the ACK!