summaryrefslogtreecommitdiff
path: root/ubuntu/boards/dragonboard410c/README.textile.in
blob: 7f421264203d47b54651268c371b6bec508e93fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
The Linaro Qualcomm Landing Team is pleased to announce the new release of the _Linaro Linux release for Qualcomm(tm) Snapdragon(R) 410 processor_. The Linaro Linux release ##RELEASE## is an Ubuntu-based Linaro Build that provides developers with a _desktop like_ environment using Ubuntu and the LXDE desktop, as well as a console-only image.

h4. What's new in this release

* Based on Linux kernel v4.2
* Support for Grove Starter Kit for 96boards
* Support for high speed UART (with DMA)
* Initial support for X11/GLAMOR
* Bug fixed:
** "GPIO-F (e.g. PIN28 on Low speed expansion) should be 1.8V , not 3.7V":https://bugs.96boards.org/show_bug.cgi?id=101
** "SCM calls when kernel built with linaro gcc 4.9.3":https://bugs.96boards.org/show_bug.cgi?id=80
** "WiFi and BT LEDs never flash":https://bugs.96boards.org/show_bug.cgi?id=53
** "User leds names do no match the specifications":https://bugs.96boards.org/show_bug.cgi?id=54
** "Kernel module binfmt_misc to prepare Dragonboard410c for Exagear":https://bugs.96boards.org/show_bug.cgi?id=67

h4. Features

The Linaro Linux version ##RELEASE## for the Snapdragon 410 supports the following features:

* Provides a working Ubuntu environment with access to Ubuntu repositories (apt-get) and updates. It is based on Ubuntu ##UBUNTU_REL## (aka ##UBUNTU_REL_NICK##).
* It is based on Linux kernel ##KERNEL_VER##.
* It is based on proprietary firmware available on "Qualcomm Developer Network":##QDN_FIRMWARE_LINK##.
* The following images are released:
** @boot@ image that includes prebuilt kernel and initrd
** @developer@ image that includes Ubuntu core packages as well as typical development packages
** @alip@ image 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 @linaro@
* 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 @freedreno@ Mesa/Gallium GPU driver, version ##MESA_VERSION##
*** OpenGL 2.1, OpenGLES 2.0
*** xf86-video-freedreno driver v1.3.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":http://wireless.kernel.org/en/users/Drivers/wcn36xx
** Hardware accelerated video playback using dedicated Snapdragon coprocessor

h4. Information about the DragonBoard 410c

For more information about the DragonBoard 410c, please check the following website and wiki:
* "http://www.96boards.org/dragonboard410c":http://www.96boards.org/dragonboard410c
* "http://www.96boards.org/dragonboard410c/documentation":http://www.96boards.org/dragonboard410c/documentation
* "http://www.96boards.org/dragonboard410c/gettingstarted":http://www.96boards.org/dragonboard410c/gettingstarted
* "https://github.com/96boards/documentation/wiki":https://github.com/96boards/documentation/wiki
* "https://developer.qualcomm.com/hardware/dragonboard-410c":https://developer.qualcomm.com/hardware/dragonboard-410c

h4. How to install and use this release

To install this release please follow the instructions from the "DragonBoard 410c Linux user guide":https://github.com/96boards/documentation/wiki/Dragonboard-410c-Installation-Guide-for-Linux-and-Android.

h4. Proprietary firmware

This release contains proprietary firmware. You can download the proprietary firmware separately, from "here":##QDN_FIRMWARE_LINK##. All the required firmware files are pre-installed, and our images are bound to the following "license agreement":https://git.linaro.org/landing-teams/working/qualcomm/lt-docs.git/blob_plain/HEAD:/license/license.txt.

h4. 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.

h4. 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

h4. How to get and customize the kernel source code

h5. 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":https://git.linaro.org/landing-teams/working/qualcomm/kernel.git:

bc. git: http://git.linaro.org/landing-teams/working/qualcomm/kernel.git
tag: ubuntu-qcom-dragonboard410c-##RELEASE##
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 (Aarch64 little-endian)":##LINARO_GCC##.

To build the Linux kernel, you can use the following instructions:

