All of lore.kernel.org
 help / color / mirror / Atom feed
From: "André Przywara" <andre.przywara@arm.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 19/19] sunxi: update Pine64 README
Date: Tue, 18 Apr 2017 21:38:15 +0100	[thread overview]
Message-ID: <3e9f8075-a1c5-e2c5-a5ca-806ae842ae4c@arm.com> (raw)
In-Reply-To: <b625a9a5-5968-347d-03f5-f9aab8969b5e@suse.de>

On 16/04/17 02:20, Andreas Färber wrote:

Hi Andreas,

thanks for the review!

> Thanks for your awesome work on getting things in shape!
> 
> Am 01.04.2017 um 00:31 schrieb Andre Przywara:
>> +Quick Start / Overview
>> +======================
>> +- Build the ARM Trusted Firmware binary (see "ARM Trusted firmware (ATF)" below)
>> +- Build U-Boot (see "SPL/U-Boot" below)
>> +- Transfer to an uSD card (see "microSD card" below)
>> +- Boot and enjoy!
>> +
>> +Building the firmware
>> +=====================
>> +
>> +The Allwinner A64 firmware consists of three parts: U-Boot's SPL, an
>> +ARM Trusted Firmware (ATF) build and the U-Boot proper.
>> +The SPL will load both ATF and U-Boot proper along with the right device
>> +tree blob (.dtb) and will pass execution to ATF (in EL3), which in turn will
>> +drop into the U-Boot proper (in EL2).
>> +As the ATF binary will become part of the U-Boot image file, you will need
>> +to build it first.
>> +
>> + ARM Trusted firmware (ATF)
> 
> "Firmware"
> 
>> +----------------------------
>> +Checkout the "allwinner" branch from the github repository [1] and build it:
>> +$ export CROSS_COMPILE=aarch64-linux-gnu-
>> +$ make PLAT=sun50iw1p1 DEBUG=1 bl31
>> +  The resulting binary is build/sun50iw1p1/debug/bl31.bin. Copy this to the
>> +  root of the U-Boot source tree (or create a symbolic link).
> 
> This sentence startled me - but luckily it does not need to be in the
> _source_ directory, the U-Boot _build_ directory works just fine, too!
> Care to revise the statement?

Well, these instructions are more for the uninitiated, I guess, so
tossing in a "build directory" is probably more confusing. I was
silently assuming that people building in a separate build directory can
read between the lines here. Let me see if I can find a wording which
makes everyone happy ;-)

> It would also be nice to be able to just set some BL31 variable with the
> full path on the make command line, like ATF allows.

Mmmh, that sounds like a good idea. Let me see how this can be integrated.

> 
>> +
>> + SPL/U-Boot
>> +------------
>> +Both U-Boot proper and the SPL are using the 64-bit mode. As the boot ROM
>> +enters the SPL still in AArch32 secure SVC mode, there is some shim code to
>> +enter AArch64 very early. The rest of the SPL runs in AArch64 EL3.
>> +U-boot proper runs in EL2 and can load any AArch64 code, EFI applications or
> 
> "U-Boot"
> 
>> +arm64 Linux kernel images (often named "Image") using the booti command.
> 
> You may want to clarify this sentence - booti only applies to the
> latter, EFI applications would use "bootefi" and arbitrary code "go".
> Maybe just drop the "using" part?
> 
>> +
>> +$ make clean
>>  $ export CROSS_COMPILE=aarch64-linux-gnu-
>>  $ make pine64_plus_defconfig
>>  $ make
> [snip]
> 
> Build-testing this series with both pine64_plus_defconfig and
> orangepi_pc2_defconfig, I ran into a ~1616 size overflow with gcc5. gcc6
> worked okay. Would be helpful to document such requirements here.

Can you say which version of GCC 5? I think I used GCC 5.3.0 for a while
and this was fine, but I need to re-check this.
But yes: GCC 4.9 is not up to the task ;-)

