主题 : 请问各位大侠:bootloader,kernel 和文件系统之间的组合有什么严格要求么? 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 65964
精华: 0
发帖: 19
金钱: 95 两
威望: 19 点
综合积分: 38 分
注册时间: 2012-03-24
最后登录: 2012-07-19
楼主  发表于: 2012-04-08 20:15

 请问各位大侠:bootloader,kernel 和文件系统之间的组合有什么严格要求么?

各位大侠,我今天搞了一天了,十分郁闷啊~~我打算实验一个视频监控系统,初步设想是这样的:(本来想在文件系统移植成功后安装mjpg-streamer的,但是......)
1、用supervivi来启动和加载内核,因为这样我就可以先不用去移植u-boot,等以后我通过浏览器看到图像后在去移植u-boot;
2、我选用了Linux 2.6.32.59版本的内核,打了yaffs2的补丁,使用了make mini2440_defconfig后,直接通过menuconfig,选上了yaffs2和zc301的摄像头驱动;
3、用rootfs_qtopia_qt4作为文件系统;
4、分别把zImage和rootfs_qtopia_qt4,通过DNW烧到nand flash后,按b重启,之后就错了。
搞了一天啊~每次尝试修改内核后一个make就要让我等10分钟啊~~等不起了
各位高人请为我指点一下迷津吧~~~
启动时控制台输出如下:
Enter your selection: b
Copy linux kernel from 0x00060000 to 0x30008000, size = 0x00500000 ... pos = 5242880, good pos = 560000
done
zImage magic = 0x016f2818
Setup linux parameters at 0x30000100
linux command line is: "noinitrd root=/dev/mtdblock3 init=/linuxrc console=ttySAC0"
MACH_TYPE = 1999
NOW, Booting Linux......
Uncompressing Linux................................................................................................................................................ done, booting the kernel.
Linux version 2.6.32.59 (root@localhost.localdomain) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-176) ) #1 Sun Apr 8 18:50:28 CST 2012
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
CPU: VIVT data cache, VIVT instruction cache
Machine: MINI2440
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/mtdblock3 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: 60116KB available (4072K code, 447K data, 140K init, 0K highmem)
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
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
MINI2440: Option string mini2440=0tb
MINI2440: 't' ignored, touchscreen not compiled in
MINI2440: LCD [0:240x320] 1:800x480 2:1024x768
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
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.
JFFS2 version 2.2. (NAND) 漏 2001-2006 Red Hat, Inc.
ROMFS MTD (C) 2007 Red Hat, Inc.
yaffs Apr  8 2012 18:44:48 Installing.
msgmni has been set to 117
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
Console: switching to colour frame buffer device 60x53
fb0: s3c2410fb frame buffer device
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
at24 0-0050: 1024 byte 24c08 EEPROM (writable)
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c24xx-nand s3c2440-nand: Tacls=3, 29ns Twrph0=7 69ns, Twrph1=3 29ns
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
Bad eraseblock 239 at 0x000001de0000
Bad eraseblock 404 at 0x000003280000
Bad eraseblock 431 at 0x0000035e0000
Bad eraseblock 827 at 0x000006760000
Bad eraseblock 1265 at 0x000009e20000
Bad eraseblock 1273 at 0x000009f20000
Bad eraseblock 1464 at 0x00000b700000
Bad eraseblock 1621 at 0x00000caa0000
Bad eraseblock 1879 at 0x00000eae0000
Creating 5 MTD partitions on "NAND 256MiB 3,3V 8-bit":
0x000000000000-0x000000040000 : "supervivi"
ftl_cs: FTL header not found.
0x000000040000-0x000000060000 : "param"
uncorrectable error :
0x000000060000-0x000000560000 : "Kernel"
uncorrectable error :
0x000000560000-0x000040560000 : "root"
mtd: partition "root" extends beyond the end of device "NAND 256MiB 3,3V 8-bit" -- size truncated to 0xfaa0000
ftl_cs: FTL header not found.
0x000000000000-0x000040000000 : "nand"
mtd: partition "nand" extends beyond the end of device "NAND 256MiB 3,3V 8-bit" -- size truncated to 0x10000000
uncorrectable error :
dm9000 Ethernet Driver, V1.31
dm9000 dm9000: eth%d: Invalid ethernet MAC address. Please set using ifconfig
eth0: dm9000e at c486e300,c4872304 IRQ 51 MAC: 00:00:00:00:00:00 (chip)
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
s3c2440-usbgadget s3c2440-usbgadget: S3C2440: increasing FIFO to 128 bytes
g_ether gadget: using random self ethernet address
g_ether gadget: using random host ethernet address
usb0: MAC 7e:b6:df:9a:42:c3
usb0: HOST MAC 6e:df:66:35:1e:17
g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
g_ether gadget: g_ether ready
mice: PS/2 mouse device common for all mice
input: gpio-keys as /devices/platform/gpio-keys/input/input0
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
s3c2410-rtc s3c2410-rtc: rtc disabled, re-enabling
s3c2410-rtc s3c2410-rtc: rtc core: registered s3c as rtc0
i2c /dev entries driver
Linux video capture interface: v2.00
zc0301: V4L2 driver for ZC0301[P] Image Processor and Control Chip v1:1.10
usbcore: registered new interface driver zc0301
gspca: main v2.7.0 registered
usbcore: registered new interface driver zc3xx
zc3xx: registered
usbcore: registered new interface driver uvcvideo
USB Video Class driver (v0.1.0)
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled
cpuidle: using governor ladder
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
s3c-sdi s3c2440-sdi: powered down.
s3c-sdi s3c2440-sdi: mmc0 - using pio, sw SDIO IRQ
Registered led device: led1
Registered led device: led2
Registered led device: led3
Registered led device: led4
Registered led device: backlight
usbcore: registered new interface driver hiddev
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
Advanced Linux Sound Architecture Driver Version 1.0.21.
No device for DAI UDA134X
No device for DAI s3c24xx-i2s
S3C24XX_UDA134X SoC Audio driver
UDA134X SoC Audio Codec
asoc: UDA134X <-> s3c24xx-i2s mapping ok
ALSA device list:
  #0: S3C24XX_UDA134X (UDA134X)
