天天看點

OK6410(256MRAM2Gnandflash) uboot2010.03移植筆記之error小結

1.

[email protected]:/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

#define DMC1_CHIP0_CFG 0x150F8

修改成如下:

#define DMC1_MEM_CFG 0x0001001a

#define DMC1_CHIP0_CFG 0x150F0

在 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;

改成:

u_int32_t

offset;

.在 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;    

    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},

繼續閱讀