Qualcomm Robotics RB5/RB6 - Customize image

From RidgeRun Developer Wiki


Index






In this section we will cover how to customize; using Yocto, the packages installed in the image built in the previous section Base Image. For this customization we will add a layer called meta-ridgerun, which is a Yocto layer containing the recipes to build RidgeRun's proprietary and open software. For more information on the meta-ridgerun layer and purchasing its packages follow the following link meta-ridgerun. The process described by the following steps to add a layer can be used with any other custom meta layer.

First, let's define some environment variables, based on the previous build:

Note
Make sure to change the directory names to the ones you used in your computer.


YOCTO_DIR=/home/$USER/oe-rpb
export BRANCH="dunfell"


Getting meta-ridgerun layer

1. Download Ridgerun meta layer from GitHub, unzip and rename it:

cd ~/Downloads
wget https://github.com/RidgeRun/meta-ridgerun/archive/master.zip
unzip master.zip 
mv meta-ridgerun-master/ meta-ridgerun


2. Copy meta-ridgerun in your layers directory:

cp -r meta-ridgerun $YOCTO_DIR/layers/


3. Go to the build configuration directory:

Note
Make sure to change the directory names to the ones you used in your computer.
cd $YOCTO_DIR/build-wayland/conf/


4. Open the bblayers.conf file and add the RidgeRun meta layer path $YOCTO_DIR/layers/meta-ridgerun. The BBLAYERS variable in the bblayers.conf should look something like this:

Note
This extract shows the beginning of the bblayers.conf file and the BBLAYERS variable only, the full file may have extra content. Notice the last line on BBLAYERS is the meta-ridgerun path.
# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf
# changes incompatibly
LCONF_VERSION = "7"
OEROOT := "${@os.path.abspath(os.path.dirname(d.getVar('FILE', True)))}/../.."

BBPATH = "${TOPDIR}"

BBFILES = ""

      .
      .
      .

BBLAYERS = " \
  ${OEROOT}/layers/meta-rpb \
  ${BASELAYERS} \
  ${BSPLAYERS} \
  ${EXTRALAYERS} \
  ${OEROOT}/layers/openembedded-core/meta \
  ${OEROOT}/layers/meta-ridgerun \
"


5. Build the recipes. In this case we will build two RidgeRun products such as Gstd, which is a GStreamer framework for controlling audio and video streaming using an InterProcess Communication protocol, and Gst-Perf, which is a GStreamer element to measure framerate, bitrate and CPU usage. You can see more information on each product, such as how to get them for your applications and examples on how to use them, by clicking the links on their names.

Note
Before building the selected recipes, it is better to remove all the recipes you won't use, from the meta-ridgerun directory
$YOCTO_DIR/layers/meta-ridgerun
to avoid building errors due to unauthorized access rights to repositories or lack of dependencies, as Yocto processes even the recipes you did not choose to build.
cd $YOCTO_DIR/build-wayland/
bitbake gstd gst-perf


6. If the previous build worked, add the two products to the local.conf file, so that the image includes them when its rebuilt. Open the file located in

$YOCTO_DIR/build-wayland/conf/local.conf

and add the following line at the end of the file:

IMAGE_INSTALL_append = " gstd gst-perf"


7. Rebuild and verify the package was correctly added to the image. Run the following command and search for: gstreamer1.0, gstreamer1.0-plugins-base, gstd and gst-perf:

bitbake -g rpb-weston-image-test && cat pn-buildlist | grep -ve "native" | sort | uniq


The result should look similar to the following:

Note
The result may contain more or less packages depending on the image you are building.
Parsing recipes: 100% |########################################################################################################################################################################################################| Time: 0:01:21
Parsing of 3460 .bb files complete (0 cached, 3460 parsed). 5004 targets, 384 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
NOTE: PN build list saved to 'pn-buildlist'
NOTE: Task dependencies saved to 'task-depends.dot'

96boards-tools
acl
adwaita-icon-theme
  
  .
  .
  .

gstd
gst-perf
gstreamer1.0
gstreamer1.0-libav
gstreamer1.0-plugins-bad
gstreamer1.0-plugins-base
gstreamer1.0-plugins-good

  .
  .
  .

xz
zip
zlib


8. If the building process went fine, the built files will be located in the

$YOCTO_DIR/build-wayland/tmp-rpb_wayland-glibc/deploy/images/qrb5165-rb5

folder.

user@desktop:~/oe-rpb/build-rpb/tmp-rpb-glibc/deploy/images/qrb5165-rb5$ ls
boot-qrb5165-rb5--5.15-r0-qrb5165-rb5-20230131031421.img     modules--5.15-r0-qrb5165-rb5-20230131031421.tgz                    rpb-weston-image-test-qrb5165-rb5-20230131170755.rootfs.manifest                                 
boot-qrb5165-rb5.img                                         modules-qrb5165-rb5.tgz                                            rpb-weston-image-test-qrb5165-rb5.testdata.json             
boot-qrb5165-rb5-qrb5165-rb5.img                             qrb5165-rb5--5.15-r0-qrb5165-rb5-20230131031421.dtb                rpb-weston-image-test-qrb5165-rb5-20230131170755.rootfs.tar.xz  
boot-sm8250-rb5-dvt--5.15-r0-qrb5165-rb5-20230131031421.img  qrb5165-rb5.dtb                                                    rpb-weston-image-test-qrb5165-rb5-20230131170755.testdata.json   
boot-sm8250-rb5-dvt-qrb5165-rb5.img                          qrb5165-rb5-qrb5165-rb5.dtb                                        rpb-weston-image-test-qrb5165-rb5.ext4.gz                       
Image.gz                                                     rpb-weston-image-test-qrb5165-rb5.manifest                        sm8250-rb5-dvt--5.15-r0-qrb5165-rb5-20230131031421.dtb                                           
Image.gz--5.15-r0-qrb5165-rb5-20230131031421.bin             rpb-weston-image-test-qrb5165-rb5-20230131170755.rootfs.ext4.gz   sm8250-rb5-dvt.dtb
Image.gz-qrb5165-rb5.bin                                     rpb-weston-image-test-qrb5165-rb5.tar.xz                          sm8250-rb5-dvt-qrb5165-rb5.dtb


9. To flash the board, you will need the boot image and rootfs. The following shows the name of the files.

Boot Image: boot-qrb5165-rb5.img
Rootfs Image: rpb-weston-image-test-qrb5165-rb5-20230131170755.rootfs.ext4.gz


With these files, you can go to our Flashing Bootloader and Flashing Boot Image and Rootfs sections to check how to flash your Qualcomm Robotics RB5/RB6 with your new image.

References


Index