Chinaunix首页 | 论坛 | 博客
  • 博客访问: 723234
  • 博文数量: 118
  • 博客积分: 1437
  • 博客等级: 上尉
  • 技术积分: 1155
  • 用 户 组: 普通用户
  • 注册时间: 2009-02-22 20:23
文章分类

全部博文(118)

文章存档

2022年(32)

2017年(3)

2014年(4)

2013年(1)

2011年(2)

2010年(16)

2009年(60)

我的朋友

分类: LINUX

2010-03-17 10:26:21


(1)修改内核源代码根目录下的makefile时注意
ARCH ?=arm不要有空格
(2)Error: unrecognized/unsupported machine ID (r1 = 0x33f60264).


解决方法一

========================================================

    Linux内核启动时出现:bad machine ID,原因大致是u-boot传递给内核的machine ID错误,可以手动在内核源代码中添加machine ID.

解决方法:
在u-boot命令行中输入bdinfo
查看板卡信息,我的输出如下:
[ ~ljh@GDLC ]# bdinfo
arch_number = 0x000000C1
env_t       = 0x00000000
boot_params = 0x30000100
DRAM bank   = 0x00000000
-> start    = 0x30000000
-> size     = 0x04000000
ethaddr     = 08:00:3E:26:0A:5B
ip_addr     = 10.1.8.245
baudrate    = 115200 bps


修改内核的arch/arm/kernel/head.S,直接将s3c2410的参数赋给内核
# cd linux-2.6.19
# vi arch/arm/kernel/head.S +72
----------------------------------------------    
70     __INIT
71     .type       stext, %function
72 ENTRY(stext)
   /********* add here *********/
   mov    r0, #0
   mov    r1, #0xc1
   ldr    r2, =0x30000100
   /********* end add *********/

73     msr cpsr_c, #PSR_F_BIT | PSR_I_BIT | SVC_MODE @ ensure svc mode
74     @ and irqs disabled

(3)
忘了修改NAND分区信息,参考图书《应用开发入门》汪明虎
VFS: Cannot open root device "mtdblock2" or unknown-block(31,2)
Please append a correct "root=" boot option; here are the available partitions:
1f00         16 mtdblock0 (driver?)
1f01       2048 mtdblock1 (driver?)
1f02       4096 mtdblock2 (driver?)
1f03       2048 mtdblock3 (driver?)
1f04       4096 mtdblock4 (driver?)
1f05      10240 mtdblock5 (driver?)
1f06      24576 mtdblock6 (driver?)
1f07      16384 mtdblock7 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,2)
比较两个启动信息不同之处:
YYS2410 # tftp 30008000 newImage
TFTP from server 192.168.4.86; our IP address is 192.168.4.80
Filename 'newImage'.
Load address: 0x30008000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #####################################
done
Bytes transferred = 1516252 (1722dc hex)
YYS2410 # go 30008000
## Starting application at 0x30008000 ...
Uncompressing Linux...............................................................................................
Linux version 2.6.22.1 (jason@jason-desktop) (gcc version 3.4.5) #2 Wed Mar 17 10:18:42 CST 2010
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=00007177
Machine: SMDK2410
Warning: bad configuration page, trying to continue
Memory policy: ECC disabled, Data cache writeback
CPU S3C2410A (id 0x32410002)
S3C2410: core 202.800 MHz, memory 101.400 MHz, peripheral 50.700 MHz
S3C24XX Clocks, (c) 2004 Simtec Electronics
CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
CPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
Built 1 zonelists.  Total pages: 16256
Kernel command line: noinitrd root=/dev/mtdblock2 init=/linuxrc console=ttySAC0,115200 mem=64M
irq: clearing subpending status 00000002
PID hash table entries: 256 (order: 8, 1024 bytes)
timer tcon=00500000, tcnt a509, tcfg 00000200,00000000, usec 00001e4c
Console: colour dummy device 80x30
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: 61616KB available (2792K code, 313K data, 144K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
S3C2410 Power Management, (c) 2004 Simtec Electronics
S3C2410: Initialising architecture
S3C24XX DMA Driver, (c) 2003-2004,2006 Simtec Electronics
DMA channel 0 at c4800000, irq 33
DMA channel 1 at c4800040, irq 34
DMA channel 2 at c4800080, irq 35
DMA channel 3 at c48000c0, irq 36
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
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
NetWinder Floating Point Emulator V0.97 (double precision)
JFFS2 version 2.2. (NAND)
阅读(1133) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~