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