Chinaunix首页 | 论坛 | 博客
  • 博客访问: 311927
  • 博文数量: 41
  • 博客积分: 857
  • 博客等级: 准尉
  • 技术积分: 614
  • 用 户 组: 普通用户
  • 注册时间: 2011-05-11 12:42
文章分类

全部博文(41)

文章存档

2016年(1)

2015年(2)

2012年(6)

2011年(32)

分类: LINUX

2011-07-06 17:20:45

本人是参考友善官方<>从第一章节开始仔细阅读和试验的,现对本书中出现的漏洞和错误之处以作笔记总结,方便自已的同时希望能对他人有所帮助~
 
hardware: mini2440(64M FLASH)
platform: fedora9 under vmware
 
未标出章节为没有错误的章节,特此说明.
附标记后的友善官方<>PDF
 
3.7章节
 
参照此手册完成本章节后,编译内核之前还应再修改两处,不然不出现很多错误,在此不列出错误内容.
 
1.因为这个mach-mini2440.c是从mach-smdk2440.c处复制过来的,mach-smdk2440.c中未对nand作处理,但这里我们作处理啦,所以应在文件中加入相应的头文件
#include
#include
#include
#include
#include
2.不作下面的修改之前如果编译,以然会出现一个警告
warning:"mini2440_nand_info"defined but not used.
 
解决方法:
   在static void __init mini2440_map_io(void)
    {
    }
    中加入以下代码:
    s3c_device_nand.dev.platform_data = &mini2440_nand_info;
 
3.8章节
 
     完全按照此章节修改好程序后,编译下载到开发板,并下载自已制作适合自已开发板(64M)的文件系统,后出现下面的问题
 
##### FriendlyARM BIOS for 2440 #####
[x] bon part 0 320k 2368k
[v] Download vivi
[k] Download linux kernel
[y] Download root_yaffs image
[a] Absolute User Application
[n] Download Nboot
[l] Download WinCE boot-logo
[w] Download WinCE NK.bin
[d] Download & Run
[z] Download zImage into RAM
[g] Boot linux from RAM
[f] Format the nand flash
[b] Boot the system
[s] Set the boot parameters
[u] Backup NAND Flash to HOST through USB(upload)
[r] Restore NAND Flash from HOST through USB
[q] Goto shell of vivi
[i] Version: 1026-12
Enter your selection: b
Copy linux kernel from 0x00060000 to 0x30008000, size = 0x00500000 ... done
zImage magic = 0x016f2818
Setup linux parameters at 0x30000100
linux command line is: "noinitrd root=/dev/mtdblock3 init=/linuxrc console=ttySA
C0"
MACH_TYPE = 1999
NOW, Booting Linux......
Uncompressing Linux.............................................................
...................................................................... done, boo
ting the kernel.
Linux version 2.6.32.2 () (gcc version 4.4.3 (ctng-1.6
.1) ) #8 Wed Jul 6 17:00:40 CST 2011
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
CPU: VIVT data cache, VIVT instruction cache
Machine: FriendlyARM mini2440 Develop board
ATAG_INITRD is deprecated; please update your bootloader.
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id 0x32440001)
S3C24XX Clocks, (c) 2004 Simtec Electronics
S3C244X: core 405.000 MHz, memory 101.250 MHz, peripheral 50.625 MHz
CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
Kernel command line: noinitrd root=/dev/mtdblock3 init=/linuxrc console=ttySAC0
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 60524KB available (3680K code, 417K data, 132K init, 0K highmem)
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:85
irq: clearing subpending status 00000003
irq: clearing subpending status 00000002
Console: colour dummy device 80x30
console [ttySAC0] enabled
Calibrating delay loop... 201.93 BogoMIPS (lpj=504832)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
S3C2440: Initialising architecture
S3C2440: IRQ Support
S3C24XX DMA Driver, (c) 2003-2004,2006 Simtec Electronics
DMA channel 0 at c4808000, irq 33
DMA channel 1 at c4808040, irq 34
DMA channel 2 at c4808080, irq 35
DMA channel 3 at c48080c0, irq 36
S3C244X: Clock Support, DVS off
bio: create slab at 0
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
s3c-i2c s3c2440-i2c: slave address 0x10
s3c-i2c s3c2440-i2c: bus frequency set to 98 KHz
s3c-i2c s3c2440-i2c: i2c-0: S3C I2C adapter
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
ROMFS MTD (C) 2007 Red Hat, Inc.
yaffs Jul  6 2011 12:49:18 Installing.
msgmni has been set to 118
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
Console: switching to colour frame buffer device 60x53
fb0: s3c2410fb frame buffer device
s3c2440-uart.0: s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2440
s3c2440-uart.1: s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2440
s3c2440-uart.2: s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2440
brd: module loaded
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c24xx-nand s3c2440-nand: Tacls=3, 29ns Twrph0=7 69ns, Twrph1=3 29ns
s3c24xx-nand s3c2440-nand: NAND soft ECC
NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB 3,3V 8-bit
)
Scanning device for bad blocks
Bad eraseblock 3091 at 0x00000304c000
Creating 5 MTD partitions on "NAND 64MiB 3,3V 8-bit":
0x000000000000-0x000000040000 : "supervivi"
ftl_cs: FTL header not found.
0x000000040000-0x000000060000 : "param"
ftl_cs: FTL header not found.
0x000000060000-0x000000560000 : "Kernel"
uncorrectable error :
uncorrectable error :
0x000000560000-0x000040560000 : "root"
mtd: partition "root" extends beyond the end of device "NAND 64MiB 3,3V 8-bit" -
- size truncated to 0x3aa0000
ftl_cs: FTL header not found.
0x000000000000-0x000004000000 : "nand"
uncorrectable error :
uncorrectable error :
dm9000 Ethernet Driver, V1.31
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
usbcore: registered new interface driver libusual
mice: PS/2 mouse device common for all mice
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
i2c /dev entries driver
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled
cpuidle: using governor ladder
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
usbcore: registered new interface driver hiddev
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
Advanced Linux Sound Architecture Driver Version 1.0.21.
No device for DAI UDA134X
No device for DAI s3c24xx-i2s
ALSA device list:
  No soundcards found.
