From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: gianluca <gianlucarenzi@eurek.it>, barebox@lists.infradead.org
Subject: Re: Barebox as first and second stage bootloader
Date: Tue, 3 Mar 2020 07:58:32 +0100 [thread overview]
Message-ID: <f6caf17d-6f00-8a40-6859-d16d736b5a23@pengutronix.de> (raw)
In-Reply-To: <eeab62fa-2049-42d8-f666-8c912e2a7e2d@eurek.it>
Hi,
On 2/28/20 9:28 AM, gianluca wrote:
>> RUNNING Program ...
>> PartID: :0x03
>>
>> reconnecting the device ...
>>
>> Error: unable to reconnect the target device: time out expired
>>
>>
>> Error: Start operation failed at partition 0x03
>> Error: TSV flashing service failed
>
> So in the console debug (via ttyACM usb gadget) I have these messages:
>
>> NOTICE: CPU: STM32MP157CAC Rev.B
>> NOTICE: Model: STMicroelectronics STM32MP157C-DK2 Discovery Board
>> NOTICE: Board: MB1272 Var2 Rev.C-01
>> INFO: Reset reason (0x14):
>> INFO: Pad Reset from NRST
>> INFO: PMIC version = 0x10
>> INFO: Using USB
>> INFO: Instance 2
>> INFO: Boot used partition fsbl1
>> NOTICE: BL2: v2.0-r3.0(debug):v2.0-stm32mp-r3
>> NOTICE: BL2: Built : 08:44:36, Feb 28 2020
>> INFO: BL2: Doing platform setup
>> INFO: RAM: DDR3-1066/888 bin G 1x4Gb 533MHz v1.45
>> INFO: Memory size = 0x20000000 (512 MB)
>> INFO: BL2 runs SP_MIN setup
>> INFO: BL2: Loading image id 4
>> INFO: Loading image id=4 at address 0x2ffef000
>> INFO: Image id=4 loaded: 0x2ffef000 - 0x30000000
>> INFO: BL2: Loading image id 5
>> INFO: GETSTATUS :
>> INFO: DFU_STATE_IDLE
>> INFO: UPLOAD :
>> INFO: Phase ID : 0
>> INFO: address 0x2ffed78c
>> INFO: GETSTATUS :
>> INFO: DFU_STATE_IDLE
>> INFO: GETSTATUS :
>> INFO: DFU_STATE_IDLE
>> INFO: UPLOAD :
>> INFO: Phase ID : 0
>> INFO: address 0x2ffed78c
>> INFO: GETSTATUS :
>> INFO: DFU_STATE_IDLE
>> INFO: Start Download partition 0 to address 0xc0000000 length 0
>> INFO: USB : DFU : end of download partition : 0
>> INFO: Loading image id=5 at address 0xc0100000
>> INFO: GETSTATUS :
>> INFO: DFU_STATE_IDLE
>> INFO: UPLOAD :
>> INFO: Phase ID : 3
>> INFO: address 0x2ffed78c
>> INFO: GETSTATUS :
>> INFO: DFU_STATE_IDLE
>> INFO: receive request 6
>> INFO: GETSTATUS :
>> INFO: DFU_STATE_IDLE
>> INFO: UPLOAD :
>> INFO: Phase ID : 3
>> INFO: address 0x2ffed78c
>> INFO: GETSTATUS :
>> INFO: DFU_STATE_IDLE
>> INFO: usb_partition_size: partition size : 0x454aa
>> INFO: Start Download partition 3 to address 0xc0100000 length 283818
>> INFO: USB : DFU : end of download partition : 3
>> WARNING: Skip signature check (header option)
>> INFO: GETSTATUS :
>> INFO: DFU_STATE_IDLE
>> INFO: UPLOAD :
>> INFO: Phase ID : 0
>> INFO: address 0xffffffff
>> INFO: Send detach request
>> INFO: GETSTATUS :
>> INFO: DFU_STATE_IDLE
>> INFO: Receive Detach
>> INFO: Image id=5 loaded: 0xc0100000 - 0xc01454aa
>> NOTICE: BL2: Booting BL32
>> INFO: Entry point address = 0x2ffef000
>> INFO: SPSR = 0x1d3
>> NOTICE: SP_MIN: v2.0-r3.0(debug):v2.0-stm32mp-r3
>> NOTICE: SP_MIN: Built : 08:44:45, Feb 28 2020
>> INFO: ARM GICv2 driver initialized
>> INFO: stm32mp HSI (18): Secure only
>> INFO: stm32mp HSE (20): Secure only
>> INFO: stm32mp PLL2 (27): Secure only
>> INFO: stm32mp PLL2_R (30): Secure only
>> INFO: SP_MIN: Initializing runtime services
>> INFO: SP_MIN: Preparing exit to normal world
>
> So it seems it hangs on running or transferring Barebox as SSBL... Or the Barebox output is not the same as TF-A...
barebox output is uart4 (ttyACM of ST-Link).
> The Barebox is 2020.01.0, the steps to build it are:
>
> 1- make ARCH=arm stm32mp_defconfig
> 2- make ARCH=arm all
>
>> CHK include/generated/version.h
>> CHK include/generated/utsrelease.h
>> CREATE include/config.h
>> CHK include/generated/compile.h
>> ENV defaultenv/barebox_default_env
>> ENV defaultenv/defaultenv-2-base.bbenv
>> ENV defaultenv/defaultenv-2-menu.bbenv
>> CHKFILESIZE images/start_stm32mp157c_dk2.pblb
>> LN images/../barebox-flash-image
>> images built:
>> barebox-stm32mp157c-dk2.img
>
> So the SSBL the .tsv file is referring to is the last build of Barebox.
>
> Any hint? Clue? or whatever?
>
> Is the console output of Barebox in the stm32mp_defconfig routed to the same RX & TX pins for the ttyACM as for the TF-A components?
Yes. Try enabling CONFIG_DEBUG_LL to see if you get some early output from barebox
before the UART driver was probed.
barebox might not work under a "trusted" TF-A, because it isolates some peripherals behind
vendor-specific secure monitor calls. I intend to add support for these, once upstream TF-A
has SCMI support.
For now, you may be better off using the flash tool like it's intended and write vendor
TF-A and vendor U-Boot to RAM and then use those to flash barebox and TF-A to eMMC.
See FlashLayout_sdcard_stm32mp157c-ev1-basic.tsv[1] for an example.
[1]: https://wiki.st.com/stm32mpu/wiki/STM32MP1_Starter_Package_-_images
Cheers
Ahmad
>
>
> Gianluca
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2020-03-03 6:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-26 11:57 gianluca
2020-02-26 14:28 ` Ahmad Fatoum
2020-02-26 14:46 ` gianluca
2020-02-26 15:08 ` Ahmad Fatoum
2020-02-26 15:30 ` gianluca
2020-02-26 15:46 ` Ahmad Fatoum
[not found] ` <2b5d2afe-c71e-34b9-efa5-57aaa5f28445@eurek.it>
2020-02-27 11:51 ` Ahmad Fatoum
2020-02-28 7:50 ` gianluca
2020-02-28 8:28 ` gianluca
2020-03-03 6:58 ` Ahmad Fatoum [this message]
[not found] ` <fb81fdd3-b674-ce0b-e472-ec8e606e4131@eurek.it>
2020-03-03 7:03 ` Ahmad Fatoum
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=f6caf17d-6f00-8a40-6859-d16d736b5a23@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=gianlucarenzi@eurek.it \
/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