bc. git clone -n http://git.linaro.org/landing-teams/working/qualcomm/kernel.git
cd kernel
git checkout -b kernel-##RELEASE## ubuntu-qcom-dragonboard410c-##RELEASE##
export ARCH=arm64
export CROSS_COMPILE=<path to your GCC cross compiler>/aarch64-linux-gnu-
git cherry-pick -n e4df9dd88bb3b37d84db277e0f6a5d59cf5ac737
make defconfig distro.config
make -j4 Image dtbs KERNELRELEASE=##KERNEL_VER##.0-linaro-lt-qcom

Note: the cherry-pick is needed to fix a build issue that was reported against 15.09 release.

h5. 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:

bc. 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.

The @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.

bc. ./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:

bc. wget http://builds.96boards.org/releases/dragonboard410c/linaro/ubuntu/##RELEASE##/initrd.img-##KERNEL_VER##.0-linaro-lt-qcom

The tool @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:

bc. ./skales/mkbootimg --kernel arch/arm64/boot/Image \
                   --ramdisk initrd.img-##KERNEL_VER##.0-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"

h5. 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:

bc. 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 @boot@ partition:

bc. sudo fastboot flash boot boot-db410c.img

h4. How to get and customize the bootloader

While the first stage bootloader is proprietary and released as firmware blob available on "Qualcomm Developer Network":##QDN_FIRMWARE_LINK##, the second stage bootloader is @LK@ and is open source.

The original LK source code is available on "CodeAurora.org":https://www.codeaurora.org/cgit/quic/la/kernel/lk/, and the source code which is used in this release can be found in the "Linaro Qualcomm Landing Team git repository":https://git.linaro.org/landing-teams/working/qualcomm/lk.git:

bc. git: http://git.linaro.org/landing-teams/working/qualcomm/lk.git
tag: ubuntu-qcom-dragonboard410c-##LK_RELEASE##

To build the LK bootloader, you can use the following instructions:

bc. git clone git://codeaurora.org/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8.git -b ##LK_GCC_REL##
git clone http://git.linaro.org/landing-teams/working/qualcomm/lk.git -b ubuntu-qcom-dragonboard410c-##LK_RELEASE##
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:

bc. sudo fastboot aboot ./build-msm8916/emmc_appsboot.mbn

h4. How to get and customize Ubuntu packages source code

This release is based on Ubuntu ##UBUNTU_REL## (aka ##UBUNTU_REL_NICK##), and it is not possible to use a different Ubuntu release (e.g. it is not possible to downgrade to an older Ubuntu release, nor is it possible to use a newer release, such as the one being currently developed).

Since all packages installed in Linaro Ubuntu-based images are maintained either in Ubuntu archives or in Linaro repositories, it is possible for users to update their environment with commands such as:

bc. sudo apt-get update
sudo apt-get upgrade

All user space software is packaged using Ubuntu or Debian packaging process, since Debian is the rock upon which Ubuntu is built. 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:

bc. sudo apt-get update
sudo apt-get build-dep <pkg>
apt-get source <pkg>

Then you can rebuild the package locally with:

bc. cd <pkg-version>
dpkg-buildpackage -b -us -uc

Notes:
* 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 <pkg>.deb.
* 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. 

h4. 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:

bc. sudo systemctl stop lightdm

Then you can run the following commands to switch from freedreno video driver, to modesetting, and restart the LXDE desktop:

bc. 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:

bc. sudo systemctl stop lightdm
sudo sed -i 's/modesetting/freedreno/' /usr/share/X11/xorg.conf.d/42-freedreno.conf
sudo systemctl start lightdm

h4. Feedback and Support

For general question or support request, please go to "96boards.org Community forum":https://www.96boards.org/forums/forum/products/dragonboard410c/.

For any bug related to this release, please submit issues to the "96Board.org Bug tracking system":https://bugs.96boards.org/. To submit a bug, follow this "link":https://bugs.96boards.org/enter_bug.cgi?product=Dragonboard%20410c.

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 @dmesg@).

<hr>

__Qualcomm Snapdragon is product of Qualcomm Technologies, Inc.__