Yocto layer for Radxa boards

Hi. Here is one example of adding debian apt sources and installing needed packages.

Create one file /etc/apt/sources.list.d/apt.debian-buster.list and add the content like this.

root@rockpi-s-rk3308:~# cat /etc/apt/sources.list.d/apt.debian-buster.list 
deb http://httpredir.debian.org/debian buster main contrib non-free
#deb-src http://httpredir.debian.org/debian buster main contrib non-free
deb http://httpredir.debian.org/debian buster-updates main contrib non-free
#deb-src http://httpredir.debian.org/debian buster-updates main contrib non-free
deb http://httpredir.debian.org/debian buster-backports main contrib non-free
#deb-src http://httpredir.debian.org/debian buster-backports main contrib non-free
deb http://security.debian.org/ buster/updates main contrib non-free
#deb-src http://security.debian.org/ buster/updates main contrib non-free

Search package.

apt-cache search minicom

Install packages.

apt-get update
apt-get install git
apt-get install minicom
apt-get install python3-pip

@Stephen Thank your support! I have add those source links into the file “/etc/apt/source.list.d/apt.debian-buster.list”, this method is valid, I can search and install some packages with “apt-get”. However other problems occurs, as following:

root@rockpi-s-rk3308:~# cat /etc/apt/sources.list.d/apt.debian-buster.list
deb http://httpredir.debian.org/debian buster main contrib non-free
#deb-src http://httpredir.debian.org/debian buster main contrib non-free
deb http://httpredir.debian.org/debian buster-updates main contrib non-free
#deb-src http://httpredir.debian.org/debian buster-updates main contrib non-free
deb http://httpredir.debian.org/debian buster-backports main contrib non-free
#deb-src http://httpredir.debian.org/debian buster-backports main contrib non-free
deb http://security.debian.org/ buster/updates main contrib non-free
#deb-src http://security.debian.org/ buster/updates main contrib non-free

root@rockpi-s-rk3308:~# sudo apt-get update
Get:1 http://security.debian.org buster/updates InRelease [65.4 kB]
Get:2 http://httpredir.debian.org/debian buster InRelease [122 kB]
Ign:1 http://security.debian.org buster/updates InRelease
Get:3 http://security.debian.org buster/updates/main arm64 Packages [304 kB]

Get:17 http://httpredir.debian.org/debian buster-backports/non-free Translation-en [38.3 kB]
Fetched 9561 kB in 9s (1015 kB/s)
Reading package lists… Done
W: GPG error: http://security.debian.org buster/updates InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 112695A0E562B32A NO_PUBKEY 54404762BBB6E853
W: The repository ‘http://security.debian.org buster/updates InRelease’ is not signed.
N: Data from such a repository can’t be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://httpredir.debian.org/debian buster InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 648ACFD622F3D138 NO_PUBKEY 0E98404D386FA1D9 NO_PUBKEY DCC9EFBF77E11517
W: The repository ‘http://httpredir.debian.org/debian buster InRelease’ is not signed.
N: Data from such a repository can’t be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://httpredir.debian.org/debian buster-updates InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 648ACFD622F3D138 NO_PUBKEY 0E98404D386FA1D9
W: The repository ‘http://httpredir.debian.org/debian buster-updates InRelease’ is not signed.
N: Data from such a repository can’t be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://httpredir.debian.org/debian buster-backports InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 648ACFD622F3D138 NO_PUBKEY 0E98404D386FA1D9
W: The repository ‘http://httpredir.debian.org/debian buster-backports InRelease’ is not signed.
N: Data from such a repository can’t be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch /
E: Failed to fetch /
E: Failed to fetch /
E: Failed to fetch /
E: Some index files failed to download. They have been ignored, or old ones used instead.

