How to use new downloaded mfgtool?

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

How to use new downloaded mfgtool?

3,005 Views
jagsgediya
Contributor II

Hi All,

I have downloaded imx-3.10.17-1.0.0-ga-mfg-tools from freescale site.

I have built images through yocto for imx6sl evk kit.

We have imx6sl evk based custom board and we are using spi nor for booting purpose.

we have booted the board through imx_usb utility and from uboot we have put uboot image to spi flash at 0x400 offset(u-boot.imx) and it is booting u-boot from SPI.

Now i want to put all the images to SPI NOR.(u-boot.imx, uImage, .dtb, and file system, NOR size if 16 MB.)

So i want to use mfgtool from freescale to flash the images to NOR. but as i know we have to first configure the mfgtoolby putting some images to it and then only it will work.

Can anyone please give me directions for how to use mfgtool to flash all the images to spi nor?

thanks,

0 Kudos
4 Replies

1,403 Views
jian_jiang
NXP Employee
NXP Employee

Hi jags,

You should place the related files in the directory:

<your path>\imx-3.10.17-1.0.0-ga-mfg-tools.tar\imx-3.10.17-1.0.0-ga-mfg-tools\mfgtools-with-rootfs.tar\mfgtools\Profiles\Linux\OS Firmware\files

You can replace those existed files so you don't have to modify the ucl2.xml file.

All the best

Jian Jiang

-----------------------------------------------------------------------------------------------------------------------

PS: If my comment answers your question, please click Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,403 Views
bandelaprathyus
Contributor II

Hi,

     Could you please tell in which directory of MFG-Tool, we should place the images-u-boot.imx, uImage, .dtb, and rootfs.

0 Kudos

1,403 Views
saurabh206
Senior Contributor III

Hi

Check the UCL2.xml file, which provides detail of where to put all these files.

Thanks

Saurabh

0 Kudos

1,403 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi Jags,

    I have 2 suggestions for your questions:

(1)i want to put all the images to SPI NOR(u-boot.imx, uImage, .dtb, and file system, NOR size if 16 MB)

The size of file system is much larger than that of u-boot.imx and uImage, Generally speaking, the 16MB nor size is not enough, so please check your file system.

(2)Can anyone please give me directions for how to use mfgtool to flash all the images to spi nor?

In our sabre AI board, SPI Nor flash is supported, you can download MFG Tools , open ucl2.xml, you can find some lists in this file, these lists are configurations of MFG Tools, for example , see following list:

<LIST name="MX6Q-Sabreauto-SPI_NOR & SD card" desc="Choose SPI-NOR/SD as media">
<CMD state="BootStrap" type="boot" body="BootStrap" file ="u-boot-mx6q-sabreauto-spi-nor.bin" >Loading uboot.</CMD>
<CMD state="BootStrap" type="load" file="uImage" address="0x10800000"
  loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" >Doing Kernel.</CMD>
<CMD state="BootStrap" type="load" file="initramfs.cpio.gz.uboot" address="0x10C00000"
  loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" >Doing Initramfs.</CMD>
<CMD state="BootStrap" type="jump" > Jumping to OS image. </CMD>

<!--burn the uboot to SPI-NOR: -->
<CMD state="Updater" type="push" body="$ flash_erase /dev/mtd0 0 0">Erasing Boot partition</CMD>
<CMD state="Updater" type="push" body="send" file="files/u-boot-mx6q-sabreauto-spi-nor.bin">Sending U-Boot</CMD>
<CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mtd0 bs=512">write U-Boot to SPI-NOR</CMD>

<!-- partitioning the SD card: -->
<CMD state="Updater" type="push" body="send" file="mksdcard.sh.tar">Sending partition shell</CMD>
<CMD state="Updater" type="push" body="$ tar xf $FILE "> Partitioning...</CMD>
<CMD state="Updater" type="push" body="$ sh mksdcard.sh /dev/mmcblk0"> Partitioning SD card now...</CMD>

<!-- burn the kernel: -->
<CMD state="Updater" type="push" body="send" file="files/uImage">Sending kernel uImage</CMD>
<CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mmcblk0 bs=1M seek=1 conv=fsync">write kernel image to sd card</CMD>

<!-- burn the rootfs: -->
- <CMD state="Updater" type="push" body="$ mkfs.ext3 -j /dev/mmcblk0p1">Formatting rootfs partition</CMD>
<CMD state="Updater" type="push" body="$ mkdir -p /mnt/mmcblk0p1"/>
<CMD state="Updater" type="push" body="$ mount -t ext3 /dev/mmcblk0p1 /mnt/mmcblk0p1"/>
<CMD state="Updater" type="push" body="pipe tar -jxv -C /mnt/mmcblk0p1" file="files/rootfs.tar.bz2">Sending and writting rootfs</CMD>
<CMD state="Updater" type="push" body="frf">Finishing rootfs write</CMD>
<CMD state="Updater" type="push" body="$ umount /mnt/mmcblk0p1">Unmounting rootfs partition</CMD>

<CMD state="Updater" type="push" body="$ echo Update Complete!">Done</CMD>
</LIST>

If you want to use this list to burn images into flashes on board, you can open cfg.ini file and modify list's name:

[profiles]
chip = MX6Q Linux Update

[platform]
board = SabreSD

[LIST]
name = MX6Q-Sabreauto-SPI_NOR & SD card

Regards,

Weidong