how to know address for mfgtool ucl2.xml

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to know address for mfgtool ucl2.xml

1,574 Views
jiujinhong
Contributor IV

Hi,  We have download Yocto bsp(Uboot 2015.4, Kernel 4.X.X)  for building fsl-image-mfgtool-initramfs and generated U-boot\uImage\initramfs\dtb.

U-boot use below env for usb

  9 #define CONFIG_MFG_ENV_SETTINGS \
 10   "mfgtool_args=setenv bootargs console=" CONFIG_CONSOLE_DEV ",115200 " \
 11     "rdinit=/linuxrc " \
 12     "g_mass_storage.stall=0 g_mass_storage.removable=1 " \
 13     "g_mass_storage.file=/fat g_mass_storage.ro=1 " \
 14     "g_mass_storage.idVendor=0x066F g_mass_storage.idProduct=0x37FF "\
 15     "g_mass_storage.iSerialNumber=\"\" "\
 16     "enable_wait_mode=off "\
 17     CONFIG_MFG_NAND_PARTITION \
 18     "\0" \
 19     "initrd_addr=0x12C00000\0" \
 20     "initrd_high=0xffffffff\0" \
 21     "bootcmd_mfg=run mfgtool_args;bootz ${loadaddr} ${initrd_addr} ${fdt_addr};\0" \

So, how to fill load address for uImage\initramfs\dtb  in mfgtool in ucl2.xml (below ucl2.xml taken from others, take as refernce).

    <CMD state="BootStrap" type="boot" body="BootStrap" file ="u-boot-mx6q" >Loading U-boot</CMD>
    <CMD state="BootStrap" type="load" file="uImage" address="0x10800000"
        loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" >Loading Kernel.</CMD>
    <CMD state="BootStrap" type="load" file="initramfs.cpio.gz.uboot" address="0x10C00000"
        loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" >Loading Initramfs.</CMD>

In Manufacturing Tool V2 Linux or Android Firmware Development Guide V2.doc, mentioned some macro need to define in mx6sabre_common.h,  it need to apply to bsp as below?

  • #define CONFIG_BOOTCOMMAND      "bootm 0x10800000 0x10F00000  0x12000000"
0 Kudos
3 Replies

967 Views
jamesbone
NXP TechSupport
NXP TechSupport

The error is in setenv bootargs_mmc 'setenv bootargs ${bootargs} root=/dev/ram0 rw initrd=0x13000000,200M'

You need to define how much memory (in kB) to allocate for /dev/ram0 in order to hold all the uncompressed filesystem: for this, I need to add ramdisk_size=200000

Moreover, the second parameter passed to the initrd is the size, in MB, of compressed filesystem, that is (in my case) about 25MB.

Summary, the correct string is setenv bootargs_mmc 'setenv bootargs ${bootargs} root=/dev/ram0 ramdisk_size=200000 rw initrd=0x13000000,25M'

In this way, my system load the filesystem in RAM.

967 Views
jiujinhong
Contributor IV

thanks, i have fixed self.

0 Kudos

967 Views
jiujinhong
Contributor IV

I have define  #define CONFIG_BOOTCOMMAND \ "bootm 0x10800000 0x10F00000 0x12000000"  to mx6sabre_common.h, but it can not bootm successfully.  u-boot bin size is 400K. so i need to make it smaller than IRAM size?

0 Kudos