root@rockpi-s-rk3308:~# sudo apt-get install minicom
Reading package lists… Done
Building dependency tree… Done
The following additional packages will be installed:
libtinfo6 lrzsz
The following NEW packages will be installed:
libtinfo6 lrzsz minicom
0 upgraded, 3 newly installed, 0 to remove and 41 not upgraded.
Need to get 660 kB of archives.
After this operation, 1972 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
WARNING: The following packages cannot be authenticated!
libtinfo6 lrzsz minicom
Install these packages without verification? [y/N] y
Get:1 http://httpredir.debian.org/debian buster/main arm64 libtinfo6 arm64 6.1+20181013-2+deb10u2 [321 kB]
Get:2 http://httpredir.debian.org/debian buster/main arm64 lrzsz arm64 0.12.21-10 [83.5 kB]
Get:3 http://httpredir.debian.org/debian buster/main arm64 minicom arm64 2.7.1-1+b1 [256 kB]
Fetched 660 kB in 2s (284 kB/s)
Selecting previously unselected package libtinfo6:arm64.
(Reading database … 21173 files and directories currently installed.)
Preparing to unpack …/libtinfo6_6.1+20181013-2+deb10u2_arm64.deb …
Unpacking libtinfo6:arm64 (6.1+20181013-2+deb10u2) …
Selecting previously unselected package lrzsz.
Preparing to unpack …/lrzsz_0.12.21-10_arm64.deb …
Unpacking lrzsz (0.12.21-10) …
Selecting previously unselected package minicom.
Preparing to unpack …/minicom_2.7.1-1+b1_arm64.deb …
Unpacking minicom (2.7.1-1+b1) …
Setting up libtinfo6:arm64 (6.1+20181013-2+deb10u2) …
Setting up lrzsz (0.12.21-10) …
Setting up minicom (2.7.1-1+b1) …

root@rockpi-s-rk3308:~# sudo minicom
minicom: error while loading shared libraries: libtinfo.so.6: cannot open shared object file: No such file or directory
root@rockpi-s-rk3308:~# ls /usr/lib/libtinfo.so*
/usr/lib/libtinfo.so

root@rockpi-s-rk3308:~# sudo apt-get install git
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following additional packages will be installed:
adduser apt apt-utils bash-completion debconf debconf-i18n debian-archive-keyring gcc-8-base git-man gpgv krb5-locales less libapt-inst2.0 libapt-pkg5.0
libaudit-common libaudit1 libbsd0 libbz2-1.0 libcurl3-gnutls libdb5.3 libedit2 liberror-perl libgcc1 libgcrypt20 libgmp-dev libgmp10 libgmpxx4ldbl libgpg-error-l10n
libgpg-error0 libgssapi-krb5-2 libhogweed4 libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 libldap-2.4-2 libldap-common liblocale-gettext-perl liblz4-1
libnettle6 libnghttp2-14 libpam-modules libpam-modules-bin libpam0g libpcre2-8-0 libpcre3 libpsl5 librtmp1 libsasl2-2 libsasl2-modules libsasl2-modules-db
libseccomp2 libselinux1 libsemanage-common libsemanage1 libsepol1 libssh2-1 libtext-charwidth-perl libtext-iconv-perl libtext-wrapi18n-perl libx11-6 libx11-data
libxext6 libxmuu1 libzstd1 openssh-client passwd patch perl-base publicsuffix xauth zlib1g
Suggested packages:
apt-doc aptitude | synaptic | wajig dpkg-dev powermgmt-base debconf-doc debconf-utils libterm-readline-gnu-perl libgtk3-perl libnet-ldap-perl debconf-kde-helper
gettext-base git-daemon-run | git-daemon-sysvinit git-doc git-el git-email git-gui gitk gitweb git-cvs git-mediawiki git-svn gmp-doc libgmp10-doc libmpfr-dev
krb5-doc krb5-user libpam-doc libsasl2-modules-gssapi-mit | libsasl2-modules-gssapi-heimdal libsasl2-modules-ldap libsasl2-modules-otp libsasl2-modules-sql keychain
libpam-ssh monkeysphere ssh-askpass ed diffutils-doc sensible-utils
The following packages will be REMOVED:
bash-completion-dev libgcc-s-dev libgmpxx4
The following NEW packages will be installed:
adduser apt-utils debconf debconf-i18n debian-archive-keyring gcc-8-base git git-man gpgv krb5-locales less libapt-inst2.0 libapt-pkg5.0 libaudit-common libaudit1
libbsd0 libbz2-1.0 libcurl3-gnutls libdb5.3 libedit2 liberror-perl libgcrypt20 libgmpxx4ldbl libgpg-error-l10n libgpg-error0 libgssapi-krb5-2 libhogweed4
libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 libldap-2.4-2 libldap-common liblocale-gettext-perl liblz4-1 libnettle6 libnghttp2-14 libpam-modules
libpam-modules-bin libpam0g libpcre2-8-0 libpcre3 libpsl5 librtmp1 libsasl2-2 libsasl2-modules libsasl2-modules-db libseccomp2 libselinux1 libsemanage-common
libsemanage1 libsepol1 libssh2-1 libtext-charwidth-perl libtext-iconv-perl libtext-wrapi18n-perl libx11-data libxext6 libxmuu1 libzstd1 openssh-client passwd patch
perl-base publicsuffix xauth zlib1g
The following packages will be upgraded:
apt bash-completion libgcc1 libgmp-dev libgmp10 libx11-6
6 upgraded, 67 newly installed, 3 to remove and 35 not upgraded.
Need to get 23.1 MB of archives.
After this operation, 89.6 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
WARNING: The following packages cannot be authenticated!
perl-base libaudit-common libaudit1 debconf libpam0g libpcre3 libselinux1 libsemanage-common libbz2-1.0 libsepol1 libsemanage1 libdb5.3 libpam-modules-bin
libpam-modules passwd adduser libgpg-error0 libgcrypt20 zlib1g gpgv debian-archive-keyring gcc-8-base libgcc1 liblz4-1 libzstd1 libseccomp2 libapt-pkg5.0 apt
libgmpxx4ldbl libgmp-dev libgmp10 liblocale-gettext-perl libapt-inst2.0 apt-utils libtext-iconv-perl libtext-charwidth-perl libtext-wrapi18n-perl debconf-i18n less
bash-completion krb5-locales libbsd0 libedit2 libkeyutils1 libkrb5support0 libk5crypto3 libkrb5-3 libgssapi-krb5-2 openssh-client libsasl2-modules-db libsasl2-2
libldap-common libldap-2.4-2 libnettle6 libnghttp2-14 libpsl5 libhogweed4 librtmp1 libssh2-1 libcurl3-gnutls libpcre2-8-0 liberror-perl git-man git libgpg-error-l10n
libsasl2-modules libx11-6 libx11-data libxext6 libxmuu1 patch publicsuffix xauth
Install these packages without verification? [y/N] y
Get:1 http://httpredir.debian.org/debian buster/main arm64 perl-base arm64 5.28.1-6+deb10u1 [1403 kB]
Get:2 http://httpredir.debian.org/debian buster/main arm64 libaudit-common all 1:2.8.4-3 [22.4 kB]
Get:3 http://httpredir.debian.org/debian buster/main arm64 libaudit1 arm64 1:2.8.4-3 [56.6 kB]

