Author Topic: Moving boot from SD to eMMC in a TE0720  (Read 471 times)

CarmeloLabadie

  • Active Member
  • *
  • Posts: 1
Moving boot from SD to eMMC in a TE0720
« on: September 04, 2021, 05:23:24 PM »
Hello,

I've been working with Linux in a TE0720 via SD, where I had two partitions, one with the files image.ub, BOOT.BIN and system.dtb, and another partition with the root file system.

Now I would like to use the eMMC instead of the SD card. The thing is that I've managed to make it work, although it only loads Linux correctly if BOOT.BIN and system.dtb are kept in the SD card. However, I would like to have system.dtb in the eMMC as well.

These are the steps I've followed:

1) Configure eMMC with two partitions and format partition 1 as FAT32 and partion 2 as ext4 (as I did with the SD). eMMC is in /dev/mmcblk1, and SD in /dev/mmcblk0.

2) In petalinux:  petalinux-config

    Then:

             Subsystem AUTO Hardware Settings ---> SD/SDIO Settings ---> Primary SD/SDIO (psu_sd_1)

             Image Packaging Configuration ---> Device node of SD device ---> /dev/mmcblk1p2

3) Copy the U-boot environment variable in platform-top.h as described here.

4) Finally, after building it, I copy the system.dtb and image.ub in partition 1, and the root file system in partition 2. BOOT.BIN remains in the SD.

I was expecting this would load Linux correctly, and after that, my next step was going to replace the QSPI boot by the one of the SD in order to avoid the use of the SD. However, it only works if system.dtb is in the SD as well, since it is there where it is looked for. I've been looking for in all options of the petalinux-config, but I've not found anything relevant to force the use of the system.dtb placed in the eMMC instead of the SD one.

Can you tell me which is the step I'm missing?

JH

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1835
Re: Moving boot from SD to eMMC in a TE0720
« Reply #1 on: September 06, 2021, 06:29:31 AM »
Hello,
basic steps looks ok.
Which petalinux version did you use? --> Xilinx has changed boot flow a little bit with 20.x --> https://wiki.trenz-electronic.de/display/PD/Distro+Boot+with+Boot.scr
On which partition is the kernel?
Did you clean up the project before you built it again? Sometimes petalinux did not recognise all changes.

br
John