Chinaunix首页 | 论坛 | 博客
  • 博客访问: 201316
  • 博文数量: 103
  • 博客积分: 5051
  • 博客等级: 大校
  • 技术积分: 1155
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-08 11:07
文章分类

全部博文(103)

文章存档

2011年(1)

2010年(2)

2009年(100)

我的朋友

分类: LINUX

2009-05-07 17:25:07

下载了最新的2.6.26内核,配置gcc3.4.1的编译器

运行了make menuconfig后,发现菜单里完全没有和arm相关的选项,都是x86的CPU

查找了资料发现,需要在makefile中修改

ARCH ?= arm

CROSS_COMPILE ?= arm-linux-

终于出现arm的选项了

晚上边看奥运开幕式边编译,虚拟机跑了一半竟然死机了。。。。。

================8月9日==============================================

没有任何经验去配置2.6.26内核,随随便便添加部件,虽然能够make出zImage,但明显是无法运行的

果然,转换为uImage后,还是停留在booting the kernel处就死掉了。。。。

晚上发现以前下载的linux_mig_release文档中有详细编译2.6.14.1内核的教程,先按照这个做吧

2hours later 10:00

编译完成后,直接用go 调用zImage出现 bad machine ID错误

用bootm加载uImage文章则停留在.................booting the kernel处

在网上搜到bad machine ID的解决方法

arch_number为0xC1, 编辑内核中的arch/arm/boot/compressed/head.S文件,修改
1:    mov    r7, r1        @save architecture ID
改为(arch/arm/tools/mach-types,您所使用的machine type)
1:    mov    r7, #0xC1      @save architecture ID
再重新编译内核即可。

现在uImage和zImage都可以启动,但是都启动到

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,2)

死掉

XXXXXXXXXXXXXXXXXXXX

1hour later 11:00

神奇呢,在配置内核的时候我选择的root是cramfs

所以呢我死马当活马医吧,尝试了下把阳初2410开发板里带的root_china.cramfs输入nand的root分区,再加载2.6.14.1内核

竟然成功了哈,高兴,附启动代码

网卡还没有驱动,明天再研究

------------------------------------

U-Boot 1.2.0 (Aug 29 2007 - 15:01:07)

DRAM: 64 MB
Flash: 512 kB
NAND:    64 MB
In:    serial
Out:   serial
Err:   serial
Hit any key to stop autoboot: 0
YANGCHU2410 # nand erase 0x400000 0x2c00000

NAND erase: device 0 offset 4194304, size 46137344 ...
OK
YANGCHU2410 # tftp 31000000 root.cramfs
TFTP from server 192.168.0.54; our IP address is 192.168.0.53
Filename 'root.cramfs'.
Load address: 0x31000000
Loading: #################################################################
         #################################################################
         #################################################################
         #############################################################
done
Bytes transferred = 1306624 (13f000 hex)
YANGCHU2410 # nand write 0x31000000 0x400000 0x2c00000

NAND write: device 0 offset 4194304, size 46137344 ...
41549824 bytes written: ERROR
YANGCHU2410 # nand write 0x31000000 0x400000 0x1000000

NAND write: device 0 offset 4194304, size 16777216 ...
16777216 bytes written: OK
YANGCHU2410 # tftp 31000000 uImage
TFTP from server 192.168.0.54; our IP address is 192.168.0.53
Filename 'uImage'.
Load address: 0x31000000
Loading: #################################################################
         #################################################################
         ##########################################################
done
Bytes transferred = 957960 (e9e08 hex)
YANGCHU2410 # bootm 31000000
## Booting image at 31000000 ...
   Image Name:   linux-2.6.14.1
   Created:      2008-08-09 14:55:15 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    957896 Bytes = 935.4 kB
   Load Address: 30008000
   Entry Point: 30008000
   Verifying Checksum ... OK
OK

Starting kernel ...


arch_number:c1
boot_params:30000100
Uncompressing Linux................................................................ done, booting the kernel.
Linux version 2.6.14.1 () (gcc version 3.4.1) #2 Sat Aug 9 22:24:24 CST 2008
CPU: ARM920Tid(wb) [41129200] revision 0 (ARMv4T)
Machine: SMDK2410
Memory policy: ECC disabled, Data cache writeback
CPU S3C2410A (id 0x32410002)
S3C2410: core 200.000 MHz, memory 100.000 MHz, peripheral 50.000 MHz
S3C2410 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
Kernel command line: noinitrd root=/dev/mtdblock2 init=/linuxrc console=ttySAC0,115200
irq: clearing subpending status 00000002
PID hash table entries: 512 (order: 9, 8192 bytes)
timer tcon=00500000, tcnt a2c1, tcfg 00000200,00000000, usec 00001eb8
Console: colour dummy device 80x30
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 64MB = 64MB total
Memory: 62720KB available (1583K code, 360K data, 88K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
softlockup thread 0 started up.
NET: Registered protocol family 16
S3C2410: Initialising architecture
S3C2410 DMA Driver, (c) 2003-2004 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
NetWinder Floating Point Emulator V0.97 (double precision)
devfs: 2004-01-31 Richard Gooch ()
devfs: boot_options: 0x1
S3C2410 RTC, (c) 2004 Simtec Electronics
s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2410
s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2410
s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2410
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c2410-nand: mapped registers at c4880000
s3c2410-nand: timing: Tacls 10ns, Twrph0 40ns, Twrph1 10ns
NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB 3,3V 8-bit)
NAND_ECC_NONE selected by board driver. This is not recommended !!
Scanning device for bad blocks
Bad eraseblock 2792 at 0x02ba0000
Creating 4 MTD partitions on "NAND 64MiB 3,3V 8-bit":
0x00000000-0x00100000 : "bootloader"
0x00100000-0x00400000 : "kernel"
0x00400000-0x02c00000 : "root"
0x02d00000-0x03c00000 : "user"
mice: PS/2 mouse device common for all mice
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 2, 16384 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
TCP bic registered
NET: Registered protocol family 1
Reading data from NAND FLASH without ECC is not recommended
VFS: Mounted root (cramfs filesystem) readonly.
Mounted devfs on /dev
Freeing init memory: 88K
Reading data from NAND FLASH without ECC is not recommended
mount /etc as ramfs
re-create the /etc/mtab entries
insmod: QM_MODULES: Function not implemented

mount: Mounting /dev/mtdblock/4 on /usr failed: No such device
console=/dev/console
init started: BusyBox v0.60.3 (2002.05.13-08:36+0000) multi-call binary
Starting pid 24, console /dev/console: '/etc/init.d/rcS'
exec: /usr/etc/rc.local: No such file or directory
Waiting for enter to start '/bin/sh' (pid 27, terminal /dev/console)

Please press Enter to activate this console.
Starting pid 27, console /dev/console: '/bin/sh'


BusyBox v0.60.3 (2002.05.13-08:36+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

# ls
bin       etc       linuette mnt       qt        tmp       var
dev       lib       linuxrc   proc      sbin      usr
#

阅读(528) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~