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.

SK-AM62P-LP: SK-AM62P-LP: How to repackage default image folder after extracting from tar.xz?

Part Number: SK-AM62P-LP
Other Parts Discussed in Thread: AM62P

Tool/software:

Hi,

             In am62pxx-evm SDK, there are 3 filesystem images, namely "base image", "default image", "thinlinux image".

After extracting the compressed folder, what is the appropriate way to recompress it back into it's tar.xz format to be able to flash into the SK-AM62Pxx board?

Currently, we have tried using the direct compression option on Linux.
When we are trying to boot from eMMC using that file, it's not booting. I have attached the boot log for your reference.

switch to partitions #0, OK
mmc0(part 0) is current device
SD/MMC found on device 0
Failed to load 'boot.scr'
Can't set block device
Error: "main_cpsw0_qsgmii_phyinit" not defined
Failed to load '/boot/Image'
Failed to load '/boot/dtb/ti/k3-am62p5-sk.dtb'
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
No FDT memory address configured. Please configure
the FDT address via "fdt addr <address>" command.
Aborting!
Failed to load '/boot/dtb/ti/k3-am62p5-sk-mcan.dtbo'
Bad Linux ARM64 Image magic!
switch to partitions #0, OK
mmc0(part 0) is current device
Scanning mmc 0:1...
MMC: no card present
No EFI system partition
No EFI system partition
Failed to persist EFI variables
BootOrder not defined
EFI boot manager: Cannot load any image
MMC: no card present
starting USB...
Bus usb@31100000: Register 1000840 NbrPorts 1
Starting the controller
USB XHCI 1.10
scanning bus usb@31100000 for devices... Resetting EP 0...
Resetting EP 0...
Resetting EP 0...
Resetting EP 0...
Resetting EP 0...
Resetting EP 0...
2 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found

Device 0: unknown device
ethernet@8000000port@1 Waiting for PHY auto negotiation to complete......... TIMEOUT !
am65_cpsw_nuss_port ethernet@8000000port@1: phy_startup failed
am65_cpsw_nuss_port ethernet@8000000port@1: am65_cpsw_start end error
ethernet@8000000port@2 Waiting for PHY auto negotiation to complete......... TIMEOUT !
am65_cpsw_nuss_port ethernet@8000000port@2: phy_startup failed
am65_cpsw_nuss_port ethernet@8000000port@2: am65_cpsw_start end error
missing environment variable: pxeuuid
Retrieving file: pxelinux.cfg/01-92-2d-a7-a5-06-c0
ethernet@8000000port@1 Waiting for PHY auto negotiation to complete......... TIMEOUT !
am65_cpsw_nuss_port ethernet@8000000port@1: phy_startup failed
am65_cpsw_nuss_port ethernet@8000000port@1: am65_cpsw_start end error
ethernet@8000000port@2 Waiting for PHY auto negotiation to complete......... TIMEOUT !
am65_cpsw_nuss_port ethernet@8000000port@2: phy_startup failed
am65_cpsw_nuss_port ethernet@8000000port@2: am65_cpsw_start end error
Retrieving file: pxelinux.cfg/00000000
ethernet@8000000port@1 Waiting for PHY auto negotiation to complete.....

Regards
Veerapandiyan V

  • Hi Veerapandiyan,

    A similar query was answered here:

    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1187000/sk-am62-how-to-repackage-base-image-folder-after-extracting-from-tar-xz

    Also, can you follow the instructions provided on how to flash linux on EMMC in the AM62P Academy:

    https://dev.ti.com/tirex/explore/node?node=A__AXEeWNLEW2jak3KzsCN3BA__AM62P-ACADEMY__fp5YxRM__LATEST

    Linux->Develop Linux on TI EVM -> Flash Linux to EMMC

    Best Regards,

    Suren

  • Hi Suren,

    I built the archive file using the command sudo tar cfj tisdk-default-image-am62pxx-evm.tar.xz tisdk-default-image-am62pxx-evm and verified it using tar -tvf tisdk-default-image-am62pxx-evm.tar.xz. The archive file was built properly without any errors. but when I load it into eMMC, it's not booting. I have attached the boot log in the above one when I'm using the default built archive it's working fine in eMMC Boot.

    I would like to know whether any separate method is there for building the tar.xz file?


  • Hi Veerapandiyan,

    I have assigned your query to our eMMC expert. Please expect a response in a day or two. 

    Best Regards,

    Suren

  • Hello,

    When we are trying to boot from eMMC using that file, it's not booting. I have attached the boot log for your reference.

    Could you please share the output of the following commands run from the U-Boot prompt,

    => mmc dev 0 0
    => mmc part
    => ls mmc 0:1
    => ls mmc 0:2
    

    Regards,

    Prashant

  • Hi Prashant,

    Please find the logs for the commands you asked for.

    => 
    => mmc dev 0 0
    switch to partitions #0, OK
    mmc0(part 0) is current device
    => mmc part
    
    Partition Map for MMC device 0  --   Partition Type: EFI
    
    Part	Start LBA	End LBA		Name
    	Attributes
    	Type GUID
    	Partition GUID
      1	0x00000022	0x03b47fde	"rootfs"
    	attrs:	0x0000000000000000
    	type:	ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
    	guid:	76647e72-63ed-4d38-bc22-1bc7c16c272c
    => ls mmc 0:1
    <DIR>       4096 .
    <DIR>       4096 ..
    <DIR>      16384 lost+found
    <DIR>       4096 lib
    <DIR>       4096 usr
    <DIR>       4096 dev
    <DIR>       4096 opt
    <DIR>       4096 srv
    <DIR>       4096 mnt
    <DIR>       4096 boot
    <DIR>       4096 var
    <DIR>       4096 tmp
    <DIR>       4096 media
    <DIR>       4096 etc
    <DIR>       4096 sys
    <DIR>       4096 sbin
    <DIR>       4096 run
    <SYM>         19 linuxrc
    <DIR>       4096 home
    <DIR>       4096 proc
    <DIR>       4096 root
    <DIR>       4096 bin
    => ls mmc 0:2
    ** Invalid partition 2 **
    Couldn't find partition mmc 0:2
    => 
    


    My question is not about the issue in booting the eMMC.

    My question is how to repackage the extracted tar.xz file after making the changes in it.

    When I used the below Commands

    the command sudo tar cfj tisdk-default-image-am62pxx-evm.tar.xz tisdk-default-image-am62pxx-evm and verified it using tar -tvf tisdk-default-image-am62pxx-evm.tar.xz. The archive file was built properly without any errors.

    When I create the tisdk-default.ext4 using the tar.xz file I created and loading into eMMC only its not booting. The issue in creating tar.xz file.
    So can you please tell me there is any command or way to repackage the tar.xz file?

    Thank you

    Regards
    Veerapandiyan V

  • Hello,

    Those commands look good. We need to see why U-Boot is failing to load Kernel and DTB image.

    Please share the output of the following commands

    => ls mmc 0:1 /boot
    => ls mmc 0:1 /boot/dtb/ti

    If you see files listed, could you once try loading them manually

    => load mmc 0:1 $loadaddr /boot/Image
    => load mmc 0:1 $loadaddr /boot/dtb/ti/k3-am62p5-sk.dtb

    Regards,

    Prashant

  • Hi Prashant,

    I have created tar.xz file from sd card using the below command and it's working Fine

    sudo tar -cvpJf /home/bpt/Desktop/tisdk-default-image-am62pxx-evm.tar.xz -C /media/bpt/rootfs/ .

    Thank you

    Regards
    Veerapandiyan V