1, 解决启动时的错误
Warning - bad CRC, using default environment
搜索发现 在 /tools/env/fw_env.c 中
/* 放在NAND FLASH 中 大小 128K 开始地址 */
#define CONFIG_ENV_IS_IN_NAND
#define CONFIG_SYS_ENV_SECT_SIZE (128 << 10)
#define CONFIG_ENV_OFFSET (256<<10)
#define CONFIG_ENV_SIZE CONFIG_SYS_ENV_SECT_SIZE

2, 添加 MTD
#define CONFIG_CMD_MTDPARTS /* Enable MTD parts commands */
#define CONFIG_MTD_DEVICE /* needed for mtdparts commands */
#define MTDIDS_DEFAULT "nand0=nand"
#define MTDPARTS_DEFAULT "mtdparts=nand:256k(uboot),"\
"128k(env),"\
"2m(kernel),-(fs)"

在 /common/board_r.c
man_loop 中添加
run_command("mtdparts default", 0);

擦除 nand flash
nand erase.part uboot
nand write 0x30000000 uboot

3, 下载试验

nfs 0x30000000 192.168.1.10:/nfs/fs.yaffs2
nand erase.part fs
nand write.yaffs 0x30000000 0x00260000 0x8607c0 (文件大小)
set bootargs noinitrd root=/dev/mtdblock3 init=/linuxrc console=ttySAC0
boot 启动

写入出错
Unknown nand command suffix '.yaffs2'

4, 支持 yaffs2

在 smdk2440.h 发现有个,配置后 #define CONFIG_YAFFS2

编译后,大了很多,有 335K ,菜单多了几个功能
yls - yaffs ls
ymkdir - YAFFS mkdir
ymount - mount yaffs
ymv - YAFFS mv
yrd - read file from yaffs
yrdm - read file to memory from yaffs
yrm - YAFFS rm
yrmdir - YAFFS rmdir
ytrace - show/set yaffs trace mask
yumount - unmount yaffs
ywr - write file to yaffs
ywrm - write file from memory to yaffs

试着挂载,失败,文档也没有找到,导致 u-boot 也非常大,换一种方法。

