OK6410(256MRAM2Gnandflash) uboot2010.03移植笔记之error小结

来源:互联网 发布:云计算架构与实践 pdf 编辑:程序博客网 时间:2024/05/17 22:17

1.

root@ubuntu:/file/uboot201003# make
Generating include/autoconf.mk
Generating include/autoconf.mk.dep
for dir in tools examples/standalone examples/api cpu/arm1176 /file/uboot201003/board/samsung/smdk6410/ ; do \
   make -C $dir _depend ; done
make[1]: 正在进入目录 `/file/uboot201003/tools'
make[1]: 没有什么可以做的为 `_depend'。
make[1]:正在离开目录 `/file/uboot201003/tools'
make[1]: 正在进入目录 `/file/uboot201003/examples/standalone'
make[1]: 没有什么可以做的为 `_depend'。
make[1]:正在离开目录 `/file/uboot201003/examples/standalone'
make[1]: 正在进入目录 `/file/uboot201003/examples/api'
make[1]: 没有什么可以做的为 `_depend'。
make[1]:正在离开目录 `/file/uboot201003/examples/api'
make[1]: 正在进入目录 `/file/uboot201003/cpu/arm1176'
make[1]: 没有什么可以做的为 `_depend'。
make[1]:正在离开目录 `/file/uboot201003/cpu/arm1176'
make[1]: 正在进入目录 `/file/uboot201003/board/samsung/smdk6410'
make[1]: *** 没有规则可以创建“_depend”需要的目标“.depend”。 停止。
make[1]:正在离开目录 `/file/uboot201003/board/samsung/smdk6410'
make: *** [depend] 错误 2

原因很清楚,没把所有6400都改成6410,对于这里我没把samsung目录下smdk6410下的smdk6400.c改成smdk6410.c,所以造成依赖错误。总之注意检查自己有没有把全部6400换成6410

2.sav命令不能保存环境变量的办法

将 s3c6410.h 中的:
#define DMC1_MEM_CFG 0x00010012
/* burst 4, 13-bit row, 10-bit col */

#define DMC1_CHIP0_CFG 0x150F8
/* 0x5000_0000~0x57ff_ffff (128 MiB) */
修改成如下:
#define DMC1_MEM_CFG 0x0001001a /* burst 4, 14-bit row, 10-bit col */

#define DMC1_CHIP0_CFG 0x150F0 /* 0x5000_0000~0x5fff_ffff (128 MiB) */
在 include/linux/mtd/mtd.h:
将结构体 struct erase_info{}中的
//uint64_t addr;
//uint64_t len;
//uint64_t fail_addr;
改成:
u_int32_t addr;
u_int32_t len;
u_int32_t fail_addr;
将结构体 struct mtd_erase_region_info{}中的
//uint64_t offset;
/* At which this region starts, from the beginning of the MTD */
改成:
u_int32_t
offset;
/* At which this region starts, from the beginning of the MTD */
.在 common/env_nand.c中          int env_init(void):
if (!crc1_ok && !crc2_ok) {
gd->env_addr = 0;
gd->env_valid = 0;
return 0;
} else if (crc1_ok && !crc2_ok) {
gd->env_valid = 1;
}
改成:
if (!crc1_ok && !crc2_ok) {
//gd->env_addr = 0;
//gd->env_valid = 0;
gd->env_valid = 1;
return 0;
} else if (crc1_ok && !crc2_ok) {
gd->env_valid = 1;
}

3.为解决raise:signal #8 caught

找到u-boot-2010.03\cpu\arm1176\s3c64xx文件夹下的timer.c这个文件

 注释掉函数do_div(res,(timer_load_val/(100*CONFIG_SYS_HZ)))

4.nandflash不能完全识别

修改/u-boot-2010.03/include/linux/mtd/mtd.h

struct mtd_info {
    u_char type;
    u_int32_t flags;
    uint32_t size;     /* Total size of the MTD */
    u_int32_t writesize;
    u_char rw_oob;
    u_char skipfirstblk;



和/u-boot-2010.03/drivers/mtd/nand/nand_ids.c

    {"NAND 2GiB 1,8V 8-bit",    0xA5, 0, 2048, 0, LP_OPTIONS},
    {"NAND 2GiB 3,3V 8-bit",    0xD5, 4096, 2048, 512*1024, LP_OPTIONS},

 

 


 


 


 


 
 
 
原创粉丝点击