Please enable javascript, or click here to visit my ecommerce web site powered by Shopify.
Jump to: navigation, search

Difference between revisions of "Yocto-layer-for-radxa-boards"

(Getting the Source)
 
(7 intermediate revisions by the same user not shown)
Line 7: Line 7:
 
=== Introduction ===
 
=== Introduction ===
  
This guide describes how to build Yocto images for Radxa boards on Ubuntu 16.04 PC.
+
This guide describes how to build Yocto images for Radxa boards on Ubuntu 16.04/18.04/20.04  PC.
  
 
=== List of Radxa Boards supported ===
 
=== List of Radxa Boards supported ===
  
 +
* ROCK Pi 4 A/B/C
 
* ROCK Pi E
 
* ROCK Pi E
 +
* ROCK Pi N10
 +
* ROCK Pi PX30
 
* ROCK Pi S
 
* ROCK Pi S
  
 
=== Getting the Source ===
 
=== Getting the Source ===
 +
 +
==== Select Release Dunfell ====
 +
 +
cd ~
 +
mkdir yocto
 +
cd yocto
 +
git clone git://git.yoctoproject.org/poky -b dunfell
 +
cd poky
 +
git clone git://git.openembedded.org/meta-openembedded.git -b dunfell
 +
git clone https://github.com/radxa/meta-radxa.git -b dunfell
 +
git clone https://github.com/YoeDistro/meta-python2.git -b dunfell
 +
 +
==== Select Release Zeus ====
  
 
  cd ~
 
  cd ~
Line 35: Line 51:
 
Set proxy for git, wget, curl.
 
Set proxy for git, wget, curl.
  
=== Building the Image ===
+
=== Building the Image for Specified Board ===
 +
 
 +
==== ROCK Pi 4 A/B/C ====
 +
 
 +
cd poky
 +
source oe-init-build-env
 +
 
 +
After you source oe-init-build-env, the working directory becomes build. So there we change the directory to poky.
 +
 
 +
cd ..
 +
cp meta-radxa/conf/bblayers.conf.sample build/conf/bblayers.conf
 +
cp meta-radxa/conf/local.conf.sample build/conf/local.conf
 +
 
 +
Modify file build/conf/local.conf
 +
 
 +
* For ROCK Pi 4A
 +
 
 +
MACHINE ?= "rockpi-4a-rk3399" # uncomment this line
 +
PACKAGE_CLASSES ?= "package_deb" # use deb package
 +
 
 +
* For ROCK Pi 4B
 +
 
 +
MACHINE ?= "rockpi-4b-rk3399" # uncomment this line
 +
PACKAGE_CLASSES ?= "package_deb" # use deb package
 +
 
 +
* For ROCK Pi 4C
 +
 
 +
MACHINE ?= "rockpi-4c-rk3399" # uncomment this line
 +
PACKAGE_CLASSES ?= "package_deb" # use deb package
 +
 
 +
Source the script oe-init-build-env.
 +
 
 +
source oe-init-build-env
 +
 
 +
Start to build the system image.
 +
 
 +
* For minimal variant
 +
bitbake -k radxa-minimal-image
 +
 
 +
* For console variant
 +
bitbake -k radxa-console-image
 +
 
 +
* For desktop variant
 +
bitbake -k radxa-desktop-image
  
 
==== ROCK Pi E ====
 
==== ROCK Pi E ====
Line 53: Line 112:
 
  PACKAGE_CLASSES ?= "package_deb" # use deb package
 
  PACKAGE_CLASSES ?= "package_deb" # use deb package
  
Source the script oe-init-build-env and start to build the system image.
+
Source the script oe-init-build-env.
  
 
  source oe-init-build-env
 
  source oe-init-build-env
 +
 +
Start to build the system image.
 +
 +
* For minimal variant
 
  bitbake -k radxa-minimal-image
 
  bitbake -k radxa-minimal-image
 +
 +
