AMP with Raspberry Pi: Cookbook

In order to boot Linux on a RaspBerry Pi 2 or 3 with 3 cores and reserve half ram for bare-metal apps you must use U-boot, no the default RasPi bootloader.

Prepare a SD card with Minibian or Raspbian
Get boot files and examples with
git clone https://github.com/telmomoya/AMP

Copy to SD boot folder (fat's root) the files provided in repository boot folder:
boot.scr
u-boot.bin
uboot.env

(More details on this files here)

Add to config.txt a line with:
kernel=u-boot.bin

Boot your Linux (look during boot only 3 berries= 3 cores)
Login and go to examples foders



Blinking Led
This file will blink a led connected to GPIO16.
In amp-test folder you can find source and binary files for this first example. 
Test it with enough privileges (root or sudo):

cd amp-test
./loadmetal up-metal.bin
./devmem 0x400000bc w 0x20000000

You can change blink timming with:
./devmem 0x200000a0 b 0x0a

0x200000a0 is the physical address for a "delay" variable, so writing from Linux to that address changes the value for the remote (bare-metal) process: IPC!.

View other posts for detailed info about each step:

No hay comentarios:

Publicar un comentario