• «
  • 1
  • 2
  • »
  • Pages: 1/2     Go
主题 : 移植内核linux-2.6.32后。提示错误。无法启动。 复制链接 | 浏览器收藏 | 打印
级别: 侠客
UID: 9683
精华: 0
发帖: 56
金钱: 325 两
威望: 92 点
综合积分: 112 分
注册时间: 2009-10-10
最后登录: 2017-09-13
楼主  发表于: 2009-12-12 15:57

 移植内核linux-2.6.32后。提示错误。无法启动。

错误如下。是不是配置的时候选错了什么?
请各位大侠帮助。新手。看不明白到底是什么地方错了。

Enter your selection: b
Copy linux kernel from 0x00060000 to 0x30008000, size = 0x00200000 ... done
zImage magic = 0x016f2818
Setup linux parameters at 0x30000100
linux command line is: "noinitrd root=/dev/mtdblock2 init=/linuxrc console=ttySAC0"
MACH_TYPE = 1999
NOW, Booting Linux......
Uncompressing Linux............................................................................................................................ done, booting the kernel.
Linux version 2.6.32 (root@Test) (gcc version 4.3.2 (Sourcery G++ Lite 2008q3-72) ) #1 Sun Dec 13 15:13:01 CST 2009
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
CPU: VIVT data cache, VIVT instruction cache
Machine: Yayi-2440
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/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: 60828KB available (3456K code, 316K data, 132K init, 0K highmem)
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
S3C Power Management, Copyright 2004 Simtec Electronics
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 <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
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.
NetWinder Floating Point Emulator V0.97 (extended precision)
JFFS2 version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
msgmni has been set to 118
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
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, 9ns Twrph0=4 39ns, Twrph1=1 9ns
s3c24xx-nand s3c2440-nand: NAND soft ECC
NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8-bit)
Scanning device for bad blocks
Creating 3 MTD partitions on "NAND 128MiB 3,3V 8-bit":
0x000000000000-0x000000050000 : "Boot Agent"
mtd: partition "Boot Agent" doesn't end on an erase block -- force read-only
0x000000050000-0x000000250000 : "S3C2410 flash partition 1"
mtd: partition "S3C2410 flash partition 1" doesn't start on an erase block boundary -- force read-only
0x000000250000-0x000004000000 : "S3C2410 flash partition 2"
mtd: partition "S3C2410 flash partition 2" doesn't start on an erase block boundary -- force read-only
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
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
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.5.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
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)
List of all partitions:
1f00             320 mtdblock0 (driver?)
1f01            2048 mtdblock1 (driver?)
1f02           63168 mtdblock2 (driver?)
No filesystem could mount root, tried:  cramfs
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,2)
[<c002f9dc>] (unwind_backtrace+0x0/0xdc) from [<c028af88>] (panic+0x40/0x118)
[<c028af88>] (panic+0x40/0x118) from [<c0009000>] (mount_block_root+0x1d0/0x210)
[<c0009000>] (mount_block_root+0x1d0/0x210) from [<c0009298>] (prepare_namespace+0x164/0x1bc)
[<c0009298>] (prepare_namespace+0x164/0x1bc) from [<c00085bc>] (kernel_init+0xd8/0x10c)
[<c00085bc>] (kernel_init+0xd8/0x10c) from [<c002ae14>] (kernel_thread_exit+0x0/0x8)

级别: 侠客
UID: 9203
精华: 0
发帖: 69
金钱: 590 两
威望: 265 点
综合积分: 138 分
注册时间: 2009-09-21
最后登录: 2010-03-26
1楼  发表于: 2009-12-12 19:04
哥不懂呢
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
2楼  发表于: 2009-12-12 22:34

Creating 3 MTD partitions on "NAND 128MiB 3,3V 8-bit":
0x000000000000-0x000000050000 : "Boot Agent"
mtd: partition "Boot Agent" doesn't end on an erase block -- force read-only
0x000000050000-0x000000250000 : "S3C2410 flash partition 1"
mtd: partition "S3C2410 flash partition 1" doesn't start on an erase block boundary -- force read-only
0x000000250000-0x000004000000 : "S3C2410 flash partition 2"
mtd: partition "S3C2410 flash partition 2" doesn't start on an erase block boundary -- force read-only

内核所用的NAND Flash分区表不是合法的(不是NAND Flash的block大小(128K)对齐的)。要让内核正确启动,你需要设置内核使用和supervivi相一致的分区表。可以在supervivi命令行模式下用"part show"命令查看supervivi所用的NAND Flash分区表
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 侠客
UID: 9683
精华: 0
发帖: 56
金钱: 325 两
威望: 92 点
综合积分: 112 分
注册时间: 2009-10-10
最后登录: 2017-09-13
3楼  发表于: 2009-12-12 22:41
我是用bon part 0 320k 2368k进行默认分区的,
分区内容在最后我不会填写。因为我是128M的。。看到很多资料都是64M的。
我写的是这样:
---------------------------------------------------------------------------------------------------------
      [0] = {
                .name   = "vivi",
                .size   = SZ_16K*20,
                .offset = 0,
        },
        [1] = {
                .name   = "kernel",
                .offset = SZ_16K*20,
                .size   = SZ_2M,
        },
        [2] = {
                .name   = "NAND",
                .offset = SZ_2M+SZ_16K*20,
                .size   = SZ_63168K,
        },