Get:73 http://httpredir.debian.org/debian buster/main arm64 xauth arm64 1:1.0.10-1 [38.2 kB]
Fetched 23.1 MB in 2min 51s (135 kB/s)
Selecting previously unselected package perl-base.
(Reading database … 21319 files and directories currently installed.)
Preparing to unpack …/perl-base_5.28.1-6+deb10u1_arm64.deb …
Unpacking perl-base (5.28.1-6+deb10u1) …
dpkg: error processing archive /var/cache/apt/archives/perl-base_5.28.1-6+deb10u1_arm64.deb (–unpack):
trying to overwrite ‘/usr/bin/perl’, which is also in package perl 5.30.1-r0
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/perl-base_5.28.1-6+deb10u1_arm64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

root@rockpi-s-rk3308:~# sudo git
sudo: git: command not found

I am trying to execute “sudo apt-get upgrade”, then many libraries can not used. May be the warning “The following packages cannot be authenticated” results those problems, but I don’t know how to fix those problems.

I would suggest you build yocto image with minicom, git, etc.

@nishif you need any hardware, we would be happy to sponsor you on that.

FYI - there is now balenaOS support for RockPi 4 https://github.com/balena-os/balena-rockpi/

Hi! Can you add Radxa Zero support?

Was that directed at me or someone else?

Yes, shawaj it was for you)

Yes actually soon balena will have Radxa Zero and RockPi CM3

I don’t work for balena (anymore) but we use their software stack and are working with them to build support for these boards :+1:

3 Likes

Hi, Wondering if this layer has support for kernel 5.4? It appeared like a current recipe is using 4.4 kernel. Wondering if there are any plans for the kernel 5.4. I am looking at this from LTS perspective.

