重新编译Linux内核,进系统时在/dev/pts这里开始报错,请教。
硬件平台为ATMEL 9260,两片SDRAM,一片NAND。之前有成熟的内核文件(2.6.38.2)和UBI文件系统,一切工作正常。但是之前的内核没有选择支持VLAN,现在需要添加这个功能。然后重新编译后启动就不正常了。因为之前的config是另一个同事做的,现在人已离职,找不到存档,我自己重新配置了一下内核,能起来,但是加载完文件系统后就开始报错。下面贴一下正确启动和异常启动代码:正确的:
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
Linux version 2.6.38.2 (zcj@project-manager) (gcc version 4.2.2) #29 Sat Mar 23 16:16:54 CST 2013
CPU: ARM926EJ-S revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: Atmel AT91SAM9260-EK
Memory policy: ECC disabled, Data cache writeback
Clocks: CPU 200 MHz, master 100 MHz, main 18.432 MHz
Built 1 zonelists in Zone order, mobility grouping on.Total pages: 8128
Kernel command line: console=ttySAC0,115200 mem=32M mtdparts=atmel_nand:128K(BootAgent)ro,896K(Uboot)ro,4M(Kernel1),4M(Kernel2),55M(Root1),55M(Root2),-(data) ubi.mtd=4 root=ubi0:Root rootfstype=ubifs rw
PID hash table entries: 128 (order: -3, 512 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 32MB = 32MB total
Memory: 29328k/29328k available, 3440k reserved, 0K highmem
Virtual kernel memory layout:
vector: 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap: 0xfff00000 - 0xfffe0000 ( 896 kB)
DMA : 0xffc00000 - 0xffe00000 ( 2 MB)
vmalloc : 0xc2800000 - 0xfee00000 ( 966 MB)
lowmem: 0xc0000000 - 0xc2000000 (32 MB)
modules : 0xbf000000 - 0xc0000000 (16 MB)
.init : 0xc0008000 - 0xc0026000 ( 120 kB)
.text : 0xc0026000 - 0xc02d375c (2742 kB)
.data : 0xc02d4000 - 0xc02f1900 ( 119 kB)
NR_IRQS:192
AT91: 96 gpio irqs in 3 banks
Console: colour dummy device 80x30
console enabled
Calibrating delay loop... 99.73 BogoMIPS (lpj=498688)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
devtmpfs: initialized
NET: Registered protocol family 16
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
i2c-gpio i2c-gpio: using pins 55 (SDA) and 56 (SCL)
Switching to clocksource pit
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
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
NetWinder Floating Point Emulator V0.97 (double precision)
JFFS2 version 2.2. (NAND) ?? 2001-2006 Red Hat, Inc.
msgmni has been set to 57
io scheduler noop registered (default)
atmel_usart.0: ttyS0 at MMIO 0xfefff200 (irq = 1) is a ATMEL_SERIAL
atmel_usart.1: ttyS1 at MMIO 0xfffb0000 (irq = 6) is a ATMEL_SERIAL
atmel_usart.2: ttyS2 at MMIO 0xfffb4000 (irq = 7) is a ATMEL_SERIAL
atmel_usart.3: ttyS3 at MMIO 0xfffb8000 (irq = 8) is a ATMEL_SERIAL
brd: module loaded
NAND device: Manufacturer ID: 0xc2, Chip ID: 0xf1 (Unknown NAND 128MiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 525 at 0x0000041a0000
7 cmdlinepart partitions found on MTD device atmel_nand
Creating 7 MTD partitions on "atmel_nand":
0x000000000000-0x000000020000 : "BootAgent"
0x000000020000-0x000000100000 : "Uboot"
0x000000100000-0x000000500000 : "Kernel1"
0x000000500000-0x000000900000 : "Kernel2"
0x000000900000-0x000004000000 : "Root1"
0x000004000000-0x000007700000 : "Root2"
0x000007700000-0x000008000000 : "data"
UBI: attaching mtd4 to ubi0
UBI: physical eraseblock size: 131072 bytes (128 KiB)
UBI: logical eraseblock size: 129024 bytes
UBI: smallest flash I/O unit: 2048
UBI: sub-page size: 512
UBI: VID header offset: 512 (aligned 512)
UBI: data offset: 2048
UBI: max. sequence number: 0
UBI: volume 0 ("Root") re-sized from 366 to 432 LEBs
UBI: attached mtd4 to ubi0
UBI: MTD device name: "Root1"
UBI: MTD device size: 55 MiB
UBI: number of good PEBs: 440
UBI: number of bad PEBs: 0
UBI: number of corrupted PEBs: 0
UBI: max. allowed volumes: 128
UBI: wear-leveling threshold: 4096
UBI: number of internal volumes: 1
UBI: number of user volumes: 1
UBI: available PEBs: 0
UBI: total number of reserved PEBs: 440
UBI: number of PEBs reserved for bad PEB handling: 4
UBI: max/mean erase counter: 1/0
UBI: image sequence number:440952063
UBI: background thread "ubi_bgt0d" started, PID 799
mii init .
MACB_mii_bus: probed
eth0: Atmel MACB at 0xfffc4000 irq 21 (00:23:b8:33:45:66)
eth0: attached PHY driver (mii_bus:phy_addr=ffffffff:00, irq=-1)
usbmon: debugfs is not available
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
at91_ohci at91_ohci: AT91 OHCI
at91_ohci at91_ohci: new USB bus registered, assigned bus number 1
at91_ohci at91_ohci: irq 20, io mem 0x00500000
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.
udc: at91_udc version 3 May 2006
mousedev: PS/2 mouse device common for all mice
rtc-ds1307 0-0068: rtc core: registered ds1307 as rtc0
rtc-ds1307 0-0068: 56 bytes nvram
i2c /dev entries driver
AT91SAM9 Watchdog: sorry, watchdog is disabled
at91_wdt: probe of at91_wdt failed with error -5
TCP cubic registered
NET: Registered protocol family 17
rtc-ds1307 0-0068: setting system clock to 2000-01-01 01:16:56 UTC (946689416)
UBIFS: mounted UBI device 0, volume 0, name "Root"
UBIFS: file system size: 50319360 bytes (49140 KiB, 47 MiB, 390 LEBs)
UBIFS: journal size: 6838272 bytes (6678 KiB, 6 MiB, 53 LEBs)
UBIFS: media format: w4/r0 (latest is w4/r0)
UBIFS: default compressor: lzo
UBIFS: reserved for root:0 bytes (0 KiB)
VFS: Mounted root (ubifs filesystem) on device 0:12.
devtmpfs: mounted
Freeing init memory: 120K
============================================================
nanoRC system, version 0.2.3 (2011-11-17)
: http://sourceforge.net/p/nanorc/.
============================================================
Welcom to xxx linux system.
------------------------------------------------------------
Starting system...
* Mounting proc pesudo file sytem ... [ DONE ]
* Mounting devpts... [ DONE ]
* Remounting root rw... [ DONE ]
* Setting hostname... [ DONE ]
* Setting system clock to hwclock...
* Auto loading modules and creating device nodes
异常的:
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
Linux version 2.6.38.2 (dbh@project-manager) (gcc version 4.2.2) #71 Thu Apr 23 17:15:43 CST 2015
CPU: ARM926EJ-S revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: Atmel AT91SAM9260-EK
Memory policy: ECC disabled, Data cache writeback
Clocks: CPU 200 MHz, master 100 MHz, main 18.432 MHz
Built 1 zonelists in Zone order, mobility grouping on.Total pages: 8128
Kernel command line: console=ttySAC0,115200 mem=32M mtdparts=atmel_nand:128K(BootAgent)ro,896K(Uboot)ro,4M(Kernel1),4M(Kernel2),55M(Root1),55M(Root2),-(data) ubi.mtd=4 root=ubi0:Root rootfstype=ubifs rw
PID hash table entries: 128 (order: -3, 512 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 32MB = 32MB total
Memory: 28808k/28808k available, 3960k reserved, 0K highmem
Virtual kernel memory layout:
vector: 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap: 0xfff00000 - 0xfffe0000 ( 896 kB)
DMA : 0xffc00000 - 0xffe00000 ( 2 MB)
vmalloc : 0xc2800000 - 0xfee00000 ( 966 MB)
lowmem: 0xc0000000 - 0xc2000000 (32 MB)
modules : 0xbf000000 - 0xc0000000 (16 MB)
.init : 0xc0008000 - 0xc0027000 ( 124 kB)
.text : 0xc0027000 - 0xc034cc44 (3224 kB)
.data : 0xc034e000 - 0xc036d1a0 ( 125 kB)
NR_IRQS:192
AT91: 96 gpio irqs in 3 banks
Console: colour dummy device 80x30
console enabled
Calibrating delay loop... 99.73 BogoMIPS (lpj=498688)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
AT91: Power Management
AT91: Starting after general reset
bio: create slab <bio-0> at 0
Switching to clocksource pit
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
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 (double precision)
squashfs: version 4.0 (2009/01/31) Phillip Lougher
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
ROMFS MTD (C) 2007 Red Hat, Inc.
fuse init (API version 7.16)
msgmni has been set to 56
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
atmel_usart.0: ttyS0 at MMIO 0xfefff200 (irq = 1) is a ATMEL_SERIAL
atmel_usart.1: ttyS1 at MMIO 0xfffb0000 (irq = 6) is a ATMEL_SERIAL
atmel_usart.2: ttyS2 at MMIO 0xfffb4000 (irq = 7) is a ATMEL_SERIAL
atmel_usart.3: ttyS3 at MMIO 0xfffb8000 (irq = 8) is a ATMEL_SERIAL
brd: module loaded
NAND device: Manufacturer ID: 0xc2, Chip ID: 0xf1 (Unknown NAND 128MiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 525 at 0x0000041a0000
7 cmdlinepart partitions found on MTD device atmel_nand
Creating 7 MTD partitions on "atmel_nand":
0x000000000000-0x000000020000 : "BootAgent"
0x000000020000-0x000000100000 : "Uboot"
0x000000100000-0x000000500000 : "Kernel1"
0x000000500000-0x000000900000 : "Kernel2"
0x000000900000-0x000004000000 : "Root1"
0x000004000000-0x000007700000 : "Root2"
0x000007700000-0x000008000000 : "data"
UBI: attaching mtd4 to ubi0
UBI: physical eraseblock size: 131072 bytes (128 KiB)
UBI: logical eraseblock size: 129024 bytes
UBI: smallest flash I/O unit: 2048
UBI: sub-page size: 512
UBI: VID header offset: 512 (aligned 512)
UBI: data offset: 2048
UBI: max. sequence number: 5
UBI: attached mtd4 to ubi0
UBI: MTD device name: "Root1"
UBI: MTD device size: 55 MiB
UBI: number of good PEBs: 440
UBI: number of bad PEBs: 0
UBI: number of corrupted PEBs: 0
UBI: max. allowed volumes: 128
UBI: wear-leveling threshold: 4096
UBI: number of internal volumes: 1
UBI: number of user volumes: 1
UBI: available PEBs: 0
UBI: total number of reserved PEBs: 440
UBI: number of PEBs reserved for bad PEB handling: 4
UBI: max/mean erase counter: 1/0
UBI: image sequence number:440952063
mii init .
UBI: background thread "ubi_bgt0d" started, PID 32
MACB_mii_bus: probed
eth0: Atmel MACB at 0xfffc4000 irq 21 (00:23:b8:33:45:66)
eth0: attached PHY driver (mii_bus:phy_addr=ffffffff:00, irq=-1)
mousedev: PS/2 mouse device common for all mice
i2c /dev entries driver
rtc-ds1307 0-0068: rtc core: registered ds1307 as rtc0
rtc-ds1307 0-0068: 56 bytes nvram
at91_i2c at91_i2c: AT91 i2c bus driver.
TCP cubic registered
NET: Registered protocol family 17
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
VFP support v0.3: not present
rtc-ds1307 0-0068: setting system clock to 2000-01-01 21:29:07 UTC (946762147)
UBIFS: recovery needed
UBIFS: recovery completed
UBIFS: mounted UBI device 0, volume 0, name "Root"
UBIFS: file system size: 50319360 bytes (49140 KiB, 47 MiB, 390 LEBs)
UBIFS: journal size: 6838272 bytes (6678 KiB, 6 MiB, 53 LEBs)
UBIFS: media format: w4/r0 (latest is w4/r0)
UBIFS: default compressor: lzo
UBIFS: reserved for root:0 bytes (0 KiB)
VFS: Mounted root (ubifs filesystem) on device 0:12.
Freeing init memory: 124K
============================================================
nanoRC system, version 0.2.3 (2011-11-17)
: http://sourceforge.net/p/nanorc/.
============================================================
Welcom to xxx linux system.
------------------------------------------------------------
Starting system...
* Mounting proc pesudo file sytem ... [ DONE ]
* Mounting devpts...mkdir: can't create directory '/dev/pts': File exists
[ DONE ]
mount: mounting /tmp on /tmp failed: Invalid argument
* Remounting root rw... [ DONE ]
* Setting hostname... [ DONE ]
* Setting system clock to hwclock...
hwclock: can't open '/dev/misc/rtc': No such file or directory
* Auto loading modules and creating device nodes
*xxx: ds18b20 init.
mknod: /dev/ds18b20: File exists
[ DONE ]
* Starting telnetd
* Starting vsftpd
open /dev/mtd6 failed!
* recovering device mac... [ DONE ]
* Starting comd... open /dev/mtd6 failed!
whe_factory_init(): mtd_char_dev_read() err=19
open /dev/mtd6 failed!
conf_read error ret =19
td_conf_init: No such file or directory
td485_init: Illegal seek
[ DONE ]
* Starting snmpd ...... [ DONE ]
* Starting webserver ...... [ DONE ]
* Starting lcdkeyserver ...... TouchLCD Start Run!
Can't Open Serial Port!
: No such file or directory
TouchLCD Start Run!
Can't Open Serial Port!
: No such file or directory
[ DONE ]
can't open /dev/tty1: No such file or directory
TouchLCD Start Run!
Can't Open Serial Port!
....
正确的启动在完成文件系统挂载后最后几行打印是
VFS: Mounted root (ubifs filesystem) on device 0:12.
devtmpfs: mounted
Freeing init memory: 120K
而异常启动在同一个地方缺一行关于devtmfs的打印:
VFS: Mounted root (ubifs filesystem) on device 0:12.
Freeing init memory: 124K
只更改了内核,什么bootstrap、uboot、UBI文件系统什么都没动。请教坛友,有何思路啊,头都快搞炸了。
根据出错一般能找到问题的,重新编译一下内核,在文件系统支持中选中tmpfs.
devtmpfs是临时文件系统,内核启动后在内存中虚拟的,需要读写数据的,如果没有的话肯定不行。
再次检查一下command line,看一个内核的默认启动参数是不是正确。有时候需要手工指定位置。 shell.albert 发表于 2015-4-24 10:51
根据出错一般能找到问题的,重新编译一下内核,在文件系统支持中选中tmpfs.
devtmpfs是临时文件系统,内核 ...
谢谢,已解决。就是在内核配置里面没有添加的原因。
页:
[1]