Skip to content

DragonBoard 820c Getting Started With Linux

Nicolas Dechesne edited this page Jul 13, 2017 · 29 revisions

This page has instructions to get started with Debian or OpenEmbedded on the DragonBoard 820c board.

Disclaimer

DragonBoard 820c is not yet commercially available and is in beta testing only. Please expect limited documentation and support until further notice.

Bootloaders

Throughout these instructions, we are assuming that you have been able to flash the board with an initial build from Qualcomm such that you can boot the board into fastboot. If you cannot get the board to boot into fastboot, then you need to get in touch with the person that provided you with the board.

In recent bootloaders from Qualcomm, we noticed that support for splash screen was enabled in LK (in Android builds), so that the snapdragon logo can be displayed very early in the boot process.

The splash screen support in bootloader creates issues with the linux kernel, as we don't have proper handoff of resources between LK and kernel as of yet. As such when using Linux releases, and especially the Linaro kernel, we need to explicitly disable display in LK. If it is enabled you will notice that the kernel fails to boot and abruptly returns into SBL (reboots). To disable display support in LK, put the board into fastboot mode and run

fastboot oem select-display-panel none

By default it should be 'hdmi', and you can thus revert to default settings (if you need to run Android) with the following command:

fastboot oem select-display-panel hdmi

After you set it to none, please power off/reboot and try booting linux kernel again.

Onboard storage

The onboard storage is partionned such as :

  • /dev/sda9 is userdata and is ~24GB
  • /dev/sde18 is system and is ~3GB
  • /dev/sde17 is boot

For now there is no rescue tool which is provided, so it is not recommended to change the partition layout. The root file system can be installed in userdata or system based on how much space is needed. It is even possible to install a Debian image in userdata and an OpenEmbedded image in system partition.

Installing Debian

Console (no graphics) image

Debian builds for the DB820c can be found here: http://builds.96boards.org/snapshots/dragonboard820c/linaro/debian/. They have for now has minimal features set (mostly console, UFS, 4 core running at the lowest speed). Features will be added in this builds stream. Note that kernel version might changes regularly and without notice until mid 2017.

