summaryrefslogtreecommitdiff
path: root/board/qualcomm/dragonboard410c/readme.txt
diff options
context:
space:
mode:
authorStephan Gerhold <stephan@gerhold.net>2021-07-07 11:06:02 +0200
committerTom Rini <trini@konsulko.com>2021-07-23 18:53:45 -0400
commit0204d1b56b2fa681d9f47c2fed0c626d48429151 (patch)
tree230cc92043325e450f5c59704763b8857de41cc9 /board/qualcomm/dragonboard410c/readme.txt
parent10189cb700114b81413934e63fac9c3e6b336887 (diff)
board: dragonboard410c: Load U-Boot directly without LK
At the moment the U-Boot port for the DragonBoard 410c is designed to be loaded as an Android boot image after Qualcomm's Little Kernel (LK) bootloader. This is simple to set up but LK is redundant in this case, since everything done by LK can be also done directly by U-Boot. Dropping LK entirely has at least the following advantages: - Easier installation/board code (no need for Android boot images) - (Slightly) faster boot - Boot directly in 64-bit without a round trip to 32-bit for LK So far this was not possible yet because of unsolved problems: 1. Signing tool: The firmware expects a "signed" ELF image with extra (Qualcomm-specific) ELF headers, usually used for secure boot. The DragonBoard 410c does not have secure boot by default but the extra ELF headers are still required. 2. PSCI bug: There seems to be a bug in the PSCI implementation (part of the TrustZone/tz firmware) that causes all other CPU cores to be started in 32-bit mode if LK is missing in the boot chain. This causes Linux to hang early during boot. There is a solution for both problems now: 1. qtestsign (https://github.com/msm8916-mainline/qtestsign) can be used as a "signing" tool for U-Boot and other firmware. 2. A workaround for the "PSCI bug" is to execute the TZ syscall when entering U-Boot. That way PSCI is made aware of the 64-bit switch and starts all other CPU cores in 64-bit mode as well. Simplify the dragonboard410c board by removing all the extra code that is only used to build an Android boot image that can be loaded by LK. This allows dropping the custom linker script, special image magic, as well as most of the special build/installation instructions. CONFIG_REMAKE_ELF is used to build a new ELF image that has both U-Boot and the appended DTB combined. The resulting u-boot.elf can then be passed to the "signing" tool (e.g. qtestsign). The PSCI workaround is placed in the "boot0" hook that is enabled with CONFIG_ENABLE_ARM_SOC_BOOT0_HOOK. The extra check for EL1 allows compatibility with custom firmware that enters U-Boot in EL2 or EL3, e.g. qhypstub (https://github.com/msm8916-mainline/qhypstub). As a first step these changes apply only to DragonBoard410c. Similar changes could likely also work for the DragonBoard 820c. Note that removing LK wouldn't be possible that easily without a lot of work already done three years ago by Ramon Fried. A lot of missing initialization, pinctrl etc was already added back then even though it was not strictly needed yet. Cc: Ramon Fried <rfried.dev@gmail.com> Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Diffstat (limited to 'board/qualcomm/dragonboard410c/readme.txt')
-rw-r--r--board/qualcomm/dragonboard410c/readme.txt73
1 files changed, 5 insertions, 68 deletions
diff --git a/board/qualcomm/dragonboard410c/readme.txt b/board/qualcomm/dragonboard410c/readme.txt
index a90d0f52e7..dfdb299fb7 100644
--- a/board/qualcomm/dragonboard410c/readme.txt
+++ b/board/qualcomm/dragonboard410c/readme.txt
@@ -1,69 +1,6 @@
-# SPDX-License-Identifier: GPL-2.0+
-#
-# (C) Copyright 2015 Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
+Documentation for DragonBoard 410c is now located at:
+ doc/board/qualcomm/dragonboard410c.rst
-Build & Run instructions:
-
-1) Install mkbootimg and dtbTool from
- git://codeaurora.org/quic/kernel/skales (15ece94f09 worked for me)
-2) Setup CROSS_COMPILE to aarch64 compiler
-3) make dragonboard410c_config
-4) make
-5) generate fake, empty ramdisk (can have 0 bytes)
-$ touch rd
-
-6) Generate qualcomm device tree table with dtbTool [1]
-$ dtbTool -o dt.img arch/arm/dts
-
-7) Generate Android boot image with mkbootimg [2]:
-$ mkbootimg --kernel=u-boot-dtb.bin --output=u-boot.img --dt=dt.img \
- --pagesize 2048 --base 0x80000000 --ramdisk=rd --cmdline=""
-
-8) Enter fastboot (reboot board with vol- button pressed)
-
-9) Boot it:
-$ fastboot boot u-boot.img
-or flash as kernel:
-$ fastboot flash boot u-boot.img
-$ fastboot reboot
-
-
-What is working:
-- UART
-- GPIO (SoC)
-- SD
-- eMMC
-- Reset
-- USB in EHCI mode (usb starts does switch device->host, usb stop does the opposite)
-- PMIC GPIOS (but not in generic subsystem)
-- PMIC "special" buttons (power, vol-)
-
-What is not working / known bugs:
-- SDHCI is slow (~2.5MiB/s for SD and eMMC)
-
-[1] To boot any kernel image, Little Kernel requires valid device tree for the
-platform it runs on. dtbTool creates device tree table that Little Kernel scans.
-Later on proper device tree is passed to next boot stage.
-Full device tree is not required to boot u-boot. Enough would be:
-/dts-v1/;
-
-/ {
- model = "Qualcomm Technologies, Inc. Dragonboard 410c";
- compatible = "qcom,dragonboard", "qcom,apq8016-sbc";
- qcom,msm-id = <0xce 0x0 0xf8 0x0 0xf9 0x0 0xfa 0x0 0xf7 0x0>;
- qcom,board-id = <0x10018 0x0>;
- #address-cells = <0x2>;
- #size-cells = <0x2>;
- chosen { };
- aliases { };
-
- memory {
- device_type = "memory";
- reg = <0 0x80000000 0 0x3da00000>;
- };
-};
-
-but for simplicity (and because size of image is not that critical) we use
-existing Qualcomm device trees.
-
-[2] Note that ramdisk is required, even if it is unused.
+Note that the installation method has changed: U-Boot is now installed into the
+"aboot" partition (replacing Little Kernel/LK). It is no longer packaged into
+an Android boot image and loaded through Qualcomm's LK bootloader.