TCP cubic registered
NET: Registered protocol family 17
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
yaffs: dev is 32505859 name is "mtdblock3"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.3, "mtdblock3"
yaffs: block 2747 is marked bad
block 2748 is bad
usb 1-1: new low speed USB device using s3c2410-ohci and address 2
usb 1-1: configuration #1 chosen from 1 choice
input: PIXART USB OPTICAL MOUSE as /devices/platform/s3c2410-ohci/usb1/1-1/1-1:1
.0/input/input0
generic-usb 0003:093A:2510.0001: input,hidraw0: USB HID v1.11 Mouse [PIXART USB
OPTICAL MOUSE] on usb-s3c24xx-1/input0
yaffs_read_super: isCheckpointed 0
VFS: Mounted root (yaffs filesystem) on device 31:3.
Freeing init memory: 132K
Unable to handle kernel paging request at virtual address 5058455e
pgd = c3ac4000
[5058455e] *pgd=00000000
Internal error: Oops: 80000005 [#1]
last sysfs file:
Modules linked in:
CPU: 0    Not tainted  (2.6.32.2 #8)
PC is at 0x5058455e
LR is at s3c2410_nand_select_chip+0x88/0xa0
pc : [<5058455e>]    lr : []    psr: 20000033
sp : c3823a50  ip : 00000006  fp : 00000000
r10: 00000001  r9 : 00011d93  r8 : 00000000
r7 : 02912600  r6 : 00000003  r5 : c3998840  r4 : 00000000
r3 : 5058455f  r2 : c4c00004  r1 : 00000000  r0 : c0024f2c
Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA Thumb  Segment user
Control: c000717f  Table: 33ac4000  DAC: 00000015
Process linuxrc (pid: 1, stack limit = 0xc3822270)
Stack: (0xc3823a50 to 0xc3824000)
3a40:                                     c3887988 c3887800 c3823b54 c01e9868
3a60: ffffffff 00000004 00000010 00000000 00000000 00000200 00000000 00000008
3a80: 00000000 00000001 00000001 00000000 00000004 0000001f 00000000 00000004
3aa0: 00000001 00000000 00000000 00000000 c3887800 c3823b54 00000200 c0025000
3ac0: 00011d93 02912600 00000000 c01e9e9c c3823b54 00000000 00000000 00000000
3ae0: 00000000 00000001 00000001 00000000 00000000 60000013 c3887800 c39a9400
3b00: 00560000 00000000 00000200 c0025000 00011d93 c3823b54 00000000 c01ce128
3b20: c3823b54 ffffffe0 023b2600 c3823ba8 c3813000 c39a9400 c3823b74 c0154734
3b40: c3823b54 c3887800 023b2600 00000000 00011db3 00000001 00000200 00000000
3b60: 00000008 00000000 00000000 c0025000 c3823b74 c3823b98 c3813000 00000000
3b80: 00000000 c3813000 c3823ba8 00011db3 00000200 00000000 00000000 00000469
3ba0: 00001000 c0153314 00000000 00000001 00000bab 00000468 00000200 00000001
3bc0: 00000000 00000000 c3823c0c 00000001 c3823be0 c0185c78 0000009a 00000000
3be0: 0000009a c0025000 c3ab5078 c3ab5078 00000200 c3ab5078 c3813000 c3ab5078
3c00: 00000200 c014e7c4 00000000 c0025000 0008d000 00000000 00000000 00000000
3c20: 0000008c c04424a0 c3813000 c3ab5078 c0025000 00100100 c3410448 00200200
3c40: 00000020 c01485e0 00001000 c04424a0 c03e3774 c04424a0 c383b080 00000011
3c60: 00000003 c014882c c04424a0 c3410444 00000011 c006d890 c383b080 0000009a
3c80: c0442218 c04424d8 00000000 c383b080 00000000 0000009a c3410444 c34103a8
3ca0: c383b0c0 c3410444 c3823d00 c006d900 00000000 c3410444 c383b080 c006713c
3cc0: 00000000 c0148838 c0401508 000284d0 c34107ec c39cc0b0 c3a39000 00000001
3ce0: 00000000 c3a39000 000aa000 c3ac4000 c3ac4000 c00782c8 c3822000 c3ac4000
3d00: 00000001 0000009a 000aa000 00000000 00000000 00000001 00000000 000aa000
3d20: 00000000 c3a39000 00000000 c39cdaa8 c3ac4000 c00794e0 0000009a 00000001
3d40: 00000000 00000000 00000000 00000001 000000aa c3ac4000 000002a8 c0400f14
3d60: 00000000 000aa959 c3820000 c3823e50 c39cc0b0 c3a39000 c3a39034 00000805
3d80: c3a31260 c002f86c 000aa959 00000805 00000805 c03dc580 000aa959 c3823e50
3da0: 00000000 80000013 000aa959 c00292bc c3823f80 c03e4308 c0401508 c03e37fc
3dc0: 00000000 c39cc0b0 c39cc0d4 000aa000 c3a39000 c383b080 00001000 c39cc070
3de0: 00000001 c0075b68 c39cc0b0 c3a39000 000aa000 c007cce8 c39cc0b0 c007d424
3e00: c39cc070 c39cc0b0 c39cc058 c39cc0b0 08101877 c007e8fc c39cc108 c3a39000
3e20: c39cc018 c39cc108 00000002 c007d3d4 c39cc108 c007d424 c39cc018 ffffffff
3e40: c3823e84 c39d5400 c383ba00 c0029a40 000aa959 000006a7 00000000 00000000
3e60: 00000000 c383bd00 c39d5400 c383ba00 00000000 000aa959 000aa959 c3a31260
3e80: 00000001 c3823e98 c00c2730 c0180884 80000013 ffffffff 000006a7 c00c2730
3ea0: 00000000 c00c325c 00001812 00000000 c3a39000 000accb4 000aa959 000accb4
3ec0: 00000001 c39d5500 c3a31260 00000007 c3823f80 000a2100 00008000 c0091e94
3ee0: 000aa100 00008000 00000000 00000000 befff000 c0442500 beffffe1 c0028fd8
3f00: 00000009 c39d5400 c03e480c fffffff8 00000000 00000000 c3823f80 c03e4308
3f20: c39d5402 c0092328 c3820000 c3822000 c03dc130 00000002 c39d5400 00000000
3f40: 00000000 c3823f80 c03dc0ac c00933e0 c04cc082 00000000 c03dc130 c0401560
3f60: c03dc0a8 c04cc082 c03dc130 00000000 00000000 00000000 00000000 c002c9f8
3f80: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
3fa0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
3fc0: 00000000 00000000 00000002 c0401560 c00224e4 00000000 00000000 c0029588
3fe0: c0401560 c0008438 00000000 00000000 00000000 c002a868 00000000 00000000
Code: bad PC value
---[ end trace 4b28e919385a3e14 ]---
Kernel panic - not syncing: Attempted to kill init!
[] (unwind_backtrace+0x0/0xd8) from [] (panic+0x40/0x118)
[] (panic+0x40/0x118) from [] (do_exit+0x64/0x59c)
[] (do_exit+0x64/0x59c) from [] (die+0x15c/0x180)
[] (die+0x15c/0x180) from [] (__do_kernel_fault+0x64/0x74)
[] (__do_kernel_fault+0x64/0x74) from [] (do_page_fault+0x1b
0/0x1c4)
[] (do_page_fault+0x1b0/0x1c4) from [] (do_PrefetchAbort+0x3
4/0x94)
[] (do_PrefetchAbort+0x34/0x94) from [] (__pabt_svc+0x44/0x8
0)
Exception stack(0xc3823a08 to 0xc3823a50)
3a00:                   c0024f2c 00000000 c4c00004 5058455f 00000000 c3998840
3a20: 00000003 02912600 00000000 00011d93 00000001 00000000 00000006 c3823a50
3a40: c01ec5dc 5058455e 20000033 ffffffff
[] (__pabt_svc+0x44/0x80) from [<5058455e>] (0x5058455e)
 
查找资料发现有这样的说明:
  这个问题是由于arch/arm/mach-s3c2440/mach-mini2440.c中nand flash controller相关配置数据被声明为__initdata属性造成的。这部分数据会在根文件系统挂载后被释放,但事实上它们还会被nand flash driver用到,因此就出现了memory access问题。解决的办法是把arch/arm/mach-s3c2440/mach-mini2440.c中下列几行中的__initdata声明去掉:

static struct mtd_partition mini2440_default_nand_part[] __initdata = {}
static struct s3c2410_nand_set mini2440_nand_sets[] __initdata = {}
static struct s3c2410_platform_nand mini2440_nand_info __initdata = {}
按此方法修改后,成功!

3.9章节
 
此章节基本没有什么错误,有两小处要说明:
  1)3.9.1节,DM9000网卡设备的物理基地址宏定义处
#define MACH_MINI2440_DM9K_BASE 空格 (S3C2410_CS4 + 0x300)
  2)就是在mini2440设备集中添加做好的网卡平台设备时,所说的"如下红色部分"未见红色部分,其实为
