I am trying to make my Ultrazed EG boot from eMMC. It looks like I am missing something, because it does not work yet. These are the steps I make:
1. Build a simple Vivado project (2019.2) with BRAM and AXI UART just to add something
2. Create a petalinux project based on Ultrazed IOOC BSP with following options:
- sys console PS UART0
-rootfs mmcblk1p2 to boot from SD (to be changed later)
- kernel, dev tree and image all stored on SD
3. petalinux-build and "petalinux-package --boot --fsbl images/linux/zynqmp_fsbl.elf --u-boot images/linux/u-boot.elf --pmufw images/linux/pmufw.elf --fpga images/linux/system.bit --force"
3.(A) Create similar set of system files with rootfs location mmcblk0p2
4.Format SD card and write three system files to BOOT partition fat32 and rsync existing rootfs Ubuntu to ext4 partition.
5. Boot Ultrazed from the SD card
6. Use fdisk to create BOOT and rootfs on /dev/mmcblk0 (eMMC)
7. Copy additional set of three system files (ones showing location of rootfs as /dev/mmcblk0p2) to /dev/mmcblk0p1 and use rsync to copy rootfs from /dev/mmcblk1p2 to /dev/mmcblk1p2
8. Change boot mode switch on Ultrazed to 1001 and reboot
9 See the output below. It stops at uboot and cannot move further.
10. I also tried to create a uEnv.txt with the line "root=/dev/mmcblk0p2" in the eMMC boot partition, it does not make any difference. I can very easily boot Ubuntu from SD but not from eMMC, please help!
Xilinx Zynq MP First Stage Boot Loader
Release 2019.2 Jul 17 2020 - 18:15:03
NOTICE: ATF running on XCZU3EG/silicon v4/RTL5.1 at 0xfffea000
NOTICE: BL31: Secure code at 0x0
NOTICE: BL31: Non secure code at 0x8000000
NOTICE: BL31: v2.0(release):xilinx-v2019.1-12-g713dace9
NOTICE: BL31: Built : 18:11:52, Jul 17 2020
PMUFW: v1.1
U-Boot 2019.01 (Jul 17 2020 - 18:12:51 +0000)
Board: Xilinx ZynqMP
DRAM: 2 GiB
EL Level: EL2
Chip ID: zu3eg
MMC: mmc@ff160000: 0, mmc@ff170000: 1
Loading Environment from SPI Flash... SF: Detected n25q256a with page size 512 Bytes, erase size 128 KiB, total 64 MiB
*** Warning - bad CRC, using default environment
In: serial@ff000000
Out: serial@ff000000
Err: serial@ff000000
Board: Xilinx ZynqMP
Bootmode: EMMC_MODE
Reset reason: EXTERNAL
Net: ZYNQ GEM: ff0e0000, phyaddr 9, interface rgmii-id
eth0: ethernet@ff0e0000
U-BOOT for uz3eg-iocc-2019-2
ethernet@ff0e0000 Waiting for PHY auto negotiation to complete...... done
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
BOOTP broadcast 4
BOOTP broadcast 5
DHCP client bound to address 172.16.20.46 (3755 ms)
Hit any key to stop autoboot: 0
Device: mmc@ff160000
Manufacturer ID: 13
OEM: 14e
Name: Q2J55
Bus Speed: 50000000
Mode : MMC High Speed (52MHz)
Rd Block Len: 512
MMC version 5.0
High Capacity: Yes
Capacity: 7.1 GiB
Bus Width: 4-bit
Erase Group Size: 512 KiB
HC WP Group Size: 8 MiB
User Capacity: 7.1 GiB WRREL
Boot Capacity: 16 MiB ENH
RPMB Capacity: 4 MiB ENH
MMC: no card present