Name Date Size #Lines LOC

..--

classes/H05-Jun-2025-5644

conf/H05-Jun-2025-628382

dynamic-layers/H05-Jun-2025-12,92611,247

licenses/H05-Jun-2025-4235

recipes-benchmark/glmark2/H05-Jun-2025-85

recipes-bsp/H05-Jun-2025-12377

recipes-core/H05-Jun-2025-199153

recipes-devtools/H05-Jun-2025-6,7694,874

recipes-graphics/H05-Jun-2025-24,15321,712

recipes-kernel/H05-Jun-2025-1,3501,126

recipes-multimedia/H05-Jun-2025-17,48015,597

wic/H05-Jun-2025-1311

COPYING.MITH A D05-Jun-20251 KiB1815

LICENSEH A D05-Jun-2025276 65

README.mdH A D05-Jun-20254.2 KiB166107

README.md

1# meta-rockchip
2
3Yocto BSP layer for the Rockchip SOC boards
4  - wiki <http://opensource.rock-chips.com/wiki_Main_Page>.
5
6This README file contains information on building and booting the meta-rockchip BSP layers.
7
8Please see the corresponding sections below for details.
9
10## Dependencies
11
12This layer depends on:
13
14* URI: git://git.yoctoproject.org/poky
15* branch: kirkstone
16
17* URI: git://git.openembedded.org/meta-openembedded
18* layers: meta-oe
19* branch: kirkstone
20
21## Table of Contents
22
23I. Configure yocto/oe Environment
24
25II. Building meta-rockchip BSP Layers
26
27III. Booting your Device
28
29IV. Tested Hardwares
30
31V. Supporting new Machine
32
33### I. Configure yocto/oe Environment
34
35In order to build an image with BSP support for a given release, you need to download the corresponding layers described in the "Dependencies" section. Be sure that everything is in the same directory.
36
37```shell
38~ $ mkdir yocto; cd yocto
39~/yocto $ git clone git://git.yoctoproject.org/poky -b kirkstone
40~/yocto $ git clone git://git.openembedded.org/meta-openembedded.git -b kirkstone
41```
42
43And put the meta-rockchip layer here too.
44
45Then you need to source the configuration script:
46
47```shell
48~/yocto $ source poky/oe-init-build-env
49```
50
51Having done that, you can build a image for a rockchip board by adding the location of the meta-rockchip layer to bblayers.conf, along with any other layers needed.
52
53For example:
54
55```makefile
56# build/conf/bblayers.conf
57BBLAYERS ?= " \
58  ${TOPDIR}/../meta-rockchip \
59  ${TOPDIR}/../poky/meta \
60  ${TOPDIR}/../poky/meta-poky \
61  ${TOPDIR}/../poky/meta-yocto-bsp \
62  ${TOPDIR}/../meta-openembedded/meta-oe \
63```
64
65To enable a particular machine, you need to add a MACHINE line naming the BSP to the local.conf file:
66
67```makefile
68  MACHINE = "xxx"
69```
70
71All supported machines can be found in meta-rockchip/conf/machine.
72
73### II. Building meta-rockchip BSP Layers
74
75You should then be able to build a image as such:
76
77```shell
78$ bitbake core-image-minimal
79```
80
81At the end of a successful build, you should have an .wic image in `/path/to/yocto/build/tmp/deploy/images/<MACHINE>/`, also with an rockchip firmware image: `update.img`.
82
83### III. Booting your Device
84
85Under Linux, you can use upgrade_tool: <http://opensource.rock-chips.com/wiki_Upgradetool> to flash the image:
86
871. Put your device into rockusb mode: <http://opensource.rock-chips.com/wiki_Rockusb>
88
892. If it's maskrom rockusb mode, try to enter miniloader rockusb mode:
90
91```shell
92$ sudo upgrade_tool db <IMAGE PATH>/loader.bin
93```
94
953. Flash the image (wic image or rockchip firmware image)
96
97```shell
98$ sudo upgrade_tool wl 0 <IMAGE PATH>/<IMAGE NAME>.wic # For wic image
99```
100
101```shell
102$ sudo upgrade_tool uf <IMAGE PATH>/update.img # For rockchip firmware image
103```
104
105### IV. Tested Hardwares
106
107The following undergo regular basic testing with their respective MACHINE types.
108
109* px3se evb board
110
111* rk3308 evb board
112
113* rk3326 evb board
114
115* px30 evb board
116
117* rk3328 evb board
118
119* rk3288 evb board
120
121* rk3399 sapphire excavator board
122
123* rk3399pro evb board
124
125### V. Supporting new Machine
126
127To support new machine, you can either add new machine config in meta-rockchip/conf/machine, or choose a similar existing machine and override it's configurations in local config file.
128
129In general, a new machine needs to specify it's u-boot config, kernel config, kernel device tree and wifi/bt firmware:
130
131For example:
132
133```makefile
134KBUILD_DEFCONFIG = "rk3326_linux_defconfig"
135KERNEL_DEVICETREE = "rockchip/rk3326-evb-lp3-v10-linux.dtb"
136UBOOT_MACHINE = "evb-rk3326_defconfig"
137RK_WIFIBT_FIRMWARES = " \
138        rkwifibt-firmware-ap6212a1-wifi \
139        rkwifibt-firmware-ap6212a1-bt \
140        brcm-tools \
141"
142```
143
144If you want to use your own local u-boot and kernel sources, a simple way is to override related configurations in local config file.
145
146For example using the kernel/ and u-boot/ in the same directory of meta-rockchip:
147
148```makefile
149# build/conf/local.conf
150SRC_URI:pn-linux-rockchip = " \
151        git://${TOPDIR}/../kernel;protocol=file;usehead=1 \
152        file://cgroups.cfg \
153"
154SRCREV:pn-linux-rockchip = "${AUTOREV}"
155KBRANCH = "HEAD"
156
157SRC_URI:pn-u-boot = " \
158        git://${TOPDIR}/../u-boot;protocol=file;usehead=1 \
159"
160SRCREV:pn-u-boot = "${AUTOREV}"
161```
162
163## Maintainers
164
165* Jeffy Chen `<jeffy.chen@rock-chips.com>`
166