project : dessect nand read from Vivi instruction : dessect nand read from ViVi step by step. (1) the below fragment from ViVi is represent for reading nand flash to memory. int nand_read_ll(unsigned char *buf, unsigned long start_addr, int size) { int i, j; if ((start_addr & nand_BLOCK_MASK) || (size & nand_BLOCK_MASK)) { return -1; /* invalid alignment */ } nand_CH...
by vincent-cws - Linux文档专区 - 2010-06-23 19:39:54 阅读(2048) 回复(1)
本帖最后由 sourxsunny 于 2011-01-19 23:03 编辑 我已经把kernel放在nand的0x6000位置,但当我在u_boot环境下nand read之后出错 为什么会变成nand from offset 6000ffffffff的? 还有我想问一下 #define CONFIG_BOOTARGS "noinitrd root=/dev/mtdblock3 init=/linuxrc console=ttySAC0" #define CONFIG_BOOTCOMMAND "nand read 0x30008000 0x00060000 0x00500000;bootm" 这样对吗?
初学驱动,有两个问题一直没搞明白。请知道的人抽空指点一下,谢谢!
1. 在S3C2410中,可以设置bank的Tacs, Tcos等参数的大小,这些参数是在哪里使用的? flash的驱动程序里面不用关心么?
2. 下面的代码中
for(i=0;i
#include config.h> #define __REGb(x) (*(volatile unsigned char *)(x)) #define __REGi(x) (*(volatile unsigned int *)(x)) #define NF_BASE 0x4e000000 #define NFCONF __REGi(NF_BASE + 0x0) #define NFCMD __REGb(NF_BASE + 0x4) #define NFADDR __REGb(NF_BASE + 0x8) #define NFDATA __REGb(NF_BASE + 0xc) #define NFSTAT __REGb(NF_BASE + 0x10) 细心的人肯定会发...
[code] if(read(fd,buf,MAXLINE) == -1 ); { printf("%s\n",buf); perror(NULL); Close(fd); exit(1); }[/code]为什么read返回的是 -1 但是perror却是success
#!/bin/sh sleep 3 echo "input a:" read a if [ "$a" == y ]; then echo $a else echo no fi 问题: 如果在shell sleep 的过程敲很多次回车 例如3次 现象为 [root@localhost]#./filename input a: no [root@localhost]# [root@localhost]# [root@localhost]# _ 也就是说shell记住了你敲的这3次回车 怎么能达到这种效果: 不管敲几次回车 只捕捉input a: 出现后的那一次输入 [root@localhost]#./filename i...