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.

TDA4VM: update 4GB rootfs image file in U-Boot

Part Number: TDA4VM

Hi Sir :

I want to update the all rootfs for the eMMC partition 0:2.

I made a 4GB rootfs ext4 image file. (4GB is already the minimum....)

Is there any way to update the image file to eMMC partition 0:2 in U-Boot ?

U-Boot SPL 2020.01-g5338e93-dirty (Dec 17 2020 - 11:25:43 +0800)
SYSFW ABI: 3.0 (firmware rev 0x0014 '20.04.1-v2020.04a (Terrific Lla')
Trying to boot from MMC1
Loading Environment from MMC... *** Warning - bad CRC, using default environment

init_env from device 17 not supported!
Starting ATF on ARM64 core...

NOTICE:  BL31: v2.3():07.00.00.005-dirty
NOTICE:  BL31: Built : 14:33:55, Jun 17 2020

U-Boot SPL 2020.01-g5338e93-dirty (Dec 17 2020 - 11:26:22 +0800)
SYSFW ABI: 3.0 (firmware rev 0x0014 '20.04.1-v2020.04a (Terrific Lla')
Detected: J7X-BASE-CPB rev E3
Detected: J7X-VSC8514-ETH rev E2
Diagnostic Key Check
Trying to boot from MMC1


U-Boot 2020.01-g5338e93-dirty (Dec 17 2020 - 11:26:22 +0800)

SoC:   J721E SR1.0
Model: Texas Instruments K3 J721E SoC
Board: J721EX-PM2-SOM rev E7
DRAM:  4 GiB
Flash: 0 Bytes
MMC:   sdhci@4f80000: 0, sdhci@4fb0000: 1
Loading Environment from MMC... OK
In:    serial@2800000
Out:   serial@2800000
Err:   serial@2800000
Detected: J7X-BASE-CPB rev E3
Detected: J7X-VSC8514-ETH rev E2
Net:   
Warning: ethernet@046000000 using MAC address from ROM
eth0: ethernet@046000000
Hit any key to stop autoboot:  0 
=> 
=> mmc list
sdhci@4f80000: 0 (eMMC)
sdhci@4fb0000: 1
=> mmc info
Device: sdhci@4f80000
Manufacturer ID: 13
OEM: 14e
Name: S0J56 
Bus Speed: 200000000
Mode: HS400 (200MHz)
Rd Block Len: 512
MMC version 5.1
High Capacity: Yes
Capacity: 14.8 GiB
Bus Width: 8-bit DDR
Erase Group Size: 512 KiB
HC WP Group Size: 8 MiB
User Capacity: 14.8 GiB WRREL
Boot Capacity: 31.5 MiB ENH
RPMB Capacity: 4 MiB ENH
=> mmc part

Partition Map for MMC device 0  --   Partition Type: DOS

Part	Start Sector	Num Sectors	UUID		Type
  1	2048      	262144    	533994d0-01	0c Boot
  2	264192    	30816256  	533994d0-02	83