之前可以使用 #define CONFIG_CMD_NAND_YAFFS
对比了 u-boot 2013 2014 2015 都有这个功能, 但从 2015-10 移除了
参考u-boot 2015修改代码添加支持
/* 添加兼容 yaffs2 烧写支持 */
/include/configs/smdk2440.h
#define CONFIG_CMD_NAND_YAFFS
/cmd/nand.c
在543line:
if (strncmp(cmd, "read", 4) == 0 || strncmp(cmd, "write", 5) == 0) {
里面添加 622line:
#ifdef CONFIG_CMD_NAND_YAFFS
} else if (!strcmp(s, ".yaffs")) {
if (read) {
printf("Unknown nand command suffix '%s'.\n", s);
return 1;
}
ret = nand_write_skip_bad(nand, off, &rwsize, NULL,
maxsize, (u_char *)addr,
WITH_YAFFS_OOB);
#endif

/include/nand.h 101line: 添加
#define WITH_YAFFS_OOB (1 << 0) /* whether write with yaffs format. This flag * is a 'mode' meaning it cannot be mixed with * other flags */

/drivers/mtd/nand/nand_util.c 583line:
#ifdef CONFIG_CMD_NAND_YAFFS
if (flags & WITH_YAFFS_OOB) {
if (flags & ~WITH_YAFFS_OOB)
return -EINVAL;

int pages;
pages = nand->erasesize / nand->writesize;
blocksize = (pages * nand->oobsize) + nand->erasesize;
if (*length % (nand->writesize + nand->oobsize)) {
printf("Attempt to write incomplete page"
" in yaffs mode\n");
return -EINVAL;
}
} else
#endif

666line:
#ifdef CONFIG_CMD_NAND_YAFFS
if (flags & WITH_YAFFS_OOB) {
int page, pages;
size_t pagesize = nand->writesize;
size_t pagesize_oob = pagesize + nand->oobsize;
struct mtd_oob_ops ops;

ops.len = pagesize;
ops.ooblen = nand->oobsize;
ops.mode = MTD_OPS_AUTO_OOB;
ops.ooboffs = 0;

pages = write_size / pagesize_oob;
for (page = 0; page < pages; page++) {
WATCHDOG_RESET();

ops.datbuf = p_buffer;
ops.oobbuf = ops.datbuf + pagesize;

rval = mtd_write_oob(nand, offset, &ops);
if (rval != 0)
break;

offset += pagesize;
p_buffer += pagesize_oob;
}
}
else
#endif
{
这里要包含下面的部分。 最后 u-boot 改完后,会有大补丁。大家可以下载比较。
..............
}
编译后,252K
重新烧写出错
NAND write to offset 2a1000 failed -22 0 bytes written: ERROR
ops.mode = MTD_OPS_RAW; 这里也要改。

最终 完成了, 可以烧写 yaffs2 , 也能使用 NAND FLASH NOR FLASH ,网卡, u-boot 差不多结束了。

2016.03.u-boot 补丁

  1. diff -urN u-boot-2016.03/arch/arm/cpu/arm920t/init.c u-boot-.03ok/arch/arm/cpu/arm920t/init.c
  2. --- u-boot-2016.03/arch/arm/cpu/arm920t/init.c -- ::00.000000000 +
  3. +++ u-boot-.03ok/arch/arm/cpu/arm920t/init.c -- ::00.645377559 +
  4. @@ -, +, @@
  5. +/* NAND FLASH控制器 */
  6. +#define NFCONF (*((volatile unsigned long *)0x4E000000))
  7. +#define NFCONT (*((volatile unsigned long *)0x4E000004))
  8. +#define NFCMMD (*((volatile unsigned char *)0x4E000008))
  9. +#define NFADDR (*((volatile unsigned char *)0x4E00000C))
  10. +#define NFDATA (*((volatile unsigned char *)0x4E000010))
  11. +#define NFSTAT (*((volatile unsigned char *)0x4E000020))
  12. +
  13. +/* CLK */
  14. +#define CLKDIVN (*(volatile unsigned long *)0x4C000014)
  15. +#define MPLLCON (*(volatile unsigned long *)0x4C000004)
  16. +
  17. +/* SDRAM */
  18. +#define BWSCON (*(volatile unsigned long *)0x48000000)
  19. +#define BANKCON4 (*(volatile unsigned long *)0x48000014)
  20. +#define BANKCON6 (*(volatile unsigned long *)0x4800001c)
  21. +#define REFRESH (*(volatile unsigned long *)0x48000024)
  22. +#define BANKSIZE (*(volatile unsigned long *)0x48000028)
  23. +#define MRSRB6 (*(volatile unsigned long *)0x4800002c)
  24. +
  25. +void init_clock(void)
  26. +{
  27. + //Mpll = 400M
  28. + MPLLCON = (0x5c<<) | (<<) | ;
  29. + //FCLK 400M HCLK 100M PCLK 50M
  30. + CLKDIVN = << | <<;
  31. + __asm__(
  32. + "mrc p15,0,r0,c1,c0,0\n"
  33. + "orr r0,r0,#0xc0000000\n"
  34. + "mcr p15,0,r0,c1,c0,0\n"
  35. + );
  36. +}
  37. +
  38. +void init_sdram(void)
  39. +{
  40. + #if 0
  41. + BWSCON = <<;
  42. + BANKCON6 = << | << | ;
  43. + REFRESH = (<<) + ;
  44. + BANKSIZE = << | << | ;
  45. + MRSRB6 = 0x30;
  46. + #else
  47. + BWSCON = << | <<;
  48. + BANKCON4 = 0x00000740;
  49. + BANKCON6 = << | << | ;
  50. + REFRESH = (<<) + ;
  51. + BANKSIZE = << | << | ;
  52. + MRSRB6 = 0x30;
  53. + #endif
  54. +}
  55. +
  56. +void clear_bss(void)
  57. +{
  58. + extern int __bss_start, __bss_end;
  59. + int *p = &__bss_start;
  60. +
  61. + for (; p < &__bss_end; p++)
  62. + {
  63. + *p = ;
  64. + }
  65. +}
  66. +
  67. +static void nand_latency(void)
  68. +{
  69. + int i=;
  70. + while(i--);
  71. +}
  72. +
  73. +static void nand_is_ready(void)
  74. +{
  75. + //bit 0 : 1 不忙了
  76. + while(! (NFSTAT & ));
  77. +}
  78. +
  79. +static void nand_write_addr(unsigned int addr)
  80. +{
  81. + int col, page;
  82. + col = addr % ;
  83. + page = addr / ;
  84. +
  85. + NFADDR = col & 0xff; /* Column Address A0~A7 */
  86. + nand_latency();
  87. + NFADDR = (col >> ) & 0x0f; /* Column Address A8~A11 */
  88. + nand_latency();
  89. + NFADDR = page & 0xff; /* Row Address A12~A19 */
  90. + nand_latency();
  91. + NFADDR = (page >> ) & 0xff; /* Row Address A20~A27 */
  92. + nand_latency();
  93. + NFADDR = (page >> ) & 0x03; /* Row Address A28~A29 */
  94. + nand_latency();
  95. +}
  96. +
  97. +static unsigned char nand_read_char(void)
  98. +{
  99. + //只保留8个bit
  100. + return NFDATA & 0xff;
  101. +}
  102. +
  103. +static void nand_cmd(unsigned char cmd)
  104. +{
  105. + NFCMMD = cmd;
  106. + nand_latency();
  107. +}
  108. +
  109. +static void nand_select_chip(void)
  110. +{
  111. + //1bit : 0 选中
  112. + NFCONT &= ~(<<);
  113. +}
  114. +
  115. +static void nand_deselect_chip(void)
  116. +{
  117. + //1bit : 1 选中
  118. + NFCONT |= (<<);
  119. +}
  120. +
  121. +static void nand_reset(void)
  122. +{
  123. + nand_select_chip();
  124. + nand_cmd(0xff);
  125. + nand_deselect_chip();
  126. +}
  127. +
  128. +void nand_init_ll(void)
  129. +{
  130. + //TACLS 3.3v 时 12ns
  131. + #define TACLS 0
  132. + //12ns
  133. + #define TWRPH0 1
  134. + //5ns
  135. + #define TWRPH1 0
  136. + NFCONF = TACLS<< | TWRPH0<< | TWRPH1<<;
  137. + /* 4 ECC
  138. + * 1 CE 先不选中,用的时候在选中
  139. + * 0 启动 flash controller
  140. + */
  141. + NFCONT = << | << | ;
  142. + nand_reset();
  143. +}
  144. +
  145. +static void nand_read(unsigned int addr, unsigned char *buf, int len)
  146. +{
  147. + //选中
  148. + nand_select_chip();
  149. + //j 地址可能不是从0对齐开始读的
  150. + unsigned int i = addr,j = addr % ;
  151. + for(; i<(addr + len);)
  152. + {
  153. + //读命令
  154. + nand_cmd(0x00);
  155. + nand_is_ready();
  156. +
  157. + //发送地址
  158. + nand_write_addr(i);
  159. + nand_is_ready();
  160. +
  161. + //在次发出读命令
  162. + nand_cmd(0x30);
  163. + nand_is_ready();
  164. + //读2K
  165. + for(; j<; j++)
  166. + {
  167. + *buf = nand_read_char();
  168. + buf++;
  169. + i++;
  170. + }
  171. + j=;
  172. + nand_latency();
  173. + }
  174. + //取消选中
  175. + nand_deselect_chip();
  176. +}
  177. +
  178. +static int boot_is_nor()
  179. +{
  180. + //利用 NOR 不能写的特点判断
  181. + volatile unsigned int *p = (volatile unsigned int *);
  182. + unsigned int val;
  183. + val = *p;
  184. + *p = 0x12345678;
  185. + if(0x12345678 == *p)
  186. + {
  187. + *p = val;
  188. + return ;
  189. + }
  190. + return ;
  191. +}
  192. +
  193. +//片内4K 的程序要复制到链接SDRAM中去
  194. +void copy_code_to_sdram(unsigned char *src,unsigned char *dst,int len)
  195. +{
  196. + int i = ;
  197. + if(boot_is_nor())
  198. + {
  199. + while(i < len)
  200. + {
  201. + dst[i] = src[i];
  202. + i++;
  203. + }
  204. + }
  205. + else
  206. + {
  207. + nand_read((int)src, dst, len);
  208. + }
  209. +}
  210. +
  211. diff -urN u-boot-2016.03/arch/arm/cpu/arm920t/Makefile u-boot-.03ok/arch/arm/cpu/arm920t/Makefile
  212. --- u-boot-2016.03/arch/arm/cpu/arm920t/Makefile -- ::21.000000000 +
  213. +++ u-boot-.03ok/arch/arm/cpu/arm920t/Makefile -- ::31.767626866 +
  214. @@ -, +, @@
  215. extra-y = start.o
  216.  
  217. obj-y += cpu.o
  218. +obj-y += init.o
  219. obj-$(CONFIG_USE_IRQ) += interrupts.o
  220.  
  221. obj-$(CONFIG_EP93XX) += ep93xx/
  222. diff -urN u-boot-2016.03/arch/arm/cpu/arm920t/start.S u-boot-.03ok/arch/arm/cpu/arm920t/start.S
  223. --- u-boot-2016.03/arch/arm/cpu/arm920t/start.S -- ::21.000000000 +
  224. +++ u-boot-.03ok/arch/arm/cpu/arm920t/start.S -- ::31.782641369 +
  225. @@ -, +, @@
  226.  
  227. /* FCLK:HCLK:PCLK = 1:2:4 */
  228. /* default FCLK is 120 MHz ! */
  229. - ldr r0, =CLKDIVN
  230. - mov r1, #
  231. - str r1, [r0]
  232. + //ldr r0, =CLKDIVN
  233. + //mov r1, #3
  234. + //str r1, [r0]
  235. +
  236. + /* 设置分频参数 */
  237. + ldr r0, =CLKDIVN
  238. + mov r1, #0x05; /* FCLK:HCLK:PCLK=1:4:8 */
  239. + str r1, [r0]
  240. +
  241. + /* 如果HDIVN非0,CPU的总线模式应该从“fast bus mode”变为“asynchronous bus mode” */
  242. + mrc p15, , r1, c1, c0, /* 读出控制寄存器 */
  243. + orr r1, r1, #0xc0000000 /* 设置为“asynchronous bus mode” */
  244. + mcr p15, , r1, c1, c0, /* 写入控制寄存器 */
  245. +
  246. + /* 配置时钟 */
  247. + #define S3C2440_MPLL_400MHZ ((0x5c<<12)|(0x01<<4)|(0x01))
  248. + ldr r0, =0x4c000004
  249. + ldr r1, =S3C2440_MPLL_400MHZ
  250. + str r1, [r0]
  251. +
  252. #endif /* CONFIG_S3C24X0 */
  253.  
  254. + /**
  255. + * 调用 init.c 中的初始化
  256. + * 因为已经初始化好内存 所以 sp 在 顶部
  257. + * 在 NOR 时不能用片内 4K
  258. + */
  259. + ldr sp, =
  260. + bl init_sdram
  261. + ldr sp, =0x34000000
  262. + bl nand_init_ll
  263. + /**
  264. + * 从 0 地址开始复制 到 SDRAM 中
  265. + * 在 smdk2440.h 中定义 #define CONFIG_SYS_TEXT_BASE
  266. + * u-boot 的加载地址
  267. + */
  268. + mov r0,#
  269. + ldr r1, =CONFIG_SYS_TEXT_BASE
  270. + ldr r2, =__bss_start
  271. + sub r2, r2, r1
  272. + bl copy_code_to_sdram
  273. + bl clear_bss
  274. + ldr pc, =_main
  275. +
  276. /*
  277. * we do sys-critical inits only at reboot,
  278. * not when booting from ram!
  279. @@ -95,8 +134,6 @@
  280. bl cpu_init_crit
  281. #endif
  282.  
  283. - bl _main
  284. -
  285. /*------------------------------------------------------------------------------*/
  286.  
  287. .globl c_runtime_cpu_setup
  288. diff -urN u-boot-2016.03/arch/arm/cpu/u-boot.lds u-boot-.03ok/arch/arm/cpu/u-boot.lds
  289. --- u-boot-2016.03/arch/arm/cpu/u-boot.lds -- ::21.000000000 +
  290. +++ u-boot-.03ok/arch/arm/cpu/u-boot.lds -- ::12.338040880 +
  291. @@ -, +, @@
  292. */
  293. /DISCARD/ : { *(.rel._secure*) }
  294. #endif
  295. - . = 0x00000000;
  296. + . = ;
  297.  
  298. . = ALIGN();
  299. .text :
  300. diff -urN u-boot-2016.03/arch/arm/Kconfig u-boot-.03ok/arch/arm/Kconfig
  301. --- u-boot-2016.03/arch/arm/Kconfig -- ::21.000000000 +
  302. +++ u-boot-.03ok/arch/arm/Kconfig -- ::52.118143749 +
  303. @@ -, +, @@
  304. config TARGET_SMDK2410
  305. bool "Support smdk2410"
  306. select CPU_ARM920T
  307. +
  308. +config TARGET_SMDK2440
  309. + bool "Support smdk2440"
  310. + select CPU_ARM920T
  311.  
  312. config TARGET_ASPENITE
  313. bool "Support aspenite"
  314. @@ -, +, @@
  315. source "board/phytec/pcm052/Kconfig"
  316. source "board/ppcag/bg0900/Kconfig"
  317. source "board/samsung/smdk2410/Kconfig"
  318. +source "board/samsung/smdk2440/Kconfig"
  319. source "board/sandisk/sansa_fuze_plus/Kconfig"
  320. source "board/schulercontrol/sc_sps_1/Kconfig"
  321. source "board/siemens/draco/Kconfig"
  322. diff -urN u-boot-2016.03/arch/arm/lib/crt0.S u-boot-.03ok/arch/arm/lib/crt0.S
  323. --- u-boot-2016.03/arch/arm/lib/crt0.S -- ::21.000000000 +
  324. +++ u-boot-.03ok/arch/arm/lib/crt0.S -- ::44.287690421 +
  325. @@ -, +, @@
  326. * relocate_code(addr_moni). Trick here is that we'll return
  327. * 'here' but relocated.
  328. */
  329. -
  330. ldr sp, [r9, #GD_START_ADDR_SP] /* sp = gd->start_addr_sp */
  331. #if defined(CONFIG_CPU_V7M) /* v7M forbids using SP as BIC destination */
  332. mov r3, sp
  333. @@ -, +, @@
  334.  
  335. bl c_runtime_cpu_setup /* we still call old routine here */
  336. #endif
  337. +
  338. +
  339. #if !defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_FRAMEWORK)
  340. -# ifdef CONFIG_SPL_BUILD
  341. +#ifdef CONFIG_SPL_BUILD
  342. /* Use a DRAM stack for the rest of SPL, if requested */
  343. bl spl_relocate_stack_gd
  344. cmp r0, #
  345. movne sp, r0
  346. movne r9, r0
  347. -# endif
  348. +#endif
  349. +
  350. ldr r0, =__bss_start /* this is auto-relocated! */
  351.  
  352. #ifdef CONFIG_USE_ARCH_MEMSET
  353. @@ -, +, @@
  354. #endif
  355.  
  356. ENDPROC(_main)
  357. +
  358. diff -urN u-boot-2016.03/arch/arm/lib/relocate.S u-boot-.03ok/arch/arm/lib/relocate.S
  359. --- u-boot-2016.03/arch/arm/lib/relocate.S -- ::21.000000000 +
  360. +++ u-boot-.03ok/arch/arm/lib/relocate.S -- ::48.481661370 +
  361. @@ -, +, @@
  362.  
  363. ENTRY(relocate_vectors)
  364.  
  365. +
  366. #ifdef CONFIG_CPU_V7M
  367. /*
  368. * On ARMv7-M we only have to write the new vector address
  369. diff -urN u-boot-2016.03/board/samsung/smdk2440/Kconfig u-boot-2016.03ok/board/samsung/smdk2440/Kconfig
  370. --- u-boot-2016.03/board/samsung/smdk2440/Kconfig 1970-01-01 07:00:00.000000000 +0700
  371. +++ u-boot-2016.03ok/board/samsung/smdk2440/Kconfig 2016-05-18 15:00:45.794906725 +0800
  372. @@ -0,0 +1,15 @@
  373. +if TARGET_SMDK2440
  374. +
  375. +config SYS_BOARD
  376. + default "smdk2440"
  377. +
  378. +config SYS_VENDOR
  379. + default "samsung"
  380. +
  381. +config SYS_SOC
  382. + default "s3c24x0"
  383. +
  384. +config SYS_CONFIG_NAME
  385. + default "smdk2440"
  386. +
  387. +endif
  388. diff -urN u-boot-2016.03/board/samsung/smdk2440/lowlevel_init.S u-boot-2016.03ok/board/samsung/smdk2440/lowlevel_init.S
  389. --- u-boot-2016.03/board/samsung/smdk2440/lowlevel_init.S 1970-01-01 07:00:00.000000000 +0700
  390. +++ u-boot-2016.03ok/board/samsung/smdk2440/lowlevel_init.S 2016-05-18 15:00:45.654313065 +0800
  391. @@ -0,0 +1,147 @@
  392. +/*
  393. + * Memory Setup stuff - taken from blob memsetup.S
  394. + *
  395. + * Copyright (C) 1999 2000 2001 Erik Mouw (J.A.K.Mouw@its.tudelft.nl) and
  396. + * Jan-Derk Bakker (J.D.Bakker@its.tudelft.nl)
  397. + *
  398. + * Modified for the Samsung SMDK2410 by
  399. + * (C) Copyright 2002
  400. + * David Mueller, ELSOFT AG, <d.mueller@elsoft.ch>
  401. + *
  402. + * SPDX-License-Identifier: GPL-2.0+
  403. + */
  404. +
  405. +
  406. +#include <config.h>
  407. +
  408. +/* some parameters for the board */
  409. +
  410. +/*
  411. + *
  412. + * Taken from linux/arch/arm/boot/compressed/head-s3c2410.S
  413. + *
  414. + * Copyright (C) 2002 Samsung Electronics SW.LEE <hitchcar@sec.samsung.com>
  415. + *
  416. + */
  417. +
  418. +#define BWSCON 0x48000000
  419. +
  420. +/* BWSCON */
  421. +#define DW8 (0x0)
  422. +#define DW16 (0x1)
  423. +#define DW32 (0x2)
  424. +#define WAIT (0x1<<2)
  425. +#define UBLB (0x1<<3)
  426. +
  427. +#define B1_BWSCON (DW32)
  428. +#define B2_BWSCON (DW16)
  429. +#define B3_BWSCON (DW16 + WAIT + UBLB)
  430. +#define B4_BWSCON (DW16)
  431. +#define B5_BWSCON (DW16)
  432. +#define B6_BWSCON (DW32)
  433. +#define B7_BWSCON (DW32)
  434. +
  435. +/* BANK0CON */
  436. +#define B0_Tacs 0x0 /* 0clk */
  437. +#define B0_Tcos 0x0 /* 0clk */
  438. +#define B0_Tacc 0x7 /* 14clk */
  439. +#define B0_Tcoh 0x0 /* 0clk */
  440. +#define B0_Tah 0x0 /* 0clk */
  441. +#define B0_Tacp 0x0
  442. +#define B0_PMC 0x0 /* normal */
  443. +
  444. +/* BANK1CON */
  445. +#define B1_Tacs 0x0 /* 0clk */
  446. +#define B1_Tcos 0x0 /* 0clk */
  447. +#define B1_Tacc 0x7 /* 14clk */
  448. +#define B1_Tcoh 0x0 /* 0clk */
  449. +#define B1_Tah 0x0 /* 0clk */
  450. +#define B1_Tacp 0x0
  451. +#define B1_PMC 0x0
  452. +
  453. +#define B2_Tacs 0x0
  454. +#define B2_Tcos 0x0
  455. +#define B2_Tacc 0x7
  456. +#define B2_Tcoh 0x0
  457. +#define B2_Tah 0x0
  458. +#define B2_Tacp 0x0
  459. +#define B2_PMC 0x0
  460. +
  461. +#define B3_Tacs 0x0 /* 0clk */
  462. +#define B3_Tcos 0x3 /* 4clk */
  463. +#define B3_Tacc 0x7 /* 14clk */
  464. +#define B3_Tcoh 0x1 /* 1clk */
  465. +#define B3_Tah 0x0 /* 0clk */
  466. +#define B3_Tacp 0x3 /* 6clk */
  467. +#define B3_PMC 0x0 /* normal */
  468. +
  469. +#define B4_Tacs 0x0 /* 0clk */
  470. +#define B4_Tcos 0x0 /* 0clk */
  471. +#define B4_Tacc 0x7 /* 14clk */
  472. +#define B4_Tcoh 0x0 /* 0clk */
  473. +#define B4_Tah 0x0 /* 0clk */
  474. +#define B4_Tacp 0x0
  475. +#define B4_PMC 0x0 /* normal */
  476. +
  477. +#define B5_Tacs 0x0 /* 0clk */
  478. +#define B5_Tcos 0x0 /* 0clk */
  479. +#define B5_Tacc 0x7 /* 14clk */
  480. +#define B5_Tcoh 0x0 /* 0clk */
  481. +#define B5_Tah 0x0 /* 0clk */
  482. +#define B5_Tacp 0x0
  483. +#define B5_PMC 0x0 /* normal */
  484. +
  485. +#define B6_MT 0x3 /* SDRAM */
  486. +#define B6_Trcd 0x1
  487. +#define B6_SCAN 0x1 /* 9bit */
  488. +
  489. +#define B7_MT 0x3 /* SDRAM */
  490. +#define B7_Trcd 0x1 /* 3clk */
  491. +#define B7_SCAN 0x1 /* 9bit */
  492. +
  493. +/* REFRESH parameter */
  494. +#define REFEN 0x1 /* Refresh enable */
  495. +#define TREFMD 0x0 /* CBR(CAS before RAS)/Auto refresh */
  496. +#define Trp 0x0 /* 2clk */
  497. +#define Trc 0x3 /* 7clk */
  498. +#define Tchr 0x2 /* 3clk */
  499. +#define REFCNT 1113 /* period=15.6us, HCLK=60Mhz, (2048+1-15.6*60) */
  500. +/**************************************/
  501. +
  502. +.globl lowlevel_init
  503. +lowlevel_init:
  504. + /* memory control configuration */
  505. + /* make r0 relative the current location so that it */
  506. + /* reads SMRDATA out of FLASH rather than memory ! */
  507. + ldr r0, =SMRDATA
  508. + ldr r1, =CONFIG_SYS_TEXT_BASE
  509. + sub r0, r0, r1
  510. + ldr r1, =BWSCON /* Bus Width Status Controller */
  511. + add r2, r0, #*
  512. +:
  513. + ldr r3, [r0], #
  514. + str r3, [r1], #
  515. + cmp r2, r0
  516. + bne 0b
  517. +
  518. + /* everything is fine now */
  519. + mov pc, lr
  520. +
  521. + .ltorg
  522. +/* the literal pools origin */
  523. +
  524. +SMRDATA:
  525. + .long 0x22011110 //BWSCON
  526. + .long 0x00000700 //BANKCON0
  527. + .long 0x00000700 //BANKCON1
  528. + .long 0x00000700 //BANKCON2
  529. + .long 0x00000700 //BANKCON3
  530. + .long 0x00000740 //BANKCON4
  531. + .long 0x00000700 //BANKCON5
  532. + .long 0x00018005 //BANKCON6
  533. + .long 0x00018005 //BANKCON7
  534. + .long 0x008C04F4 // REFRESH
  535. + .long 0x000000B1 //BANKSIZE
  536. + .long 0x00000030 //MRSRB6
  537. + .long 0x00000030 //MRSRB7
  538. +
  539. diff -urN u-boot-2016.03/board/samsung/smdk2440/MAINTAINERS u-boot-.03ok/board/samsung/smdk2440/MAINTAINERS
  540. --- u-boot-2016.03/board/samsung/smdk2440/MAINTAINERS -- ::00.000000000 +
  541. +++ u-boot-.03ok/board/samsung/smdk2440/MAINTAINERS -- ::45.729857753 +
  542. @@ -, +, @@
  543. +SMDK2440 BOARD
  544. +M: David M眉ller <d.mueller@elsoft.ch>
  545. +S: Maintained
  546. +F: board/samsung/smdk2440/
  547. +F: include/configs/smdk2440.h
  548. +F: configs/smdk2440_defconfig
  549. diff -urN u-boot-2016.03/board/samsung/smdk2440/Makefile u-boot-.03ok/board/samsung/smdk2440/Makefile
  550. --- u-boot-2016.03/board/samsung/smdk2440/Makefile -- ::00.000000000 +
  551. +++ u-boot-.03ok/board/samsung/smdk2440/Makefile -- ::45.849850303 +
  552. @@ -, +, @@
  553. +#
  554. +# (C) Copyright -
  555. +# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  556. +#
  557. +# SPDX-License-Identifier: GPL-2.0+
  558. +#
  559. +
  560. +obj-y := smdk2440.o
  561. +obj-y += lowlevel_init.o
  562. diff -urN u-boot-2016.03/board/samsung/smdk2440/smdk2440.c u-boot-.03ok/board/samsung/smdk2440/smdk2440.c
  563. --- u-boot-2016.03/board/samsung/smdk2440/smdk2440.c -- ::00.000000000 +
  564. +++ u-boot-.03ok/board/samsung/smdk2440/smdk2440.c -- ::45.625917593 +
  565. @@ -, +, @@
  566. +/*
  567. + * (C) Copyright 2002
  568. + * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
  569. + * Marius Groeger <mgroeger@sysgo.de>
  570. + *
  571. + * (C) Copyright 2002, 2010
  572. + * David Mueller, ELSOFT AG, <d.mueller@elsoft.ch>
  573. + *
  574. + * SPDX-License-Identifier: GPL-2.0+
  575. + */
  576. +
  577. +#include <common.h>
  578. +#include <netdev.h>
  579. +#include <asm/io.h>
  580. +#include <asm/arch/s3c24x0_cpu.h>
  581. +
  582. +DECLARE_GLOBAL_DATA_PTR;
  583. +
  584. +#define FCLK_SPEED 1
  585. +
  586. +#if (FCLK_SPEED == 0) /* Fout = 203MHz, Fin = 12MHz for Audio */
  587. +#define M_MDIV 0xC3
  588. +#define M_PDIV 0x4
  589. +#define M_SDIV 0x1
  590. +#elif (FCLK_SPEED == 1) /* Fout = 202.8MHz */
  591. +#define M_MDIV 0xA1
  592. +#define M_PDIV 0x3
  593. +#define M_SDIV 0x1
  594. +#endif
  595. +
  596. +#define USB_CLOCK 1
  597. +
  598. +#if (USB_CLOCK == 0)
  599. +#define U_M_MDIV 0xA1
  600. +#define U_M_PDIV 0x3
  601. +#define U_M_SDIV 0x1
  602. +#elif (USB_CLOCK == 1)
  603. +#define U_M_MDIV 0x48
  604. +#define U_M_PDIV 0x3
  605. +#define U_M_SDIV 0x2
  606. +#endif
  607. +
  608. +static inline void pll_delay(unsigned long loops)
  609. +{
  610. + __asm__ volatile ("1:\n"
  611. + "subs %0, %1, #1\n"
  612. + "bne 1b" : "=r" (loops) : "" (loops));
  613. +}
  614. +
  615. +/*
  616. + * Miscellaneous platform dependent initialisations
  617. + */
  618. +
  619. +int board_early_init_f(void)
  620. +{
  621. + struct s3c24x0_clock_power * const clk_power =
  622. + s3c24x0_get_base_clock_power();
  623. + struct s3c24x0_gpio * const gpio = s3c24x0_get_base_gpio();
  624. +
  625. + /* to reduce PLL lock time, adjust the LOCKTIME register */
  626. + writel(0xFFFFFF, &clk_power->locktime);
  627. +
  628. + /* configure MPLL */
  629. + //writel((M_MDIV << 12) + (M_PDIV << 4) + M_SDIV, &clk_power->mpllcon);
  630. +
  631. + /* some delay between MPLL and UPLL */
  632. + //pll_delay(4000);
  633. +
  634. + /* configure UPLL */
  635. + writel((U_M_MDIV << ) + (U_M_PDIV << ) + U_M_SDIV,
  636. + &clk_power->upllcon);
  637. +
  638. + /* some delay between MPLL and UPLL */
  639. + pll_delay();
  640. +
  641. + /* set up the I/O ports */
  642. + writel(0x007FFFFF, &gpio->gpacon);
  643. + writel(0x00044555, &gpio->gpbcon);
  644. + writel(0x000007FF, &gpio->gpbup);
  645. + writel(0xAAAAAAAA, &gpio->gpccon);
  646. + writel(0x0000FFFF, &gpio->gpcup);
  647. + writel(0xAAAAAAAA, &gpio->gpdcon);
  648. + writel(0x0000FFFF, &gpio->gpdup);
  649. + writel(0xAAAAAAAA, &gpio->gpecon);
  650. + writel(0x0000FFFF, &gpio->gpeup);
  651. + writel(0x000055AA, &gpio->gpfcon);
  652. + writel(0x000000FF, &gpio->gpfup);
  653. + writel(0xFF95FFBA, &gpio->gpgcon);
  654. + writel(0x0000FFFF, &gpio->gpgup);
  655. + writel(0x002AFAAA, &gpio->gphcon);
  656. + writel(0x000007FF, &gpio->gphup);
  657. +
  658. + return ;
  659. +}
  660. +
  661. +int board_init(void)
  662. +{
  663. + /* arch number of SMDK2410-Board */
  664. + gd->bd->bi_arch_number = MACH_TYPE_SMDK2410;
  665. +
  666. + /* adress of boot parameters */
  667. + gd->bd->bi_boot_params = 0x30000100;
  668. +
  669. + icache_enable();
  670. + dcache_enable();
  671. +
  672. + return ;
  673. +}
  674. +
  675. +int dram_init(void)
  676. +{
  677. + /* dram_init must store complete ramsize in gd->ram_size */
  678. + gd->ram_size = PHYS_SDRAM_1_SIZE;
  679. + return ;
  680. +}
  681. +
  682. +#ifdef CONFIG_CMD_NET
  683. +int board_eth_init(bd_t *bis)
  684. +{
  685. + int rc = ;
  686. +#ifdef CONFIG_CS8900
  687. + rc = cs8900_initialize(, CONFIG_CS8900_BASE);
  688. +#endif
  689. +
  690. +#ifdef CONFIG_DRIVER_DM9000
  691. + rc = dm9000_initialize(bis);
  692. +#endif
  693. + return rc;
  694. +}
  695. +#endif
  696. +
  697. +/*
  698. + * Hardcoded flash setup:
  699. + * Flash 0 is a non-CFI AMD AM29LV800BB flash.
  700. + */
  701. +ulong board_flash_get_legacy(ulong base, int banknum, flash_info_t *info)
  702. +{
  703. + info->portwidth = FLASH_CFI_16BIT;
  704. + info->chipwidth = FLASH_CFI_BY16;
  705. + info->interface = FLASH_CFI_X16;
  706. + return ;
  707. +}
  708. diff -urN u-boot-2016.03/cmd/nand.c u-boot-.03ok/cmd/nand.c
  709. --- u-boot-2016.03/cmd/nand.c -- ::21.000000000 +
  710. +++ u-boot-.03ok/cmd/nand.c -- ::47.371697445 +
  711. @@ -, +, @@
  712. maxsize, (u_char *)addr,
  713. WITH_DROP_FFS | WITH_WR_VERIFY);
  714. #endif
  715. +#ifdef CONFIG_CMD_NAND_YAFFS
  716. + } else if (!strcmp(s, ".yaffs")) {
  717. + if (read) {
  718. + printf("Unknown nand command suffix '%s'.\n", s);
  719. + return ;
  720. + }
  721. + ret = nand_write_skip_bad(nand, off, &rwsize, NULL,
  722. + maxsize, (u_char *)addr,
  723. + WITH_YAFFS_OOB);
  724. +#endif
  725. +
  726. +
  727. } else if (!strcmp(s, ".oob")) {
  728. /* out-of-band data */
  729. mtd_oob_ops_t ops = {
  730. diff -urN u-boot-2016.03/common/board_r.c u-boot-.03ok/common/board_r.c
  731. --- u-boot-2016.03/common/board_r.c -- ::21.000000000 +
  732. +++ u-boot-.03ok/common/board_r.c -- ::22.083443762 +
  733. @@ -, +, @@
  734. sandbox_main_loop_init();
  735. #endif
  736. /* main_loop() can return to retry autoboot, if so just run it again */
  737. + run_command("mtdparts default", );
  738. for (;;)
  739. main_loop();
  740. return ;
  741. diff -urN u-boot-2016.03/configs/smdk2440_defconfig u-boot-.03ok/configs/smdk2440_defconfig
  742. --- u-boot-2016.03/configs/smdk2440_defconfig -- ::00.000000000 +
  743. +++ u-boot-.03ok/configs/smdk2440_defconfig -- ::48.822806092 +
  744. @@ -, +, @@
  745. +CONFIG_ARM=y
  746. +CONFIG_TARGET_SMDK2440=y
  747. +CONFIG_SYS_PROMPT="SMDK2440 # "
  748. +# CONFIG_CMD_SETEXPR is not set
  749. diff -urN u-boot-2016.03/drivers/mtd/cfi_flash.c u-boot-.03ok/drivers/mtd/cfi_flash.c
  750. --- u-boot-2016.03/drivers/mtd/cfi_flash.c -- ::21.000000000 +
  751. +++ u-boot-.03ok/drivers/mtd/cfi_flash.c -- ::45.155765043 +
  752. @@ -, +, @@
  753.  
  754. /* The DEBUG define must be before common to enable debugging */
  755. /* #define DEBUG */
  756. -
  757. #include <common.h>
  758. #include <console.h>
  759. #include <dm.h>
  760. diff -urN u-boot-2016.03/drivers/mtd/jedec_flash.c u-boot-.03ok/drivers/mtd/jedec_flash.c
  761. --- u-boot-2016.03/drivers/mtd/jedec_flash.c -- ::21.000000000 +
  762. +++ u-boot-.03ok/drivers/mtd/jedec_flash.c -- ::45.174882256 +
  763. @@ -, +, @@
  764. }
  765. },
  766. #endif
  767. + {
  768. + .mfr_id = (u16)MX_MANUFACT,
  769. + .dev_id = AM29LV160DB,
  770. + .name = "MX 29LV160DB",
  771. + .uaddr = {
  772. + [] = MTD_UADDR_0x0555_0x02AA /* x16 */
  773. + },
  774. + .DevSize = SIZE_2MiB,
  775. + .CmdSet = CFI_CMDSET_AMD_LEGACY,
  776. + .NumEraseRegions= ,
  777. + .regions = {
  778. + ERASEINFO(*, ),
  779. + ERASEINFO(*, ),
  780. + ERASEINFO(*, ),
  781. + ERASEINFO(*, ),
  782. + }
  783. + },
  784. +
  785. };
  786.  
  787. static inline void fill_info(flash_info_t *info, const struct amd_flash_info *jedec_entry, ulong base)
  788. diff -urN u-boot-2016.03/drivers/mtd/nand/Makefile u-boot-.03ok/drivers/mtd/nand/Makefile
  789. --- u-boot-2016.03/drivers/mtd/nand/Makefile -- ::21.000000000 +
  790. +++ u-boot-.03ok/drivers/mtd/nand/Makefile -- ::22.449544201 +
  791. @@ -, +, @@
  792. obj-$(CONFIG_NAND_NDFC) += ndfc.o
  793. obj-$(CONFIG_NAND_PXA3XX) += pxa3xx_nand.o
  794. obj-$(CONFIG_NAND_S3C2410) += s3c2410_nand.o
  795. +obj-$(CONFIG_NAND_S3C2440) += s3c2440_nand.o
  796. obj-$(CONFIG_NAND_SPEAR) += spr_nand.o
  797. obj-$(CONFIG_TEGRA_NAND) += tegra_nand.o
  798. obj-$(CONFIG_NAND_OMAP_GPMC) += omap_gpmc.o
  799. diff -urN u-boot-2016.03/drivers/mtd/nand/nand_util.c u-boot-.03ok/drivers/mtd/nand/nand_util.c
  800. --- u-boot-2016.03/drivers/mtd/nand/nand_util.c -- ::21.000000000 +
  801. +++ u-boot-.03ok/drivers/mtd/nand/nand_util.c -- ::19.582988542 +
  802. @@ -, +, @@
  803.  
  804. if (actual)
  805. *actual = ;
  806. +#ifdef CONFIG_CMD_NAND_YAFFS
  807. + if (flags & WITH_YAFFS_OOB) {
  808. + if (flags & ~WITH_YAFFS_OOB)
  809. + return -EINVAL;
  810. +
  811. + int pages;
  812. + pages = nand->erasesize / nand->writesize;
  813. + blocksize = (pages * nand->oobsize) + nand->erasesize;
  814. + if (*length % (nand->writesize + nand->oobsize)) {
  815. + printf("Attempt to write incomplete page"
  816. + " in yaffs mode\n");
  817. + return -EINVAL;
  818. + }
  819. + } else
  820. +#endif
  821.  
  822. blocksize = nand->erasesize;
  823.  
  824. @@ -, +, @@
  825. write_size = left_to_write;
  826. else
  827. write_size = blocksize - block_offset;
  828. +#ifdef CONFIG_CMD_NAND_YAFFS
  829. + if (flags & WITH_YAFFS_OOB) {
  830. + int page, pages;
  831. + size_t pagesize = nand->writesize;
  832. + size_t pagesize_oob = pagesize + nand->oobsize;
  833. + struct mtd_oob_ops ops;
  834. +
  835. + ops.len = pagesize;
  836. + ops.ooblen = nand->oobsize;
  837. + ops.mode = MTD_OPS_RAW;
  838. + ops.ooboffs = ;
  839. +
  840. + pages = write_size / pagesize_oob;
  841. + for (page = ; page < pages; page++) {
  842. + WATCHDOG_RESET();
  843. +
  844. + ops.datbuf = p_buffer;
  845. + ops.oobbuf = ops.datbuf + pagesize;
  846. +
  847. + rval = mtd_write_oob(nand, offset, &ops);
  848. + if (rval != )
  849. + break;
  850. +
  851. + offset += pagesize;
  852. + p_buffer += pagesize_oob;
  853. + }
  854. + }
  855. + else
  856. + {
  857. +#endif
  858.  
  859. truncated_write_size = write_size;
  860. #ifdef CONFIG_CMD_NAND_TRIMFFS
  861. @@ -, +, @@
  862.  
  863. offset += write_size;
  864. p_buffer += write_size;
  865. -
  866. + }
  867. +
  868. if (rval != ) {
  869. printf("NAND write to offset %llx failed %d\n",
  870. offset, rval);
  871. diff -urN u-boot-2016.03/drivers/mtd/nand/s3c2440_nand.c u-boot-.03ok/drivers/mtd/nand/s3c2440_nand.c
  872. --- u-boot-2016.03/drivers/mtd/nand/s3c2440_nand.c -- ::00.000000000 +
  873. +++ u-boot-.03ok/drivers/mtd/nand/s3c2440_nand.c -- ::21.900454122 +
  874. @@ -, +, @@
  875. +/*
  876. + * (C) Copyright 2006 OpenMoko, Inc.
  877. + * Author: Harald Welte <laforge@openmoko.org>
  878. + *
  879. + * SPDX-License-Identifier: GPL-2.0+
  880. + */
  881. +
  882. +//#define DEBUG
  883. +#include <common.h>
  884. +
  885. +#include <nand.h>
  886. +#include <asm/arch/s3c24x0_cpu.h>
  887. +#include <asm/io.h>
  888. +
  889. +#define S3C2440_NFCONF_EN (1<<15)
  890. +#define S3C2440_NFCONF_512BYTE (1<<14)
  891. +#define S3C2440_NFCONF_4STEP (1<<13)
  892. +#define S3C2440_NFCONF_INITECC (1<<12)
  893. +#define S3C2440_NFCONF_nFCE (1<<1)
  894. +#define S3C2440_NFCONF_TACLS(x) ((x)<<12)
  895. +#define S3C2440_NFCONF_TWRPH0(x) ((x)<<8)
  896. +#define S3C2440_NFCONF_TWRPH1(x) ((x)<<4)
  897. +
  898. +#define S3C2440_ADDR_NALE 8
  899. +#define S3C2440_ADDR_NCLE 0xc
  900. +
  901. +#ifdef CONFIG_NAND_SPL
  902. +
  903. +/* in the early stage of NAND flash booting, printf() is not available */
  904. +#define printf(fmt, args...)
  905. +
  906. +static void nand_read_buf(struct mtd_info *mtd, u_char *buf, int len)
  907. +{
  908. + int i;
  909. + struct nand_chip *this = mtd->priv;
  910. +
  911. + for (i = ; i < len; i++)
  912. + buf[i] = readb(this->IO_ADDR_R);
  913. +}
  914. +#endif
  915. +
  916. +static void s3c24x0_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl)
  917. +{
  918. + struct nand_chip *chip = mtd->priv;
  919. + struct s3c24x0_nand *nand = s3c24x0_get_base_nand();
  920. +
  921. + debug("hwcontrol(): 0x%02x 0x%02x\n", cmd, ctrl);
  922. +
  923. + if (ctrl & NAND_CLE)
  924. + nand->nfcmd = cmd;
  925. + if (ctrl & NAND_ALE)
  926. + nand->nfaddr = cmd;
  927. +
  928. +}
  929. +
  930. +static void s3c2440_nand_select(struct mtd_info *mtd, int chipnr)
  931. +{
  932. + struct s3c24x0_nand *nand = s3c24x0_get_base_nand();
  933. +
  934. + switch (chipnr) {
  935. + case -: /* 取消选中 */
  936. + nand->nfcont |= (<<);
  937. + break;
  938. + case : /* 选中 */
  939. + nand->nfcont &= ~(<<);
  940. + break;
  941. +
  942. + default:
  943. + BUG();
  944. + }
  945. +}
  946. +
  947. +
  948. +static int s3c24x0_dev_ready(struct mtd_info *mtd)
  949. +{
  950. + struct s3c24x0_nand *nand = s3c24x0_get_base_nand();
  951. + debug("dev_ready\n");
  952. + return readl(&nand->nfstat) & 0x01;
  953. +}
  954. +
  955. +#ifdef CONFIG_S3C2440_NAND_HWECC
  956. +void s3c24x0_nand_enable_hwecc(struct mtd_info *mtd, int mode)
  957. +{
  958. + struct s3c24x0_nand *nand = s3c24x0_get_base_nand();
  959. + debug("s3c24x0_nand_enable_hwecc(%p, %d)\n", mtd, mode);
  960. + writel(readl(&nand->nfconf) | S3C2440_NFCONF_INITECC, &nand->nfconf);
  961. +}
  962. +
  963. +static int s3c24x0_nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat,
  964. + u_char *ecc_code)
  965. +{
  966. + struct s3c24x0_nand *nand = s3c24x0_get_base_nand();
  967. + ecc_code[] = readb(&nand->nfecc);
  968. + ecc_code[] = readb(&nand->nfecc + );
  969. + ecc_code[] = readb(&nand->nfecc + );
  970. + debug("s3c24x0_nand_calculate_hwecc(%p,): 0x%02x 0x%02x 0x%02x\n",
  971. + mtd , ecc_code[], ecc_code[], ecc_code[]);
  972. +
  973. + return ;
  974. +}
  975. +
  976. +static int s3c24x0_nand_correct_data(struct mtd_info *mtd, u_char *dat,
  977. + u_char *read_ecc, u_char *calc_ecc)
  978. +{
  979. + if (read_ecc[] == calc_ecc[] &&
  980. + read_ecc[] == calc_ecc[] &&
  981. + read_ecc[] == calc_ecc[])
  982. + return ;
  983. +
  984. + printf("s3c24x0_nand_correct_data: not implemented\n");
  985. + return -;
  986. +}
  987. +#endif
  988. +
  989. +int board_nand_init(struct nand_chip *nand)
  990. +{
  991. + u_int32_t cfg;
  992. + u_int8_t tacls, twrph0, twrph1;
  993. + struct s3c24x0_clock_power *clk_power = s3c24x0_get_base_clock_power();
  994. + struct s3c24x0_nand *nand_reg = s3c24x0_get_base_nand();
  995. +
  996. + debug("board_nand_init()\n");
  997. +
  998. + writel(readl(&clk_power->clkcon) | ( << ), &clk_power->clkcon);
  999. +
  1000. + /* initialize hardware */
  1001. +#if defined(CONFIG_S3C24XX_CUSTOM_NAND_TIMING)
  1002. + tacls = CONFIG_S3C24XX_TACLS;
  1003. + twrph0 = CONFIG_S3C24XX_TWRPH0;
  1004. + twrph1 = CONFIG_S3C24XX_TWRPH1;
  1005. +#else
  1006. + tacls = ;
  1007. + twrph0 = ;
  1008. + twrph1 = ;
  1009. +#endif
  1010. + //cfg = S3C2440_NFCONF_EN;
  1011. + cfg = S3C2440_NFCONF_TACLS(tacls - );
  1012. + cfg |= S3C2440_NFCONF_TWRPH0(twrph0 - );
  1013. + cfg |= S3C2440_NFCONF_TWRPH1(twrph1 - );
  1014. + writel(cfg, &nand_reg->nfconf);
  1015. +
  1016. + /* initialize nand_chip data structure */
  1017. + nand->IO_ADDR_R = (void *)&nand_reg->nfdata;
  1018. + nand->IO_ADDR_W = (void *)&nand_reg->nfdata;
  1019. +
  1020. + /* read_buf and write_buf are default */
  1021. + /* read_byte and write_byte are default */
  1022. +#ifdef CONFIG_NAND_SPL
  1023. + nand->read_buf = nand_read_buf;
  1024. +#endif
  1025. +
  1026. + /* hwcontrol always must be implemented */
  1027. + nand->cmd_ctrl = s3c24x0_hwcontrol;
  1028. +
  1029. + nand->dev_ready = s3c24x0_dev_ready;
  1030. +
  1031. +#ifdef CONFIG_S3C2440_NAND_HWECC
  1032. + nand->ecc.hwctl = s3c24x0_nand_enable_hwecc;
  1033. + nand->ecc.calculate = s3c24x0_nand_calculate_ecc;
  1034. + nand->ecc.correct = s3c24x0_nand_correct_data;
  1035. + nand->ecc.mode = NAND_ECC_HW;
  1036. + nand->ecc.size = CONFIG_SYS_NAND_ECCSIZE;
  1037. + nand->ecc.bytes = CONFIG_SYS_NAND_ECCBYTES;
  1038. + nand->ecc.strength = ;
  1039. +#else
  1040. + nand->ecc.mode = NAND_ECC_SOFT;
  1041. +#endif
  1042. +
  1043. +#ifdef CONFIG_S3C2440_NAND_BBT
  1044. + nand->bbt_options |= NAND_BBT_USE_FLASH;
  1045. +#endif
  1046. +
  1047. + /* 4 ECC
  1048. + * 1 CE 先不选中,用的时候在选中
  1049. + * 0 启动 flash controller
  1050. + */
  1051. + writel(<< | << | , &nand_reg->nfcont);
  1052. + nand->select_chip = s3c2440_nand_select;
  1053. +
  1054. +
  1055. + debug("end of nand_init\n");
  1056. +
  1057. + return ;
  1058. +}
  1059. +
  1060. diff -urN u-boot-2016.03/include/configs/smdk2410.h u-boot-.03ok/include/configs/smdk2410.h
  1061. --- u-boot-2016.03/include/configs/smdk2410.h -- ::21.000000000 +
  1062. +++ u-boot-.03ok/include/configs/smdk2410.h -- ::46.907513241 +
  1063. @@ -, +, @@
  1064. * (easy to change)
  1065. */
  1066. #define CONFIG_S3C24X0 /* This is a SAMSUNG S3C24x0-type SoC */
  1067. -#define CONFIG_S3C2410 /* specifically a SAMSUNG S3C2410 SoC */
  1068. +#define CONFIG_S3C2440
  1069. #define CONFIG_SMDK2410 /* on a SAMSUNG SMDK2410 Board */
  1070.  
  1071. -#define CONFIG_SYS_TEXT_BASE 0x0
  1072. +#define CONFIG_SYS_TEXT_BASE 0x33f00000
  1073.  
  1074. #define CONFIG_SYS_ARM_CACHE_WRITETHROUGH
  1075. @@ -, +, @@
  1076. /************************************************************
  1077. * USB support (currently only works with D-cache off)
  1078. ************************************************************/
  1079. -#define CONFIG_USB_OHCI
  1080. -#define CONFIG_USB_OHCI_S3C24XX
  1081. -#define CONFIG_USB_KEYBOARD
  1082. -#define CONFIG_USB_STORAGE
  1083. -#define CONFIG_DOS_PARTITION
  1084. +/*#define CONFIG_USB_OHCI */
  1085. +/*#define CONFIG_USB_OHCI_S3C24XX */
  1086. +/*#define CONFIG_USB_KEYBOARD */
  1087. +/*#define CONFIG_USB_STORAGE */
  1088. +/*#define CONFIG_DOS_PARTITION */
  1089.  
  1090. /************************************************************
  1091. * RTC
  1092. ************************************************************/
  1093. -#define CONFIG_RTC_S3C24X0
  1094. +/*#define CONFIG_RTC_S3C24X0*/
  1095.  
  1096. #define CONFIG_BAUDRATE 115200
  1097. @@ -, +, @@
  1098. /*
  1099. * BOOTP options
  1100. */
  1101. -#define CONFIG_BOOTP_BOOTFILESIZE
  1102. -#define CONFIG_BOOTP_BOOTPATH
  1103. -#define CONFIG_BOOTP_GATEWAY
  1104. -#define CONFIG_BOOTP_HOSTNAME
  1105. +/*#define CONFIG_BOOTP_BOOTFILESIZE*/
  1106. +/*#define CONFIG_BOOTP_BOOTPATH*/
  1107. +/*#define CONFIG_BOOTP_GATEWAY*/
  1108. +/*#define CONFIG_BOOTP_HOSTNAME*/
  1109.  
  1110. /*
  1111. * Command line configuration.
  1112. */
  1113. -#define CONFIG_CMD_BSP
  1114. +/*#define CONFIG_CMD_BSP*/
  1115. #define CONFIG_CMD_CACHE
  1116. -#define CONFIG_CMD_DATE
  1117. -#define CONFIG_CMD_DHCP
  1118. +/*#define CONFIG_CMD_DATE*/
  1119. +/*#define CONFIG_CMD_DHCP*/
  1120. #define CONFIG_CMD_NAND
  1121. #define CONFIG_CMD_PING
  1122. -#define CONFIG_CMD_REGINFO
  1123. -#define CONFIG_CMD_USB
  1124. +/*#define CONFIG_CMD_REGINFO*/
  1125. +/*#define CONFIG_CMD_USB*/
  1126.  
  1127. #define CONFIG_SYS_HUSH_PARSER
  1128. #define CONFIG_CMDLINE_EDITING
  1129. @@ -, +, @@
  1130. #define CONFIG_ZERO_BOOTDELAY_CHECK
  1131.  
  1132. #define CONFIG_NETMASK 255.255.255.0
  1133. -#define CONFIG_IPADDR 10.0.0.110
  1134. -#define CONFIG_SERVERIP 10.0.0.1
  1135. +#define CONFIG_IPADDR 192.168.1.88
  1136. +#define CONFIG_SERVERIP 192.168.1.1
  1137.  
  1138. #if defined(CONFIG_CMD_KGDB)
  1139. #define CONFIG_KGDB_BAUDRATE 115200 /* speed to run kgdb serial port */
  1140. @@ -, +, @@
  1141. * NAND configuration
  1142. */
  1143. #ifdef CONFIG_CMD_NAND
  1144. -#define CONFIG_NAND_S3C2410
  1145. -#define CONFIG_SYS_S3C2410_NAND_HWECC
  1146. #define CONFIG_SYS_MAX_NAND_DEVICE 1
  1147. #define CONFIG_SYS_NAND_BASE 0x4E000000
  1148. +#define CONFIG_NAND_S3C2440
  1149. +#define CONFIG_S3C24XX_CUSTOM_NAND_TIMING
  1150. +#define CONFIG_S3C24XX_TACLS 1
  1151. +#define CONFIG_S3C24XX_TWRPH0 2
  1152. +#define CONFIG_S3C24XX_TWRPH1 1
  1153. #endif
  1154.  
  1155. /*
  1156. * File system
  1157. */
  1158. -#define CONFIG_CMD_FAT
  1159. -#define CONFIG_CMD_EXT2
  1160. -#define CONFIG_CMD_UBI
  1161. -#define CONFIG_CMD_UBIFS
  1162. +/*#define CONFIG_CMD_FAT*/
  1163. +/*#define CONFIG_CMD_EXT2*/
  1164. +/*#define CONFIG_CMD_UBI*/
  1165. +/*#define CONFIG_CMD_UBIFS*/
  1166. #define CONFIG_CMD_MTDPARTS
  1167. #define CONFIG_MTD_DEVICE
  1168. #define CONFIG_MTD_PARTITIONS
  1169. #define CONFIG_YAFFS2
  1170. -#define CONFIG_RBTREE
  1171. +/*#define CONFIG_RBTREE*/
  1172.  
  1173. /* additions for new relocation code, must be added to all boards */
  1174. #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
  1175. diff -urN u-boot-2016.03/include/configs/smdk2440.h u-boot-.03ok/include/configs/smdk2440.h
  1176. --- u-boot-2016.03/include/configs/smdk2440.h -- ::00.000000000 +
  1177. +++ u-boot-.03ok/include/configs/smdk2440.h -- ::46.556075095 +
  1178. @@ -, +, @@
  1179. +/*
  1180. + * (C) Copyright 2002
  1181. + * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
  1182. + * Marius Groeger <mgroeger@sysgo.de>
  1183. + * Gary Jennejohn <garyj@denx.de>
  1184. + * David Mueller <d.mueller@elsoft.ch>
  1185. + *
  1186. + * Configuation settings for the SAMSUNG SMDK2440 board.
  1187. + *
  1188. + * SPDX-License-Identifier: GPL-2.0+
  1189. + */
  1190. +
  1191. +#ifndef __CONFIG_H
  1192. +#define __CONFIG_H
  1193. +
  1194. +/*
  1195. + * High Level Configuration Options
  1196. + * (easy to change)
  1197. + */
  1198. +#define CONFIG_S3C24X0 /* This is a SAMSUNG S3C24x0-type SoC */
  1199. +#define CONFIG_S3C2440 /* specifically a SAMSUNG S3C2440 SoC */
  1200. +#define CONFIG_SMDK2440 /* on a SAMSUNG SMDK2440 Board */
  1201. +
  1202. +#define CONFIG_SYS_TEXT_BASE 0x30a00000/*0x33f00000*/
  1203. +
  1204. +
  1205. +#define CONFIG_SYS_ARM_CACHE_WRITETHROUGH
  1206. +
  1207. +/* input clock of PLL (the SMDK2440 has 12MHz input clock) */
  1208. +#define CONFIG_SYS_CLK_FREQ 12000000
  1209. +
  1210. +#define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */
  1211. +#define CONFIG_SETUP_MEMORY_TAGS
  1212. +#define CONFIG_INITRD_TAG
  1213. +
  1214. +/* 放在NAND FLASH 中 大小 128K 开始地址 */
  1215. +#define CONFIG_ENV_IS_IN_NAND
  1216. +#define CONFIG_SYS_ENV_SECT_SIZE (128 << 10)
  1217. +#define CONFIG_ENV_OFFSET (256<<10)
  1218. +#define CONFIG_ENV_SIZE CONFIG_SYS_ENV_SECT_SIZE
  1219. +
  1220. +
  1221. +/* 添加兼容 yaffs2 烧写支持 */
  1222. +#define CONFIG_CMD_NAND_YAFFS
  1223. +#define CONFIG_CMD_MTDPARTS /* Enable MTD parts commands */
  1224. +#define CONFIG_MTD_DEVICE /* needed for mtdparts commands */
  1225. +#define MTDIDS_DEFAULT "nand0=nand"
  1226. +#define MTDPARTS_DEFAULT "mtdparts=nand:256k(bootloader),"\
  1227. + "128k(params),"\
  1228. + "2m(kernel),-(root)"
  1229. +
  1230. +#define CONFIG_BOOTARGS "noinitrd root=/dev/mtdblock3 init=/linuxrc console=ttySAC0"
  1231. +#define CONFIG_BOOTCOMMAND "nand read.jffs2 0x30007FC0 kernel; bootm 0x30007FC0"
  1232. +
  1233. +/*
  1234. + * Hardware drivers
  1235. + */
  1236. +#define CONFIG_DRIVER_DM9000
  1237. +#define CONFIG_DM9000_BASE 0x20000000
  1238. +#define DM9000_IO CONFIG_DM9000_BASE
  1239. +#define DM9000_DATA (CONFIG_DM9000_BASE+4)
  1240. +#define CONFIG_NETMASK 255.255.255.0
  1241. +#define CONFIG_IPADDR 192.168.1.123
  1242. +#define CONFIG_SERVERIP 192.168.1.100
  1243. +#define CONFIG_ETHADDR "00:50:56:C0:00:08"
  1244. +
  1245. +/*
  1246. + * select serial console configuration
  1247. + */
  1248. +#define CONFIG_S3C24X0_SERIAL
  1249. +#define CONFIG_SERIAL1 1 /* we use SERIAL 1 on SMDK2440 */
  1250. +
  1251. +
  1252. +
  1253. +#define CONFIG_BAUDRATE 115200
  1254. +
  1255. +
  1256. +#define CONFIG_CMD_PING
  1257. +
  1258. +/* autoboot */
  1259. +#define CONFIG_BOOTDELAY 5
  1260. +#define CONFIG_BOOT_RETRY_TIME -1
  1261. +#define CONFIG_RESET_TO_RETRY
  1262. +#define CONFIG_ZERO_BOOTDELAY_CHECK
  1263. +
  1264. +
  1265. +#if defined(CONFIG_CMD_KGDB)
  1266. +#define CONFIG_KGDB_BAUDRATE 115200 /* speed to run kgdb serial port */
  1267. +#endif
  1268. +
  1269. +/*
  1270. + * Miscellaneous configurable options
  1271. + */
  1272. +#define CONFIG_SYS_LONGHELP /* undef to save memory */
  1273. +#define CONFIG_SYS_CBSIZE 256
  1274. +/* Print Buffer Size */
  1275. +#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
  1276. + sizeof(CONFIG_SYS_PROMPT)+)
  1277. +#define CONFIG_SYS_MAXARGS 16
  1278. +#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
  1279. +
  1280. +#define CONFIG_DISPLAY_CPUINFO /* Display cpu info */
  1281. +
  1282. +#define CONFIG_SYS_MEMTEST_START 0x30000000 /* memtest works on */
  1283. +#define CONFIG_SYS_MEMTEST_END 0x33F00000 /* 63 MB in DRAM */
  1284. +
  1285. +#define CONFIG_SYS_LOAD_ADDR 0x30800000
  1286. +
  1287. +/* support additional compression methods */
  1288. +#define CONFIG_BZIP2
  1289. +#define CONFIG_LZO
  1290. +#define CONFIG_LZMA
  1291. +
  1292. +/*-----------------------------------------------------------------------
  1293. + * Physical Memory Map
  1294. + */
  1295. +#define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */
  1296. +#define PHYS_SDRAM_1 0x30000000 /* SDRAM Bank #1 */
  1297. +#define PHYS_SDRAM_1_SIZE 0x04000000 /* 64 MB */
  1298. +
  1299. +#define PHYS_FLASH_1 0x00000000 /* Flash Bank #0 */
  1300. +
  1301. +#define CONFIG_SYS_FLASH_BASE PHYS_FLASH_1
  1302. +
  1303. +/*-----------------------------------------------------------------------
  1304. + * FLASH and environment organization
  1305. + */
  1306. +
  1307. +#define CONFIG_SYS_FLASH_CFI
  1308. +#define CONFIG_FLASH_CFI_DRIVER
  1309. +#define CONFIG_FLASH_CFI_LEGACY
  1310. +#define CONFIG_SYS_FLASH_LEGACY_512Kx16
  1311. +#define CONFIG_FLASH_SHOW_PROGRESS 45
  1312. +
  1313. +#define CONFIG_SYS_MAX_FLASH_BANKS 1
  1314. +#define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE }
  1315. +#define CONFIG_SYS_MAX_FLASH_SECT (35)
  1316. +
  1317. +
  1318. +/*
  1319. + * Size of malloc() pool
  1320. + * BZIP2 / LZO / LZMA need a lot of RAM
  1321. + */
  1322. +#define CONFIG_SYS_MALLOC_LEN (4 * 1024 * 1024)
  1323. +
  1324. +#define CONFIG_SYS_MONITOR_LEN (448 * 1024)
  1325. +#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
  1326. +
  1327. +#define CONFIG_CMD_NAND
  1328. +/*
  1329. + * NAND configuration
  1330. + */
  1331. +#ifdef CONFIG_CMD_NAND
  1332. +#define CONFIG_NAND_S3C2440
  1333. +#define CONFIG_SYS_MAX_NAND_DEVICE 1
  1334. +#define CONFIG_SYS_NAND_BASE 0x4E000000
  1335. +#define CONFIG_S3C24XX_CUSTOM_NAND_TIMING
  1336. +#define CONFIG_S3C24XX_TACLS 1
  1337. +#define CONFIG_S3C24XX_TWRPH0 2
  1338. +#define CONFIG_S3C24XX_TWRPH1 1
  1339. +
  1340. +#endif
  1341. +
  1342. +/* additions for new relocation code, must be added to all boards */
  1343. +#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
  1344. +#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x1000 - \
  1345. + GENERATED_GBL_DATA_SIZE)
  1346. +
  1347. +#define CONFIG_BOARD_EARLY_INIT_F
  1348. +
  1349. +#endif /* __CONFIG_H */
  1350. diff -urN u-boot-2016.03/include/env_default.h u-boot-.03ok/include/env_default.h
  1351. --- u-boot-2016.03/include/env_default.h -- ::21.000000000 +
  1352. +++ u-boot-.03ok/include/env_default.h -- ::50.860466037 +
  1353. @@ -, +, @@
  1354. #else
  1355. const uchar default_environment[] = {
  1356. #endif
  1357. +#ifdef CONFIG_ETHADDR
  1358. + "ethaddr=" CONFIG_ETHADDR "\0"
  1359. +#endif
  1360. +
  1361. #ifdef CONFIG_ENV_CALLBACK_LIST_DEFAULT
  1362. ENV_CALLBACK_VAR "=" CONFIG_ENV_CALLBACK_LIST_DEFAULT "\0"
  1363. #endif
  1364. diff -urN u-boot-2016.03/include/nand.h u-boot-.03ok/include/nand.h
  1365. --- u-boot-2016.03/include/nand.h -- ::21.000000000 +
  1366. +++ u-boot-.03ok/include/nand.h -- ::57.399450808 +
  1367. @@ -, +, @@
  1368. int nand_read_skip_bad(nand_info_t *nand, loff_t offset, size_t *length,
  1369. size_t *actual, loff_t lim, u_char *buffer);
  1370.  
  1371. +#define WITH_YAFFS_OOB (1 << 0) /* whether write with yaffs format. This flag * is a 'mode' meaning it cannot be mixed with * other flags */
  1372. +
  1373. #define WITH_DROP_FFS (1 << 0) /* drop trailing all-0xff pages */
  1374. #define WITH_WR_VERIFY (1 << 1) /* verify data was written correctly */
  1375.  
  1376. diff -urN u-boot-2016.03/Makefile u-boot-.03ok/Makefile
  1377. --- u-boot-2016.03/Makefile -- ::21.000000000 +
  1378. +++ u-boot-.03ok/Makefile -- ::00.046292963 +
  1379. @@ -, +, @@
  1380. SUBLEVEL =
  1381. EXTRAVERSION =
  1382. NAME =
  1383. -
  1384. +ARCH=arm
  1385. +CROSS_COMPILE=arm-linux-
  1386. # *DOCUMENTATION*
  1387. # To see a list of typical targets execute "make help"
  1388. # More info can be located in ./README
  1389. Binary files u-boot-2016.03/.swp and u-boot-.03ok/.swp differ

s3c2440 移值u-boot-2016.03 第6篇 支持mtd yaffs 烧写的更多相关文章

  1. s3c2440 移值u-boot-2016.03 第4篇 支持NAND flash 识别

    1, /include/configs/smdk2440.h 中添加 #define CONFIG_CMD_NAND 编译 drivers/mtd/nand/built-in.o: In functi ...

  2. s3c2440 移值u-boot-2016.03 第3篇 支持Nor flash 识别

    当选择,NOR flash 启用时,才可以访问 NOR FLASH ./common/board_r.c 364 line:initr_flash()flash_size = flash_init() ...

  3. s3c2440 移值u-boot-2016.03 第1篇 新建单板

    目前除RC版外,最新的就是 u-boot-2016.03.tar.bz2 ,大概看了几个年份的u-boot 发现,现在 更像是 linux kernel .有 menuconfig . 对比2012年 ...

  4. s3c2440 移值新内核 linux-4.1.36

    arm-linuxgcc version 4.3.2 经过试验,最高可以编译到 linux-4.1.36 ,在高的版本会有错误 ,可能是 GCC 编译器版本较低造成. 解压比较麻烦还要装一个 xz x ...

  5. s3c2440 移值u-boot-2016.03 第2篇 支持Nand flash启动

    1, 要求:在4K 的代码以内,完成 NOR NAND 类型判断,初始化 NAND 复制自身到 SDRAM ,重定向. 2, 在 /arch/arm/cpu/arm920t/ 文件夹里 添加一个 in ...

  6. s3c2440 移值u-boot-2016.03 第5篇 支持dm9000 识别

    1, 通过查看 /drivers/net/Makefile 发现想要编译上,需要添加宏 /include/configs/smdk2440.h 中添加 #define CONFIG_DRIVER_DM ...

  7. Davinci DM6446开发攻略-UBOOT-2009.03移植2 nand flash的烧写

      很长一段时间没有更新博客了,是因为要推出新开发方案和做好客户服务工作,忙得不易乐乎.有关DAVINCI U-BOOT的移植,以前写过一篇u-boot-1.3.4(2008年的),其实和这个u-bo ...

  8. DM6446开发攻略:UBOOT-2009.03移植及nand flash烧写

    有关DAVINCI U-BOOT的移植,以前写过一篇u-boot-1.3.4(2008年的),其实和这个u-boot-2009.03差别不大,只不过这个u-boot-2009.03是从TI的网站上下载 ...

  9. “耐撕”团队 2016.03.24 站立会议

    时间: 2016.03.22  17:00-17:30     18:30-19:00 成员: Z 郑蕊 * 组长 (博客:http://www.cnblogs.com/zhengrui0452/), ...

随机推荐

  1. android开发期间使用真机调试但系统无法识别出真机

    前言 前些天重装了系统,好不容易把所有的软件装好,结果发现打开android studio真机调试却出了问题. 一.症状: 1.手机端设置完全没问题(打开了调试模式......) 2.电脑端右下角不出 ...

  2. MacPort 的使用

    MacPorts 的安装和使用   官网下载最版本的 安装包   自动安装  可能会出现很慢的情况   设置环境变量   vim ~/.bash_profile      i  插入修改  :wq 保 ...

  3. JS判断客户端系统 让ipad iphone 等手持设备自动跳到手机版

    if ((navigator.userAgent.match(/(iPhone|iPod|Android|ios|iPad)/i))) { location.replace("http:// ...

  4. Android课程---String、StringBuffer 、StringBuilder 的区别(转)

    String 字符串常量 StringBuffer 字符串变量(线程安全) StringBuilder 字符串变量(非线程安全)  简要的说, String 类型和 StringBuffer 类型的主 ...

  5. 【转】C#(ASP.Net)获取当前路径的方法集合

    转自:http://www.gaobo.info/read.php/660.htm //获取当前进程的完整路径,包含文件名(进程名). string str = this.GetType().Asse ...

  6. 新安装个Myeclipse,导入以前做的程序后程序里好多错,提示The import java.util cannot be resolved

    原因:这是由于你的项目buildpath不对原来的项目,比如采用了原先的MyEclipse自带的jdk (D:\myeclipse\XXXXXX)结果,你现在换了一个,原来的没了就导致了现在这种错误, ...

  7. linq查询结果转换为指定字段类型的list集合

    转换查询结果为ProductId字段的类型的list集合 (from s in _db.Mobile_TeamAction || s.ActionStatus == select new { s.Pr ...

  8. Jmeter多机并发压测IP地址问题

    meter.engine.RemoteJMeterEngineImpl: Local IP address=192.168.56.1 不能成功链家到相应的压力机 解决步骤: 1.找到jmeter.ba ...

  9. 一个iOS项目中包含多个xcodeproj文件,如何运行其中的一个项目

    从GitHub上下载的Masonry的iOS源码,打开发现有多个项目,直接运行,模拟器没反应.由于Masonry是一个多工程的项目,每个项目都依赖Masonry的源码,所以要运行Masonry的Exa ...

  10. iOS,XMPP本地环境搭建和框架使用

    1.XMPP的MySQL和openfire环境配置 2.XmppFramework框架导入和介绍 XMPP的MySQL和openfire环境配置 1.下载mysql安装 mysql下载 打开MySQL ...