&mini2440_device_eth;
 
3.11章节
 
贴出背光灯的驱动程序,方便需要的朋友复制.
 
//以下的头文件并不是每一个都是必须的,但多余的并不会影响驱动程序的内容
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#undef DEBUG                //#undef是在后面取消以前的宏定义,也就是所DEBUG这个宏的生命到此为止
//#define DEBUG
#ifdef DEBUG//ifdef..else..endif条件编译语句如果DEBUG宏定义,则顺序执行,否则执行else语句后内容
#define DPRINTK(x...) {printk(__FUNCTION__"(%d):",__LINE__);printk(##x);}
#else
#define DPRINTK(x...) (void)(0)
#endif
//定义背光灯的驱动名称,将会出现在/dev下
#define DEVICE_NAME "backlight"
//定义背光状态,以记录背光的开关状态
static unsigned int bl_state;
static inline void set_bl(int state)
{
   bl_state = !!state;
   s3c2410_gpio_setpin(S3C2410_GPG(4),bl_state);
}
static inline unsigned int get_bl(void)
{
return bl_state;
}
static ssize_t dev_write(struct file *file,const char *buffer,size_t count,loff_t *ppos)
{
unsigned char ch;
int ret;
if(count == 0){
    return count;
}
ret = copy_from_user(&ch,buffer,sizeof(ch))?-EFAULT:0;
if(ret){
    return ret;
}
ch &= 0x01;
set_bl(ch);
 
return count;
}
static ssize_t dev_read(struct file *filp,char *buffer,size_t count,loff_t *ppos)
{
int ret;
unsigned char str[] = {'0','1'};
if(count == 0){
    return 0;
}
ret = copy_to_user(buffer,str + get_bl(),sizeof(unsigned char))?-EFAULT:0;
if(ret){
    return ret;
}
return sizeof(unsigned char);
}
static struct file_operations dev_fops = {
    owner: THIS_MODULE,
    read:  dev_read,
    write: dev_write,
};
static struct miscdevice misc = {
    .minor = MISC_DYNAMIC_MINOR,
    .name  = DEVICE_NAME,
    .fops  = &dev_fops,
};
static int __init dev_init(void)
{
int ret;
ret = misc_register(&misc);
printk(DEVICE_NAME"\tinitialized\n");
s3c2410_gpio_cfgpin(S3C2410_GPG(4),S3C2410_GPIO_OUTPUT);
set_bl(1);
return ret;
}
static void __exit dev_exit(void)
{
misc_deregister(&misc);
}

