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.

AM6421: Rootfs and Kernel footprint reduction using buildroot on TI AM64xx

Part Number: AM6421

Hello team,

I need support on how we can reduce the footprint of Kernel & rootfs filesystm within 10Mb size. I am looking it to load via QSPI having basic functionality with minimal peripherals working like ethernet, usb, uart, spi & gpios.

Need support on what packages can be added or removed to achieve this.

Regards,

Shraddha N.

  • Hi Shraddha,

    You may want to build the tisdk-tiny-image or tisdk-tiny-initramfs in order to have a minimal image to suit your use-case.

    https://software-dl.ti.com/processor-sdk-linux/esd/AM64X/11_02_08_02/exports/docs/linux/Foundational_Components_Filesystem.html

    You can use yocto to build these images and give it a try.

    Best Regards,

    Suren

  • Hi Suren,

    I was able to generate the images for tisdk-tiny-initramfs but i see multiple files for boot & images, can i get information about the files generated & which to be used for evm board?

    Regards,

    shraddha

  • Hi Shraddha,

    If your EVM is  a HS-FS device, then use the hs-fs-evm.bin file. If its a HS-SE device then use the hs-evm.bin  and otherwise for a general purpose device gp-evm.bin. 

    Hope this helps

    Best Regards

    Suren

  • Hi Suren,

    For rootfs i see below files, but when we flash to NOR or NAND flash memories, we need it in img format. SO which file i should take & how we can convert to img format.

    Also i can see rootfs.cpio file is of 70Mb, what i was expecting was less than 10MB size with tiny-initramfs configuration. 

    For tispl.bin & u-boot.img file there is no hs-fs files available, so should i have to use tispl.bin & u-boot.img, right?

    Regards

    Shraddha

  • Hi Shraddha,

    Can you check the AM62x processor SDK installer that contains the tinyfs that you can take as a reference for AM64x and see if it helps

    https://dr-download.ti.com/software-development/software-development-kit-sdk/MD-PvdSyIiioq/11.02.08.02/ti-processor-sdk-linux-am62xx-evm-11.02.08.02-Linux-x86-Install.bin

    Also, you can refer in the link below on how to reduce the user space boot time by optimizing tiny initramfs.

    https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/10_01_10_04/exports/docs/linux/How_to_Guides/Target/How_to_boot_quickly.html#reducing-userspace-boot-time

    Let me know how it goes.

    Best Regards,

    Suren

  • Hi  

    I have built tisdk-tiny-initramfs, rootfs i got in format .cpio, which i tried to load in emmc over USB DFU. FLashing was succesful, but it boots till Uboot,

    then at Uboot prompt i entered below commands to boot from emmc

    => setenv mmcdev 0

    => setenv bootpart 0

    => boot

    this doesnt boot from emmc below are the logs

    U-Boot SPL 2025.01-00766-g7493977a537f (Dec 03 2025 - 15:20:36 +0000)
    Resetting on cold boot to workaround ErrataID:i2331
    Please resend tiboot3.bin in case of UART/DFU boot
    resetting ...
    
    U-Boot SPL 2025.01-00766-g7493977a537f (Dec 03 2025 - 15:20:36 +0000)
    SYSFW ABI: 4.0 (firmware rev 0x000b '11.2.5--v11.02.05 (Fancy Rat)')
    Set clock rates for '/a53@0', CPU: 1000MHz at Speed Grade 'S'
    SPL initial stack usage: 13536 bytes
    Trying to boot from MMC1
    Authentication passed
    Authentication passed
    Loading Environment from nowhere... OK
    init_env from device 9 not supported!
    Authentication passed
    Authentication passed
    Starting ATF on ARM64 core...
    
    NOTICE:  BL31: v2.13.0(release):v2.13.0-259-ge0c4d3903b-dirty
    NOTICE:  BL31: Built : 07:01:36, Jul  1 2025
    I/TC:
    I/TC: OP-TEE version: 4.7.0-47-ga9690ae39 (gcc version 13.4.0 (GCC)) #1 Thu Aug  7 15:25:10 UTC 2025 aarch64
    I/TC: WARNING: This OP-TEE configuration might be insecure!
    I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
    I/TC: Primary CPU initializing
    I/TC: GIC redistributor base address not provided
    I/TC: Assuming default GIC group status and modifier
    I/TC: SYSFW ABI: 4.0 (firmware rev 0x000b '11.2.5--v11.02.05 (Fancy Rat)')
    I/TC: Activated SA2UL device
    I/TC: Enabled firewalls for SA2UL TRNG device
    I/TC: EIP76D TRNG initialized
    I/TC: SA2UL Drivers initialized
    I/TC: HUK Initialized
    I/TC: Primary CPU switching to normal world boot
    
    U-Boot SPL 2025.01-00766-g7493977a537f (Dec 03 2025 - 15:20:36 +0000)
    SYSFW ABI: 4.0 (firmware rev 0x000b '11.2.5--v11.02.05 (Fancy Rat)')
    Trying to boot from MMC1
    Authentication passed
    Authentication passed
    
    
    U-Boot 2025.01-00766-g7493977a537f (Dec 03 2025 - 15:20:36 +0000)
    
    SoC:   AM64X SR2.0 HS-FS
    Model: Texas Instruments AM642 EVM
    Board: AM64-EVM rev D
    DRAM:  2 GiB
    Core:  111 devices, 34 uclasses, devicetree: separate
    MMC:   mmc@fa10000: 0, mmc@fa00000: 1
    Loading Environment from nowhere... OK
    In:    serial@2800000
    Out:   serial@2800000
    Err:   serial@2800000
    Net:   eth0: ethernet@8000000port@1am65_cpsw_nuss_port ethernet@8000000port@2: phy_connect() failed
    , eth2: icssg1-eth-port@0
    Hit any key to stop autoboot:  0
    => setenv mmcdev 0
    => setenv bootpart 0
    => boot
    switch to partitions #0, OK
    mmc0(part 0) is current device
    SD/MMC found on device 0
    Can't set block device
    Failed to load '/boot/Image'
    Failed to load '/boot/dtb/ti/k3-am642-evm.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-am642-evm-onboard-clkgen-pcie-serdes.dtbo'
    Bad Linux ARM64 Image magic!
    Scanning for bootflows in all bootdevs
    Seq  Method       State   Uclass    Part  Name                      Filename
    ---  -----------  ------  --------  ----  ------------------------  ----------------
    Scanning bootdev 'mmc@fa00000.bootdev':
    MMC: no card present
    MMC: no card present
    MMC: no card present
    Scanning bootdev 'mmc@fa10000.bootdev':
    No USB controllers found
    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
    am65_cpsw_nuss_port ethernet@8000000ethernet@800000: phy_connect() failed
    MMC: no card present
    ** Bad device specification mmc 1 **
    Couldn't find partition mmc 1:2
    No UBIFS volume mounted!
    prueth_port icssg1-eth-port@0: failed to boot PRU0: -1
    BOOTP broadcast 1
    BOOTP broadcast 2
    BOOTP broadcast 3
    BOOTP broadcast 4
    BOOTP broadcast 5
    BOOTP broadcast 6
    BOOTP broadcast 7
    BOOTP broadcast 8
    BOOTP broadcast 9

    From above log it doesnt find boot/Image

    SD/MMC found on device 0
    Can't set block device
    Failed to load '/boot/Image'
    Failed to load '/boot/dtb/ti/k3-am642-evm.dtb'

    1. if i extract tar file, boot& root folder is empty.

    2. Booting from emmc, Uboot SPL & ubbot iamge date as Dec 3, 2025, but i have built this images recently, by following the proper steps of yocto build procedure.

    whats wrong here?

    ALso same observation with tisdk-tiny-image.

    One more info i need is , if i use tiny-image, whether rootfs & image will have basic modules like remoteproc & remoteproc firmwares to run application on r5, hsr/prp?

    Also, it i generate tiny image with CPIO format or ext4 format, whether device will be able to boot from emmc or gpmc nand flash?

    Thanks & Regards

    Shraddha

  • Hi Shraddha,

    Have you modified the bootargs in Linux kernel device tree  in order to boot from eMMC? 

    Best Regards,

    Suren

  • Hi Suren

    I am flashing only boot images & rootfs, kernel image & dtb i am not flashing it separately. 

    Have you modified the bootargs in Linux kernel device tree  in order to boot from eMMC? 

    so did not modify any bootargs. Let me know what changes to be done & how i can flash kernel image separately & boot from emmc.

    Also, How can we package kernel image & dtb in boot folder of rootfs?

    i tried adding below coomand in build/conf/local.conf file & built the image again

    IMAGE_INSTALL:append = "kernel-image kernel-devicetree"

    But with above change, i did not see kernel image & device tree getting added in rootfs

    Regards

    shraddha

  • Hi Shraddha,

    Sent you an email, can you respond back.

    Best Regards,

    Suren

  • Hi Shraddha,

    Wanted to check if you still need support here? Please respond to the email I sent you.

    Best Regards,

    Suren