* For console variant
 +
bitbake -k radxa-console-image
 +
 +
* For desktop variant
 +
bitbake -k radxa-desktop-image
 +
 +
==== ROCK Pi N10 ====
 +
 +
cd poky
 +
source oe-init-build-env
 +
 +
After you source oe-init-build-env, the working directory becomes build. So there we change the directory to poky.
 +
 +
cd ..
 +
cp meta-radxa/conf/bblayers.conf.sample build/conf/bblayers.conf
 +
cp meta-radxa/conf/local.conf.sample build/conf/local.conf
 +
 +
Modify file build/conf/local.conf
 +
 +
MACHINE ?= "rockpi-n10-rk3399pro" # uncomment this line
 +
PACKAGE_CLASSES ?= "package_deb" # use deb package
 +
 +
Source the script oe-init-build-env.
 +
 +
source oe-init-build-env
 +
 +
Start to build the system image.
 +
 +
* For minimal variant
 +
bitbake -k radxa-minimal-image
 +
 +
* For console variant
 +
bitbake -k radxa-console-image
 +
 +
* For desktop variant
 +
bitbake -k radxa-desktop-image
 +
 +
==== ROCK Pi PX30 ====
 +
 +
cd poky
 +
source oe-init-build-env
 +
 +
After you source oe-init-build-env, the working directory becomes build. So there we change the directory to poky.
 +
 +
cd ..
 +
cp meta-radxa/conf/bblayers.conf.sample build/conf/bblayers.conf
 +
cp meta-radxa/conf/local.conf.sample build/conf/local.conf
 +
 +
Modify file build/conf/local.conf
 +
 +
MACHINE ?= "rockpi-px30" # uncomment this line
 +
PACKAGE_CLASSES ?= "package_deb" # use deb package
 +
 +
Source the script oe-init-build-env.
 +
 +
source oe-init-build-env
 +
 +
Start to build the system image.
 +
 +
* For minimal variant
 +
bitbake -k radxa-minimal-image
 +
 +
* For console variant
 +
bitbake -k radxa-console-image
 +
 +
* For desktop variant
 +
bitbake -k radxa-desktop-image
  
 
==== ROCK Pi S ====
 
==== ROCK Pi S ====
Line 74: Line 205:
 
  PACKAGE_CLASSES ?= "package_deb" # use deb package
 
  PACKAGE_CLASSES ?= "package_deb" # use deb package
  
Source the script oe-init-build-env and start to build the system image.
+
Source the script oe-init-build-env.
  
 
  source oe-init-build-env
 
  source oe-init-build-env
 +
 +
Start to build the system image.
 +
 +
* For minimal variant
 
  bitbake -k radxa-minimal-image
 
  bitbake -k radxa-minimal-image
 +
 +
* For console variant
 +
bitbake -k radxa-console-image
 +
 +
* For desktop variant
 +
bitbake -k radxa-desktop-image
  
 
=== Downloads ===
 
=== Downloads ===
Line 83: Line 224:
 
==== Images ====
 
==== Images ====
  
 +
* ROCK Pi 4: https://dl.radxa.com/rockpi4/images/yocto/
 
* ROCK Pi E: https://dl.radxa.com/rockpie/images/yocto/
 
* ROCK Pi E: https://dl.radxa.com/rockpie/images/yocto/
 +
* ROCK Pi PX30: https://dl.radxa.com/rockpipx30/images/yocto/
 
* ROCK Pi S: https://dl.radxa.com/rockpis/images/yocto/
 
* ROCK Pi S: https://dl.radxa.com/rockpis/images/yocto/
  
 
=== Flash system ===
 
=== Flash system ===
 +
 +
==== ROCK Pi 4 A/B/C ====
 +
 +
* [[rockpi4/install/microSD | Install on microSD card]]
 +
* [[rockpi4/install/eMMC | Install on eMMC module]]
 +
