求救done, booting the kernel.后死机

elderelf 2010-04-15 02:31:16
我编译出一个kernel 大小1MB
烧到板子smdk2443
processor s3c2443
64MB SDRAM
128MB NAND flash
在解压缩完的时候停住了
下面一堆数字为head.S DEBUG讯息.

讯息如下:

U-Boot 1.1.6 (Feb 12 2010 - 10:47:37) for SMDK2443


CPU: S3C2443@400MHz
Fclk = 400MHz, Hclk = 100MHz, Pclk = 50MHz
Board: SMDK2443 Mobile SDRAM
DRAM: 64 MB
NAND: 128 MB
In: serial
Out: serial
Err: serial
Net: No ethernet found.
Hit any key to stop autoboot: 0

NAND read: device 0 offset 0x100000, size 0x300000
3145728 bytes read: OK

NAND read: device 0 offset 0x400000, size 0x100000
1048576 bytes read: OK
## Booting image at 30008000 ...
Image Name: linux-2.6.23
Created: 2010-03-04 6:45:02 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1016424 Bytes = 992.6 kB
Load Address: 30008000
Entry Point: 30008040
Verifying Checksum ... OK
XIP Kernel Image ... OK
## Loading Ramdisk Image at 30800000 ...
Image Name: ramdisk
Created: 2010-03-01 3:59:23 UTC
Image Type: ARM Linux RAMDisk Image (uncompressed)
Data Size: 143486 Bytes = 140.1 kB
Load Address: 30800000
Entry Point: 30800000
Verifying Checksum ... OK

Starting kernel ...

Uncompressing Linux.................................................................... done, booting the kernel.

后面没讯息了

我改过CPU频率,原本解压缩失败变成成功,可是后面完全没讯息,SERIAL PORT 测过了,应该正确,想请问有人碰过这种情形,怎解决的?大概是怎样问题?我找过网路,试过还是没解决...
...全文
1728 27 打赏 收藏 转发到动态 举报
写回复
用AI写文章
27 条回复
切换为时间正序
请发表友善的回复…
发表回复
杨工 2012-06-29
  • 打赏
  • 举报
回复
我是在.h中增加了如下定义好的。
#define CONFIG_SETUP_MEMORY_TAGS
#define CONFIG_INITRD_TAG
#define CONFIG_CMDLINE_TAG
elderelf 2010-05-06
  • 打赏
  • 举报
回复
哇哈哈哈...有一些进展了@@
可是最后他说Kernel panic - not syncing: No init found. Try passing init= option to kernel.

<6>nand_read_oob: from = 0x023a0000, len = 28
<6>nand_read_oob: from = 0x023c0000, len = 28
<6>nand_read_oob: from = 0x023e0000, len = 28
yaffs_read_super: isCheckpointed 0
VFS: Mounted root (yaffs filesystem).
<6>Freeing init memory: 92K
<4>Warning: unable to open an initial console.
<0>Kernel panic - not syncing: No init found. Try passing init= option to kernel.

想请问init是啥?
目前我做的filesystem 是 android,有产生3个档拉 ramdisk.img system.img userdata.img

hallowwar 2010-04-29
  • 打赏
  • 举报
回复
The bootloader is expected to find and initialise all RAM that the kernel will use for volatile data storage in the system. It performs this in a machine dependent manner. It may use internal algorithms to automatically locate and size all RAM, or it may use knowledge of the RAM in the machine, or any other method the bootloader designer sees fit.

In all cases it should be noted that all setup is performed by the bootloader. The kernel should have no knowledge of the setup or configuration of the RAM within a system other than that provided by the bootloader. The use of machine_fixup() within the kernel is most definitely not the correct place for this. There is a clear distinction between the bootloaders responsibility and the kernel in this area.

The physical memory layout is passed to the kernel using the ATAG_MEM parameter. Memory does not necessarily have to be completely contiguous, although the minimum number of fragments is preferred. Multiple ATAG_MEM blocks allow for several memory regions. The kernel will coalesce blocks passed to it if they are contiguous physical regions.

The bootloader may also manipulate the memory with the kernels command line, using the 'mem=' parameter, the options for this parameter are fully documented in linux/Documentation/kernel-parameters.txt

The kernel command line 'mem=' has the syntax mem=<size>[KM][,@<phys_offset>] which allows the size and physical memory location for a memory area to be defined. This allows for specifying multiple discontigous memory blocks at differing offsets by providing the mem= parameter multiple times.

http://blog.chinaunix.net/u/19573/showart_2136173.html

hallowwar 2010-04-29
  • 打赏
  • 举报
