linux换内核之后找不到文件,内核问题?基于arm的linux平台更换flash后不能正常启动??...

在将嵌入式产品的Flash从5608更换为1208后,博主遇到了启动到一半停止的问题。通过串口监控发现内核启动到一定阶段后无法找到init程序,可能的原因包括根文件系统问题或内核参数设置错误。建议尝试修改uboot传递给内核的参数,如添加'init=/sbin/init',检查root文件系统中是否存在对应的init程序,并考虑重新分区和配置。同时,讨论了可能涉及的内存映射配置问题。
摘要由CSDN通过智能技术生成

在已经做好的嵌入式产品上做更改,即把原来的5608的flash换成1208的,然后对uboot做了相应的修改后烧入内核及文件系统,可是启动到一半就停止了,实在想不出来到底是哪里出问题了,怀疑是不是内核需做什么修改。希望知道的朋友给点建议,非常感激!

我把串口监控打印的信息贴下:

NOW, Booting Linux......

Uncompressing Linux....................................................................................

done, booting the kernel.

Linux version 2.4.27-vrs1-2440 (s3c2440x@deng.txl) (gcc version 3.3.5)

#128 三 6月 25 17:33:00 CST 2008

CPU: Arm920Tid(wb) revision 0

Machine: Samsung-SMDK2440

Warning: bad configuration page, trying to continue

On node 0 totalpages: 8192

zone(0): 8192 pages.

zone(1): 0 pages.

zone(2): 0 pages.

Kernel command line: root=1f02 mem=32M console=tty0 console=ttyS0 init=/linuxrc

Console: colour dummy device 80x30

Calibrating delay loop... 202.75 BogoMIPS

Memory: 32MB = 32MB total

Memory: 29576KB available (1294K code, 1435K data, 64K init)

Dentry cache hash table entries: 4096 (order: 3, 32768 bytes)

Inode cache hash table entries: 2048 (order: 2, 16384 bytes)

Mount cache hash table entries: 512 (order: 0, 4096 bytes)

Buffer cache hash table entries: 1024 (order: 0, 4096 bytes)

Page-cache hash table entries: 8192 (order: 3, 32768 bytes)

CPU: Testing write buffer: pass

POSIX conformance testing by UNIFIX

Linux NET4.0 for Linux 2.4

Based upon Swansea University Computer Society NET3.039

Initializing RT netlink socket

CPU clock = 406.000 Mhz, HCLK = 101.500000 Mhz, PCLK = 50.750000 Mhz

CPU clock = 406.000 Mhz, HCLK = 101.500000 Mhz, PCLK = 50.750000 Mhz

Initializing S3C2440 buffer pool for DMA workaround

Starting kswapd

devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au)

devfs: boot_options: 0x1

JFFS2 version 2.1. (C) 2001 Red Hat, Inc., designed by Axis Communications AB.

ttyS%d0 at I/O 0x50000000 (irq = 52) is a S3C2440

Console: switching to colour frame buffer device 100x60

Installed S3C2440 frame buffer

pty: 256 Unix98 ptys configured

S3C2440 Real Time Clock Driver v0.1

RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize

NAND device: Manufacture ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MB 3,3V)

nand flash size is 0x04000000

Creating 4 MTD partitions on "NAND 64MB 3,3V":

0x00000000-0x00030000 : "NAND partition 0 : Bootloader"

0x00030000-0x00200000 : "NAND partition 1 : Kernel"

0x00200000-0x03200000 : "NAND partition 2"

0x03200000-0x04000000 : "NAND partition 3"

i2c-core.o: i2c core module version 2.6.1 (20010830)

Samsung S3CX (i2c) algorithm module version 2.6.1 (20010830)

iic_elfin_init: Samsung S3CX iic adapter module version 2.6.1 (20010830)

enable_irq(27) unbalanced from c00c398c

elfin_init: Initialized IIC on S3CX, 6kHz clock

iic_elfin_init: initialized iic-bus at 0xf4000000.

usb.c: registered new driver usbdevfs

usb.c: registered new driver hub

host/usb-ohci.c: USB OHCI at membase 0xe9000000, IRQ 26

usb.c: new USB bus registered, assigned bus number 1

Product: USB OHCI Root Hub

SerialNumber: e9000000

hub.c: USB hub found

hub.c: 2 ports detected

usb.c: registered new driver usbkbd

usbkbd.c: :USB HID Boot Protocol keyboard driver

usb.c: registered new driver usbnet

NET4: Linux TCP/IP 1.0 for NET4.0

IP Protocols: ICMP, UDP, TCP

IP: routing cache hash table of 512 buckets, 4Kbytes

TCP: Hash tables configured (established 2048 bind 4096)

NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.

NetWinder Floating Point Emulator V0.97 (double precision)

VFS: Mounted root (cramfs filesystem) readonly.

Mounted devfs on /dev

Freeing init memory: 64K

Kernel panic: No init found.  Try passing init= option

to kernel.系统启动后就停在此。

在线等待答复,希望尽快解决问题!!!!

|

可能的两个原因:

(1)你的root文件系统做的有问题,kernel找不到init程序;

(2)传递给内核的参数”init=“有问题;

你可以视作在uboot中,修改或者添加给内核的参数"init=/sbin/init" 或者"init=/bin/bash"之类的参数,实际路径到底是什么,取决与的root文件系统。

|

看了下你的init=/linuxrc, 你的根文件系统的根目录下有没有linuxrc?

|

root=1f02

这个是什么意思?

按照我的理解,应该类似 root=/dev/mtdblock2 什么的。

|

根据打印信息,你的root文件系统已经mount上,其实你可以换一个init 参数,比如init=/bin/sh 之类,试一下看能否得到一个shell。有时候,换一下思路思考和试验,不要老盯着一个东西不放。思路要发散一点。

|

系统做好基本的硬件初始化后,就会调用do_mounts.c: mount_root(),根据boot传入的参数加载根文件系统。

接下来运行该文件系统下的/sbin/init,或者你自己指定的init程序。

你可以先偿试先在你的根文件系统/sbin/下加一个init程序试一下。

|

说说你的1208Flash 上的系统是怎么烧上去的?

|

容量变大,有没有重新分区

|

重新配置一下你的系统给init的值整对,或者再改一下uboot看看是不是flash驱动有问题

|

CONFIG_MTD_PHYSMAP_START=0x??000000

CONFIG_MTD_PHYSMAP_LEN=0x?00000

CONFIG_MTD_PHYSMAP_BANKWIDTH=1

如果是并行FLASH, 是不是要改一下映射的内存区长度呢?

|

关注ing, 希望楼主 解决后分享下经验。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值