> 
> For the Orange Pi PC 2, for this series:
> 
> Tested-by: Andreas Färber <afaerber@suse.de>
> 
> Orange Pi PC 2 will benefit from the $fdtfile patch I sent for Pine64,
> tested there as well.
> 
> I note there is no README.orangepi_pc2. Should README.pine64 be renamed
> to cover both boards, or were you planning to add a separate one?

Yeah, I was stumbling upon this as well.
One problem is that I think I was pointing people to README.pine64 for
quite a while, so renaming this might break links or so.
Other problem is to find a decent alternative name. I tend to use
"sunxi64" if I talk about 64-bit Allwinner SoCs in general, but I am not
sure if that is too technical or not meaning much to people.
So I am open to suggestions.

> Reason I ask is I tried unsuccessfully the Pine64 boot0.bin approach
> (based on your extract_fw_blobs.sh) for orangepi_pc2 before, based on
> current master branch, and it did not get me into U-Boot, unlike on the
> Pine64, so some documentation somewhere would be good to have,
> especially should this simplifying patchset miss the release again...

The H5 boot0 changed quite a lot, so the A64 runes don't work anymore.
The way the different meta data of the firmware parts (ATF, U-Boot,
arisc) are stored is different. I really couldn't be bothered to rev-eng
and hack this dead end (again). And since we have the SPL code working
already this time, I thought we just go with the proper stuff.

Cheers,
Andre.

