public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Mateusz Kulikowski <mateusz.kulikowski@gmail.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 22:13:43 +0100	[thread overview]
Message-ID: <56E48687.2060900@gmail.com> (raw)
In-Reply-To: <20160311235822.GA32341@homes.emlix.com>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi Daniel,

Thanks for the hints!
On 12.03.2016 00:58, Daniel Gl?ckner wrote:
> On Sun, Feb 07, 2016 at 09:57:37PM +0100, Mateusz Kulikowski wrote:
[...]
>> +.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.

Good point, in that case I'll just rename it to arm64_header :)

> 
> 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).

My bad, I should have put it the other way around:
add x13, x18, #0x16,
b _start

Will do that for v3 

> 
>> +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'll clarify readme, thanks for verbose explanation.
I know (almost) empty dtb is enough (I use it personally), but 
I didn't wanted to pollute dts directory with fake device trees.

> 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.

I prefer not to (at least for now) - It will not give us significant benefits
(image will be a bit smaller and boot slightly faster, but it's not an issue
as U-Boot replaces huge kernel image) and will just confuse people 
that already are using it. Is it fine with you?


Regards,
Mateusz
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJW5IZ7AAoJELvtohmVtQzBjj0IAJMwf9zutegyq5bmzG5ZYYJW
dcdqRUXXDDV5IocWDxYK1BGALoFocxxqkRaimwT04r+0ZZ4SsLKXnmKkGJcwSE6p
VfWW3aXG437VlVTDwyo8idSRESrFXkjtdrke+4xDQxoFWlCfUifKJJ53NYH2AzYt
lj/ZDvuGikAJPDN27DeITlJVqq1OXcOTXfJbooIMGqTFbt/R8bZb1dIP/wF6GobS
OqivQcMPh12pKped7Ym1kWMWJ01CWiauePjSK4xRJyAvZUjbvzke/8joBcpHDpaw
IGMR5g1RNN6d9flV/W25Ryzrz5XS9M5+ikqucBnSkQD/POnvhHKOkPL9SdMHeYY=
=zhqu
-----END PGP SIGNATURE-----

  reply	other threads:[~2016-03-12 21:13 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
2016-03-12 21:13     ` Mateusz Kulikowski [this message]
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=56E48687.2060900@gmail.com \
    --to=mateusz.kulikowski@gmail.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