AnsweredAssumed Answered

how do I for my mx28 board with、uImage and rootfs in one nand flash

Question asked by jie liu on Oct 16, 2016
Latest reply on Oct 17, 2016 by igorpadykov

my board for mx28 has one nand flash with 128MiB and DDR2 SDRAM with 64MiB

I set what as fellow ,my logo file is :

  NAND read: device 0 offset 0x200000, size 0x400000
 4194304 bytes read: OK
*  mem_start = 0x40000000
*  mem_size = 0x04000000
*  kernel: cmdline image address = 0x41600000


## format 00000000 ...
Wrong Image Format for bootm command
ERROR: can't get kernel image!


1、in mfgtool :

<CMD type="boot" body="Recovery" file="" timeout="60" if="HabEnable">Booting update firmware.</CMD>
<CMD type="find" body="Updater" timeout="180"/>
<CMD type="push" body="mknod class/mtd,mtd0,/dev/mtd0" timeout="180" />
<CMD type="push" body="mknod class/mtd,mtd1,/dev/mtd1" timeout="180" />
<CMD type="push" body="mknod class/misc,ubi_ctrl,/dev/ubi_ctrl"/>
<CMD type="push" body="$ flash_eraseall /dev/mtd0">Erasing mtd0 partition</CMD>
 <CMD type="push" body="send" file="files/">Sending uboot</CMD>
<CMD type="push" body="$ kobs-ng init -v $FILE">Flashing uboot firmware</CMD>
<CMD type="push" body="$ flash_erase /dev/mtd0 0x200000 32">Erasing 0x200000 32</CMD>
<CMD type="push" body="send" file="files/uImage">Sending uImage</CMD>
<CMD type="push" body="$ dd if=$FILE of=/dev/mtdblock0 bs=1M seek=2">Flashing uImage firmware</CMD>
<CMD type="push" body="$ echo Update Complete!">Done</CMD>


#define PHYS_SDRAM_1_SIZE    0x04000000    /* 64 MB */

  #define CONFIG_BOOTFILE        "uImage"
#define CONFIG_BOOTARGS        "console=ttyAM0,115200n8 "    /* modefy by zhuguojun        */
#define CONFIG_BOOTCOMMAND    "run nand_boot"

#define CONFIG_LOADADDR        0x41600000      



      "kernel=uImage\0"                                                   \
        "kernelsize=0x400000\0"                                             \
        "rootfs=rootfs.ubifs\0"                                             \
         "kerneladdr="       "0x00200000\0"                                 \

       "nand_boot=nand read.jffs2 $(loadaddr) $(kerneladdr) $(kernelsize);"                        \
                                                                "bootm $(loadaddr)\0"               \