天嵌 ARM开发社区

 找回密码
 注册
查看: 7075|回复: 27

急!linux2.6.35移植问题

[复制链接]
5402105 发表于 2010-9-19 09:23:17 | 显示全部楼层 |阅读模式
在成功移植了天嵌教程的2.6.25和2.6.30.4内核后。我又开始自己移植了2.6.35.不过遇到了以下问题,请版主解决一下。
环境:VM+Fedora10
交叉环境:4.3.3
内核版本:2.6.35
硬件:TQ2440 256M NANDflash
按照手册移植时,当移植到了nandflash驱动时,我先把内核镜像烧到flash中,(此时还没有移植文件系统)。我直接烧写zImage,串口打印信息:

RECEIVED FILE SIZE: 2037710 (994KB/S, 2S)
NOW, Booting Linux......
Uncompressing Linux...

uncompression error

-- System resetting

后来我又编译了make uImage。我将uImage烧写到flash中,用nand read 0x32000000 0x200000 0x300000;bootm 0x32000000;内核又可以正常启动,串口打印如下:
EmbedSky> bootm 0x32000000
## Booting image at 32000000 ...
   Image Name:   Linux-2.6.35machoe
   Created:      2010-09-17   5:28:02 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2037728 Bytes =  1.9 MB
   Load Address: 30108000
   Entry Point:  30108000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Linux version 2.6.35machoe (root@EmbedSky) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-176) ) #5 Fri Sep 17 13:22:50 CST 2010
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
CPU: VIVT data cache, VIVT instruction cache
Machine: SMDK2440
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id 0x32440001)
S3C24XX Clocks, Copyright 2004 Simtec Electronics
S3C244X: core 400.000 MHz, memory 100.000 MHz, peripheral 50.000 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/mtdblock2 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: 60736k/60736k available, 4800k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    DMA     : 0xffc00000 - 0xffe00000   (   2 MB)
    vmalloc : 0xc4800000 - 0xe0000000   ( 440 MB)
    lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
    modules : 0xbf000000 - 0xc0000000   (  16 MB)
      .init : 0xc0108000 - 0xc012d000   ( 148 kB)
      .text : 0xc012d000 - 0xc04b3000   (3608 kB)
      .data : 0xc04ca000 - 0xc04f03a0   ( 153 kB)
Hierarchical RCU implementation.
        RCU-based detection of stalled CPUs is disabled.
        Verbose stalled-CPUs detection is disabled.
NR_IRQS:99
irq: clearing pending ext status 00080000
irq: clearing subpending status 00000003
irq: clearing subpending status 00000002
Console: colour dummy device 80x30
console [ttySAC0] enabled
Calibrating delay loop... 199.47 BogoMIPS (lpj=498688)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
gpiochip_add: gpios 288..303 (GPIOK) failed to register
gpiochip_add: gpios 320..334 (GPIOL) failed to register
gpiochip_add: gpios 352..353 (GPIOM) failed to register
NET: Registered protocol family 16
S3C Power Management, Copyright 2004 Simtec Electronics
S3C2440: Initialising architecture
S3C2440: IRQ Support
S3C24XX DMA Driver, Copyright 2003-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 <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Advanced Linux Sound Architecture Driver Version 1.0.23.
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
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
NetWinder Floating Point Emulator V0.97 (extended precision)
JFFS2 version 2.2. (NAND) (SUMMARY)  漏 2001-2006 Red Hat, Inc.
ROMFS MTD (C) 2007 Red Hat, Inc.
msgmni has been set to 118
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Console: switching to colour frame buffer device 30x40
fb0: s3c2410fb frame buffer device
lp: driver loaded but no devices found
ppdev: user-space parallel port driver
Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
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
loop: module loaded
Uniform Multi-Platform E-IDE driver
ide-gd driver 1.18
ide-cd driver 5.00
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c24xx-nand s3c2440-nand: Tacls=1, 10ns Twrph0=3 30ns, Twrph1=1 10ns
s3c24xx-nand s3c2440-nand: NAND soft ECC
NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung NAND 256MiB 3,3V 8-bit)
Scanning device for bad blocks
Creating 3 MTD partitions on "NAND 256MiB 3,3V 8-bit":
0x000000000000-0x000000040000 : "EmbedSky_Board_uboot"
0x000000200000-0x000000400000 : "EmbedSky_Board_kernel"
0x000000400000-0x00000ff80000 : "EmbedSky_Board_yaffs2"
dm9000 Ethernet Driver, V1.31
usbmon: debugfs is not available
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
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
usbcore: registered new interface driver libusual
usbcore: registered new interface driver usbserial
USB Serial support registered for generic
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial Driver core
USB Serial support registered for FTDI USB Serial Device
usbcore: registered new interface driver ftdi_sio
ftdi_sio: v1.6.0:USB FTDI Serial Converters Driver
USB Serial support registered for pl2303
usbcore: registered new interface driver pl2303
pl2303: Prolific PL2303 USB to serial adaptor driver
mice: PS/2 mouse device common for all mice
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled
ALSA device list:
  No soundcards found.
TCP cubic registered
NET: Registered protocol family 17
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
List of all partitions:
1f00             256 mtdblock0 (driver?)
1f01            2048 mtdblock1 (driver?)
1f02          257536 mtdblock2 (driver?)
No filesystem could mount root, tried:  ext3 ext2 cramfs vfat msdos iso9660 romfs
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,2)
[<c0133314>] (unwind_backtrace+0x0/0xec) from [<c03d5eb8>] (panic+0x54/0xdc)
[<c03d5eb8>] (panic+0x54/0xdc) from [<c0109054>] (mount_block_root+0x1d0/0x210)
[<c0109054>] (mount_block_root+0x1d0/0x210) from [<c01092ec>] (prepare_namespace+0x164/0x1bc)
[<c01092ec>] (prepare_namespace+0x164/0x1bc) from [<c01085f0>] (kernel_init+0x10c/0x14c)
[<c01085f0>] (kernel_init+0x10c/0x14c) from [<c012ee18>] (kernel_thread_exit+0x0/0x8)

