QCOM Landing Team – #144-4fffd62d
- Build URL: https://ci.linaro.org/jenkins/job/lt-qcom-debian-images-arm64/144/
- OS flavour: jessie
- Kernel tree: https://git.linaro.org/landing-teams/working/qualcomm/kernel.git
- Kernel branch: release/qcomlt-4.4
- Kernel version: 4.4.23-linaro-lt-qcom
- Kernel commit: 4fffd62d74b4db1163b32800976086771a1924ae
- Kernel defconfig: defconfig distro.config
- Linaro Debian developer: http://snapshots.linaro.org/debian/images/developer-arm64/97 , size: 996M
- Linaro Debian alip: http://snapshots.linaro.org/debian/images/alip-arm64/97 , size: 1.7G
- Linaro Debian installer: http://snapshots.linaro.org/debian/images/installer-arm64/97 , size: 618M
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 16.09 is a Debian-based Linaro Build that provides developers with a desktop like environment using Debian and the LXDE desktop, as well as a console-only image.
What’s new in this release
- Upgrade to Debian 8.6
- Upgrade to Linux kernel 4.4.23
- Switch to PSCI by default , with support for cpuidle, SMP, hotplug and restart.
- Improved stability of CSI and camera
- Added support for dual CSI camera
- Fixed a memory leak in the bluetooth driver
- Extend connectivity options in kernel config (6LowPAN support and extend bluetooth options for BT LE 6LoWPAN)
- Reworked tools and scripts to generate the SD card installer, which now uses the current kernel, not the 4.0 kernel from launch
- Updated QCOM bootloader and firmware package (v1.4)
- Bug fixed:
- Known issues:
- Bluetooth address is the same on all Dragonboards
- Audio stops working when the DSP firmware is loaded and booted
- Openbox has severe lag for some applications
- First packet after idle is slow
- glmark2 crash on 1080p
- hal_remove_bsskey response failed
- UART corruption in transition between console printing and uart operation
- Must be root to use ping and arping commands
- hardware reset must be asserted for 17 seconds
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 from http://builds.96boards.org/releases/dragonboard410c/linaro/rescue/16.09/.
The Linaro Linux version 16.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 8.6 (aka jessie).
- It is based on Linux kernel 4.4.23.
- It is based on proprietary firmware available on Qualcomm Developer Network.
- 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 LXDE
- 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)
- Adreno 306 GPU, powered by
freedrenoMesa/Gallium GPU driver, version 11.1.2
- OpenGL 3.1, OpenGLES 3.0, GLX, EGL
- xf86-video-freedreno driver v1.4.0, with XA support enabled
- 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 or CSI1 on the high speed expansion connector (not both at the same time)
- streaming from the camera sensor or CSID test generator
- fixed resolution of 1920×1080 and 8bit packed UYVY format
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 following license agreement.
Running the ALIP Desktop image
The ALIP/LXDE 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
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-16.09 defconfig: arch/arm64/defconfig kernel/configs/distro.config
The kernel image (
Image) 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-16.09 debian-qcom-dragonboard410c-16.09 export ARCH=arm64 export CROSS_COMPILE=<path to your GCC cross compiler>/aarch64-linux-gnu- make defconfig distro.config make -j4 Image dtbs KERNELRELEASE=4.4.23-linaro-lt-qcom
Additionally, you might want or need to compile the kernel modules:
make -j4 modules KERNELRELEASE=4.4.23-linaro-lt-qcom
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) 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 \ --ramdisk initrd.img-4.4.23-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, the second stage bootloader is
LK and is open source.
git: http://git.linaro.org/landing-teams/working/qualcomm/lk.git tag: debian-qcom-dragonboard410c-LA.BR.1.2.4-00310-8x16.0-linaro2
To build the LK bootloader, 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 debian-qcom-dragonboard410c-LA.BR.1.2.4-00310-8x16.0-linaro2 cd lk make -j4 msm8916 EMMC_BOOT=1 TOOLCHAIN_PREFIX=<path to arm-eabi-4.8 tree>/bin/arm-eabi-
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 8.6 (aka jessie), 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 X11 with modesetting video driver and GLAMOR
While not enabled by default, it is possible use evaluate X11/GLAMOR. In order to start X server with the modesetting driver, with GLAMOR support, your first need to make sure that X server is not running:
sudo systemctl stop lightdm
Then you can run the following commands to switch from freedreno video driver, to modesetting, and restart the LXDE desktop:
sudo sed -i 's/freedreno/modesetting/' /usr/share/X11/xorg.conf.d/42-freedreno.conf sudo systemctl start lightdm
To switch back to freedreno video driver, please run:
sudo systemctl stop lightdm sudo sed -i 's/modesetting/freedreno/' /usr/share/X11/xorg.conf.d/42-freedreno.conf sudo systemctl start lightdm
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). Because of bug 416, the DSP is not started automatically at boot. To start the GPS, the DSP needs to be started first. Once the DSP is started 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. Then you need to start the DSP:
sudo systemctl start qdsp-start.service
From now on, you can use any gpsd client, such as gpsmon or xgps.
Using CSI camera
Only basic use cases are supported at the moment. More features will be added, such as support for scaling, cropping.
The release is configured with no camera, and users with camera are expected to configure the DTS file accordingly. Please check commit “dts: Remove camera sensors from dtsi” in the kernel, it should mostly be a matter of reverting this patch. Note that this patch assumes that 2 OV5645 sensors are connected on each CSI port. The setup is validated using an upcoming STM based mezzanine (STM32F446 sensor board).
This release includes drivers for:
- OV5645 camera sensor;
- QC MSM camera sub-system (CSIPHY, CSID, ISPIF, VFE);
- QC Camera control interface.
The OV5645 camera sensor driver is in a final stage of implementation and is currently undergoing review in upstream lists.
The CAMSS (camera sub-system) driver is implemented for direct dump to memory. Will be sent for upstream review after some cleanups and minor changes. The CAMSS HW on 8016 consists of two CSIPHY modules, two CSID modules, ISPIF module and VFE module. The driver is implemented to configure each of these HW modules. It is a V4L2 driver which also utilizes the media controller framework to model the internal topology of the system. The driver registers V4L2 subdevice nodes for each of the CSIPHY and CSID modules, then registers two V4L2 subdevice nodes to represent the ISPIF module and then registers three V4L2 subdevice nodes to represent each of the RDI channels in the VFE.
The CCI (camera control interface) driver is a version which originates from QC Android driver and is now separated from the CAMSS driver and compiled on our linux. For this another V4L2 driver and media device are created – this is only a temporary work to enable control on the camera sensor. Proper implementation will follow.
Make sure that you have the following package installed:
sudo apt-get install v4l-utils
To ensure that your sensor is properly connected, you can inspect the output of the following command:
sudo media-ctl -d /dev/media1 -p
If everything is ok, you should see something like this:
entity 13: ov5645 1-0076 (1 pad, 1 link) type V4L2 subdev subtype Unknown flags 0 device node name /dev/v4l-subdev9 pad0: Source [fmt:UYVY8_2X8/1920x1080 field:none crop:(0,0)/0x0] -> "msm_csiphy0":0 [ENABLED,IMMUTABLE]
At this point you need to configure the pipeline: link CSIPHY to CSID, CSID to ISPIF, ISPIF to RDI channel on VFE. Then configure formats on all entities in 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_rdi0":0' sudo media-ctl -d /dev/media1 -V '"ov5645 1-0076":0[fmt:UYVY2X8/1920x1080],"msm_csiphy0":0[fmt:UYVY2X8/1920x1080],"msm_csid0":0[fmt:UYVY2X8/1920x1080],"msm_ispif0":0[fmt:UYVY2X8/1920x1080],"msm_vfe0_rdi0":0[fmt:UYVY2X8/1920x1080]'
At this point, the pipeline should be configured and ready to be used by any application that can use v4l2. For example, you can use Gstreamer to take a JPEG picture:
gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=1 ! 'video/x-raw,format=UYVY,width=1920,height=1080,framerate=30/1' ! jpegenc ! filesink location=image01.jpg
Or you can use Gstreamer to show a live preview from the camera:
gst-launch-1.0 v4l2src ! glimagesink
If you have a second camera sensor and intend to use it concurrently then link and configure another pipeline which includes the second camera and the unused entities. Use a v4l2 application the same way only pointing the correct video device node used in this pipeline.
If you do not have any sensor, it is possible to use the internal CSID Test Generator (TG). In order to use the TG, you will have to rebuild the device tree blob (DTB). Indeed in the kernel source tree, you need to edit the file arch/arm64/boot/dts/qcom/msm8916.dtsi, and remove the following nodes:
camera@78, then following the instructions from above to recompile the kernel, device tree and boot image.
Then once you have booted the device with this new kernel, download and compile the
yavta tool from here:
git clone git://git.ideasonboard.org/yavta.git cd yavta make
Then, enable the test generator:
sudo ./yavta --no-query -w '0x009f0903 1' /dev/v4l-subdev2
Then, configure the pipeline:
sudo media-ctl -d /dev/media1 -l '"msm_csid0":1->"msm_ispif0":0,"msm_ispif0":1->"msm_vfe0_rdi0":0' sudo media-ctl -d /dev/media1 -V '"msm_csid0":1[fmt:UYVY2X8/1920x1080],"msm_ispif0":0[fmt:UYVY2X8/1920x1080],"msm_vfe0_rdi0":0[fmt:UYVY2X8/1920x1080]'
Finally, you can use any v4l2 application, such as Gstreamer.
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
Qualcomm Snapdragon is product of Qualcomm Technologies, Inc.