News:

Attention: For security reasons,please choose a user name *different* from your login name.
Also make sure to choose a secure password and change it regularly.

Main Menu

Booting TE082* from QSPI and eMMC

Started by jhane, August 26, 2020, 07:17:19 AM

Previous topic - Next topic

jhane

Hello,
   I currently have a TE0821 with a 703 carrier that is booting form SD card.  We have a custom carrier board coming soon with no SD card which we will connect to a TE0820 SOM and I need to boot from QSPI/eMCC and have a few questions about doing this since I can't find a step-by-step guide.

  I understand that I can't flash the QSPI via jtag without a special fsbl; however, what if I boot from SD and do the setup from linux(obviously using the 703 carrier)?

Can I use flash_erase/flashcp to copy a  BOOT.BIN onto the QSPI?

I want to put the image.ub with the kernel and ramdisk in eMCC.  It looks like it is already partitioned:

brw-rw----    1 root     disk      179,   0 Aug 17 20:36 /dev/mmcblk0
brw-rw----    1 root     disk      179,   8 Aug 17 20:36 /dev/mmcblk0boot0
brw-rw----    1 root     disk      179,  16 Aug 17 20:36 /dev/mmcblk0boot1
crw-------    1 root     root      245,   0 Aug 17 20:36 /dev/mmcblk0rpmb

Does it matter what type of filesystem I put on boot0?

Looking at the uboot env it look like will try multiple devices until it finds one that works so it seems like I don't have to change the u-boot config.

thanks,
jeff


JH

Hi,
Quote
Can I use flash_erase/flashcp to copy a  BOOT.BIN onto the QSPI?
yes you must write it to the boot partion
Or use Vivado/SDK, see references to Xilinx user guides:https://wiki.trenz-electronic.de/display/PD/Xilinx+Development+Tools#XilinxDevelopmentTools-XilinxSoftwareProgrammingandDebugging


Quote
I want to put the image.ub with the kernel and ramdisk in eMCC. 
eMMC is not formatted when shipped.
You must formate it --> use Linux which will be loaded as RAM Disk from SD
where uboot search for image.ub and if rootfs is included as RAM disk or on ther partition (SD or eMMC or SATA(possible for U+ Zynq)), depends on your uboot configuration.You can change this dynamically via uboot commands (type help on uboot console)Or you change it in petalinux config and petalinux uboot config and device tree.
br
John


jhane

Hi,
  Thanks for the pointers.  I've figured it out now.   I was able to get QSPI and SD booting after resizing the boot partition but getting QSPI/eMMC was a bit more complicated, especially since I'm on 2020.1.

  I'll post a couple of finding here as it might be helpful

1. Update the device-tree so that you can access the device in linux
&sdhci0 {
    disable-wp;
    no-1-8-v;
};

2.  The existing devices on mmc0 are special areas in the eMMC.  You need to use fdisk to partition the user area of the eMMC(mmcblk0).  Then you can mkfs.

3. One 2020.1, u-boot kept hanging on 'sf probe 0 0 0' .  Disabling the u-boot autoconfig fixed this(the kernel and u-boot autoconfig is going to be removed anyway but I'm really not sure how this fixed it)

4. u-boot now uses something called distro boot which uses a u-boot boot script.  I had an issue that when u-boot calls the boot script it would call it first with qspi, since that is where the BOOT.BIN is; however, because my image.ub was on the eMMC the script would fail and cause the whole boot process to fail.  I had to modify the u-boot script recipe to only look on mmc devices.

Hope that helps somebody,
jeff