blob: a90d0f52e7f2d3f4e2895d3792d57793f5869a37 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001# SPDX-License-Identifier: GPL-2.0+
Mateusz Kulikowski626f0482016-03-31 23:12:33 +02002#
3# (C) Copyright 2015 Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Mateusz Kulikowski626f0482016-03-31 23:12:33 +02004
5Build & Run instructions:
6
71) Install mkbootimg and dtbTool from
8 git://codeaurora.org/quic/kernel/skales (15ece94f09 worked for me)
92) Setup CROSS_COMPILE to aarch64 compiler
103) make dragonboard410c_config
114) make
125) generate fake, empty ramdisk (can have 0 bytes)
13$ touch rd
14
156) Generate qualcomm device tree table with dtbTool [1]
16$ dtbTool -o dt.img arch/arm/dts
17
187) 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
228) Enter fastboot (reboot board with vol- button pressed)
23
249) Boot it:
25$ fastboot boot u-boot.img
26or flash as kernel:
27$ fastboot flash boot u-boot.img
28$ fastboot reboot
29
30
31What 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
41What 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
45platform it runs on. dtbTool creates device tree table that Little Kernel scans.
46Later on proper device tree is passed to next boot stage.
47Full 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
66but for simplicity (and because size of image is not that critical) we use
67existing Qualcomm device trees.
68
69[2] Note that ramdisk is required, even if it is unused.