JZ2440开发板使用问题,U-Boot烧写程序到Nand Flash时报错:NAND write: incorrect device type in bootloader
'bootloader' is not a number
这是因为分区名中u-boot,不是bootloader,而cmd_menu.c里用的是bootloader
可以执行:mtdpart default
save
参考文章:https://bbs.elecfans.com/jishu_1805952_1_1.html
##### 100ask Bootloader for OpenJTAG #####
[n] Download u-boot to Nand Flash
[o] Download u-boot to Nor Flash
[k] Download Linux kernel uImage
[j] Download root_jffs2 image
[y] Download root_yaffs image
[d] Download to SDRAM & Run
[z] Download zImage into RAM
[g] Boot linux from RAM
[f] Format the Nand Flash
[s] Set the boot parameters
[b] Boot the system
[r] Reboot u-boot
[q] Quit from menu
Enter your selection: q
OpenJTAG> mtdpart default
OpenJTAG> save
Saving Environment to NAND...
Erasing Nand...Writing to Nand... done
OpenJTAG> menu##### 100ask Bootloader for OpenJTAG #####
[n] Download u-boot to Nand Flash
[o] Download u-boot to Nor Flash
[k] Download Linux kernel uImage
[j] Download root_jffs2 image
[y] Download root_yaffs image
[d] Download to SDRAM & Run
[z] Download zImage into RAM
[g] Boot linux from RAM
[f] Format the Nand Flash
[s] Set the boot parameters
[b] Boot the system
[r] Reboot u-boot
[q] Quit from menu
Enter your selection: n
USB host is connected. Waiting a download.Now, Downloading [ADDRESS:30000000h,TOTAL:18338]
RECEIVED FILE SIZE: 18338 (17KB/S, 1S)NAND erase: device 0 offset 0x0, size 0x40000
Erasing at 0x20000 -- 100% complete.
OKNAND write: device 0 offset 0x0, size 0x4798Writing data at 0x4000 -- 100% complete.18328 bytes written: OK