readme.txt
1 # SPDX-License-Identifier: GPL-2.0+
2 #
3 # (C) Copyright 2015 Mateusz Kulikowski <mateusz.kulikowski (a] gmail.com>
4
5 Build & Run instructions:
6
7 1) Install mkbootimg and dtbTool from
8 git://codeaurora.org/quic/kernel/skales (15ece94f09 worked for me)
9 2) Setup CROSS_COMPILE to aarch64 compiler
10 3) make dragonboard410c_config
11 4) make
12 5) generate fake, empty ramdisk (can have 0 bytes)
13 $ touch rd
14
15 6) Generate qualcomm device tree table with dtbTool [1]
16 $ dtbTool -o dt.img arch/arm/dts
17
18 7) Generate Android boot image with mkbootimg [2]:
19 $ mkbootimg --kernel=u-boot-dtb.bin --output=u-boot.img --dt=dt.img \
20 --pagesize 2048 --base 0x80000000 --ramdisk=rd --cmdline=""
21
22 8) Enter fastboot (reboot board with vol- button pressed)
23
24 9) Boot it:
25 $ fastboot boot u-boot.img
26 or flash as kernel:
27 $ fastboot flash boot u-boot.img
28 $ fastboot reboot
29
30
31 What is working:
32 - UART
33 - GPIO (SoC)
34 - SD
35 - eMMC
36 - Reset
37 - USB in EHCI mode (usb starts does switch device->host, usb stop does the opposite)
38 - PMIC GPIOS (but not in generic subsystem)
39 - PMIC "special" buttons (power, vol-)
40
41 What is not working / known bugs:
42 - SDHCI is slow (~2.5MiB/s for SD and eMMC)
43
44 [1] To boot any kernel image, Little Kernel requires valid device tree for the
45 platform it runs on. dtbTool creates device tree table that Little Kernel scans.
46 Later on proper device tree is passed to next boot stage.
47 Full device tree is not required to boot u-boot. Enough would be:
48 /dts-v1/;
49
50 / {
51 model = "Qualcomm Technologies, Inc. Dragonboard 410c";
52 compatible = "qcom,dragonboard", "qcom,apq8016-sbc";
53 qcom,msm-id = <0xce 0x0 0xf8 0x0 0xf9 0x0 0xfa 0x0 0xf7 0x0>;
54 qcom,board-id = <0x10018 0x0>;
55 #address-cells = <0x2>;
56 #size-cells = <0x2>;
57 chosen { };
58 aliases { };
59
60 memory {
61 device_type = "memory";
62 reg = <0 0x80000000 0 0x3da00000>;
63 };
64 };
65
66 but for simplicity (and because size of image is not that critical) we use
67 existing Qualcomm device trees.
68
69 [2] Note that ramdisk is required, even if it is unused.
70