This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM3352: Copying u-boot and Linux to eMMC

Part Number: AM3352

Hi,

I have a custom board with AM3352 and two MMC connected.
MMC0: SD card
MMC1: eMMC

The goal is to prepare and flash a blank eMMC (copy both u-boot and Linux rootfs).

I can successfully deal with it using Linux.
I can boot to Linux, then I can make partitions, format them, mount and finally move necessary files.
More or less, it's like using a sledgehammer to crack a nut.

The question is, how can I do the same using the u-boot only?

I found these information:




Although I'm able to write u-boot and MLO, I have no idea how to properly copy rootfs.

I have a problem with the last two actions:
U-Boot # fatload mmc 0 ${loadaddr} rootfs.ext4
U-Boot # mmc write ${loadaddr} 0x1000 ...rootfs.ext4 size in bytes divided by 512, in hex...

1) How can I copy a 1.5GB rootfs.tar file since I only have 256MB of RAM?  

2) How to properly prepare the rootfs.ext4 file?

For now, I extracted /sdk/filesystems/tisdk-rootfs-image-am335x-evm.tar.xz to the .tar file.
Do I have to use a .tar or .ubi file for this?

Regards
Adam

  • Hi Adam,

    Adam Kozlowski said:

    I can successfully deal with it using Linux.
    I can boot to Linux, then I can make partitions, format them, mount and finally move necessary files.
    More or less, it's like using a sledgehammer to crack a nut.

    The question is, how can I do the same using the u-boot only?

    Actually it is recommended to flash emmc in Linux instead of U-Boot. You can put the steps of "make partitions, format them, mount and finally move necessary files" into a script, then let it run automatically when Linux started.