beagleboard / beaglebone-ai-64

Mirror of https://git.beagleboard.org/beagleboard/beaglebone-ai-64
https://beaglebone.ai/64
Creative Commons Attribution 4.0 International
6 stars 0 forks source link

Write uboot.img to eMMC failed #9

Closed mingzhangqun closed 2 years ago

mingzhangqun commented 3 years ago

Write uboot.img to eMMC failed. f57b77464d5d7363ef6144e4bbae701

RobertCNelson commented 3 years ago

@jadonk tried:

=> mmc bootpart-resize 0 8 8            
EMMC boot partition Size change Failed.

it looks like some eMMC modules can be changed in u-boot:

http://trac.gateworks.com/wiki/MMC#U-BootSupport

https://u-boot.readthedocs.io/en/latest/usage/mmc.html

We just don't know which/how...

FionaYu20180326 commented 3 years ago

Checked with Kingston. eMMC partition capacity can not be changed. Always 4096KB for boot. image

mingzhangqun commented 3 years ago

The eMMC model on EVM is:
MTFC16GAPALBH-AAT

jadonk commented 3 years ago

Confirmed that the boot area cannot be increased on eMMC.

@RobertCNelson and @jadonk will resolve booting from eMMC. @FionaYu20180326 we may want to change a boot mode pin, but we'll let you know.

Pillar1989 commented 2 years ago

@jadonk @RobertCNelson It looks like we can modify the tispi.bin , let the code jump into User partition to run u-boot.img. do you want this modification ?

RobertCNelson commented 2 years ago

@Pillar1989 have we tried to create a normal "fat" partition on the eMMC? essentially dd https://rcn-ee.net/rootfs/debian-arm64/2021-09-15/j721e_evm-debian-11-console-arm64-2021-09-15-6gb.img.xz to the eMMC?

@jadonk working on sending me a board, i can test this when it arrives..

Regards,

mingzhangqun commented 2 years ago

@Pillar1989 have we tried to create a normal "fat" partition on the eMMC? essentially dd https://rcn-ee.net/rootfs/debian-arm64/2021-09-15/j721e_evm-debian-11-console-arm64-2021-09-15-6gb.img.xz to the eMMC?

Yes, I tried, but it failed boot on evm and bbai. So I tried the steps(it runs well on evm): https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-jacinto7/07_03_00_05/exports/docs/linux/Foundational_Components/U-Boot/UG-Memory.html#booting-tiboot3-bin-tispl-bin-and-u-boot-img-from-emmc-boot-partition-for-k3-class-of-socs

Takuma-Fujiwara commented 2 years ago

I'm working on this issue right now. Linked below is how to modify uboot to fit into 4MB. I have not been able to get it working yet, but will keep you posted. https://e2e.ti.com/support/processors-group/processors/f/processors-forum/950948/faq-tda4vm-how-to-modify-offsets-for-boot-binaries-in-emmc

jadonk commented 2 years ago

@Takuma-Fujiwara This approach looks great, though I'd love if we just had the source to tiboot3.bin.

Any feedback on what is going wrong?

@RobertCNelson can you apply 0001-Change-the-offsets-for-eMMC-8MB-boot0-partition-to-4.patch from https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/eMMC_5F00_flashing_5F00_package.zip to our u-boot? I made a pull request at https://github.com/beagleboard/u-boot/pull/6. Can you see if the images are within the required size?

mingzhangqun commented 2 years ago

Just replace the second-to-last line 0x100 with 0x300.

mmc partconf 0 1 1 1
mmc dev 0 1
mmc erase 0 0x2000
fatload mmc 1 ${loadaddr} tiboot3.bin
mmc write ${loadaddr} 0x0 0x300
fatload mmc 1 ${loadaddr} tispl.bin
mmc write ${loadaddr} 0x300 0x600
fatload mmc 1 ${loadaddr} u-boot.img
mmc write ${loadaddr} 0x900 0x1000
fatload mmc 1 ${loadaddr} sysfw.itb
mmc write ${loadaddr} 0x1900 0x300
mmc bootbus 0 2 0 0

image

mingzhangqun commented 2 years ago

It's confirmd.