module_init(dev_init);
module_exit(dev_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("FriendlyARM Inc.");
 
mini2440_backlight.c中只发现一小处错误,如图中黄色标记行
         
此处就改为:
           ret = copy_form_user(&ch,buffer,sizeof(ch))?-EFAULT:0;
 
另还有一处错误
即本章节结尾处说下载编译后的内核到开发板,启动时可以看到如图所示的企鹅图像,这里所说的图并未指出,其实就是第3.13章节开始的那个小企鹅图,再者经实验验证,启动内核时并不能看到这个图像,这是因为LCD驱动的程序还并没有加载进去,只能开到背光灯点亮.
          
 
3.13 linux logo
   使用netbpm工具将普通的图片转换成logo图片的时候,运行到
#pnmquant 224 linux_logo.png > linux_logo_clut224.pnm
出现问题,如下:
pnmcolormap: Error reading magic number from Netpbm image stream.  Most often, this means your input file is empty.
pnmcolormap failed, rc=256
未解决.
  另外在使用logomaker软件的时候也未说明制作图片的大小,实验发现并不是宽度和高度是任意值的图片都可以用,太大的话,制作后下载到开发板将看不到图片,个人认为应该是控制在240*240范围内.
 
3.14章节
 
此章节在应用程序的编写中有一处小错误,如图中黄色标记行
          
此处应改为:
           int len = read(fd,buffer,sizeof(buffer-1));
 
另外:实验发现在按下触摸屏时并未输出'-1'.
查找ADC驱动源代码发现:
      在没有"A/D转换器"资源时,赋值为'-1'.感觉并不是触摸一下屏时输出'-1'.
 
3.15章节
 
本章节未实验成功,编译也能通过,但就是下载到开发板上,触摸屏无反应.有待解决~
 
后来解决添加笔记:
    他细查看发现在修改相应的Makefile时将
  obj-$(CONFIG_TOUCHSCREEN_S3C2410)   += s3c2410_ts.c
写成了:
  ojb-$(CONFIG_TOUCHSCREEN_S3C2410)   += s3c2410_ts.c
造成触摸屏模块未能被编译进内核,更谈不上触摸屏无反应一说了,粗心造成的~~~~
3.16章节
 
3.16.1--3.16.2
本章节未发现问题,USB键盘,USB鼠标,USB条行码扫描器(正好公司有这个东东,就顺手测试了一下)均测试正常.
 
3.16.3--3.16.4
U盘的配置中,手册中存在未说明清楚的地方,比如在配置SCSI的时候,手册上只说如图配置,然后将<*>SCSI disk support 配置项标记了,其实不然,在配置这个选择之前应该先配置<*>SCSI device support,否则,下面的配置将不会出现*选项,只有M和空选项,这也将影响到USB Mass Storage support选项的配置.
 
          
另外有一点需要读者注意的,手册本省没有错(因为我在这里就犯了错,所以才贴出来~),就是测试U盘的时候,插入U盘后,内核会自动在根目录下创建udisk(可不是/mnt目录下呀~我就晕在这里啦~)目录,U盘将挂载在此.
 
3.16.4--3.16.5
USB摄像头的配置出现说明不清,应按下图所示进行操作
          
编译下载到开发板后,找来公司的USB摄像头,测试通过.
 
3.16.7--3.16.8
由于本手册3.16.8未编写,本人手里没有USB无线网卡,估计本功能未进行验证.
 
3.16.9--3.16.10
USB转串口功能章节友善未编写,故未验证.
 
3.17章节
 
Linux version 2.6.32.2 () (gcc version 4.4.3 (ctng-1.6
.1) ) #25 Tue Jul 12 15:57:42 CST 2011
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
CPU: VIVT data cache, VIVT instruction cache
Machine: FriendlyARM mini2440 Develop board
Converting old-style param struct to taglist
ATAG_INITRD is deprecated; please update your bootloader.
Memory policy: ECC disabled, Data cache writeback
On node 0 totalpages: 16384
free_area_init_node: node 0, pgdat c049ca8c, node_mem_map c04e1000
  Normal zone: 128 pages used for memmap
  Normal zone: 0 pages reserved
  Normal zone: 16256 pages, LIFO batch:3
CPU S3C2440A (id 0x32440001)
S3C24XX Clocks, (c) 2004 Simtec Electronics
S3C244X: core 405.000 MHz, memory 101.250 MHz, peripheral 50.625 MHz
CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
Kernel command line: noinitrd root=/dev/mtdblock3 init=/linuxrc console=ttySAC0
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 59896KB available (4220K code, 463K data, 172K init, 0K highmem)
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:85
irq: clearing subpending status 00000003
irq: clearing subpending status 00000002
timer tcon=00000000, tcnt a4ca, tcfg 00000200,00000000, usec 00001e57
Console: colour dummy device 80x30
console [ttySAC0] enabled
Calibrating delay loop... 201.93 BogoMIPS (lpj=504832)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
S3C2440: Initialising architecture
S3C2440: IRQ Support
S3C24XX DMA Driver, (c) 2003-2004,2006 Simtec Electronics
DMA channel 0 at c4808000, irq 33
DMA channel 1 at c4808040, irq 34
DMA channel 2 at c4808080, irq 35
DMA channel 3 at c48080c0, irq 36
S3C244X: Clock Support, DVS off
bio: create slab at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
s3c-i2c s3c2440-i2c: slave address 0x10
s3c-i2c s3c2440-i2c: bus frequency set to 98 KHz
s3c-i2c s3c2440-i2c: i2c-0: S3C I2C adapter
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
JFFS2 version 2.2. (NAND) 漏 2001-2006 Red Hat, Inc.
ROMFS MTD (C) 2007 Red Hat, Inc.
yaffs Jul  6 2011 12:49:18 Installing.
msgmni has been set to 117
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
Console: switching to colour frame buffer device 60x53
fb0: s3c2410fb frame buffer device
backlight       initialized
adc     initialized
s3c2440-uart.0: s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2440
s3c2440-uart.1: s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2440
s3c2440-uart.2: s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2440
brd: module loaded
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c24xx-nand s3c2440-nand: Tacls=3, 29ns Twrph0=7 69ns, Twrph1=3 29ns
s3c24xx-nand s3c2440-nand: NAND soft ECC
NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB 3,3V 8-bit
)
Scanning device for bad blocks
Bad eraseblock 3091 at 0x00000304c000
Creating 5 MTD partitions on "NAND 64MiB 3,3V 8-bit":
0x000000000000-0x000000040000 : "supervivi"
ftl_cs: FTL header not found.
0x000000040000-0x000000060000 : "param"
ftl_cs: FTL header not found.
0x000000060000-0x000000560000 : "Kernel"
uncorrectable error :
0x000000560000-0x000040560000 : "root"
mtd: partition "root" extends beyond the end of device "NAND 64MiB 3,3V 8-bit" -
- size truncated to 0x3aa0000
ftl_cs: FTL header not found.
0x000000000000-0x000004000000 : "nand"
uncorrectable error :
dm9000 Ethernet Driver, V1.31
dm9000 dm9000: eth%d: Invalid ethernet MAC address. Please set using ifconfig
eth0: dm9000e at c4872300,c4876304 IRQ 51 MAC: ff:ff:ff:ff:ff:ff (chip)
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver libusual
mice: PS/2 mouse device common for all mice
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
s3c2410-rtc s3c2410-rtc: rtc disabled, re-enabling
s3c2410-rtc s3c2410-rtc: rtc core: registered s3c as rtc0
i2c /dev entries driver
Linux video capture interface: v2.00
gspca: main v2.7.0 registered
usbcore: registered new interface driver conex
conex: registered
usbcore: registered new interface driver etoms
etoms: registered
usbcore: registered new interface driver finepix
finepix: registered
usbcore: registered new interface driver jeilinj
jeilinj: registered
usbcore: registered new interface driver mars
mars: registered
usbcore: registered new interface driver mr97310a
mr97310a: registered
usbcore: registered new interface driver ov519
ov519: registered
usbcore: registered new interface driver ov534
ov534: registered
usbcore: registered new interface driver pac207
pac207: registered
usbcore: registered new interface driver pac7311
pac7311: registered
usbcore: registered new interface driver sn9c20x
sn9c20x: registered
usbcore: registered new interface driver sonixb
sonixb: registered
usbcore: registered new interface driver sonixj
sonixj: registered
usbcore: registered new interface driver spca500
spca500: registered
usbcore: registered new interface driver spca501
spca501: registered
usbcore: registered new interface driver spca505
spca505: registered
usbcore: registered new interface driver spca506
spca506: registered
usbcore: registered new interface driver spca508
spca508: registered
usbcore: registered new interface driver spca561
spca561: registered
usbcore: registered new interface driver sq905
sq905: registered
usbcore: registered new interface driver sq905c
sq905c: registered
usbcore: registered new interface driver sunplus
sunplus: registered
usbcore: registered new interface driver stk014
stk014: registered
usbcore: registered new interface driver t613
t613: registered
usbcore: registered new interface driver tv8532
tv8532: registered
usbcore: registered new interface driver vc032x
vc032x: registered
usbcore: registered new interface driver zc3xx
zc3xx: registered
usbcore: registered new interface driver ALi m5602
ALi m5602: registered
usbcore: registered new interface driver STV06xx
STV06xx: registered
gspca_gl860: driver startup - version 0.9d10
usbcore: registered new interface driver gspca_gl860
gspca_gl860: driver registered
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled
cpuidle: using governor ladder
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
s3c-sdi s3c2440-sdi: host detect has no irq available
s3c-sdi s3c2440-sdi: failed to get writeprotect
s3c-sdi: probe of s3c2440-sdi failed with error -16
usbcore: registered new interface driver hiddev
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
Advanced Linux Sound Architecture Driver Version 1.0.21.
No device for DAI UDA134X
No device for DAI s3c24xx-i2s
ALSA device list:
  No soundcards found.