> HELLO! BOOT0 is starting!
> boot0 commit : 8
> boot0 version : 4.0
> set pll start
> set pll end
> rtc[0] value = 0x00000000
> rtc[1] value = 0x00000000
> rtc[2] value = 0x00000000
> rtc[3] value = 0x00000000
> rtc[4] value = 0x00000000
> rtc[5] value = 0x00000000
> DRAM BOOT DRIVE INFO: V0.6
> the chip id is 0x00000001
> the chip id is 0x00000001
> the chip id is 0x00000001
> the chip id is 0x00000001
> the chip id is 0x00000001
> axp not exist
> DRAM CLK =672 MHZ
> DRAM Type =3 (2:DDR2,3:DDR3,6:LPDDR2,7:LPDDR3)
> DRAM zq value: 0x003b3bf9
> DRAM SIZE =1024 M
> DRAM simple test OK.
> dram size =1024
> card no is 0
> sdcard 0 line count 4
> [mmc]: mmc driver ver 2016-03-15 20:40
> [mmc]: sdc0 spd mode error, 2
> [mmc]: Wrong media type 0x00000000
> [mmc]: ***Try SD card 0***
> [mmc]: HSSDR52/SDR25 4 bit
> [mmc]: 50000000 Hz
> [mmc]: 30436 MB
> [mmc]: ***SD/MMC 0 init OK!!!***
> PANIC : sunxi_flash_init() error --2--,toc1 magic error
> PANIC : sunxi_flash_init() error --2--,toc1 magic error
> PANIC : sunxi_flash_init() error --0--
> Ready to disable icache.
> 
> Possibly related is that the output from boot0img was significantly
> larger than for Pine64? (same bl31.bin, other boot0.bin and u-boot.bin)
> 
> $ filesize orangepipc2.img
> 20013056
> $ filesize pine64.img
> 499712
> 
> Searching for a how-to I also noticed that linux-sunxi.org still links
> to a stale h5 branch from December (and that there is an spl-fit-v2
> branch but none with the latest v3 code ;)).
> 
> Cheers,
> Andreas
> 

  reply	other threads:[~2017-04-18 20:38 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-31 22:31 [U-Boot] [PATCH v3 00/19] SPL: extend FIT loading support Andre Przywara
2017-03-31 22:31 ` [U-Boot] [PATCH v3 01/19] SPL: FIT: refactor FDT loading Andre Przywara
2017-04-05 10:29   ` Simon Glass
2017-04-24 17:08   ` Peter Robinson
2017-03-31 22:31 ` [U-Boot] [PATCH v3 02/19] SPL: FIT: rework U-Boot image loading Andre Przywara
2017-04-05 10:29   ` Simon Glass
2017-03-31 22:31 ` [U-Boot] [PATCH v3 03/19] SPL: FIT: improve error handling Andre Przywara
2017-04-05 10:29   ` Simon Glass
2017-03-31 22:31 ` [U-Boot] [PATCH v3 04/19] SPL: FIT: factor out spl_load_fit_image() Andre Przywara
2017-04-05 10:29   ` Simon Glass
2017-03-31 22:31 ` [U-Boot] [PATCH v3 05/19] SPL: FIT: allow loading multiple images Andre Przywara
2017-04-03  9:40   ` Lukasz Majewski
2017-04-03 10:05     ` Andre Przywara
2017-04-03 10:15       ` Dr. Philipp Tomsich
2017-04-03 10:50       ` Lukasz Majewski
2017-04-05 10:29   ` Simon Glass
2017-03-31 22:31 ` [U-Boot] [PATCH v3 06/19] Kconfig: fix SPL_FIT dependency Andre Przywara
2017-03-31 22:31 ` [U-Boot] [PATCH v3 07/19] tools: mksunxiboot: allow larger SPL binaries Andre Przywara
2017-03-31 22:31 ` [U-Boot] [PATCH v3 08/19] armv8: SPL: only compile GIC code if needed Andre Przywara
2017-03-31 22:31 ` [U-Boot] [PATCH v3 09/19] armv8: fsl: move ccn504 code into FSL Makefile Andre Przywara
2017-03-31 22:31 ` [U-Boot] [PATCH v3 10/19] sunxi: A64: move SPL stack to end of SRAM A2 Andre Przywara
2017-04-03  7:21   ` Maxime Ripard
2017-03-31 22:31 ` [U-Boot] [PATCH v3 11/19] sunxi: SPL: store RAM size in gd Andre Przywara
2017-04-03  7:22   ` Maxime Ripard
2017-03-31 22:31 ` [U-Boot] [PATCH v3 12/19] sunxi: SPL: add FIT config selector for Pine64 boards Andre Przywara
2017-04-03  7:22   ` Maxime Ripard
2017-03-31 22:31 ` [U-Boot] [PATCH v3 13/19] Makefile: add rules to generate SPL FIT images Andre Przywara
2017-03-31 22:31 ` [U-Boot] [PATCH v3 14/19] sunxi: 64-bit SoCs: introduce FIT generator script Andre Przywara
2017-04-03  7:23   ` Maxime Ripard
2017-03-31 22:31 ` [U-Boot] [PATCH v3 15/19] sunxi: defconfig: add supported DT list for Pine64 and OrangePi PC 2 Andre Przywara
2017-04-03  7:25   ` Maxime Ripard
2017-03-31 22:31 ` [U-Boot] [PATCH v3 16/19] sunxi: enable automatic FIT build for 64-bit SoCs Andre Przywara
2017-04-03  7:26   ` Maxime Ripard
2017-03-31 22:31 ` [U-Boot] [PATCH v3 17/19] sunxi: Store the device tree name in the SPL header Andre Przywara
2017-03-31 22:31 ` [U-Boot] [PATCH v3 18/19] sunxi: use SPL header DT name for FIT board matching Andre Przywara
2017-03-31 22:31 ` [U-Boot] [PATCH v3 19/19] sunxi: update Pine64 README Andre Przywara
2017-04-16  1:20   ` Andreas Färber
2017-04-18 20:38     ` André Przywara [this message]
2017-04-19 22:21       ` Andreas Färber
2017-04-19 22:24         ` Dr. Philipp Tomsich
2017-04-20  0:54         ` Tom Rini
2017-04-16 19:34   ` Simon Glass
2017-04-18 18:21   ` Andreas Färber
2017-03-31 22:43 ` [U-Boot] [PATCH v3 00/19] SPL: extend FIT loading support Simon Glass
2017-03-31 23:21   ` André Przywara
2017-04-05 10:29     ` Simon Glass

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=3e9f8075-a1c5-e2c5-a5ca-806ae842ae4c@arm.com \
    --to=andre.przywara@arm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.