public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@xilinx.com>
To: u-boot@lists.denx.de
Subject: ZynqMP boot: no messages from SPL other than "Debug uart enabled"
Date: Fri, 24 Apr 2020 14:14:40 +0200	[thread overview]
Message-ID: <63125ad2-d203-bbdb-98fc-342edd9c2ebe@xilinx.com> (raw)
In-Reply-To: <01046131-277a-2dd9-61a8-927cd151b3f6@gmail.com>

Hi,

On 23. 04. 20 11:02, Major A wrote:
> Hi Michal,
> 
> I've had to take a break because, as it turned out, my ZCU102 was
> defective.? Now that I have a working one, I can go on with my
> frustrating quest for a bootable image.
> 
> So now that the patches to u-boot for the ZCU102 Rev. 1.1 are in git
> master, I started again from scratch, building ATF, PMUFW with patch and
> config object, and u-boot.
> 
> Once the builds finish, I place the files
> 
> ? spl/boot.bin
> 
> and
> 
> ? u-boot.itb
> 
> on the SD card and try to boot.? Sadly, as before, the only result I get
> on the first UART channel is a line
> 
> ? Debug uart enabled
> 
> sometimes followed by
> 
> ? ### ERROR ### Please RESET the board ###
> 
> but nothing else.
> 
> My suspicion is that the PMUFW or its configuration object isn't right.
> I use Luca's code from here to build both:
> 
> ? https://github.com/lucaceresoli/zynqmp-pmufw-builder.git
> 
> I also found an issue here:
> 
> 
> https://forums.xilinx.com/t5/ACAP-and-SoC-Boot-and/Booting-ZCU-102-from-SD-Card/td-p/926649
> 
> 
> It appears that there are at least two incompatible subrevisions of the
> board, both labeled Rev. 1.1.? Could it be that the current PMUFW (or
> whatever) just won't work with the current revision?
> 
> How do I figure out what the h*** is going on?

That boards should have just different DDR memory because origin was EOL.

Take a look at this mainline commit.
commit 47cc45a91ccc86c718fef7e8a00188e1047cf3dd
    arm64: zynqmp Add support for zcu102 rev1.1

You need to also add pmu.bin and pmu_obj.bin

CONFIG_PMUFW_INIT_FILE="pmu.bin"
CONFIG_ZYNQMP_SPL_PM_CFG_OBJ_FILE="pmu_obj.bin"


pmu.bin is just binary from pmu.elf which you can take from petalinux or
build it yourself.
pmu_obj.bin based on Luca's way. I personally is taking it from
petalinux fsbl.
I didn't try it for a while but this was sort of latest version.

$ cat extract-pmufw
#!/bin/bash
# Written by Michal Simek

FSBL=fsbl
PMCFG=pmu_obj.bin

PM_END=`aarch64-linux-gnu-objdump -D ${FSBL}.elf | sed -n
'/<XPm_ConfigObject>:/,/^$/p' | tail -n 2 | head -n 1 | cut -c 5-12 |
awk '{printf ("0x%s",$1)}'`
PM_START=`aarch64-linux-gnu-objdump -D ${FSBL}.elf | sed -n
'/<XPm_ConfigObject>:/,/^$/p' | head -n 1 | awk '{printf ("0x%s",$1)}'`

FSBL_START=`aarch64-linux-gnu-readelf -a ${FSBL}.elf | grep "Entry point
address" | awk '{print $4}'`

PM_OBJECT_START=`echo $((${PM_START} - ${FSBL_START}))`
PM_OBJECT_SIZE=`echo $((${PM_END} - ${PM_START}))`
PM_OBJECT_SIZE=`echo $((${PM_OBJECT_SIZE} + 4))`

echo "FSBL starting address ${FSBL_START}"
echo "FSBL object addresses ${PM_START} ${PM_END}"
echo "OBJECT start ${PM_OBJECT_START} size ${PM_OBJECT_SIZE}"

aarch64-linux-gnu-objcopy -O binary ${FSBL}.elf ${FSBL}.bin

# Extracting config object
dd if=${FSBL}.bin of=${PMCFG} bs=1 skip=${PM_OBJECT_START}
count=${PM_OBJECT_SIZE} > /dev/null 2>&1



And then simply build it like this.
export DEVICE_TREE=zynqmp-zcu102-rev1.1
make xilinx_zynqmp_virt_defconfig
make -j8

If you want to have ATF just copy bl31.bin to u-boot root ro use BL31
variable to generate u-boot.itb with it.

And that should be it.

Thanks,
Michal

  reply	other threads:[~2020-04-24 12:14 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-11 11:28 ZynqMP boot: no messages from SPL other than "Debug uart enabled" Major A
2020-03-12  8:15 ` Michal Simek
2020-03-12  9:12   ` Major A
2020-03-12 10:32     ` Michal Simek
2020-03-12 11:38       ` Major A
2020-03-12 11:44         ` Michal Simek
2020-03-12 12:01           ` Major A
2020-03-12 12:06             ` Michal Simek
2020-03-12 13:24               ` Major A
2020-03-12 13:31                 ` Michal Simek
2020-03-12 14:19                   ` Major A
2020-03-12 15:22                     ` Michal Simek
2020-04-23  9:02                       ` Major A
2020-04-24 12:14                         ` Michal Simek [this message]
2020-04-27 22:00                           ` Major A
2020-04-28  6:42                             ` Michal Simek
2020-04-28  9:29                               ` Major A
2020-04-28  9:33                                 ` Michal Simek
2020-04-28 10:53                                   ` Major A
2020-04-28 11:16                                     ` Michal Simek
2020-04-28 11:25                                       ` Major A
2020-04-28 11:29                                         ` Michal Simek
2020-04-28 13:34                                           ` Major A
2020-04-28 13:55                                             ` Michal Simek
2020-04-28 14:21                                               ` Major A
     [not found]                                                 ` <3ab17480-431a-e0e3-c2af-e1639a2d07a6@xilinx.com>
     [not found]                                                   ` <6b4c296f-fb91-fd84-f5c8-7b4f542034e4@gmail.com>
2020-04-30 10:20                                                     ` Fwd: " Major A
     [not found]                                                     ` <4f8b4b6a-c97d-38b8-5a74-98bbc916cb3a@xilinx.com>
2020-04-30 11:01                                                       ` Major A
2020-04-30 11:03                                                         ` Michal Simek
2020-04-30 11:10                                                           ` Major A

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=63125ad2-d203-bbdb-98fc-342edd9c2ebe@xilinx.com \
    --to=michal.simek@xilinx.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