From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: David Picard <david.picard@clermont.in2p3.fr>,
MList-Barebox <barebox@lists.infradead.org>
Subject: Re: boards/enclustra-sa2: add new board (HELP NEEDED)
Date: Fri, 4 Jul 2025 17:09:07 +0200 [thread overview]
Message-ID: <c775017a-aa6c-46b2-8bd8-457474f34325@pengutronix.de> (raw)
In-Reply-To: <9026c709-5e5f-4545-94ca-ea78ea431082@clermont.in2p3.fr>
Hello David,
On 7/3/25 16:21, David Picard wrote:
> Hello,
>
> I'm trying to port the Enclustra SA2 module. I started off the Terasic
> DE0 nano Soc board, that I could run with success previously. They both
> have a Cyclone V SoC FPGA. I added some pr_debug().
>
> My code is here, in the board-enclustra-sa2 branch:
> https://github.com/dpproto/barebox
>
> It hangs when the execution jumps to the uncompressed Barebox image, and
> I'm really stuck.
It's very interesting to know that this is actually the second
decompression. The first stage (barebox-socfpga-sa2-xload.img) succeeded
up to 'starting bootloader...' and then the output you have after that
is the prebootloader of the second stage (barebox-socfpga-sa2.img).
The decompressed barebox proper of the first stage already ran from
within SDRAM, so your SDRAM setup might not be to blame.
For a more complete picture, could you enable CONFIG_DEBUG_PBL and
CONFIG_DEBUG_LL also for the first stage and include them in your next mail?
> Enclustra provides a U-Boot configuration, with handoff files. I tried
> to compare them with those I copied from a sample Quartus project they
> provide too. I couldn't notice striking differences, although it's not
> easy to compare because they used an older version of Quartus.
>
> - The addresses and sizes in the log output below don't seem to exceed
> SDRAM boundaries, do they?
> - Any hint on anything to check?
I expanded a bit on Sascha's suggestions in the troubleshooting guide
I just sent out. I hope this will be helpful to you in pinpointing your
issue. Looking at the branch you pushed to your repository, I notice
the following in no particular order:
- you are missing a /chosen/stdout-path. You probably want to set it
to silence the 'No consoles were activated' warning and get
early output, even without CONFIG_DEBUG_LL
- As Sascha mentioned, calling pr_debug before relocation can
introduce bugs of its own, so stick to putc_ll('@') if unsure
- It would be interesting to see if CONFIG_PBL_VERIFY_PIGGY succeeds
and if an early putc_ll() in start.c as suggested by Sascha
would give any output.
Cheers,
Ahmad
>
> David
>
> =============================
> barebox 2025.06.1 #1 Thu Jul 3 10:53:43 CEST 2025
>
>
> Board: SoCFPGA
> No consoles were activated. Activating all consoles as fallback!
> dw_mmc dw_mmc0: registered as mci0
> mci0: detected SD card version 2.0
> mci0: registered disk0
> starting bootloader...
> arch/arm/boards/enclustra-sa2/lowlevel.c: __start_socfpga_sa2() >>> start
> include/mach/socfpga/lowlevel.h: start_socfpga_c5_common() >>> start
> include/mach/socfpga/lowlevel.h: start_socfpga_c5_common() >>>
> arm_cpu_lowlevel_init() OK
> include/mach/socfpga/lowlevel.h: start_socfpga_c5_common() >>>
> fdt_blob=0x00002320 fdt=0x1ff87ae8 size=0x40000000
> include/mach/socfpga/lowlevel.h: start_socfpga_c5_common() >>> calling
> barebox_arm_entry()...
> uncompress.c: memory at 0x00000000, size 0x40000000
> mmu: enabling MMU, ttb @ 0x3ffe0000
> endmem = 0x40000000
> arm_mem_scratch = 0x3fff8000+0x00008000
> arm_mem_stack = 0x3fff0000+0x00008000
> arm_mem_ttb = 0x3ffe0000+0x00010000
> arm_mem_barebox_image = 0x3fe00000+0x00200000
> arm_mem_early_malloc = 0x3fde0000+0x00020000
> membase = 0x00000000+0x40000000
> uncompress.c: uncompressing barebox binary at 0x1ff8c800 (size
> 0x00056b67) to 0x3fe00000 (uncompressed size: 0x000778b0)
> uncompress.c: jumping to uncompressed image at 0x3fe00001
> uncompress.c: calling armv7_switch_to_hyp()...
> uncompress.c: armv7_switch_to_hyp() OK. Now jumping...
> =============================
>
>
>
--
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 |
prev parent reply other threads:[~2025-07-04 15:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-03 14:21 David Picard
2025-07-03 20:35 ` Sascha Hauer
2025-07-04 15:09 ` Ahmad Fatoum [this message]
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=c775017a-aa6c-46b2-8bd8-457474f34325@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=david.picard@clermont.in2p3.fr \
/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