_________________________________________________________
是不是最后面填写错误了?
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
4楼  发表于: 2009-12-12 22:59

 回 3楼(yayi) 的帖子

是的,我已经解释过了,在128M上,分区起始地址必须是128K对齐的。
另外,不要用bon part命令分区,它对于Linux的MTD NAND Flash驱动没有任何意义。正确的方法是用part命令操作分区。
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 侠客
UID: 9683
精华: 0
发帖: 56
金钱: 325 两
威望: 92 点
综合积分: 112 分
注册时间: 2009-10-10
最后登录: 2017-09-13
5楼  发表于: 2009-12-12 23:51
请问下版主
修改arch/arm/mach-s3c2440/mach-smdk2440.c文件的以下内容有什么意思?新手,不明白,如果换一个硬件,我需要从什么地方看资料?从而知道如何修改以下内容?
--------------------------------------------------------------------------------------------------------------------------
static struct s3c2410fb_display smdk2440_lcd_cfg __initdata =
{
      ...
      .right_margin = 37,
      .hsync_len = 6,
      .upper_margin =2,
      .lower_margin = 6,
      .vsync_len =2,
};
static struct s3c2410fb_mach_info smdk2440_fb_info    __initdata  ={
...
.default_display =0
      .gpccon       = 0xaa955699,
      .gpccon_mask      = 0xffc003cc,
      .gpcup        = 0x0000ffff,
     .gpcup_mask = 0xffffffff,
     .gpdcon     = 0xaa95aaa1,
     .gpdcon_mask    = 0xffc0fff0,
     .gpdup       = 0x0000faff,
     .gpdup_mask = 0xffffffff,
.lpcsel = 0xf82,
};
------------------------------------------------------------------------------------------------------------------------------






还有我看很多内核移植都说要修改以下,又是有什么意思?作用是什么?如果换个硬件又是从哪里知道以下的修改?
--------------------------------------------------------------------------------------------------------------------
{
...
.tacls = 0,
.twrph0 = 30,
.twrph1=0,
...
};
----------------------------------------------------------------------------------------------------------------
这个阶段正是我事业的上升期,我怎么能走得开呢?
级别: 精灵王
UID: 3197
精华: 3
发帖: 770
金钱: 6995 两
威望: 5398 点
综合积分: 1600 分
注册时间: 2008-12-30
最后登录: 2010-12-31
6楼  发表于: 2009-12-13 00:00
其实看看变量名的含义就可以了解到。比如:right_margin (右边_边界距离)
级别: 侠客
UID: 9683
精华: 0
发帖: 56
金钱: 325 两
威望: 92 点
综合积分: 112 分
注册时间: 2009-10-10
最后登录: 2017-09-13
7楼  发表于: 2009-12-13 02:52
我的板子的分区信息如下:
---------------------------------------------------------------------------------------
Number of partitions: 4
name            :       offset          size            flag
------------------------------------------------------------
vivi            :       0x00000000      0x00040000      0
param           :       0x00040000      0x00020000      0
kernel          :       0x00060000      0x00200000      0
root            :       0x00260000      0x3fd80000      0
---------------------------------------------------------------------------------------

我的内核分区修改如下:
-----------------------------------------------------------------------------------------
static struct mtd_partition smdk_default_nand_part[] = {
        [0] = {
                .name   = "vivi",
                .size   = 0x00040000,
                .offset = 0x00000000,
        },
        [1] = {
                .name   = "param",
                .offset = 0x00040000,
                .size   = 0x00020000,
        },
        [2] = {
                .name   = "kernel",
                .offset = 0x00600000,
                .size   = 0x00200000,
        },
        [3] = {
                .name   = "root",
                .offset = 0x00260000,
                .size   = 0x3fd80000,
        },
};
---------------------------------------------------------------


请问这样是否正确?
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
8楼  发表于: 2009-12-13 10:48

 回 7楼(yayi) 的帖子

        [2] = {
                .name   = "kernel",
                .offset = 0x00600000,
                .size   = 0x00200000,
        },

应该是
        [2] = {
                .name   = "kernel",
                .offset = 0x00060000,
                .size   = 0x00200000,
        },
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 侠客
UID: 9683
精华: 0
发帖: 56
金钱: 325 两
威望: 92 点
综合积分: 112 分
注册时间: 2009-10-10
最后登录: 2017-09-13
9楼  发表于: 2009-12-13 16:15
对....真的很抱歉....老眼昏花了..
  • «
  • 1
  • 2
  • »
  • Pages: 1/2     Go