Qualcomm Robotics RB5/RB6 - Getting Started with Linaro

From RidgeRun Developer Connection
Jump to: navigation, search



Index






In this section we will be covering how to download all the required files to build an image in your computer and how to install the fastboot tool[1]. The required files are the bootloader, a boot image and a root file system The bootloader is responsible for loading the Operating System (OS) when a computer is turned on. The boot image helps the board to boot and usually includes the OS. Finally, the root file system (rootfs) is the top of the hierarchical file tree, containing files and directories critical for system operation. The fastboot tool is used to modify the flash filesystem of an embedded device via USB connection from a host computer. For this, you need a host computer that runs a Linux-based system, in our case we are working with Ubuntu 20.04.

1. Download necessary files[2]. We have two options, Debian and OpenEmbedded. In this guide, we will focus on the OpenEmbedded one. The OpenEmbedded based distro contains reference images for different cases, like a headless system or a graphical one based on Xorg server or Wayland. Also, all images exist in two variants: the regular image and a -test one that includes useful packages for testing and validation. Since there are multiple options to choose from, the following bullets will have the links for the files used in this guide. If you would like to see the other available options, go to the following link. You will need a bootloader, boot image, and root file system image (rootfs).

  • Download the bootloader in the following link. This will automatically download the bootloader for Linux since we are working with OpenEmbedded, it should be named: rb5-bootloader-ufs-linux-XX.zip
  • For the the boot image, go to the following link. This Image is for OpenEmbedded on a graphical-based system based on Xorg, the name should be similar to: boot-qrb5165-rb5.img,
  • Lastly, download the root file system image in following link. This rootfs is for the regular variant, not the test one.
Note
XX represents the release number of the Bootloader.


2. Install fastboot in your host computer [3]. In here, there are two options:

  • Option 1 (Recommended): Using a distro package manager. Run the following command in a terminal:
sudo apt install android-tools-fastboot -y
  • Option 2: From Source. Download Android SDK "Tools only" for Linux in this link.
Note
The Linux "Tools Only" SDK download does not come with fastboot, use the Android SDK Manager following the instructions in the "SDK README.txt" to install platform-tools.


3. Get the Linux flashing tool. Qualcomm devices contain a special mode of operation called Emergency Download Mode (EDL). In this mode, the device identifies itself as Qualcomm HS-USB 9008 through USB and allows communication with the host computer. The EDL mode allows the host computer to send commands to write into the onboard storage (UFS).

git clone https://git.linaro.org/landing-teams/working/qualcomm/qdl.git


4. Install the dependencies required to compile the Linux flashing tool source code.

sudo apt-get install libxml2-dev libudev-dev


5. Compile the Linux flashing tool program with the Makefile in the repository.

user@desktop:~$ cd qdl/
user@desktop:~/qdl (master=)$ make -j

The output of the above command should be similar to the following:

cc -O2 -Wall -g `xml2-config --cflags`   -c -o firehose.o firehose.c
cc -O2 -Wall -g `xml2-config --cflags`   -c -o qdl.o qdl.c
cc -O2 -Wall -g `xml2-config --cflags`   -c -o sahara.o sahara.c
cc -O2 -Wall -g `xml2-config --cflags`   -c -o util.o util.c
cc -O2 -Wall -g `xml2-config --cflags`   -c -o patch.o patch.c
cc -O2 -Wall -g `xml2-config --cflags`   -c -o program.o program.c
cc -O2 -Wall -g `xml2-config --cflags`   -c -o ufs.o ufs.c
cc -o qdl firehose.o qdl.o sahara.o util.o patch.o program.o ufs.o `xml2-config --libs` -ludev


6. Install Linux flashing tool in the host computer.

user@desktop:~/qdl (master=)$ sudo make install

The output of the above command should be similar to the following:

install -D -m 755 qdl /usr/local/bin/qdl


7. Make sure that ModemManager is not running.

Note
Some Linux distributions use ModemManager to configure Mobile Broadband. When you connect the board in USB mode to the host computer, it will be identified as a Qualcomm modem and ModemManager will try to configure it. For this reason, you need to disable it before connecting your board. If you need to use ModemManager, start it again after flashing is completed.
sudo systemctl stop ModemManager

8. After finishing every step, you can continue to the Setting up board in EDL Mode section to see the steps for setting up your board in EDL mode for you to flash the bootloader to the board. Then, please come back to this section.

9. When you have your board in EDL mode, you can continue with the Flashing Bootloader section to follow the steps on how to flash the bootloader.

References

  1. 96Boards Qualcomm® Robotics RB5 Development Kit. Retrieved January 18, 2023, from [1]
  2. 96Boards Linaro Guide for Qualcomm® Robotics RB5 Development Kit. Retrieved January 18, 2023, from [2]
  3. 96Boards Linux Host Installation for Qualcomm® Robotics RB5 Development Kit. Retrieved January 18, 2023, from [3]


Index