于是,我又将make uImage同时生成的zImage烧到flash中,用nand read 0x32000000 0x200000 0x300000;go 0x32000000
串口打印如下信息:

EmbedSky> go 0x32000000
## Starting application at 0x32000000 ...
Uncompressing Linux... done, booting the kernel.

Error: unrecognized/unsupported machine ID (r1 = 0x33cbdc94).

Available machine support:

ID (hex)        NAME
000000c1        SMDK2410
0000015b        IPAQ-H1940
0000039f        Acer-N35
00000290        Acer-N30
0000014b        Simtec-BAST
000002a8        Nex Vision - Otom 1.1
00000400        AML_M5900
000005b4        TCT_HAMMER
000001db        Thorcom-VR1000
00000454        QT2410
000005d2        JIVE
000003fe        SMDK2413
000003f1        SMDK2412
00000377        S3C2413
00000474        VSTMS
00000695        SMDK2416
000000a8        SMDK2440
0000043c        SMDK2443

Please check your kernel config and/or bootloader.

奇怪了啊,怎么会出现这种事情呢,同样的内核只是格式不同,怎么会出现这么多种不同的状况呢?天嵌的uboot是支持zImage格式的啊。。。。。。。。。。
machoe 发表于 2010-9-19 10:39:14 | 显示全部楼层
linux2.6.35 多了一个压缩的选项,你看一下,在general setup->kernel compression mode。
有可能是这个原原因。
天嵌_support1 发表于 2010-9-19 11:51:07 | 显示全部楼层
1# 5402105


不明白,上面
No filesystem could mount root, tried:  ext3 ext2 cramfs vfat msdos iso9660 romfs
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,2)
你的内核已经启动完成,在进入加载文件系统。
你的文件系统呢? yaffs2 文件系统格式支持的信息呢?
 楼主| 5402105 发表于 2010-9-19 13:49:53 | 显示全部楼层
3# embedsky_lxt


我没有烧写文件系统啊,我现在的问题是,为什么我编译make uImage后,镜像“uImage”可以启动起来,而"zImage"不行呢?天嵌的uboot是支持zImage的啊,你再好好看看我的问题,在线等你回答,谢谢了。
 楼主| 5402105 发表于 2010-9-19 13:51:34 | 显示全部楼层
2# machoe

我也怀疑是压缩的问题,因为uboot的工作已经完成了,问题就出现在内核自解压的过程,可是找了好久,没有找到。。。。。。。。。。。。。。。
 楼主| 5402105 发表于 2010-9-19 15:20:37 | 显示全部楼层
刚才又试了一下,在x86体系也编译了一试,把fedora10的内核升级到了2.6.35也能启动,可就是在TQ2440启动不了,真不明白是怎么回事,晕倒啊。。。。。。。。。。。。。。。。
wjqqwer 发表于 2010-9-19 17:41:58 | 显示全部楼层
go命令不传参,咋起动?运行到那已经到头了
等yaffs2文件系统移好了,贴了来啊。学习学习
machoe 发表于 2010-9-19 19:06:05 | 显示全部楼层
7# wjqqwer


没错,GO是不对的。至少应该用天嵌的boot_zImage。
 楼主| 5402105 发表于 2010-9-19 19:07:32 | 显示全部楼层
7# wjqqwer


我用boot_zImage也不行,zImage镜像还是启动不了,不过uImage就是正常,正郁闷呢着,希望高手再来回答。
machoe 发表于 2010-9-19 21:57:35 | 显示全部楼层
明天帮你试一下,今天没有时间啦。。。。。。
 楼主| 5402105 发表于 2010-9-20 10:40:27 | 显示全部楼层
在线等,不要沉
天嵌_support1 发表于 2010-9-20 10:52:36 | 显示全部楼层
11# 5402105


这位网友,我这两天忙于其他要事。
如果你还没解决,过两天我一直 35 的看看。
再和你交流
 楼主| 5402105 发表于 2010-9-20 11:44:30 | 显示全部楼层
12# embedsky_lxt


好的,感谢版主们的热心。现在怀疑是解压过程中的链接地址造成的,不过问题还没有找到。别的都可以成功,就是zImage镜像不能在TQ2440上实现,谢谢了。。。。。。
 楼主| 5402105 发表于 2010-9-20 20:30:18 | 显示全部楼层
高手来帮忙啊。。。。。。。。。。。
7935940 发表于 2010-9-20 22:18:19 | 显示全部楼层
我连uImage都启动不了……………………
提示Error: unrecognized/unsupported machine ID (r1 = 0x000000a8).

但是/linux-2.6.30.4/arch/arm/tools/mach-types  里面的机器码已经改成168(0xa8)了啊……

其实光盘里的源码包解压后makefile什么的都是设置好了的吧,只是make menuconfig一下不就得到镜像了?但是得到的zImage只有1.8M,光盘里编译好的镜像是2.19M,难道还有必要步骤?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

i.MX8系列ARM cortex A53 M4 工控板上一条 /1 下一条

Archiver|手机版|小黑屋|天嵌 嵌入式开发社区 ( 粤ICP备11094220号-2 )

GMT+8, 2024-9-18 04:21 , Processed in 1.044855 second(s), 18 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表