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
-
Setup build directory.
$ export TEMPLATECONF=meta-debian/bsp/meta-raspberrypi/conf $ source ./poky/oe-init-build-env build-pi -
Set
MACHINEtoraspberrypi3, which is the current tested version.$ vi conf/local.conf ... MACHINE ??= "raspberrypi3" ...Note: Add
ENABLE_UART = "1"toconf/local.confif you want serial console support. There are also other build configurations. -
Build. By default,
DISTROis set to 'deby-tiny', so onlycore-image-minimalis available to build$ bitbake core-image-minimalIn
conf/local.conf,DISTROcan be changed to 'deby' for buildingcore-image-base.
After finish building, tmp/deploy/images/raspberrypi3/core-image-minimal-raspberrypi3.rpi-sdimg should be available.
Boot
-
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 -
Enable UART (Optional).
If you didn't addENABLE_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,115200in the same line with old content. - In file config.txt, add
enable_uart=1in a new line.
- In file cmdline.txt, add
-
Boot the SD card on the board and login with
root(no password).