TCP cubic registered
NET: Registered protocol family 17
s3c2410-rtc s3c2410-rtc: setting system clock to 2002-02-02 15:23:01 UTC (101266
3381)
yaffs: dev is 32505859 name is "mtdblock3"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.3, "mtdblock3"
yaffs: block 2747 is marked bad
block 2748 is bad
yaffs_read_super: isCheckpointed 0
VFS: Mounted root (yaffs filesystem) on device 31:3.
Freeing init memory: 172K
eth0: link down
启动系统后,插入SD卡无反应,解决方法:
在mach-mini2440.c文件中的
static void __init mini2440_machine_init(void)
{
}
中,应再加入一句:
s3c_device_sdi.dev.platform_data = &mini2440_mmc_cfg;
 
重新编译,下载到开发板后,上面红色标记行将会变成:
s3c-sdi s3c2440-sdi: powered down.
s3c-sdi s3c2440-sdi: mmc0 - using pio, sw SDIO IRQ
 
另外实验发现SD卡并不能被自动挂载到开发板的/sdcard目录,任务栏中也没有多出你手册上说的那样一个图标.所以只能手动挂载.
[root@FriendlyARM /]# cat /proc/partitions  //查看分区信息
major minor  #blocks  name
  31        0        256 mtdblock0
  31        1        128 mtdblock1
  31        2       5120 mtdblock2
  31        3      60032 mtdblock3
  31        4      65536 mtdblock4
 179        0     124160 mmcblk0             //这个就是SD卡的分区
[root@FriendlyARM /]# mkdir /mnt/cdrom       //创建挂载目录
[root@FriendlyARM /]# mount /dev/mmcblk0 /mnt/cdrom  //手动挂载SD卡到相应目录
 
3.19章节
 
   由于手里没有和开发板相应大小的CON3接口,故本章节放到以前再验证.
 
 
 
 
阅读(6382) | 评论(1) | 转发(1) |
给主人留下些什么吧!~~

8700ing2013-11-09 11:16:48

文明上网,理性发言...感谢楼主分享