回复
我也正要移植内核了,估计也会遇到这个问题的。
hallowwar 2010-04-29
  • 打赏
  • 举报
回复
还没有解决吗, 帮顶个。
elderelf 2010-04-29
  • 打赏
  • 举报
回复
恩...目前乱试中...
把s3c2410.c的nand flash clock设成tacls:1 TWRPH0:0 TWRPH1:0...我看S3C2443的SPEC乱设的
我是读flash里面的第1byte..和第2byte...应该正确吧@@
maf_id=236(十进位)
dev_id=241
還改了regs-nand.h...好像没必要
现在问题是还是会出现一堆讯息
要改舍么

S3C24XX NAND Driver, (c) 2004 Simtec Electronics
<7>s3c2410_nand_probe(c0207118)
<7>s3c2412-nand s3c2410-nand: mapped registers at c4a00000
<7>result 1 from 133000, 0
<7>result 1 from 133000, 3
<7>result 1 from 133000, 0
<6>s3c2412-nand s3c2410-nand: Tacls=1, 7ns Twrph0=1 7ns, Twrph1=1 7ns
tacls:1 TWRPH0:0 TWRPH1:0
<7>s3c2412-nand s3c2410-nand: NF_CONF is 0xfffffff0
<7>initialising set 0 (c3d93a00, info c3cff220)
<6>s3c2412-nand s3c2410-nand: System booted from NAND
maf_id=236
dev_id=241
type:-1071550472mtd->oobsize:64
mtd writesize:2048
,chip->cmdfunc:-1072317044
<6>NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8-bit)
<4>NAND_ECC_NONE selected by board driver. This is not recommended !!
2540
2551
2568
2600
<6>Scanning device for bad blocks
numblocks:2048
<6>nand_read_oob: from = 0x00000000, len = 64
<6>nand_read_oob: from = 0x00020000, len = 64
<6>nand_read_oob: from = 0x00040000, len = 64
.................
.................
.................
unbutun 2010-04-29
  • 打赏
  • 举报
回复
up


up
elderelf 2010-04-27
  • 打赏
  • 举报
回复
哇哈哈哈...现在跑到kernel panic...说filesystem找不到...看前面他说nand flash找不到...
于是我改nand_base.c
加入一行自己的NAND FLASH 在nand_ids.c
指定OOB(out of band)大小...
现在问题来了...ECC我选NONE
可是出现一堆讯息
<6>Scanning device for bad blocks
<4>Bad eraseblock 0 at 0x00000000
<4>Bad eraseblock 1 at 0x00020000
<4>Bad eraseblock 2 at 0x00040000
<4>Bad eraseblock 3 at 0x00060000
<4>Bad eraseblock 4 at 0x00080000
<4>Bad eraseblock 5 at 0x000a0000
<4>Bad eraseblock 6 at 0x000c0000
<4>Bad eraseblock 7 at 0x000e0000
<4>Bad eraseblock 8 at 0x00100000
..............
..............
..............
这个该怎解决阿?请教高手教教我...
对了一次只能回3次...所以没人回就结帖了...然后我也好像没积分了>口<
elderelf 2010-04-22
  • 打赏
  • 举报
回复
[Quote=引用 17 楼 hallowwar 的回复:]

有人问过这个问题
[/Quote]

是喔...您还记得怎解决的嘛?
elderelf 2010-04-22
  • 打赏
  • 举报
回复
找到卡在哪里了,卡在ATAG_CORE,网路说那是bootloader传过来的参数,UBOOT好像是那种格式,好像在条件判断的时候停住了,这到底要怎改...
程式码:

.........
.........
printk("846\n");
/*
* If we have the old style parameters, convert them to
* a tag list.
*/
if (tags->hdr.tag != ATAG_CORE)
{
printk("854\n");
convert_to_tag_list(tags);
}
printk("857\n");

讯息如下:

start_kernel …<5>Linux version 2.6.24 (root@user-desktop) (gcc version 4.3.1 (for S3C64XX Samsung Electronics AP Development Team) ) #149 Thu Apr 22 17:49:44 CST 2010
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
setup_processor done
Machine: SMDK2443
setup_machine done
SMDK2443
826
832
4352
833
846


hallowwar 2010-04-22
  • 打赏
  • 举报
回复
有人问过这个问题
elderelf 2010-04-22
  • 打赏
  • 举报
回复
= =直接给他指定processor_ID
推进到setup_arch...
printk竟然找不到卡在哪里>口<