Regards,

1 Like

I’ve been able to build and run (on pi-4b) a recent kirkstone with the 5.10 at radxa/kernel. If anyone interested I can write and share instructions.

Hello.
Is it possible to run Yocto Linux in development board Fuhai EVB?
If yes, which MACHINE should I use to configure and build my own yocto distribution for the EVB?
Thanks.

Hello dear community,

I’m trying to build yocto Dunfell according to this guide https://wiki.radxa.com/Yocto-layer-for-radxa-boards and I’m facing an issue.
My host machine is running Ubuntu 20.04 and I’m not able to generate radxa-minimal-image for Rock PI E because i got compiling error with u-boot and kernel recipes.
In details, yocto is telling me “/bin/sh: 1: nativepython: not found” when compiling the following recipes :

  • u-boot-rockpi-e.bb
  • linux-rockpi-e_4.4.bb

Is anyone else facing this issue ? Any hint would be highly appreciated.
Regards

Hello.

I’m trying to build Dunfell for ROCKPI E, but errors ware occured during kernel compile.

“grep: include/linux/mali/mali_utgard_uk_types.h: No such file or directory”
and
“/usr/bin/env: ‘python’: No such file or directory”

How can I resolve this problem?
Thanks.

I’m building images inside of this https://github.com/elcfd/bitbake-docker/blob/master/Dockerfile.ubuntu-20.04 , https://hub.docker.com/r/elcfd/bitbake Docker image and it is working fine.

Maybe it will help you @vegetable and @davide

@vegetable and @davide I’m having the exact same issue as you guys. Did you guys were able to do the build successfully? Did you used the Docker image?

I’m just installing Docker so I will give it a try.

Yocto build for the Rock Pi E doesn’t work for me even using the Docker image.

After referring to the kernel recipe of ROCK PI S and modifying it as follows, the build works well.

diff --git a/recipes-kernel/linux/linux-rockpi-e_4.4.bb b/recipes-kernel/linux/linux-rockpi-e_4.4.bb
index e4d53a6..d661931 100644
--- a/recipes-kernel/linux/linux-rockpi-e_4.4.bb
+++ b/recipes-kernel/linux/linux-rockpi-e_4.4.bb
@@ -1,5 +1,8 @@
 DESCRIPTION = "Linux kernel for RockPi-E"
 
+inherit kernel
+inherit python3native
+
 require recipes-kernel/linux/linux-yocto.inc
 
# We need mkimage for the overlays
@@ -28,6 +31,12 @@ do_compile_append() {
        oe_runmake dtbs
 }
 
+do_patch_append() {                                                                                                                                                                                              
+        for s in `grep -rIl python ${S}/scripts`; do                                                                                                                                                             
+                sed -i -e '1s|^#!.*python[23]*|#!/usr/bin/env ${PYTHON_PN}|' $s                                                                                                                                  
+        done                                                                                                                                                                                                     
+}      
+
 do_deploy_append() {
        install -d ${DEPLOYDIR}/overlays
        install -m 644 ${WORKDIR}/linux-rockpi_e_rk3328-standard-build/arch/arm64/boot/dts/rockchip/overlay/* ${DEPLOYDIR}/overlays

Hello I’ve the same issue as @davide: building the recipe for uboot (u-boot-rockpi-e.bb) I obtain the error

/bin/sh: 1: nativepython: not found”

My target machine is rock pi e:

MACHINE ?= "rockpi-e-rk3328"

I’m following the same guide from Radxa: https://wiki.radxa.com/Yocto-layer-for-radxa-boards.
Following the yocto Zeus steps it works, but I’m interested in building with yocto dunfell, so I obtain the error.
I always build inside docker: I’ve tried with images derived from ubuntu:18:04, 20:04 and 22:04.
Inside my docker images I always install all packages requested by yocto dunfell as indicated by yocto reference manual: https://docs.yoctoproject.org/3.1.29/ref-manual/ref-system-requirements.html#required-packages-for-the-build-host

Also, as suggested by @tomk, I’ve tried using the image from the git repository “elcfd/bitbake-docker”.
Always the same result regarding nativepython not found.

What am I doing wrong? Who can help me?
Thanks in advance.
bye