QCOM Landing Team – #283-3e797f5b
- Build URL: https://ci.linaro.org/job/lt-qcom-debian-images-dragonboard410c/283/
- OS flavour: stretch
- Kernel tree: https://git.linaro.org/landing-teams/working/qualcomm/kernel.git
- Kernel branch: release/qcomlt-4.9
- Kernel version: 4.9.56-linaro-lt-qcom
- Kernel commit: 3e797f5b154e7b382aa1801b022d0d431ca00b86
- Kernel defconfig: defconfig distro.config
- Kernel toolchain: gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu.tar.xz
- Linaro Debian developer: http://snapshots.linaro.org/debian/images/stretch/developer-arm64/84 , size: 1.2G
- Linaro Debian alip: http://snapshots.linaro.org/debian/images/stretch/alip-arm64/84 , size: 2.2G
- Linaro Debian installer: http://snapshots.linaro.org/debian/images/stretch/installer-arm64/84 , size: 740M
The Linaro Qualcomm Landing Team is pleased to announce the new release of the Linaro Linux release for Qualcomm™ Snapdragon® 410 processor. The Linaro Linux release 17.09 is a Debian-based Linaro Build that provides developers with a desktop like environment using Debian and the LXQt desktop, as well as a console-only image.
What’s new in this release
- Upgrade to Linux kernel 4.9.56
- Switch to using compressed kernel Image (Image.gz)
- Added support for v4l2 M2M video playback in ffmpeg
- Switch defconfig to CONFIG_MEDIA_SUPPORT=m
- qDSP is automatically started on boot
- Bug fixed:
Important note(s) about this release
A firmware/bootloader upgrade was required for this release. If you install using the SD card method, then the new bootloaders are flashed automatically, if you install with the fastboot images, then you need to install the latest bootloader package.
For a list of all known issues, please check our Bugzilla
The Linaro Linux version 17.09 for the Snapdragon 410 supports the following features:
- Provides a working Debian environment with access to Debian repositories (apt-get) and updates. It is based on Debian 9.0 (aka stretch).
- It is based on Linux kernel 4.9.56.
- It is based on proprietary firmware available on Qualcomm Developer Network or 96boards.org.
- The following images are released:
bootimage that includes prebuilt kernel and initrd
developerimage that includes core packages as well as typical development packages (headless)
alipimage that includes a minimal desktop environment GUI using LXQt
- All images have a pre-configured user called
linaro, and the password for this user is set to
- The root file system should be flashed in the onboard eMMC.
- The following features are supported on the DragonBoard 410c:
- Quad Core ARMv8 A53 CPU (@1.2GHz)
- PSCI with support for cpuidle, SMP, hotplug and restart.
- Adreno 306 GPU, powered by
freedrenoMesa/Gallium GPU driver, version 13.0.6
- OpenGL 3.1, OpenGLES 3.0, GLX, EGL
- X11 -modesetting video driver
- Cpufreq, using ondemand governor by default
- CPU thermal sensors, and thermal management using the step wise governor
- HDMI display and audio using the onboard ADV7533 MIPI/DSI Receiver with HDMI Transmitter from Analog Devices
- UART, SD, eMMC
- USB2.0 (Mouse, Keyboard, Storage, Ethernet)
- Wifi and Bluetooth using integrated WCN3620, using proprietary firmware and wcn36xx driver
- Hardware accelerated video codecs using dedicated Snapdragon coprocessor
- Onboard GPS using Qualcomm GNSS subsystem
- CSI interface with external ISP only, sample driver included for OV5645, with support for the following features:
- CSI0 and/or CSI1 on the high speed expansion connector
- streaming from the camera sensor or CSID test generator
- raw dump to memory: 8bit packed UYVY format from OV5645 and resolutions of 2592×1944, 1920×1080 or 1280×960
- format conversion from 8bit packed UYVY to NV12
- input image downscaling (up to 16x)
- input image cropping
Information about the DragonBoard 410c
For more information about the DragonBoard 410c, please check the following website and wiki:
How to install and use this release
To install this release please follow the instructions from the DragonBoard 410c Linux user guide.
This release contains proprietary firmware. You can download the proprietary firmware separately, from here. All the required firmware files are pre-installed, and our images are bound to the Qualcomm Linux BSP license agreement. A copy of the LICENSE can be found in the image as
WLAN and BT MAC addresses
There is no dedicated flash memory on the board to store persistent data such as WLAN and BT MAC addresses. A solution is being designed to store them in an eMMC partition, so that reel MAC addresses can be used across reboots. This solution will be implemented in an upcoming release. For the time being, the MAC addresses are computed in the bootloader (in LK), such that:
- they are different from each other
- they are pseudo random, but unique for each board
- they are persistent across reboot (e.g. they are always the same)
- they are set in LK and dynamically added to the device tree blob (DTB) so that they are available to the kernel
The WLAN and BT drivers will read the MAC addresses set by the bootloader into the DTB, and configure the hardware accordingly.
Running the ALIP Desktop image
The ALIP/LXQt image is expected to provide a desktop-like experience, as such it is recommended to use an HDMI monitor, as well as USB keyboard and mouse. The default image will directly boot to the login screen by default. However a root console login will also be started on the serial console.
Note: The default bootargs enable the kernel messages to be displayed on the serial console.
Running the Developer based image
If you have flashed the developer image, when booting the board you will end up in a root login on the serial console. If you have an HDMI monitor connected, you will also have login terminals on the display
Running the Developer image from SD card
It is possible boot the system completely from SD card. There are instructions to create an bootable SD Card available here. A sample image for SD card is also included in the release. The sample image includes the same
developer image (described above), but unlike the default image which is meant to be flashed into on board eMMC, the SD card image must be flashed onto an empty SD card on your PC. Then it will boot entirely from SD card on the Dragonboard 410c. The image file is
dragonboard410c_sdcard_developer_debian-<BUILD-NUMBER>.zip. To setup the SD card using the sample image, please follow the instructions available here.
How to get and customize the kernel source code
Building the Linux kernel from source
The Linux kernel used in this release is available via tags in the Linaro Qualcomm Landing Team git repository:
git: http://git.linaro.org/landing-teams/working/qualcomm/kernel.git tag: debian-qcom-dragonboard410c-17.09 defconfig: arch/arm64/defconfig kernel/configs/distro.config
The kernel image (
Image.gz) is located in the
boot image and partition and the kernel modules are installed in the root file system. It is possible for a user to rebuild the kernel and run a custom kernel image instead of the released kernel. You can build the kernel using any recent GCC release using the git tree, tag and defconfig mentioned above. This release only supports booting with device tree, as such both the device tree blobs need to be built as well.
The DragonBoard 410c is an ARMv8 platform, and the kernel is compiled for the Aarch64 target. Even though it is possible to build natively, on the target board, It is recommended to build the Linux kernel on a PC development host. In which case you need to install a cross compiler for the ARM architecture. It is recommended to download the Linaro GCC cross compiler.
To build the Linux kernel, you can use the following instructions:
git clone -n http://git.linaro.org/landing-teams/working/qualcomm/kernel.git cd kernel git checkout -b kernel-17.09 debian-qcom-dragonboard410c-17.09 export ARCH=arm64 export CROSS_COMPILE=<path to your GCC cross compiler>/aarch64-linux-gnu- make defconfig distro.config make -j4 Image.gz dtbs KERNELRELEASE=4.9.56-linaro-lt-qcom
Additionally, you might want or need to compile the kernel modules:
make -j4 modules KERNELRELEASE=4.9.56-linaro-lt-qcom
The kernel modules need to be put in the root file system, under
/lib/modules folder. To export the built modules, please run:
make modules_install KERNELRELEASE=4.9.56-linaro-lt-qcom INSTALL_MOD_STRIP=1 INSTALL_MOD_PATH=<folder>
You will then need to transfer the content of
<folder> onto the target root file system.
Building a boot image
You now need to create a valid boot image with your own kernel build.
On your host PC, we need to install the following tools:
sudo apt-get install device-tree-compiler git clone git://codeaurora.org/quic/kernel/skales
The boot image consists of the table of device tree (
dt.img), the kernel image (
Image.gz) and an init ramdisk image.
dtbTool is a standalone application that will process the DTBs generated during the kernel build, to create the table of device tree image. This tool is included in the
skales git tree cloned above.
./skales/dtbTool -o dt.img -s 2048 arch/arm64/boot/dts/qcom/
To create the boot image, you also need a ramdisk image, and you can use the one from the release:
mkbootimg (also in the git tree previously cloned) is a standalone application that will process all files and create the boot image that can then be booted on the target board, or flash into the on-board eMMC. The boot image also contains the kernel bootargs, which can be changed as needed in the next command:
./skales/mkbootimg --kernel arch/arm64/boot/Image.gz \ --ramdisk initrd.img-4.9.56-linaro-lt-qcom \ --output boot-db410c.img \ --dt dt.img \ --pagesize 2048 \ --base 0x80000000 \ --cmdline "root=/dev/disk/by-partlabel/rootfs rw rootwait console=ttyMSM0,115200n8"
Booting a custom boot image
Assuming you have now built a valid boot image called
boot-db410c.img, you can run the following
fastboot command to boot it on the board:
sudo fastboot boot boot-db410c.img
If you want to permanently use a custom kernel image, you can update the boot image and reflash it into the
sudo fastboot flash boot boot-db410c.img
How to get and customize the bootloader
While the first stage bootloader is proprietary and released as firmware blob available on Qualcomm Developer Network or 96boards.org, the second stage bootloader is
LK and is open source.
git: http://git.linaro.org/landing-teams/working/qualcomm/lk.git tag: dragonboard410c-LA.BR.1.2.7-03810-8x16.0-linaro2
Since release 17.04, the first stage bootloader expects the second stage bootloader to include a signature. The signature is typically used for secure boot. On Dragonboard 410c, since no private keys are available, the signature is not checked for integrity however the signature section, even if empty, must exist. To build the LK bootloader and add the signature section, you can use the following instructions:
git clone git://codeaurora.org/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8.git -b LA.BR.1.1.3.c4-01000-8x16.0 git clone http://git.linaro.org/landing-teams/working/qualcomm/lk.git -b dragonboard410c-LA.BR.1.2.7-03810-8x16.0-linaro2 git clone https://git.linaro.org/landing-teams/working/qualcomm/signlk.git cd lk make -j4 msm8916 EMMC_BOOT=1 TOOLCHAIN_PREFIX=<path to arm-eabi-4.8 tree>/bin/arm-eabi- mv ./build-msm8916/emmc_appsboot.mbn ./build-msm8916/emmc_appsboot_unsigned.mbn ../signlk/signlk.sh -i=./build-msm8916/emmc_appsboot_unsigned.mbn -o=./build-msm8916/emmc_appsboot.mbn -d
The second stage bootloader is flashed on the
aboot partition, you can now flash your board with:
sudo fastboot flash aboot ./build-msm8916/emmc_appsboot.mbn
How to get and customize Debian/Ubuntu packages source code
This release is based on Debian 9.0 (aka stretch), and it is not possible to use a different Debian release (e.g. it is not possible to downgrade to an older Debian release, nor is it possible to use a newer release, such as the one being currently developed).
Since all packages installed in Linaro Debian-based images are maintained either in Debian archives or in Linaro repositories, it is possible for users to update their environment with commands such as:
sudo apt-get update sudo apt-get upgrade
All user space software is packaged using Ubuntu or Debian packaging process. As such you can find extensive information about using, patching and building packages in the Ubuntu packaging guide or The Debian New Maintainers Guide. If you quickly want to rebuild any package, you can run the following commands to fetch the package source code and install all build dependencies:
sudo apt-get update sudo apt-get build-dep <pkg> apt-get source <pkg>
Then you can rebuild the package locally with:
cd <pkg-version> dpkg-buildpackage -b -us -uc
- you can drop patches in debian/patches/ and update debian/patches/series before building with dpkg-buildpackage to customize the source code.
- all associated .deb files will be located in the root folder, and can be installed in the system with dpkg -i
- all these commands should be executed on the target directly, not on the development host. It is generally enough to build packages natively, on the target platform. For some packages, it is possible to cross compile Ubuntu/Debian packages however this goes beyond the scope of this wiki page.
Using the onboard GPS
The GPS software stack mostly runs on the DSP subsystem. The communication between the main CPU and the DSP is done with a specific IPC driver called QRTR (see ./net/qrtr/ in the kernel source tree). The GPS packages are not installed automatically in the default images. To start the GPS, some additional packages need to be installed first. Once these packages are installed, the DSP is started automatically (at boot) any gpsd client can be started and will be able to retrieve GPS data.
Please note that the sensitivity of the onboard antenna is quite low, so getting a FIX will take several minutes. Please refer to the dedicated application note to install an external antenna for better GPS performance.
To get started with GPS, first install the following packages:
sudo apt-get install gpsd-clients gnss-gpsd
The package gnss-gpsd will bring all the needed dependencies to use the onboard GPS.
From now on, you can use any gpsd client, such as gpsmon or xgps.
Using CSI camera
For detailed information about using CSI camera, please refer to this document.
Video record pipeline
It is possible to create a basic video recording GStreamer pipeline involving the camera and video encoder. Currently this has the following limitations:
- The frame data must be vertically aligned to 32 lines. For the OV5645 camera this means that only 1280×960 resolution is supported.
gstreamer1.0-plugins-goodpackage needs to be rebuilt (with different default compile options)
To enable the video encoder plugin follow these steps. Install needed packages and dependencies:
sudo apt-get install build-essential fakeroot devscripts sudo apt-get build-dep gstreamer1.0-plugins-good
apt-get source gstreamer1.0-plugins-good cd gst-plugins-good1.0-1.12.2/
debian/rules and add
--without-libv4l2 options to
debuild -b -uc -us
Install the newly built
dpkg -i ../gstreamer1.0-plugins-good_1.12.2*_arm64.deb
Now you are ready to do video recording! Configure the pipeline:
sudo media-ctl -d /dev/media1 -l '"msm_csiphy0":1->"msm_csid0":0,"msm_csid0":1->"msm_ispif0":0,"msm_ispif0":1->"msm_vfe0_pix":0' sudo media-ctl -d /dev/media1 -V '"ov5645 1-0076":0[fmt:UYVY8_2X8/1280x960 field:none],"msm_csiphy0":0[fmt:UYVY8_2X8/1280x960 field:none],"msm_csid0":0[fmt:UYVY8_2X8/1280x960 field:none],"msm_ispif0":0[fmt:UYVY8_2X8/1280x960 field:none],"msm_vfe0_pix":0[fmt:UYVY8_2X8/1280x960 field:none]'
And do video recording:
gst-launch-1.0 -e v4l2src device=/dev/video3 ! video/x-raw,format=NV12,width=1280,height=960,framerate=30/1 ! v4l2h264enc extra-controls="controls,h264_profile=4,video_bitrate=2000000;" ! h264parse ! mp4mux ! filesink location=video.mp4
When using the above command make sure that video device node numbers are correct or check and use the correct ones:
- examine the output of
media-ctl -d /dev/media1 -pand check that
/dev/video3is connected to
Optimized video pipeline
In order to exercise a fully optimized video pipeline some specific settings need to be applied throughout the pipeline elements. With the fully optimized video use case there is no extra buffer copy, and the various drivers involved are sharing all video buffers using dmabuf.
To exercise the opimized video pipeline, you can use for example the following gstreamer command:
GST_GL_PLATFORM=egl gst-launch-1.0 filesrc location=<path to file> ! qtdemux name=m m.video_0 ! h264parse ! v4l2video0dec capture-io-mode=dmabuf ! glimagesink
Audio configuration settings
The release has support for both analog and digital audio (HDMI). When using the ALIP desktop image, to switch back and forth you can use
PulseAudio volume control application, and in the
configuration tab, you will be able to chose which profile to use. Note that by default, PulseAudio will use the analog output, and you need to switch to HDMI at first boot if your HDMI monitor supports HDMI audio.
Feedback and Support
For general question or support request, please go to 96boards.org Community forum.
Bugs will be reviewed and prioritized by the team. For any bug report it is recommended to provide as much information as possible, and at the very list please include the name of the release you are using, the output of
dpkg -l to list all packages installed, as well, as the boot log (output of
How to contribute
We very much encourage developers to use and contribute to our releases, using the following instructions.
Qualcomm Snapdragon is product of Qualcomm Technologies, Inc.