* [[rockpi4/dev/usb-install | Install from USB OTG port]]
  
 
==== ROCK Pi E ====
 
==== ROCK Pi E ====
Line 92: Line 241:
 
* [[RockpiE/install/microSD | Install on microSD card]]
 
* [[RockpiE/install/microSD | Install on microSD card]]
 
* [[RockpiE/install/eMMC | Install on eMMC module]]
 
* [[RockpiE/install/eMMC | Install on eMMC module]]
 +
 +
==== ROCK Pi N10 ====
 +
 +
* [[rockpiN10/install/eMMC | Install on eMMC]]
 +
* [[rockpiN10/install/microSD | Install on microSD]]
 +
 +
==== ROCK Pi PX30 ====
 +
 +
* [[RockPro-px30#Installation | Install on eMMC ]]
  
 
==== ROCK Pi S ====
 
==== ROCK Pi S ====
Line 104: Line 262:
 
  Username: root
 
  Username: root
 
  Password: rock
 
  Password: rock
 +
 +
==== Use mraa ====
 +
 +
We added support for mraa by default. To use it, you can check out the following guides.
 +
 +
* [[rockpi4/dev/libmraa  | mraa on ROCK Pi 4 ]]
 +
* [[rockpiE/dev/libmraa  | mraa on ROCK Pi E ]]
 +
* [[rockpiN10/dev/libmraa  | mraa on ROCK Pi N10 ]]
 +
* [[rockpiS/dev/libmraa  | mraa on ROCK Pi S ]]
  
 
=== Troubleshooting ===
 
=== Troubleshooting ===
  
 
* Post your issue at the forum: https://forum.radxa.com/t/yocto-layer-for-radxa-boards/3559
 
* Post your issue at the forum: https://forum.radxa.com/t/yocto-layer-for-radxa-boards/3559
 +
* Related posts:
 +
** https://forum.radxa.com/t/investigating-smallest-possible-debian-rootfs-for-rockpi-s/4506

Latest revision as of 13:33, 12 February 2022

Yocto Layer for Radxa Boards

Introduction

This guide describes how to build Yocto images for Radxa boards on Ubuntu 16.04/18.04/20.04 PC.

List of Radxa Boards supported

  • ROCK Pi 4 A/B/C
  • ROCK Pi E
  • ROCK Pi N10
  • ROCK Pi PX30
  • ROCK Pi S

Getting the Source

Select Release Dunfell

cd ~
mkdir yocto
cd yocto
git clone git://git.yoctoproject.org/poky -b dunfell
cd poky
git clone git://git.openembedded.org/meta-openembedded.git -b dunfell
git clone https://github.com/radxa/meta-radxa.git -b dunfell
git clone https://github.com/YoeDistro/meta-python2.git -b dunfell

Select Release Zeus

cd ~
mkdir yocto
cd yocto
git clone git://git.yoctoproject.org/poky -b zeus
cd poky
git clone git://git.openembedded.org/meta-openembedded.git -b zeus

For meta-radxa, you can select the one from Github nishantpoorswani or Github Radxa.

git clone https://github.com/nishantpoorswani/meta-radxa.git -b zeus
#or
git clone https://github.com/radxa/meta-radxa.git -b zeus

Setting up the Environment

Setting proxy

Set proxy for git, wget, curl.

Building the Image for Specified Board

ROCK Pi 4 A/B/C

cd poky
source oe-init-build-env

After you source oe-init-build-env, the working directory becomes build. So there we change the directory to poky.

cd ..
cp meta-radxa/conf/bblayers.conf.sample build/conf/bblayers.conf
cp meta-radxa/conf/local.conf.sample build/conf/local.conf

Modify file build/conf/local.conf

  • For ROCK Pi 4A
MACHINE ?= "rockpi-4a-rk3399" # uncomment this line
PACKAGE_CLASSES ?= "package_deb" # use deb package
  • For ROCK Pi 4B
MACHINE ?= "rockpi-4b-rk3399" # uncomment this line
PACKAGE_CLASSES ?= "package_deb" # use deb package
  • For ROCK Pi 4C
MACHINE ?= "rockpi-4c-rk3399" # uncomment this line
PACKAGE_CLASSES ?= "package_deb" # use deb package

Source the script oe-init-build-env.

source oe-init-build-env

Start to build the system image.

  • For minimal variant
bitbake -k radxa-minimal-image
  • For console variant
bitbake -k radxa-console-image
  • For desktop variant
bitbake -k radxa-desktop-image

ROCK Pi E

cd poky
source oe-init-build-env

After you source oe-init-build-env, the working directory becomes build. So there we change the directory to poky.

cd ..
cp meta-radxa/conf/bblayers.conf.sample build/conf/bblayers.conf
cp meta-radxa/conf/local.conf.sample build/conf/local.conf

Modify file build/conf/local.conf

MACHINE ?= "rockpi-e-rk3328" # uncomment this line
PACKAGE_CLASSES ?= "package_deb" # use deb package

Source the script oe-init-build-env.

source oe-init-build-env

Start to build the system image.

  • For minimal variant
bitbake -k radxa-minimal-image
  • For console variant
bitbake -k radxa-console-image
  • For desktop variant
bitbake -k radxa-desktop-image

ROCK Pi N10

cd poky
source oe-init-build-env

After you source oe-init-build-env, the working directory becomes build. So there we change the directory to poky.

cd ..
cp meta-radxa/conf/bblayers.conf.sample build/conf/bblayers.conf
cp meta-radxa/conf/local.conf.sample build/conf/local.conf

Modify file build/conf/local.conf

MACHINE ?= "rockpi-n10-rk3399pro" # uncomment this line
PACKAGE_CLASSES ?= "package_deb" # use deb package

Source the script oe-init-build-env.

source oe-init-build-env

Start to build the system image.

  • For minimal variant
bitbake -k radxa-minimal-image
  • For console variant
bitbake -k radxa-console-image
  • For desktop variant
bitbake -k radxa-desktop-image

ROCK Pi PX30

cd poky
source oe-init-build-env

After you source oe-init-build-env, the working directory becomes build. So there we change the directory to poky.

cd ..
cp meta-radxa/conf/bblayers.conf.sample build/conf/bblayers.conf
cp meta-radxa/conf/local.conf.sample build/conf/local.conf

Modify file build/conf/local.conf

MACHINE ?= "rockpi-px30" # uncomment this line
PACKAGE_CLASSES ?= "package_deb" # use deb package

Source the script oe-init-build-env.

source oe-init-build-env

Start to build the system image.

  • For minimal variant
bitbake -k radxa-minimal-image
  • For console variant
bitbake -k radxa-console-image
  • For desktop variant
bitbake -k radxa-desktop-image

ROCK Pi S

cd poky
source oe-init-build-env

After you source oe-init-build-env, the working directory becomes build. So there we change the directory to poky.

cd ..
cp meta-radxa/conf/bblayers.conf.sample build/conf/bblayers.conf
cp meta-radxa/conf/local.conf.sample build/conf/local.conf

Modify file build/conf/local.conf

MACHINE ?= "rockpi-s-rk3308" # uncomment this line
PACKAGE_CLASSES ?= "package_deb" # use deb package

Source the script oe-init-build-env.

source oe-init-build-env

Start to build the system image.

  • For minimal variant
bitbake -k radxa-minimal-image
  • For console variant
bitbake -k radxa-console-image
  • For desktop variant
bitbake -k radxa-desktop-image

Downloads

Images

Flash system

ROCK Pi 4 A/B/C

ROCK Pi E

ROCK Pi N10

ROCK Pi PX30

ROCK Pi S

Working with Yocto System

Login Details

Username: root
Password: rock

Use mraa

We added support for mraa by default. To use it, you can check out the following guides.

Troubleshooting