start_kernel …<5>Linux version 2.6.24 (root@user-desktop) (gcc version 4.3.1 (for S3C64XX Samsung Electronics AP Development Team) ) #136 Thu Apr 22 14:17:56 CST 2010
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
setup_processor done
Machine: SMDK2443
setup_machine done




elderelf 2010-04-21
  • 打赏
  • 举报
回复
囧...kernel刚开始讯息好像出来了,不过怎会是别的板子@@
讯息如下:

start_kernel …<5>Linux version 2.6.24 (root@user-desktop) (gcc version 4.3.1 (for S3C64XX Samsung Electronics AP Development Team) ) #101 Wed Apr 21 12:16:54 CST 2010
CPU configuration botched (ID c0007177), unable to continue.
elderelf 2010-04-20
  • 打赏
  • 举报
回复
有新进展了...原来我DEBUG PORT 错了,结果才没看到错误讯息Orz

有看到一个错误拉
Error: unrecognized/unsupported machine ID (r1 = 0x00000000).

可是我在kernel head.S直接指定值给r1,还是不行
从UBOOT传ID过去也不行
他r1还是0 = =

sikinzen 2010-04-20
  • 打赏
  • 举报
回复
测试时可以在linux内核代码中直接将 machine id 写死,而不去判断uboot传来的参数。
以后有空闲了再查找
elderelf 2010-04-20
  • 打赏
  • 举报
回复
找到問題了....因為他顯示的值是r0 = =
在kernel/head-common.S
難怪不管怎改r1,都是0

現在問題變成他顯示的ID正確,位數太多?
可是不給過@@

Error: unrecognized/unsupported machine ID (r1 = 0x000000000000043c SMDK2443
qwz_007 2010-04-20
  • 打赏
  • 举报
回复
1、u-boot中的命令行参数中console设定有问题,对2.6的内核应该使用ttySAC0,而不是ttyS0。更改为"console=ttySAC0"就可以解决问题。

2、u-boot中FCLK与kernel时钟频率不一致。kernel的FCLK为200MHz,但是uboot的默认值是202.8MHz。(vivi默认的也是200MHz,所以vivi不会出现这个问题。)这样修改uboot的时钟频率设定就可以解决问题。

但是这两个方案并不适合我这种情况。经过分析和读bootm的源代码,现在提出两点额外考虑的地方:

1、如果你在配置文件中不定义tag list的成员,那么默认情况下bootm是不会传递命令行参数的。也就是说,如果你uboot环境变量中设定了正确的bootargs,但是配置文件中没有设置,这时就会出现问题。为了使用上的方便,你至少应该在头文件中定义:

/* tag list choosing */
#define CONFIG_CMDLINE_TAG
//#define CONFIG_SETUP_MEMORY_TAGS



这样就可以保证你在命令行状态下修改环境变量bootargs后,可以传递进内核。同时也就避免了重新编译uboot。

2、我在使用中发现,如果在bootargs中没有指定mem的大小,那么CONFIG_SETUP_MEMORY_TAGS也是需要设定的。我就是因为bootargs没有设定mem,所以导致出现上述的情况。现在我的bootargs为:

bootargs=noinitrd root=/dev/mtdblock3 console=ttySAC0,115200 mem=64M



在这种情况下,使用go和bootm都可以正常引导内核。

综上可知,在tag list的设定上,一定要考虑CONFIG_CMDLINE_TAG和内存两个部分,否则的话,可能出现上述无法引导内核的问题。
cuijie_cn 2010-04-19
  • 打赏
  • 举报
回复
可能的问题很多,关注ing
elderelf 2010-04-19
  • 打赏
  • 举报
回复
[Quote=引用 6 楼 xiaopei1982 的回复:]

后面没讯息了

有可能uboot传递参数失败
[/Quote]

参数哪些会影响阿? initrd? linuxrc?
我查一下网路好了@@
elderelf 2010-04-19
  • 打赏
  • 举报
回复
[Quote=引用 7 楼 deep_pro 的回复:]

引用 5 楼 elderelf 的回复:
tty 的早期调试信息打开,大概要怎开阿?


单步...不太了解...请问是啥意思阿?

谢谢deep_pro,用UBOOT看讯息,我试过后,看到那个位置是乱码,可能是啥原因阿@@?


你确定是根据你的vmlinux计算出的物理地址?
那样的话,就说明连printk缓冲区都没建好,内核就崩溃了
[/Quote]

我是照System.map里面的位址弄的,还有把那位址第一位改成3,去看它位址也是乱码

那个缓冲区没建好,大概是什么问题阿?

加载更多回复(6)

4,441

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 内核源代码研究区
社区管理员
  • 内核源代码研究区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