Raspberry Pi

Get meta-raspberrypi at https://git.yoctoproject.org/cgit/cgit.cgi/meta-raspberrypi.

Tested with:

poky             : warrior:b164f0dc3e69ba9cb552b48834cd6c50f50c5000
meta-raspberrypi : warrior:1c842e21c22e999b8a317e33d7748102ef13b6b4
meta-debian      : warrior:7df267bd32b8229e1a67ab537c30e3f3eaeaa3d8

Build

  1. Setup build directory.

    $ export TEMPLATECONF=meta-debian/bsp/meta-raspberrypi/conf
    $ source ./poky/oe-init-build-env build-pi
    
  2. Set MACHINE to raspberrypi3, which is the current tested version.

    $ vi conf/local.conf
    ...
    MACHINE ??= "raspberrypi3"
    ...
    

    Note: Add ENABLE_UART = "1" to conf/local.conf if you want serial console support. There are also other build configurations.

  3. Build. By default, DISTRO is set to 'deby-tiny', so only core-image-minimal is available to build

    $ bitbake core-image-minimal
    

    In conf/local.conf, DISTRO can be changed to 'deby' for building core-image-base.

After finish building, tmp/deploy/images/raspberrypi3/core-image-minimal-raspberrypi3.rpi-sdimg should be available.

Boot

  1. Burn sdimg file to SD card using etcher or dd:

    # Assume /dev/sdb is target SD card
    $ sudo dd if=core-image-minimal-raspberrypi3.rpi-sdimg of=/dev/sdb
    
  2. Enable UART (Optional).
    If you didn't add ENABLE_UART = "1" when build image and want to use serial console, you can enable it by edit config files in boot partition.

    • In file cmdline.txt, add console=serial0,115200 in the same line with old content.
    • In file config.txt, add enable_uart=1 in a new line.
  3. Boot the SD card on the board and login with root (no password).