问题已解决。
之前在参考Linux学习 :移植U-boot_2016.09到JZ2440开发板这篇文章使uboot支持nor flash的时候,在jedec_flash.c的jedec_table[] 中增加一项匹配板子上的NOR-Flash厂商ID和设备ID:
是这样添加的,
{ /* sheldon add for JZ2440_V2 Nor_Flash : MT29LV160DB */
.mfr_id = (u16)MX_MANUFACT,
.dev_id = 0x2249,
.name = "MX29LV160D",
.uaddr = {
[1] = MTD_UADDR_0x0555_0x02AA /* 1:x16 ,NOR Flash 的解锁地址 */
},
.DevSize = SIZE_1MiB,
.CmdSet = P_ID_AMD_STD,
.NumEraseRegions= 4,
.regions = { //查看芯片手册设置擦除块
ERASEINFO(0x10000, 31),
ERASEINFO(0x08000, 1),
ERASEINFO(0x02000, 2),
ERASEINFO(0x04000, 1),
}
但是,在u-boot-1.1.6_jz2440_burn_nor_with_nand_uboot.patch这个补丁中,是这样的
{
.mfr_id = MANUFACTURER_MACRONIX,
.dev_id = MX29LV160B,
.name = "MXIC MX29LV160B",
.uaddr = {
[0] = MTD_UADDR_0x0AAA_0x0555, /* x8 */
[1] = MTD_UADDR_0x0555_0x02AA, /* x16 */
},
.DevSize = SIZE_2MiB,
.CmdSet = P_ID_AMD_STD,
.NumEraseRegions= 4,
.regions = {
ERASEINFO(0x04000,1),
ERASEINFO(0x02000,2),
ERASEINFO(0x08000,1),
ERASEINFO(0x10000,31)
}
},
说明对flash的配置不同,
于是,我修改成这样
{
.mfr_id = (u16)MX_MANUFACT,
.dev_id = MX29LV160D,
.name = "MXIC MX29LV160D",
.uaddr = {
[0] = MTD_UADDR_0x0AAA_0x0555, /* x8 */
[1] = MTD_UADDR_0x0555_0x02AA, /* x16 */
},
.DevSize = SIZE_2MiB,
.CmdSet = P_ID_AMD_STD,
.NumEraseRegions= 4,
.regions = {
ERASEINFO(0x04000,1),
ERASEINFO(0x02000,2),
ERASEINFO(0x08000,1),
ERASEINFO(0x10000,31)
}
},
然后,编译,下载程序到JZ2440V3的norflash中,执行
nand read.jffs2 30000000 0 40000; protect off all; erase 0 3ffff; cp.b 30000000 0 40000
成功将nand flash 中的uboot拷贝至norflash
问题已解决。
之前在参考Linux学习 :移植U-boot_2016.09到JZ2440开发板这篇文章使uboot支持nor flash的时候,在jedec_flash.c的jedec_table[] 中增加一项匹配板子上的NOR-Flash厂商ID和设备ID:
是这样添加的,
{ /* sheldon add for JZ2440_V2 Nor_Flash : MT29LV160DB */
.mfr_id = (u16)MX_MANUFACT,
.dev_id = 0x2249,
.name = "MX29LV160D",
.uaddr = {
[1] = MTD_UADDR_0x0555_0x02AA /* 1:x16 ,NOR Flash 的解锁地址 */
},
.DevSize = SIZE_1MiB,
.CmdSet = P_ID_AMD_STD,
.NumEraseRegions= 4,
.regions = { //查看芯片手册设置擦除块
ERASEINFO(0x10000, 31),
ERASEINFO(0x08000, 1),
ERASEINFO(0x02000, 2),
ERASEINFO(0x04000, 1),
}
但是,在u-boot-1.1.6_jz2440_burn_nor_with_nand_uboot.patch这个补丁中,是这样的
{
.mfr_id = MANUFACTURER_MACRONIX,
.dev_id = MX29LV160B,
.name = "MXIC MX29LV160B",
.uaddr = {
[0] = MTD_UADDR_0x0AAA_0x0555, /* x8 */
[1] = MTD_UADDR_0x0555_0x02AA, /* x16 */
},
.DevSize = SIZE_2MiB,
.CmdSet = P_ID_AMD_STD,
.NumEraseRegions= 4,
.regions = {
ERASEINFO(0x04000,1),
ERASEINFO(0x02000,2),
ERASEINFO(0x08000,1),
ERASEINFO(0x10000,31)
}
},
说明对flash的配置不同,
于是,我修改成这样
{
.mfr_id = (u16)MX_MANUFACT,
.dev_id = MX29LV160D,
.name = "MXIC MX29LV160D",
.uaddr = {
[0] = MTD_UADDR_0x0AAA_0x0555, /* x8 */
[1] = MTD_UADDR_0x0555_0x02AA, /* x16 */
},
.DevSize = SIZE_2MiB,
.CmdSet = P_ID_AMD_STD,
.NumEraseRegions= 4,
.regions = {
ERASEINFO(0x04000,1),
ERASEINFO(0x02000,2),
ERASEINFO(0x08000,1),
ERASEINFO(0x10000,31)
}
},
然后,编译,下载程序到JZ2440V3的norflash中,执行
nand read.jffs2 30000000 0 40000; protect off all; erase 0 3ffff; cp.b 30000000 0 40000
成功将nand flash 中的uboot拷贝至norflash
举报