From: "Daniel Glöckner" <dg@emlix.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 17/18] board: Add Qualcomm Dragonboard 410C support
Date: Sat, 12 Mar 2016 00:58:23 +0100 [thread overview]
Message-ID: <20160311235822.GA32341@homes.emlix.com> (raw)
In-Reply-To: <1454878658-21046-18-git-send-email-mateusz.kulikowski@gmail.com>
On Sun, Feb 07, 2016 at 09:57:37PM +0100, Mateusz Kulikowski wrote:
> U-Boot boots chained with fastboot in 64-bit mode.
> --- /dev/null
> +++ b/board/qualcomm/dragonboard410c/head.S
> @@ -0,0 +1,28 @@
> +/*
> + * Little-Kernel/Fastboot header for proper chain-loading
> + *
> + * (C) Copyright 2015 Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
> + *
> + * SPDX-License-Identifier: GPL-2.0+
> + */
> +
> +#include <config.h>
> +
> +.global _fastboot_header
> +_fastboot_header:
> + b _start
> + add x13, x18, #0x16
> + /* Image load offset from start of RAM, little-endian */
> + .quad CONFIG_SYS_TEXT_BASE-PHYS_SDRAM_1
> + /* Effective size of kernel image, little-endian */
> + .quad 0 /* 0x60000 */
> + /* Informative flags, little-endian */
> + .quad 0
> + .quad 0 /* reserved */
> + .quad 0 /* reserved */
> + .quad 0 /* reserved */
> + .byte 0x41 /* Magic number, "ARM\x64" */
> + .byte 0x52
> + .byte 0x4d
> + .byte 0x64
> + .word 0 /* reserved */
I don't think fastboot is the correct term to use here. The structure in
head.S is the ARM64 Linux kernel header described in section 4 of this
document: https://www.kernel.org/doc/Documentation/arm64/booting.txt
Fastboot is AFAIK a USB protocol spoken by bootloaders used on Android
devices. Little Kernel can do fastboot, but it doesn't do it to run this
image.
It is also confusing to have the "add" instruction in there without an
explanation, especially because having it at offset 4 instead of 0 defeats
its original purpose (MZ EXE signature for EFI).
> +6) generate qualcomm device tree, use dtbTool to generate it
> +$ dtbTool -o dt.img arch/arm/dts
> +
> +7) generate image with mkbootimg:
> +$ mkbootimg --kernel=u-boot-dtb.bin --output=u-boot.img --dt=dt.img --pagesize 2048 --base 0x80000000 --ramdisk=rd --cmdline=""
I would have liked a bit more text about what is done with the device
trees here. Little Kernel refuses to run the "kernel" unless it can
find a device tree matching the hardware it is running on. It adds some
information to the device tree and passes it to the kernel in the x0
register. U-Boot discards the contents of the x0 register and uses the
device tree appended to its image. So there is no need to point dtbTool
to the same dtb file used by U-Boot. A smaller one containing only the
IDs checked by Little Kernel would be enough. And dtbTool does not
generate a device tree, it generates the Qualcomm device tree table
containing all dtb files in the directory.
I know the goal is to eventually replace Little Kernel, but how about
using the device tree passed by it? We could add some code to head.S that
saves x0 in sp_el0 and abuse CONFIG_OF_HOSTFILE to retrieve it.
Best regards,
Daniel
--
Dipl.-Math. Daniel Gl?ckner, emlix GmbH, http://www.emlix.com
Fon +49 551 30664-0, Fax +49 551 30664-11,
Bertha-von-Suttner-Stra?e 9, 37085 G?ttingen, Germany
Sitz der Gesellschaft: G?ttingen, Amtsgericht G?ttingen HR B 3160
Gesch?ftsf?hrung: Dr. Uwe Kracke, Ust-IdNr.: DE 205 198 055
emlix - your embedded linux partner
next prev parent reply other threads:[~2016-03-11 23:58 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-07 20:57 [U-Boot] [PATCH v2 00/18] Add support for 96boards Dragonboard410C board Mateusz Kulikowski
2016-02-07 20:57 ` [U-Boot] [PATCH v2 01/18] serial: Add support for Qualcomm serial port Mateusz Kulikowski
2016-02-07 20:57 ` [U-Boot] [PATCH v2 02/18] gpio: Add support for Qualcomm gpio controller Mateusz Kulikowski
2016-02-09 21:25 ` Jagan Teki
2016-02-16 15:59 ` Simon Glass
2016-02-19 13:33 ` Mateusz Kulikowski
2016-02-07 20:57 ` [U-Boot] [PATCH v2 03/18] mmc: Add support for Qualcomm SDHCI controller Mateusz Kulikowski
2016-02-09 21:33 ` Jagan Teki
2016-02-24 22:44 ` Mateusz Kulikowski
2016-02-07 20:57 ` [U-Boot] [PATCH v2 04/18] ehci-hcd: Add init_after_reset Mateusz Kulikowski
2016-02-07 20:57 ` [U-Boot] [PATCH v2 05/18] usb: ulpi: Add Kconfig options for ULPI Mateusz Kulikowski
2016-02-08 15:16 ` Marek Vasut
2016-02-07 20:57 ` [U-Boot] [PATCH v2 06/18] Migrate CONFIG_ULPI* to Kconfig Mateusz Kulikowski
2016-02-08 15:16 ` Marek Vasut
2016-02-07 20:57 ` [U-Boot] [PATCH v2 07/18] usb: Rename ehci-fsl.h to ehci-ci.h Mateusz Kulikowski
2016-02-25 15:23 ` [U-Boot] [U-Boot,v2,07/18] " Tom Rini
2016-02-07 20:57 ` [U-Boot] [PATCH v2 08/18] usb: ehci-ci: Add missing registers Mateusz Kulikowski
2016-02-07 20:57 ` [U-Boot] [PATCH v2 09/18] ehci-ci.h: drop generic USBCMD fields Mateusz Kulikowski
2016-02-07 20:57 ` [U-Boot] [PATCH v2 10/18] ehci: Add support for Qualcomm EHCI Mateusz Kulikowski
2016-02-07 20:57 ` [U-Boot] [PATCH v2 11/18] drivers: Add SPMI bus uclass Mateusz Kulikowski
2016-02-07 20:57 ` [U-Boot] [PATCH v2 12/18] spmi: Add sandbox test driver Mateusz Kulikowski
2016-02-07 20:57 ` [U-Boot] [PATCH v2 13/18] drivers: spmi: Add support for Qualcomm SPMI bus driver Mateusz Kulikowski
2016-02-09 21:37 ` Jagan Teki
2016-02-19 21:02 ` Mateusz Kulikowski
2016-02-07 20:57 ` [U-Boot] [PATCH v2 14/18] pmic: Add support for Qualcomm PM8916 PMIC Mateusz Kulikowski
2016-02-07 20:57 ` [U-Boot] [PATCH v2 15/18] gpio: Add support for Qualcomm PM8916 gpios Mateusz Kulikowski
2016-02-09 21:44 ` Jagan Teki
2016-02-20 9:27 ` Mateusz Kulikowski
2016-02-07 20:57 ` [U-Boot] [PATCH v2 16/18] arm: Add support for Qualcomm Snapdragon family Mateusz Kulikowski
2016-02-09 21:51 ` Jagan Teki
2016-02-20 9:32 ` Mateusz Kulikowski
2016-02-07 20:57 ` [U-Boot] [PATCH v2 17/18] board: Add Qualcomm Dragonboard 410C support Mateusz Kulikowski
2016-03-11 23:58 ` Daniel Glöckner [this message]
2016-03-12 21:13 ` Mateusz Kulikowski
2016-03-13 21:08 ` Daniel Glöckner
2016-02-07 20:57 ` [U-Boot] [PATCH v2 18/18] Add myself as Snapdragon and SPMI maintainer Mateusz Kulikowski
2016-02-24 23:42 ` [U-Boot] [PATCH v2 00/18] Add support for 96boards Dragonboard410C board Tom Rini
2016-03-05 22:24 ` Mateusz Kulikowski
-- strict thread matches above, loose matches on Subject: below --
2016-01-24 20:52 Mateusz Kulikowski
2016-01-24 20:53 ` [U-Boot] [PATCH v2 17/18] board: Add Qualcomm Dragonboard 410C support Mateusz Kulikowski
2016-01-31 15:17 ` Simon Glass
2016-02-07 21:05 ` Mateusz Kulikowski
2016-02-09 21:56 ` Jagan Teki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160311235822.GA32341@homes.emlix.com \
--to=dg@emlix.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox