From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Simek Date: Fri, 24 Apr 2020 14:14:40 +0200 Subject: ZynqMP boot: no messages from SPL other than "Debug uart enabled" In-Reply-To: <01046131-277a-2dd9-61a8-927cd151b3f6@gmail.com> References: <0f9a6b47-110c-c2f8-ec40-72106ed3272d@xilinx.com> <77460fd1-f86d-fd53-66af-28d16fe395a1@gmail.com> <4fcae7a6-1156-d868-3463-424368cf7b7f@xilinx.com> <69846a06-7085-70dd-bde1-95abf870cd73@gmail.com> <87728a7f-42b5-8e3b-d5a1-5fced9d7601a@xilinx.com> <9bdb2ede-8788-a7ea-cb05-fff3188815d3@gmail.com> <43908655-808a-f646-a361-f7979c783409@xilinx.com> <452c07b7-8cd3-4f55-42dd-d00d9914f446@gmail.com> <11479bdb-ff9b-1a4d-b926-635dd656e221@xilinx.com> <01046131-277a-2dd9-61a8-927cd151b3f6@gmail.com> Message-ID: <63125ad2-d203-bbdb-98fc-342edd9c2ebe@xilinx.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 '/:/,/^$/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 '/:/,/^$/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