TCP cubic registered
NET: Registered protocol family 17
s3c2410-rtc s3c2410-rtc: setting system clock to 2008-10-02 11:42:27 UTC (1222947747)
yaffs: dev is 32505859 name is "mtdblock3"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.3, "mtdblock3"
yaffs: auto selecting yaffs2
block 197 is bad
block 362 is bad
block 389 is bad
block 785 is bad
block 1223 is bad
block 1231 is bad
block 1422 is bad
block 1579 is bad
block 1837 is bad
yaffs_read_super: isCheckpointed 0
VFS: Mounted root (yaffs filesystem) on device 31:3.
Freeing init memory: 140K
Warning: unable to open an initial console.
Failed to execute /linuxrc.  Attempting defaults...
Kernel panic - not syncing: No init found.  Try passing init= option to kernel.
[<c003089c>] (unwind_backtrace+0x0/0xdc) from [<c030fef4>] (panic+0x40/0x120)
[<c030fef4>] (panic+0x40/0x120) from [<c002b5b4>] (init_post+0xcc/0xf4)
[<c002b5b4>] (init_post+0xcc/0xf4) from [<c0008448>] (kernel_init+0xe4/0x118)
[<c0008448>] (kernel_init+0xe4/0x118) from [<c002c854>] (kernel_thread_exit+0x0/0x8)
级别: 新手上路
UID: 65964
精华: 0
发帖: 19
金钱: 95 两
威望: 19 点
综合积分: 38 分
注册时间: 2012-03-24
最后登录: 2012-07-19
1楼  发表于: 2012-04-08 22:27
不断看帖后发现有两个新问题:

一、bootloader,kernel 和文件系统都用友善之臂自带的,安装mjpg-streamer后报错:

MJPG Streamer Version.: 2.0 
 i: Using V4L2 device.: /dev/video0 
 i: Desired Resolution: 640 x 480
 i: Frames Per Second.: 5 i: Format............: YUV
 i: JPEG Quality......: 80 Pixel format is unavailable, using JPEG  should never arrive exit fatal !!
 i: init_VideoIn failed


看了友善的pdf(基于Mini2440 通过网络浏览和控制CMOS 或USB 摄像头 本文档版本日期:2010‐4‐5)后知道,是mjpg-streamer不支持我的摄像头(zc301),可以自行修改摄像头驱动使之被支持,或者是花钱买一个被支持的摄像头......以我的能力,必然是第二种。


[ 此帖被kevin1016在2012-04-15 15:59重新编辑 ]
级别: 新手上路
UID: 65964
精华: 0
发帖: 19
金钱: 95 两
威望: 19 点
综合积分: 38 分
注册时间: 2012-03-24
最后登录: 2012-07-19
2楼  发表于: 2012-04-10 14:53

 回 楼主(kevin1016) 的帖子

今天问了老师,解决了:

原因如下:

我的kernel没有下载nand flash上与supervivi规定的对应位置。我写在了0x100000到0x300000了。所以读取kernel错误,启动失败。
级别: 新手上路
UID: 51584
精华: 0
发帖: 23
金钱: 135 两
威望: 27 点
综合积分: 46 分
注册时间: 2011-07-05
最后登录: 2012-09-06
3楼  发表于: 2012-05-07 09:19
kernel不是自己下载到对应位置么