The Raspberry Pi is a small computer that is ideal for learning computing and computer languages.

The redpesk Project supports images for the Raspberry Pi 3 and the Raspberry Pi 4 boards in aarch64. Each of these boards comes in a variety of models. See the Raspberry Pi Product Page for more information.

Deploying the image for rpi3/rpi4

It consists of copying raw image on sdcard.

Download images

See Download Images section

Download aarch64 image from command line

wget -r -nd --no-parent -A "redpesk*" 'https://download.redpesk.bzh/redpesk-devel/releases/33/images/minimal/aarch64/latest'

Copy image

Find your device sdcard and be sure it is unmounted

DEVICE_TO_COPY=$(x=$(lsblk -dli -o PATH,VENDOR,TYPE,HOTPLUG | grep "disk\s\+1$") && [ $(echo $x | wc -l)  -gt 1 ] && echo "ERROR: more than one devices: \n $x" || echo $x | awk '{print $1}')
echo $DEVICE_TO_COPY

If more than one device, just the list and choose the right one:

lsblk -dli -o PATH,VENDOR,TYPE,HOTPLUG | grep "disk\s\+1$"
DEVICE_TO_COPY=/dev/<yourdevice>

Use bmaptool

Preserequites:

  • bmaptool installed
  • bmap file downloaded (it comes with images)
  • device plugged, find, unmounted
IMAGE=$(ls redpesk*.raw.xz)
BMAP_FILE=$(ls redpesk*.bmap)
sudo bmaptool copy $(IMAGE) --bmap $BMAP_FILE $DEVICE_TO_COPY

Use dd

Preserequites:

  • device plugged, find, unmounted
unxz redpesk*.raw.xz
DEVICE_TO_COPY=/dev/disk/by-id/<mydevice-0:0>
IMAGE=$(ls redpesk*.raw)
sudo dd if=$IMAGE of=DEVICE_TO_COPY status=progress

Launch rpi

Preserequites:

  • sdcard copied and plugged into rpi
  • keyboard, screen plugged into rpi
  • ethernet cable pluggeg (optionnal)

Power on rpi

Just start the rpi and wait, it is booting!

Default root password is root.

SSH

It needs ethernet cable plugged into the board, and getting the ip.

  • User: root
  • Password: root

Getting the ip on target

ip a
ssh root@<ip_found>

Debugging

When things go wrong, you can take steps to debug your Raspberry Pi. For debugging, you need a 3.3 Volt USB Serial cable to fascilitate communication between your Raspberry Pi board and your build host.

NOTE: If you are using a USB console cable from Adafruit, see “Adafruit’s Raspberry Pi Lesson 5” for connection information.

Use the following steps, which assume you are using the previously mentioned Olimex cable. You can reference the following diagram for information on the following steps:

  1. Connect the Olimex cable to the Universal Asynchronous Receiver-Transmitter (UART) connection on your Raspberry Pi board. Do not connect the USB side of the cable to your build host at this time.

    CAUTION: No warranty is provided using the following procedure. Pay particular attention to the collors of your cable as they could vary depending on the vendor.

  2. Connect the cable’s BLUE wire to pin 6 (i.e. Ground) of the UART.

  3. Connect the cable’s GREEN RX line to pin 8 (i.e. the TXD line) of the UART.

  4. Connect the cable’s RED TX line to pin 10 (i.e. the RXD line) of the UART.

  5. Plug the USB connector of the cable into your build host’s USB port.

  6. Use your favorite tool for serial communication between your build host and your Raspberry Pi. For example, if your build host is a native Linux machine (e.g. Ubuntu) you could use screen as follows from a terminal on the build host:

    $ sudo screen /dev/ttyUSB0 115200