wiki:RaspberryPi

HelenOS on Raspberry Pi

Raspberry Pi 1 with a USB-TTL cable used for serial console Raspberry Pi 1 with a USB-TTL cable used for serial console.

Information pertaining to porting HelenOS to the Raspberry Pi single-board computers.

Status

Supported models:

  • Raspberry Pi 1 (model B)

Raspberry Pi 1 has been supported since HelenOS 0.6.0. The system boots to the kernel console. Use the USB-TTL cable and the pinout depicted on the picture to get the console going. For full user experience, a userspace serial driver is needed, in addition to a mechanism for passing boot arguments to HelenOS.

Booting

There are two ways to boot HelenOS on Raspberry Pi: directly from the SD card boot partition or using U-boot.

Direct boot from SD card boot partition

Build HelenOS for Raspberry Pi, insert the microSD card you use to boot Raspberry Pi to your computer and copy boot/image.bin to kernel.img on its boot partition:

$ make distclean; make -j 6 PROFILE=arm32/raspberrypi
$ mount
<snip>
/dev/mmcblk0p2 on /run/media/<$USER>/af599925-1134-4b6e-8883-fb6a99cd58f1 type ext4 (rw,nosuid,nodev,relatime,seclabel,data=ordered,uhelper=udisks2)
/dev/mmcblk0p1 on /run/media/<$USER>/boot type vfat (rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2)
$ sudo cp boot/image.bin /run/media/$USER/boot/kernel.img

Network boot with U-boot

Build HelenOS for Raspberry Pi and copy the resulting uImage.bin to your tftpboot directory. Assuming the kernel.img on the SD card is a U-boot binary built for the rpi_config, power on your Raspberry Pi and enter the U-boot boot prompt. Then enter the following command:

U-Boot> dhcp 192.168.0.103:uImage.bin

You should see the image being downloaded:

Waiting for Ethernet connection... done.
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
DHCP client bound to address 192.168.0.101 (1009 ms)
Using smsc95xx_eth device
TFTP from server 192.168.0.103; our IP address is 192.168.0.101
Filename 'uImage.bin'.
Load address: 0x200000
Loading: ##################################################  1.4 MiB
         1.4 MiB/s
done
Bytes transferred = 1428856 (15cd78 hex)

Finally, use the bootm command to boot the downloaded image:

U-Boot> bootm
## Booting kernel from Legacy Image at 00200000 ...
   Image Name:   HelenOS-0.9.1
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1428792 Bytes = 1.4 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...

Emulating in Qemu

It is possible to use machine raspi0 or raspi1p.

qemu-system-arm -M raspi0 -bios boot/image.boot.bin -serial stdio
Last modified 4 years ago Last modified on 2021-03-22T21:32:22Z

Attachments (1)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.