=> ls mmc 0:2
<DIR>       4096 .
<DIR>       4096 ..
<DIR>      16384 lost+found
<DIR>       4096 bin
<DIR>       4096 boot
<DIR>       4096 dev
<DIR>       4096 etc
<DIR>       4096 home
<DIR>       4096 include
<SYM>         20 init
<DIR>       4096 lib
<SYM>         19 linuxrc
<DIR>       4096 media
<DIR>       4096 mnt
<DIR>       4096 opt
<DIR>       4096 proc
<DIR>       4096 run
<DIR>       4096 sbin
<DIR>       4096 sys
<DIR>       4096 tmp
<DIR>       4096 usr
<DIR>       4096 var
=> 

  • Hi Pierre,

    You can use dfu-utils tool to flash the rootfs.
    This works over USB.

    If this method will work for you, I can share more details.

    Regards,
    Vishal

  • Hi Vishal :

    I split the 8GiB data into 256MiB and used TFPT to update eMMC.

    => TFTP Download 256 MiB image file path 01  => write eMMC ( MMC Dev 0)

    => TFTP Download 256 MiB image file path 02  => write eMMC ( MMC Dev 0)

    ...

    => TFTP Download 256 MiB image file path 15  => write eMMC ( MMC Dev 0)

    I was able to successfully update rootfs.

    But When I split 8GiB into 512MiB it will fail in TFTP transfer.

    Hardware : TDA4EVM, SD Card boot 

    Software : PSDK 7.0.0 , boot-j7-evm.tar.gz

    U-Boot SPL 2020.01-gf9b0d030d3 (Jun 17 2020 - 15:08:08 +0000)
    SYSFW ABI: 3.0 (firmware rev 0x0014 '20.04.1-v2020.04a (Terrific Lla')
    Trying to boot from MMC2
    Loading Environment from MMC... *** Warning - No MMC card found, using default environment
    
    Remoteproc 2 started successfully
    Starting ATF on ARM64 core...
    
    NOTICE:  BL31: v2.3():07.00.00.005-dirty
    NOTICE:  BL31: Built : 14:33:55, Jun 17 2020
    
    U-Boot SPL 2020.01-gf9b0d030d3 (Jun 17 2020 - 14:34:25 +0000)
    SYSFW ABI: 3.0 (firmware rev 0x0014 '20.04.1-v2020.04a (Terrific Lla')
    Detected: J7X-BASE-CPB rev E3
    Detected: J7X-VSC8514-ETH rev E2
    Trying to boot from MMC2
    
    
    U-Boot 2020.01-gf9b0d030d3 (Jun 17 2020 - 14:34:25 +0000)
    
    SoC:   J721E SR1.0
    Model: Texas Instruments K3 J721E SoC
    Board: J721EX-PM2-SOM rev E7
    DRAM:  4 GiB
    not found for dev hbmc-mux
    Flash: 0 Bytes
    MMC:   sdhci@4f80000: 0, sdhci@4fb0000: 1
    Loading Environment from MMC... OK
    In:    serial@2800000
    Out:   serial@2800000
    Err:   serial@2800000
    Detected: J7X-BASE-CPB rev E3
    Detected: J7X-VSC8514-ETH rev E2
    Net:   
    Warning: ethernet@046000000 using MAC address from ROM
    eth0: ethernet@046000000
    Hit any key to stop autoboot:  0 
    => 
    => tftp ${loadaddr} ${serverip}:rootfs.img_00
    link up on port 1, speed 100, full duplex
    Using ethernet@046000000 device
    TFTP from server 192.168.101.2; our IP address is 192.168.101.1
    Filename 'rootfs.img_00'.
    Load address: 0x80080000
    Loading: #################################################################
    	 #################################################################
    	...
    	 #################################################################
    	 #######################################
    TFTP error: trying to overwrite reserved memory...
    RX dma free_pkt failed -22
    => 
    => bdinfo
    arch_number = 0x0000000000000000
    boot_params = 0x0000000000000000
    DRAM bank   = 0x0000000000000000
    -> start    = 0x0000000080000000
    -> size     = 0x0000000080000000
    DRAM bank   = 0x0000000000000001
    -> start    = 0x0000000880000000
    -> size     = 0x0000000080000000
    baudrate    = 115200 bps
    TLB addr    = 0x00000000ffff0000
    relocaddr   = 0x00000000ffee7000
    reloc off   = 0x000000007f6e7000
    irq_sp      = 0x00000000fdebbc90
    sp start    = 0x00000000fdebbc90
    Early malloc usage: 2ca8 / 8000
    fdt_blob    = 0x00000000fdebbca8
    => 
    

  • Hi Pierre,

    This looks the same as: https://e2e.ti.com/support/processors/f/791/p/946704/3502237#3502237

    There are multiple reserved nodes in the vicinity of 0x80008000. So just follow the above response and see if
    you change the load address to 0x0880000000 & try?

    Best Regards,
    Keerthy