Complete SD Card Boot Image Preparation and Boot Procedure

Hello Kneron Team,

I am using a KL730 EVM board with SDK v2.0.0.

Currently, my KL730 EVM is booting from SPI-NAND, and I want to:

  1. Prepare a complete bootable SD card image using SDK v2.0.0
  2. Configure the KL730 EVM to boot completely from the SD card without on board NAND in picture.

I have gone through the KL730 documentation, including the SD Boot section, but I need clarification regarding the exact files, filenames, locations, partition layout, and complete procedure for SDK v2.0.0.

uboot.env - how to get this file as there is no inpt_env.txt file exists.

Could someone please provide the complete procedure specifically for KL730 EVM + SDK v2.0.0.

Comments

  • Hello,

    About the corresponding image binaries, you can find them in the following directory of the SDK

    /KL730_SDK_v2.0.0/04_Firmware/

    And you can find the list of specific binaries in chapter 4.1 Firmware Update in KL730_EVM_Board_User_Manual.pdf which is in HDK_v2.0.0.

    Note that you should follow the steps in "8.5 SD boot" to rename the files to bl2.bin, bl31.bin, bl32.bin, and bl33.bin respectively before you run the SD boot flow.


    About the U-Boot Environment File uboot.env, you need to create a txt file with content as below:

    baudrate=115200

    bootdelay=3

    bootcmd=fatload mmc 0:0 0x800000 Image; fatload mmc 0:0 0x2A00000 leipzig.dtb; booti 0x800000 - 0x2A00000

    bootargs=console=ttyS0,115200 root=/dev/mmcblk0 earlycon


    Then convert the txt file into uboot.env following the instructions in document. Or you can use the u-boot-tools in any linux PC to convert with following command:

    sudo apt update

    sudo apt install u-boot-tools

    mkenvimage -s 0x10000 -o u-boot.env env_sd_boot.txt


    And here is the uboot.env I created for EVM, hope it is useful for you to test in your environment.


  • Hi Ethon,

    Thank you for your response and for the detailed instructions.

    I have followed all the steps mentioned above and used the uboot.env file you provided. I have also followed the manual step-by-step. The U-Boot configuration and the other steps appear to be working correctly, and I am able to load the kernel image from the SD card.

    However, I am still facing an issue while loading/booting the root filesystem (rootfs). The system is not able to boot the rootfs successfully.

    My requirement is to boot the complete system entirely from the SD card, including the kernel and rootfs.

    I have attached the exact UART logs from my latest boot attempt for your reference. Could you please review the logs and help me identify what is causing the rootfs loading/booting issue?

    In particular, could you please advise:

    1. Whether the rootfs image needs to be in a specific format or partition on the SD card.
    2. What steps I should try next to successfully boot the complete system from the SD card.

    I have attached the UART logs showing the exact issue. Please let me know what changes I should make and how we can proceed from here.

    Thanks for your support.

  • Hello,

    I added commands for loading rootfs and confirmed the result.

    Here are the commands and the uboot.env for your reference.

    baudrate=115200

    bootdelay=3

    bootcmd=fatload mmc 0:0 0x800000 Image; fatload mmc 0:0 0x2A00000 leipzig.dtb; fatload mmc 0:0 0x7400000 rootfs.squashfs; booti 0x800000 - 0x2A00000

    bootargs=console=ttyS0,115200 root=/dev/ram0 initrd=0x7400000,32M ramdisk_size=65536 earlycon



  • Hi Ethon,

    Thank you for your response and for the detailed instructions.

    I have followed all the steps mentioned above and used the uboot.env file you provided. The U-Boot configuration and the other steps appear to be working correctly, and I am able to use the independent SD card boot.

    Thanks for your support.

The discussion has been closed due to inactivity. To continue with the topic, please feel free to post a new discussion.