To install the Debian root file system:

  1. Download either the `developer`` image from the link above
  2. Uncompress the root file system image
  3. Flash the image into userdata (or system).

So, assuming you are trying to use the latest build:

wget http://builds.96boards.org/snapshots/dragonboard820c/linaro/debian/latest/linaro-stretch-developer-qcom-snapdragon-arm64-*.img.gz
gunzip linaro-stretch-developer-qcom-snapdragon-arm64-*.img.gz
fastboot flash userdata linaro-stretch-developer-qcom-snapdragon-arm64-*.img

You can also mount the rootfs image on an NFS partition; to do that and since the image above is an sparse image you will have to first unsparse it and then mount it.

simg2img linaro-stretch-developer-qcom-snapdragon-arm64-*.img rootfs.img
mount -t nfs rootfs.img mnt/

You can download the prebuilt boot image as well, from the same location. However note that the boot image is by default going to try to mount the file system on rootfs partition, like on DragonBoard 410c, so you need to update the boot image before flashing it, since we do not (yet) use the rootfs partition on DB820c:

wget http://builds.96boards.org/snapshots/dragonboard820c/linaro/debian/latest/boot-linaro-stretch-qcom-snapdragon-arm64-*.img.gz
gunzip boot-linaro-stretch-qcom-snapdragon-arm64-*.img.gz
abootimg -u boot-linaro-stretch-qcom-snapdragon-arm64-*.img -c "cmdline=root=/dev/disk/by-partlabel/userdata rw rootwait console=tty0 console=ttyMSM0,115200n8"
fastboot flash boot boot-linaro-stretch-qcom-snapdragon-arm64-*.img

To update the kernel command line embedded in the .img to support an NFS mounted root partition the command could be as follows (for an nfs server in 192.168.1.4)

    abootimg -u boot-linaro-stretch-qcom-snapdragon-arm64-*.img -c "cmdline=root=/dev/nfs rw nfsroot=192.168.1.4:/Exports/qcom/rootfs,v3,tcp rootwait console=tty0 console=ttyMSM0,115200n8"

Graphical image (with GPU)

Support for the Adreno A5xx GPU found in the Snapdragon 820 SoC has started in mesa open source driver. The support is fairly new and experimental, and all the development for A5xx happens on the development/master branch of mesa. Mesa 17.0 was the first release with initial GPU support. However mesa 17.0 is not available in the stable of Debian (e.g. Stretch) and it will only be available in the next version of Debian. However mesa 17.x is available in the development version of Debian (aka sid). As such, if you want to experiment with Graphics on Debian, the recommended method is the following:

  1. Start with the console/headless image from previous section
  2. Upgrade the Debian root file system to Debian sid to get the latest version of all components and install a desktop environment.
  3. Install the GPU firmware

Once your board is running with the Debian minimal/console image as per previous section, you can upgrade to Debian sid: edit the file /etc/apt/sources.list

$ cat /etc/apt/sources.list
deb http://http.debian.net/debian/ sid main contrib non-free
deb-src http://http.debian.net/debian/ sid main contrib non-free

You can remove all previous content. Then run, as root:

apt update
apt dist-upgrade
apt install lxqt
apt install chromium gstreamer1.0-plugins-bad gstreamer1.0-libav

Of course you need to make sure that Ethernet is working, as you will download everything from the main Debian archives. Once these commands finish, you are running Debian sid and you have installed the LxQt desktop environment (you can install any other desktop, but LxQt is the reference desktop used in all Linaro builds).

Before getting further, it might be a good idea to check the installed version of mesa:

dpkg -l libegl1-mesa

And make sure that you are running 17.1 or above.

Finally the last step is to install the GPU firmware files. These files are not distributed publicly by Qualcomm nor Linaro at this point (like the bootloaders). You need to acquire them, typically from whoever you received the board.. They need to be installed in /lib/firmware/ folder on the board.

If all steps went fine, you should now have a Debian desktop with working GPU. You can start X manually and run graphical applications:

X&
export DISPLAY=:0
glxgears &
xterm &

Or you can start the entire desktop using LxQt default login manager:

systemctl start sddm

Installing an Open Embedded based image

Initial support for DragonBoard 820c has been added into the OpenEmbedded QCOM BSP later, including the appropriate kernel recipe. To build an image for Dragonboard 820c , simply follow the same instructions as usual, from Dragonboard-410c-OpenEmbedded-and-Yocto. When you select the MACHINE to build for, pick dragonboard-820c.

The board is being added to the Linaro Reference Platform OpenEmbedded builds, and prebuilt images for this board should appear in the coming days here : http://builds.96boards.org/snapshots/reference-platform/openembedded/.

Kernel source code

The Linux kernel used for DragonBoard 820c can be found in the Linaro Qualcomm Landing Team git repository. For now the support for this board is preliminary and can only be found in either 'release' branches named as release/db820c/qcomlt-x.y (the latest one being the most up-to-date/recent) or the integration-linux-qcomlt branch, which is regularly rebased on recent mainline, and is used for developers.

git: http://git.linaro.org/landing-teams/working/qualcomm/kernel.git
branch: release/db820c/qcomlt-x.y
defconfig: arch/arm64/defconfig kernel/configs/distro.config

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 db820c <remote branch>
export ARCH=arm64
export CROSS_COMPILE=<path to your GCC cross compiler>/aarch64-linux-gnu-
make defconfig distro.config
make -j4 Image dtbs KERNELRELEASE=`make kernelversion`-linaro-lt-qcom

Additionally, you might want or need to compile the kernel modules:

make -j4 modules KERNELRELEASE=`make kernelversion`-linaro-lt-qcom

To boot the kernel image, you will need a fastboot compatible boot image, and you can refer to Dragonboard-Boot-Image for instructions to create such an image.

Proprietary firmware

The proprietary firmware for the Dragonboard 820c are not publicly available yet. Users must get them from their board vendors directly, Linaro won't be able to redistribute them for now.

However the scripts to generate the SD rescue image for Dragonboard 820c exist and have been validated. Once you have access to the proprietary firmware you can reuse Linaro scripts to generate a rescue image and flash the board with the right bootloader.

In this section, we will provide instructions to generate a firmware package, assuming you have access to Qualcomm proprietary firmware files. With the locally generated firmware package, you will be able to generate the rescue image and install the proprietary firmware in the root file system.

Building the SD rescue image

The scripts to build the SD rescue image can be found here:

It should be fairly straight forward to run these scripts locally. In case of troubles, feel free to ask support on the 96boards forum.

Building the firmware BSP package

As you can see from the scripts above, they rely on the following file: http://builds.96boards.org/snapshots/dragonboard820c/binaries/20170628/linux-bootloader-db820c-v0.2-linaro.zip. This file cannot be accessed outside of Linaro and contains all the proprietary bootloader files. The content of this archive is the following (with corresponding md5sum):

cd44a326f048f0490a4a9d58059ba95b  linux-bootloader-db820c-v0.2-linaro/bootloaders-linux/cmnlib64.mbn
b0442419102b4ddf8e7afed78200f7cc  linux-bootloader-db820c-v0.2-linaro/bootloaders-linux/cmnlib.mbn
09eab8ccefefb921a74dec4b748fe6c2  linux-bootloader-db820c-v0.2-linaro/bootloaders-linux/devcfg.mbn
9ed5e75ec0d5d20b6ca56f38f9625e68  linux-bootloader-db820c-v0.2-linaro/bootloaders-linux/gpt_both0.bin
22945c138f11ed9c6426259d14b646ae  linux-bootloader-db820c-v0.2-linaro/bootloaders-linux/gpt_both1.bin
accee92984c46e395a1f06e1337c2218  linux-bootloader-db820c-v0.2-linaro/bootloaders-linux/gpt_both2.bin
1422cdc86cd78ac7250bec4d99c3b20a  linux-bootloader-db820c-v0.2-linaro/bootloaders-linux/gpt_both3.bin
c195164b35d11e5ff4814b360f88991a  linux-bootloader-db820c-v0.2-linaro/bootloaders-linux/gpt_both4.bin
66565c490f1091220aed04403d0db5f9  linux-bootloader-db820c-v0.2-linaro/bootloaders-linux/gpt_both5.bin
da4a9d4e082492511d30afd80c464f9c  linux-bootloader-db820c-v0.2-linaro/bootloaders-linux/hyp.mbn
f6cd833a5c0e54b51dc8c9bd953cacca  linux-bootloader-db820c-v0.2-linaro/bootloaders-linux/keymaster.mbn
1b24d1d8f57f7c19b62f7a0707fc1d68  linux-bootloader-db820c-v0.2-linaro/bootloaders-linux/pmic.elf
d4bc0715bdb9c55ed22f755c9737e4a8  linux-bootloader-db820c-v0.2-linaro/bootloaders-linux/rpm.mbn
b54a0fc7c13fd96898e4edafada39d55  linux-bootloader-db820c-v0.2-linaro/bootloaders-linux/sbc_1.0.bin
91daefdf0dc451fd84297708013b6b92  linux-bootloader-db820c-v0.2-linaro/bootloaders-linux/tz.mbn
9e903f6c9b9e1b9f6a470b5efce28f32  linux-bootloader-db820c-v0.2-linaro/bootloaders-linux/xbl.elf
581fc696917de728b60efb90f33c80a2  linux-bootloader-db820c-v0.2-linaro/bootloaders-sdboot/pmic.elf
21775907582b06389a656ab56011c160  linux-bootloader-db820c-v0.2-linaro/bootloaders-sdboot/sec.dat
62ec4162626072e843486b51101a853a  linux-bootloader-db820c-v0.2-linaro/bootloaders-sdboot/xbl.elf
652e77d26911980c78c01e78838fa9ee  linux-bootloader-db820c-v0.2-linaro/proprietary-linux/a225p5_pm4.fw
66998da45c8323be7d3b1fe364803077  linux-bootloader-db820c-v0.2-linaro/proprietary-linux/a225_pfp.fw
eba504f3c0a2f7373c52bce391dda41d  linux-bootloader-db820c-v0.2-linaro/proprietary-linux/a225_pm4.fw
25aa81977303142bdc4490efad16138b  linux-bootloader-db820c-v0.2-linaro/proprietary-linux/a300_pfp.fw
d657cacd951742d9bbbe74224347cffe  linux-bootloader-db820c-v0.2-linaro/proprietary-linux/a300_pm4.fw
d8b8333e3970aa2913d11ebb9470a7fc  linux-bootloader-db820c-v0.2-linaro/proprietary-linux/a330_pfp.fw
71ce5efe6aafc8393c135b333d495c3d  linux-bootloader-db820c-v0.2-linaro/proprietary-linux/a330_pm4.fw
4ed67d2992a7c1e906f1ef4a0dc900c4  linux-bootloader-db820c-v0.2-linaro/proprietary-linux/a420_pfp.fw
4dac702e4f5c341e84347b57254a4ce8  linux-bootloader-db820c-v0.2-linaro/proprietary-linux/a420_pm4.fw
2e9ddbd0569cd468e4f510ba78161f5f  linux-bootloader-db820c-v0.2-linaro/proprietary-linux/a530_gpmu.fw2
f7efa6802cb6793bafdfc0fee770e6cb  linux-bootloader-db820c-v0.2-linaro/proprietary-linux/a530_pfp.fw
a37bd5b4c74ef04c29e5ed7c8d46bc90  linux-bootloader-db820c-v0.2-linaro/proprietary-linux/a530_pm4.fw
509665e3c3c13194c6a9780085f8ba37  linux-bootloader-db820c-v0.2-linaro/proprietary-linux/a530v1_pfp.fw
5e04bd3c82303a1f09554548ffa8f827  linux-bootloader-db820c-v0.2-linaro/proprietary-linux/a530v1_pm4.fw
105095e441b51baf624fe4caf4a6314c  linux-bootloader-db820c-v0.2-linaro/proprietary-linux/a530v2_seq.fw2
169b8c19d944b88d5ad9df114e111f5c  linux-bootloader-db820c-v0.2-linaro/proprietary-linux/a530v3_gpmu.fw2
d0de184692249ff12eebc90c4560a8ac  linux-bootloader-db820c-v0.2-linaro/proprietary-linux/a530v3_seq.fw2
bb28299602fe8d061c3999b91695bafb  linux-bootloader-db820c-v0.2-linaro/proprietary-linux/a530_zap.b00
17c9f0bdb56dba38573f4524ac25e8dd  linux-bootloader-db820c-v0.2-linaro/proprietary-linux/a530_zap.b01
3d49a1b70c906b950d25c6502748110c  linux-bootloader-db820c-v0.2-linaro/proprietary-linux/a530_zap.b02
2d2e4ac4c1406660553743f3ad5c4361  linux-bootloader-db820c-v0.2-linaro/proprietary-linux/a530_zap.elf
dd8123ba5527120e04932e04019cfc57  linux-bootloader-db820c-v0.2-linaro/proprietary-linux/a530_zap.mdt
73697be0acbc0093cda74d4987cf7ab1  linux-bootloader-db820c-v0.2-linaro/proprietary-linux/leia_pfp_470.fw
dbc0f42b3dce0ae3fcb558b737fb073f  linux-bootloader-db820c-v0.2-linaro/proprietary-linux/leia_pm4_470.fw
d1c09d9a5746cd45e2d9cbfbe75010d8  linux-bootloader-db820c-v0.2-linaro/proprietary-linux/nfc_test.bin
b404b934b9461f7fd3c523b22ac2cd2c  linux-bootloader-db820c-v0.2-linaro/proprietary-linux/Signedrompatch_v20.bin
e55a2cddbc93aef1bbe6ee2a18ffbb3b  linux-bootloader-db820c-v0.2-linaro/proprietary-linux/Signedrompatch_v21.bin
7286f8c09a9b8093a36407691cd678f6  linux-bootloader-db820c-v0.2-linaro/proprietary-linux/Signedrompatch_v24.bin
76bfa0b8cb66f1d0abd7b94adbf5f65c  linux-bootloader-db820c-v0.2-linaro/proprietary-linux/Signedrompatch_v30.bin
7949af03d68a4a2915f8c5ff8e946026  linux-bootloader-db820c-v0.2-linaro/proprietary-linux/venus.b00
2339791d418bc1287e344bb43f26305d  linux-bootloader-db820c-v0.2-linaro/proprietary-linux/venus.b01
328bac2265ae4034b31064a0f34d1fbd  linux-bootloader-db820c-v0.2-linaro/proprietary-linux/venus.b02
0fac42db911c82283f0f0f4a1c8c9484  linux-bootloader-db820c-v0.2-linaro/proprietary-linux/venus.b03
0d68af0904dd698b16ffc9cd28b9b0c8  linux-bootloader-db820c-v0.2-linaro/proprietary-linux/venus.b04
915b58c22f775d43272e696544c1eafb  linux-bootloader-db820c-v0.2-linaro/proprietary-linux/venus.mdt

These files needs to be access from Qualcomm private repositories. If you don't know what they are, or don't have access to them, you won't be able to proceed further.

Getting proprietary files

The proprietary files must be obtained from the Qualcomm repo for msm8996-la-2.0 project, the files in the proprietary-linux and bootloader-linux folders must be taken from branch r01700.1 in the repo, and the files in the folder bootloader-sdboot are taken from the branch r01700.1.72501.1 (it is a special build for SD boot).

Files from r01700.1 branch:

For the bootloader-linux folder:
<QCOM repo>/trustzone_images/build/ms/bin/IADAANAA/cmnlib.mbn 
<QCOM repo>/trustzone_images/build/ms/bin/IADAANAA/cmnlib64.mbn 
<QCOM repo>/trustzone_images/build/ms/bin/IADAANAA/keymaster.mbn 
<QCOM repo>/trustzone_images/build/ms/bin/IADAANAA/devcfg.mbn
<QCOM repo>/trustzone_images/build/ms/bin/IADAANAA/hyp.mbn
<QCOM repo>/trustzone_images/build/ms/bin/IADAANAA/tz.mbn 
<QCOM repo>/trustzone_images/build/ms/bin/IADAANAA/mdtp.mbn 
<QCOM repo>/boot_images/QcomPkg/Msm8996Pkg/Bin64/xbl.elf 
<QCOM repo>/boot_images/QcomPkg/Msm8996Pkg/Bin64/pmic.elf 
<QCOM repo>/common/sectools/resources/build/fileversion2/sec.dat 
<QCOM repo>/rpm_proc/build/ms/bin/AAAAANAAR/rpm.mbn 
<QCOM repo>/common/build/ufs/gpt_both0.bin 
<QCOM repo>/common/build/ufs/gpt_both1.bin 
<QCOM repo>/common/build/ufs/gpt_both2.bin 
<QCOM repo>/common/build/ufs/gpt_both3.bin 
<QCOM repo>/common/build/ufs/gpt_both4.bin 
<QCOM repo>/common/build/ufs/gpt_both5.bin 
For the proprietary-linux folder:
<QCOM repo>/LINUX/android/vendor/qcom/proprietary/prebuilt_HY22/target/product/msm8996/system/etc/firmware/a225p5_pm4.fw
<QCOM repo>/LINUX/android/vendor/qcom/proprietary/prebuilt_HY22/target/product/msm8996/system/etc/firmware/a225_pfp.fw
<QCOM repo>/LINUX/android/vendor/qcom/proprietary/prebuilt_HY22/target/product/msm8996/system/etc/firmware/a225_pm4.fw
<QCOM repo>/LINUX/android/vendor/qcom/proprietary/prebuilt_HY22/target/product/msm8996/system/etc/firmware/a300_pfp.fw
<QCOM repo>/LINUX/android/vendor/qcom/proprietary/prebuilt_HY22/target/product/msm8996/system/etc/firmware/a300_pm4.fw
<QCOM repo>/LINUX/android/vendor/qcom/proprietary/prebuilt_HY22/target/product/msm8996/system/etc/firmware/a330_pfp.fw
<QCOM repo>/LINUX/android/vendor/qcom/proprietary/prebuilt_HY22/target/product/msm8996/system/etc/firmware/a330_pm4.fw
<QCOM repo>/LINUX/android/vendor/qcom/proprietary/prebuilt_HY22/target/product/msm8996/system/etc/firmware/a420_pfp.fw
<QCOM repo>/LINUX/android/vendor/qcom/proprietary/prebuilt_HY22/target/product/msm8996/system/etc/firmware/a420_pm4.fw
<QCOM repo>/LINUX/android/vendor/qcom/proprietary/prebuilt_HY22/target/product/msm8996/system/etc/firmware/a530_gpmu.fw2
<QCOM repo>/LINUX/android/vendor/qcom/proprietary/prebuilt_HY22/target/product/msm8996/system/etc/firmware/a530_pfp.fw
<QCOM repo>/LINUX/android/vendor/qcom/proprietary/prebuilt_HY22/target/product/msm8996/system/etc/firmware/a530_pm4.fw
<QCOM repo>/LINUX/android/vendor/qcom/proprietary/prebuilt_HY22/target/product/msm8996/system/etc/firmware/a530v1_pfp.fw
<QCOM repo>/LINUX/android/vendor/qcom/proprietary/prebuilt_HY22/target/product/msm8996/system/etc/firmware/a530v1_pm4.fw
<QCOM repo>/LINUX/android/vendor/qcom/proprietary/prebuilt_HY22/target/product/msm8996/system/etc/firmware/a530v2_seq.fw2
<QCOM repo>/LINUX/android/vendor/qcom/proprietary/prebuilt_HY22/target/product/msm8996/system/etc/firmware/a530v3_gpmu.fw2
<QCOM repo>/LINUX/android/vendor/qcom/proprietary/prebuilt_HY22/target/product/msm8996/system/etc/firmware/a530v3_seq.fw2
<QCOM repo>/LINUX/android/vendor/qcom/proprietary/prebuilt_HY22/target/product/msm8996/system/etc/firmware/a530_zap.b00
<QCOM repo>/LINUX/android/vendor/qcom/proprietary/prebuilt_HY22/target/product/msm8996/system/etc/firmware/a530_zap.b01
<QCOM repo>/LINUX/android/vendor/qcom/proprietary/prebuilt_HY22/target/product/msm8996/system/etc/firmware/a530_zap.b02
<QCOM repo>/LINUX/android/vendor/qcom/proprietary/prebuilt_HY22/target/product/msm8996/system/etc/firmware/a530_zap.elf
<QCOM repo>/LINUX/android/vendor/qcom/proprietary/prebuilt_HY22/target/product/msm8996/system/etc/firmware/a530_zap.mdt
<QCOM repo>/LINUX/android/vendor/qcom/proprietary/prebuilt_HY22/target/product/msm8996/system/etc/firmware/leia_pfp_470.fw
<QCOM repo>/LINUX/android/vendor/qcom/proprietary/prebuilt_HY22/target/product/msm8996/system/etc/firmware/leia_pm4_470.fw
<QCOM repo>/LINUX/android/vendor/qcom/proprietary/prebuilt_HY22/target/product/msm8996/system/etc/firmware/nfc_test.bin
<QCOM repo>/LINUX/android/vendor/qcom/proprietary/prebuilt_HY22/target/product/msm8996/system/etc/firmware/Signedrompatch_v20.bin
<QCOM repo>/LINUX/android/vendor/qcom/proprietary/prebuilt_HY22/target/product/msm8996/system/etc/firmware/Signedrompatch_v21.bin
<QCOM repo>/LINUX/android/vendor/qcom/proprietary/prebuilt_HY22/target/product/msm8996/system/etc/firmware/Signedrompatch_v24.bin
<QCOM repo>/LINUX/android/vendor/qcom/proprietary/prebuilt_HY22/target/product/msm8996/system/etc/firmware/Signedrompatch_v30.bin
<QCOM repo>/common/build/ufs/bin/modemlite/pil_split_bins/venus.b00
<QCOM repo>/common/build/ufs/bin/modemlite/pil_split_bins/venus.b01
<QCOM repo>/common/build/ufs/bin/modemlite/pil_split_bins/venus.b02
<QCOM repo>/common/build/ufs/bin/modemlite/pil_split_bins/venus.b03
<QCOM repo>/common/build/ufs/bin/modemlite/pil_split_bins/venus.b04
<QCOM repo>/common/build/ufs/bin/modemlite/pil_split_bins/venus.mdt

Files from r01700.1.72501.1 branch, for the bootloader-sdboot folder:

<QCOM repo>/boot_images/QcomPkg/Msm8996Pkg/Bin64/pmic.elf 
<QCOM repo>/boot_images/QcomPkg/Msm8996Pkg/Bin64/xbl.elf 
<QCOM repo>/common/sectools/resources/build/fileversion2/sec.dat 

File sbc_1.0.bin

This file is included in the Linaro BSP package, but it is not available in the Qualcomm repositories. For now, just skip it, and ignore any error associated to it

Create the firmware package

Once you have downloaded all the proprietary files, you can recreate a firmware package using the same folder structure used by the Linaro package, and described above. This file can then be used as an input for the next steps.

Create the SD rescue image

To create the SD rescue image, simply follow the Linaro scripts mentioned earlier. They are expected to be executed on a Linux host machine. The scripts use a mixture of Shell and Python scripts. With the exception of the proprietary firmware files, all the tools and scripts needed are public and available on Linaro git server.

Flashing the device with an SD rescue card

This method only works if your board is at least rev P2

Flash the SD card

By now you should have build the SD rescue from the previous steps, and it can be flashed onto an SD card using a Linux PC:

dd if=db820c_sd_rescue.img of=/dev/<your micro SD card> bs=4M oflag=sync status=noxfer

Connecting the DB820c

In order to force the DB820c to boot from SD you need to configure S1 switch properly. S1 is on the back of the board underneath the micro SD slot. Set S1 to OFF ON ON OFF for SD boot.

Then, connect a USB cable from the micro USB to your PC, connect UART console, connect the power whilst holding S4 (Vol-Minus).

If all the steps above were done properly you should see some debug traces on the console, and at the end something like:

fastboot: processing commands

which means that the board has entered in fastboot mode properly.

Flashing the bootloader in UFS

When booting with the SD rescue image, the fastboot flash command will in turn write into the onboard UFS. So it can be used to (re)partition the UFS, and/or flash any partition.

From the files create earlier, extract the content of dragonboard820c_bootloader_ufs_linux-*.zip and then you can reflash the entire UFS using the provided script:

./flashall

Booting into fastboot from onboard UFS

If the flashing process succeeded, all the right bootloaders and partition table should have been set. And fastboot can now be used to flash Linux root fs.

The first thing to try is to get into fastboot. to make sure the flashing completed properly.

  • Power off the board
  • Set Switch S1-1 to OFF, so S1 should now be for rev P2 (and newer) board : OFF OFF OFF OFF.
  • Connect the debug UART / serial console to your Linux PC, if not done already
  • Connect the micro USB cable (J4) to your Linux PC.
  • Open UART/serial console
  • Power on the device

You should some see debug traces on the console, and at the end something like:

fastboot: processing commands

Some board might have a valid boot partition pre-flashed, in which case the bootloader will load it and boot it. So if you see a Linux kernel being booted before flashing it yourself, then power cycle the board and press the Vol (-) key , so that it will force the bootloader to stop in fastboot mode. And normally you should now see the fastboot: processing commands message.

Clone this wiki locally