Welcome to the meta-rockchip Yocto BSP layer for Vicharak SBC boards.
This README provides information on building and booting with this layer.
This layer depends on the following components:
-
Yocto Project Poky Layer:
- URI: git://git.yoctoproject.org/poky
- Branch: mickledore
-
OpenEmbedded Layer:
- URI: git://git.openembedded.org/meta-openembedded
- Layers: meta-oe
- Branch: mickledore
- I. Configure Yocto/OE Environment
- II. Building meta-rockchip BSP Layers
- III. Booting Your Device
To build an image with BSP support for a specific release, follow these steps:
- Create a directory for your Yocto environment and navigate to it:
mkdir yocto; cd yocto
- Clone the Yocto Poky layer:
git clone git://git.yoctoproject.org/poky -b mickledore
- Clone the OpenEmbedded layer:
git clone git://git.openembedded.org/meta-openembedded -b mickledore
- Place the
meta-rockchip
layer in the same directory.
git clone https://github.com/vicharak-in/meta-rockchip -b mickledore
- Source the configuration script:
source oe-init-build-env
- Ensure that your
bblayers.conf
file includes the location of the meta-rockchip layer along with other required layers.
Note
Example conf/bblayers.conf
:
POKY_BBLAYERS_CONF_VERSION = "2"
BBPATH = "${TOPDIR}"
BBFILES ?= ""
BBLAYERS ?= " \
${TOPDIR}/../meta-openembedded/meta-oe \
${TOPDIR}/../meta-openembedded/meta-python \
${TOPDIR}/../meta-openembedded/meta-networking \
${TOPDIR}/../meta-openembedded/meta-filesystems \
${TOPDIR}/../meta-openembedded/meta-multimedia \
${TOPDIR}/../meta-qt5 \
${TOPDIR}/../meta-clang \
${TOPDIR}/../meta-rockchip \
${TOPDIR}/../poky/meta \
${TOPDIR}/../poky/meta-poky \
${TOPDIR}/../poky/meta-yocto-bsp \
"
- To enable a specific machine, add a
MACHINE
line to yourlocal.conf
file.
Note
You can find the list of supported machines in the meta-rockchip/conf/machine
Example conf/local.conf
:
MACHINE ?= "rk3399-vaaman"
- Enable systemd in your Yocto configuration by adding the following to your
local.conf
file
Note
Example conf/local.conf
:
INIT_MANAGER = "systemd"
Once your environment is configured, you can build an image as follows:
bitbake core-image-full-cmdline
Note
The list of buildable targets are:
core-image-minimal
core-image-full-cmdline
core-image-sato
core-image-weston
meta-toolchain
meta-ide-support
After a successful build, you will find the resulting .wic
image in
/path/to/yocto/build/tmp/deploy/images/<MACHINE>/
, along with a Rockchip
firmware image named update.img
.
To boot your device under Linux, you can use Rockchip upgrade_tool
.
Here are the steps:
- Put your device into Rockusb or Maskrom mode. Learn more
Note
If your device is in maskrom Rockusb mode, try entering miniloader Rockusb mode:
sudo upgrade_tool db <image_path>/loader.bin
- Flash the firmware image:
Flash the image (either the .wic
image or the Rockchip
firmware image update.img
) to your device.:
For .wic
image:
sudo upgrade_tool wl 0 <path/to/yocto/build/tmp/deploy/images/<MACHINE>/<IMAGE_NAME>.wic
For Rockchip firmware image:
sudo upgrade_tool wl 0 <path/to/yocto/build/tmp/deploy/images/<MACHINE>/update.img