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
MACHINE
toraspberrypi3
, which is the current tested version.$ vi conf/local.conf ... MACHINE ??= "raspberrypi3" ...
Note: Add
ENABLE_UART = "1"
toconf/local.conf
if you want serial console support. There are also other build configurations. -
Build. By default,
DISTRO
is set to 'deby-tiny', so onlycore-image-minimal
is available to build$ bitbake core-image-minimal
In
conf/local.conf
,DISTRO
can 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,115200
in the same line with old content. - In file config.txt, add
enable_uart=1
in a new line.
- In file cmdline.txt, add
-
Boot the SD card on the board and login with
root
(no password).