[Bassetlug mailing] ARM Code Examples

MJ.Wells mj.wells at ischus.plus.com
Thu Jun 7 13:54:25 UTC 2012


I am at this moment writing up the process of producing your own 
bootable SD card.

However, a brief run through along with URLs is:

1) Get the sources from https://github/raspberrypi/firmware Do not use 
the same files from the Debian distribution (I am not sure why, but I 
think that they lack some important code).

2) Format and SD card with Fat32

3) Copy the bootcode.bin, loader.bin, start.elf onto the SD card.

4) Get an example for the new kernel from 
https://github.com/dwelch67/raspberrypi and unpack the zip file.

5) Compile the blinker01 example.
     either:
       cross compile the files on a Linux computer (We don't know how to 
do this yet).
     or:
       compile the example on the Rpi. We used sftp on a distribution of 
debian enabled for ssh to get the file on to the Rpi. Then we had to 
make a change to Makefile. change the line:
       ARMGNU ?= arm-none-eabi
         to
       ARMGNU =
then use make to compile the program.

6) now rename the file blinker01.bin to kernel.img

7) copy kernel.img to the sd card.

8) restart the Rpi with the new SD card. You should get a blinking green 
LED next to the red Power LED. If you don't get this then it is worth 
turning off the Rpi and waiting a few seconds and trying again. It seems 
not to work every time on my Rpi even though I have no problem with the 
Debian image I have.

---

I have also used win32diskimager (you could use dd) to read the SD card 
back to an image file so it can be written to other cards.

---

If anyone tries to follow this I would appreciate feedback so I can make 
the website version as clear as possible.

Martin



More information about the Bassetlug mailing list