dwelch67/raspberrypi

How to run the Raspberry Pi 2 blinker example?

cirosantilli opened this issue · 7 comments

What I've done so far:

  • sudo apt-get install gcc-arm-none-eabi binutils-arm-none-eabi
  • make inside boards/pi2/bootloader07 and boards/pi2/HYP/blinker01. Seems to work, I get kernel7.img, bootloader07.elf, blinker01.bin and blinker01.elf
  • format SD card with fdisk, create a single fat partition with mkfs.fat, copy the entire bootloader07/* and blinker01/* to root
  • copy bootcode.bin and start.elf to the root partition as well from: https://github.com/raspberrypi/firmware/tree/master/boot

Now what do I have to do? I plug the SD card into Pi, and power it up, but nothing happens (both leds stay on all the time, as if I had no SD card).

I recommend that you add some very direct step by step bash commands at the top of the README, otherwise hard to make work. :-)

Ubuntu 16.04 host.

Thanks for awesome repo!

you have a uart hooked up? if not then the bootloader doesnt do you any
good, try one of the blinkers by itself.

no reason to copy the bootloader directories, you only need the binary
file and copy it to kernel7.img. bootcode.bin, start.elf and
kernel7.img are the only files you need. maybe config.txt if you want to
change how it boots, but the subdirs in the repo are config.txt specific.

On 10/08/2016 11:43 AM, ************ wrote:

What I've done so far:

  • |sudo apt-get install gcc-arm-none-eabi binutils-arm-none-eabi|
  • |make| inside |boards/pi2/bootloader07| and
    |boards/pi2/HYP/blinker01|. Seems to work, I get |kernel7.img|,
    |bootloader07.elf|, |blinker01.bin| and |blinker01.elf|
  • format SD card with SD disk, create a single fat partition, copy the
    entire |bootloader07/| and |blinker01/| to root
  • copy |bootcode.bin| and |start.elf| to the root partition as well
    from: https://github.com/raspberrypi/firmware/tree/master/boot

Now what do I have to do? I plug the SD card into Pi, and power it up,
but nothing happens (both leds stay on all the time, as if I had no SD
card).

I recommend that you add some very direct step by step bash commands at
the some of one of the README, otherwise hard to make work. :-)

Ubuntu 16.04 host.

Thanks for awesome repo!


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#24, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAXjrIrPSbylEk_o5SSjnD4WOMJb7mRAks5qx7o4gaJpZM4KRwFz.

UART works on Raspbian through /dev/ttyUSB0, but I have no /dev/ttyUSB with this image.

How to try a blinker by itself? I understand that I need a kernel7.img, but no such file is generated under blinker01, only .elf and .bin.

I had understood that only the img bin and elf were needed, only copied dir contents to be sure :-)

From my readme file.

  1. boots off of an on chip rom of some sort
  2. reads the sd card and looks for additional gpu specific boot files
    bootcode.bin and start.elf in the root dir of the first partition
    (fat32 formatted, loader.bin no longer used/required)
  3. in the same dir it looks for config.txt which you can do things like
    change the arm speed, or change the address where to load kernel.img,
    and many others
  4. it reads kernel.img the arm boot binary file and copies it to memory
  5. releases reset on the arm such that it runs from the address where
    the kernel.img data was written

On 10/09/2016 04:41 AM, ************ wrote:

UART works on Raspbian through |/dev/ttyUSB0|, but I have no
/dev/ttyUSB` with this image.

How to try a blinker by itself?

I had understood that only the img bin and elf were needed, only copied
dir contents to be sure :-)


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#24 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAXjrAbuFP97eYqIWxrOWfglwpvXD1oPks5qyKjAgaJpZM4KRwFz.

this is bare metal not linux on the pi, you have no usb on the pi unless
you write a bare metal usb driver (there have been a couple of folks to
succeed at some level). there is a ton of text related to getting a
3.3v level uart that you connect to your host (an ftdi breakout or cable
for example) with which you can connect to the uart on the pi and use a
bootloader. Without that you are pretty much done after you blink the led.

kernel.img or kernel7.img is the specific name of the file that contains
the memory image copied to the arm and then booted. the four files
listed are the only files that are used to boot the gpu and arm, one of
them is optional config.txt.

David

On 10/09/2016 04:41 AM, ************ wrote:

UART works on Raspbian through |/dev/ttyUSB0|, but I have no
/dev/ttyUSB` with this image.

How to try a blinker by itself?

I had understood that only the img bin and elf were needed, only copied
dir contents to be sure :-)


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#24 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAXjrAbuFP97eYqIWxrOWfglwpvXD1oPks5qyKjAgaJpZM4KRwFz.

I know this is bare metal, only mentioned Linux as way to ensure uart is connected correctly.

ftdi: OK will look into that, don't know what it is

kernel.img or kernel7.img: I understand, I just can't couldn't find the one that makes the blinker work, only the bootloader one which I couldn't use

copy the binary boards/pi2/HYP/blinker01/blinker01.bin to kernel7.img on
the card and power cycle.

On 10/09/2016 04:29 PM, ************ wrote:

I know this is bare metal, only mentioned Linux as way to ensure uart is
connected correctly.

ftdi: OK will look into that, don't know what it is

kernel.img or kernel7.img: I understand, I just can't couldn't find the
one that makes the blinker work, only the bootloader one which I
couldn't use


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#24 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAXjrGbAI51jdrcjXlp8-q6v5-zpUZIxks5qyU6mgaJpZM4KRwFz.

👍

And the partition type id must be C. Arg, 2 hours of my life went by. :-)