嵌入式爱好者

查看: 9403|回复: 5

国嵌视频中,使用initamfs制作根文件系统碰到的问题

[复制链接]

0

主题

0

帖子

3

积分

扫一扫,手机访问本帖
发表于 2012-12-8 17:22:30 | 显示全部楼层 |阅读模式
我是参考 ——  视频(国嵌)\课程5(内核驱动进阶班-上)\第3天(嵌入式Linux系统构建)中的3.3节嵌入式文件系统这一视频的方法来制作用在我开发板ok6410上的initamfs文件系统的。我大体的制作步骤是:
1. 按照国嵌视频3.2节的方法首先在自己的VMare的linux系统下制作出根文件系统--/rootfs 这个目录,然后一步一步的按照视频上面说的,导入busybox、现有的能在我板子上面跑的/etc目录等等。
2. 接着我按照国嵌3.3 的视频,在光盘中提供的linux-3.0.1的内核中,配置内核中的各种选项(在视频中,与制作initamfs根文件系统有关的一些配置选项,都是按照视频一步一步来的,都边看视频边做了好几遍了,应该不会出错的),然后编译出了uImage。
3.接着按照视频,把uImage拷在我之前建的tftpboot文件夹下,接着用tftp 下载在c0800000下,用bootm运行之后,在DNW中始终卡在了下面的画面(看我的打印信息)。真不知道怎么办了?并且我在做nfs的时候也是出现这样类似的问题。望高手帮帮忙。我是新手。谢谢!都在这卡了一个星期了。

先说明下:在做实验之前,我的开发板中被我用SD卡一键式方法烧写了最新的官方发布的linux 光盘开发资料(Linux3.0.1-2012-09 版本,其中我用SD卡烧写了下载下来的目录下的u-boot_ram256.bin、zImage、rootfs.yaffs2-nand2g这三个文件,系统可以成功运行,在开发板上有图形界面),如下:
下载地址:OK6410-A光盘 256M内存 4G Nandflash   http://dl.vmall.com/c0ittgfmf9      

详细的DNW中的打印信息在下面:(望各位大侠们,指点下!先在这说声谢谢了111)

###################### User Menu for OK6410#####################
[1] Format the nand flash
[2] Burn image from USB
[3] configure the lcd size
[4] Boot the system
[5] Reboot the u-boot
[6] Exit to command line
-----------------------------Select---------------------------------
Enter your Selection:6
SMDK6410 # ping 192.168.0.10
Found DM9000 ID:90000a46 at address 18000300 !
DM9000 work in 16 bus width
bd->bi_entaddr: 00:40:5c:26:0a:5b
[eth_init]MAC:0:40:5c:26:a:5b:
host 192.168.0.10 is alive
SMDK6410 # tftp c0800000 uImage
Found DM9000 ID:90000a46 at address 18000300 !
DM9000 work in 16 bus width
bd->bi_entaddr: 00:40:5c:26:0a:5b
[eth_init]MAC:0:40:5c:26:a:5b:
TFTP from server 192.168.0.10; our IP address is 192.168.0.232
Filename 'uImage'.
Load address: 0xc0800000
Loading: T #################################################################
  #################################################################
  #################################################################
  #################################################################
  #################################################################
  #################################################################
  #################################################################
  #################################################################
  #################################################################
  #################################################################
  #################################################################
done
Bytes transferred = 3657076 (37cd74 hex)
SMDK6410 # bootm c0800000
## Booting image at c0800000 ...
   Image Name:   Linux-3.0.1
   Created:      2012-11-28  15:41:09 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3657012 Bytes =  3.5 MB
   Load Address: 50008000
   Entry Point:  50008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Linux version 3.0.1 (root@ubuntu) (gcc version 4.3.2 (Sourcery G++ Lite 2008q3-72) ) #3 Wed Nov 28 07:40:35 PST 2012
S3C24XX Clocks, Copyright 2004 Simtec Electronics
camera: no parent clock specified
S3C64XX: PLL settings, A=532000000, M=532000000, E=24000000
S3C64XX: HCLK2=266000000, HCLK=133000000, PCLK=66500000
mout_apll: source is fout_apll (1), rate is 532000000
mout_epll: source is epll (1), rate is 24000000
mout_mpll: source is mpll (1), rate is 532000000
mmc_bus: source is mout_epll (0), rate is 24000000
mmc_bus: source is mout_epll (0), rate is 24000000
mmc_bus: source is mout_epll (0), rate is 24000000
usb-bus-host: source is clk_48m (0), rate is 48000000
uclk1: source is dout_mpll (1), rate is 66500000
spi-bus: source is mout_epll (0), rate is 24000000
spi-bus: source is mout_epll (0), rate is 24000000
audio-bus: source is mout_epll (0), rate is 24000000
audio-bus: source is mout_epll (0), rate is 24000000
audio-bus: source is mout_epll (0), rate is 24000000
irda-bus: source is mout_epll (0), rate is 24000000
(下面还有打印信息,是连着的,谢谢)

回复

使用道具 举报

0

主题

0

帖子

3

积分

 楼主| 发表于 2012-12-8 17:25:29 | 显示全部楼层
camera: no parent clock specified
Kernel command line: root=/dev/mtdblock2 rootfstype=yaffs2 init=/linuxrc console=ttySAC0,115200
PID hash table entries: 1024 (order: 0, 4096 bytes)
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 256MB = 256MB total
Memory: 206816k/206816k available, 55328k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    DMA     : 0xff600000 - 0xffe00000   (   8 MB)
    vmalloc : 0xd0800000 - 0xf4000000   ( 568 MB)
    lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
    pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    modules : 0xbf000000 - 0xbfe00000   (  14 MB)
      .init : 0xc0008000 - 0xc0033000   ( 172 kB)
      .text : 0xc0033000 - 0xc0707580   (6994 kB)
      .data : 0xc0708000 - 0xc0748bc8   ( 259 kB)
       .bss : 0xc0748bec - 0xc07c6508   ( 503 kB)
SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:246 nr_irqs:246 246
VIC @f4000000: id 0x00041192, vendor 0x41
VIC @f4010000: id 0x00041192, vendor 0x41
Console: colour dummy device 80x30
console [ttySAC0] enabled
Calibrating delay loop... 528.79 BogoMIPS (lpj=2643968)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
hw perfevents: enabled with v6 PMU driver, 3 counters available
devtmpfs: initialized
NET: Registered protocol family 16
hw-breakpoint: found 6 breakpoint and 1 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 4 bytes.
s3c64xx_dma_init: Registering DMA channels
PL080: IRQ 73, at d0804000, channels 0..8
PL080: IRQ 74, at d0806000, channels 8..16
bio: create slab <bio-0> at 0
SCSI subsystem initialized
------------[ cut here ]------------
WARNING: at drivers/gpio/gpiolib.c:101 gpio_ensure_requested+0x58/0x124()
---[ end trace da227214a82491b7 ]---
usbcore: registered new inte**ce driver usbfs
usbcore: registered new inte**ce driver hub
usbcore: registered new device driver usb
s3c-i2c s3c2440-i2c.0: slave address 0x10
s3c-i2c s3c2440-i2c.0: bus frequency set to 64 KHz
s3c-i2c s3c2440-i2c.0: i2c-0: S3C I2C adapter
Advanced Linux Sound Architecture Driver Version 1.0.24.
cfg80211: Calling CRDA to update world regulatory domain
NET: Registered protocol family 2
IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
TCP established hash table entries: 8192 (order: 4, 65536 bytes)
TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
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 named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
audit: initializing netlink socket (disabled)
type=2000 audit(0.270:1): initialized
nfs4filelayout_init: NFSv4 File Layout Driver Registering...
msgmni has been set to 403
alg: No test for stdrng (krng)
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)
LCD TYPE :: LTE480WV will be initialized
Console: switching to colour frame buffer device 60x34
fb0: s3cfb frame buffer device
fb1: s3cfb frame buffer device
fb2: s3cfb frame buffer device
fb3: s3cfb frame buffer device
s3c6400-uart.0: ttySAC0 at MMIO 0x7f005000 (irq = 16) is a S3C6400/10
s3c6400-uart.1: ttySAC1 at MMIO 0x7f005400 (irq = 20) is a S3C6400/10
s3c6400-uart.2: ttySAC2 at MMIO 0x7f005800 (irq = 24) is a S3C6400/10
s3c6400-uart.3: ttySAC3 at MMIO 0x7f005c00 (irq = 28) is a S3C6400/10
NAND device: Manufacturer ID: 0xec, Chip ID: 0xd5 (Samsung NAND 2GiB 3,3V 8-bit)
Creating 4 MTD partitions on "NAND 2GiB 3,3V 8-bit":
0x000000000000-0x000000100000 : "Bootloader"
0x000000100000-0x000000600000 : "Kernel"
0x000000600000-0x000007e00000 : "User"
0x000007e00000-0x000080000000 : "File System"
vcan: Virtual CAN inte**ce driver
slcan: serial line CAN inte**ce driver
slcan: 10 dynamic inte**ce channels.
CAN device driver inte**ce
mcp251x: setup gpio pins CS and External Int
mcp2515 spi1.0: MCP251x didn't enter in conf mode after reset
mcp2515 spi1.0: Probe failed
mcp2515 spi1.0: probe failed
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
PPP MPPE Compression module registered
NET: Registered protocol family 24
dm9000 Ethernet Driver, V1.31
eth0: dm9000a at d081a000,d0c00004 IRQ 108 MAC: 08:90:00:a0:90:90 (platform data)
libertas_sdio: Libertas SDIO driver
libertas_sdio: Copyright Pierre Ossman
usbcore: registered new inte**ce driver rt73usb
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 79, io mem 0x74300000
usb usb1: New USB device found, idVendor=1d6b, idProduct=0001
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: S3C24XX OHCI
usb usb1: Manufacturer: Linux 3.0.1 ohci_hcd
usb usb1: SerialNumber: s3c24xx
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new inte**ce driver usb-storage
USB Mass Storage support registered.
usbcore: registered new inte**ce driver usbserial
usbserial: USB Serial Driver core
USB Serial support registered for pl2303
usbcore: registered new inte**ce driver pl2303
pl2303: Prolific PL2303 USB to serial adaptor driver
dummy_hcd dummy_hcd: USB Host+Gadget Emulator, driver 02 May 2005
dummy_hcd dummy_hcd: Dummy host controller
dummy_hcd dummy_hcd: new USB bus registered, assigned bus number 2
usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb2: Product: Dummy host controller
usb usb2: Manufacturer: Linux 3.0.1 dummy_hcd
usb usb2: SerialNumber: dummy_hcd
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
mousedev: PS/2 mouse device common for all mice
input: gpio-keys as /devices/platform/gpio-keys/input/input0
input: s3c-keypad as /devices/virtual/input/input1
S3C Keypad Driver
S3C Touchscreen driver, (c) 2008 Samsung Electronics
S3C TouchScreen got loaded successfully : 12 bits
input: S3C TouchScreen as /devices/virtual/input/input2
s3c-rtc s3c64xx-rtc: rtc disabled, re-enabling
s3c-rtc s3c64xx-rtc: rtc core: registered s3c as rtc0
i2c /dev entries driver
Linux video capture inte**ce: v2.00
(不好意思,打印信息还没完)
回复 支持 反对

使用道具 举报

0

主题

0

帖子

3

积分

 楼主| 发表于 2012-12-8 17:25:44 | 显示全部楼层
gspca: main v2.10.0 registered
usbcore: registered new inte**ce driver benq
benq: registered
usbcore: registered new inte**ce driver conex
conex: registered
usbcore: registered new inte**ce driver cpia1
cpia1: registered
usbcore: registered new inte**ce driver etoms
etoms: registered
usbcore: registered new inte**ce driver finepix
finepix: registered
usbcore: registered new inte**ce driver jeilinj
jeilinj: registered
usbcore: registered new inte**ce driver mars
mars: registered
usbcore: registered new inte**ce driver mr97310a
mr97310a: registered
usbcore: registered new inte**ce driver ov519
ov519: registered
usbcore: registered new inte**ce driver ov534
ov534: registered
usbcore: registered new inte**ce driver ov534_9
ov534_9: registered
usbcore: registered new inte**ce driver pac207
pac207: registered
usbcore: registered new inte**ce driver pac7302
pac7302: registered
usbcore: registered new inte**ce driver pac7311
pac7311: registered
usbcore: registered new inte**ce driver sn9c2028
sn9c2028: registered
usbcore: registered new inte**ce driver sn9c20x
sn9c20x: registered
usbcore: registered new inte**ce driver sonixb
sonixb: registered
usbcore: registered new inte**ce driver sonixj
sonixj: registered
usbcore: registered new inte**ce driver spca500
spca500: registered
usbcore: registered new inte**ce driver spca501
spca501: registered
usbcore: registered new inte**ce driver spca505
spca505: registered
usbcore: registered new inte**ce driver spca506
spca506: registered
usbcore: registered new inte**ce driver spca508
spca508: registered
usbcore: registered new inte**ce driver spca561
spca561: registered
usbcore: registered new inte**ce driver spca1528
spca1528: registered
usbcore: registered new inte**ce driver sq905
sq905: registered
usbcore: registered new inte**ce driver sq905c
sq905c: registered
usbcore: registered new inte**ce driver sq930x
sq930x: registered
usbcore: registered new inte**ce driver sunplus
sunplus: registered
usbcore: registered new inte**ce driver stk014
stk014: registered
usbcore: registered new inte**ce driver stv0680
stv0680: registered
usbcore: registered new inte**ce driver t613
t613: registered
usbcore: registered new inte**ce driver tv8532
tv8532: registered
usbcore: registered new inte**ce driver vc032x
vc032x: registered
usbcore: registered new inte**ce driver zc3xx
zc3xx: registered
usbcore: registered new inte**ce driver ALi m5602
ALi m5602: registered
usbcore: registered new inte**ce driver STV06xx
STV06xx: registered
gspca_gl860: driver startup - version 0.9d10
usbcore: registered new inte**ce driver gspca_gl860
gspca_gl860: driver registered
s3c-fimc: controller 0 registered successfully
s3c-fimc: controller 1 registered successfully
s3c-fimc: info ov965x_init
cym s3c_mfc_mememap: addr:5dff9000 size:1138688
S3C6400 MFC Driver, (c) 2007 Samsung Electronics
S3C PostProcessor Driver v3.12, (c) 2009 Samsung Electronics
S3C6410 TV encoder Driver, (c) 2008 Samsung Electronics
S3C6410 TV scaler Driver, (c) 2008 Samsung Electronics
S3C Rotator Driver, (c) 2008 Samsung Electronics
s3c_rotator_probe called
S3C JPEG Driver, (c) 2007 Samsung Electronics
s3c_g2d_probe called
s3c_g2d_probe Success
S3C G3D Driver, (c) 2007-2009 Samsung Electronics
S3C CMM Driver, (c) 2008 Samsung Electronics
usbcore: registered new inte**ce 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
sdhci: Secure Digital Host Controller Inte**ce driver
sdhci: Copyright(c) Pierre Ossman
s3c-sdhci s3c-sdhci.0: clock source 0: hsmmc (133000000 Hz)
s3c-sdhci s3c-sdhci.0: clock source 1: hsmmc (133000000 Hz)
s3c-sdhci s3c-sdhci.0: clock source 2: mmc_bus (24000000 Hz)
mmc0: SDHCI controller on samsung-hsmmc [s3c-sdhci.0] using ADMA
s3c-sdhci s3c-sdhci.1: clock source 0: hsmmc (133000000 Hz)
s3c-sdhci s3c-sdhci.1: clock source 1: hsmmc (133000000 Hz)
s3c-sdhci s3c-sdhci.1: clock source 2: mmc_bus (24000000 Hz)
mmc1: SDHCI controller on samsung-hsmmc [s3c-sdhci.1] using ADMA
usbcore: registered new inte**ce driver usbhid
usbhid: USB HID core driver
asoc: AC97 HiFi <-> s3c-ac97 mapping ok
mmc0: new SD card at address 1234
mmcblk0: mmc0:1234 SA02G 1.85
mmcblk0: p1
ALSA device list:
#0: SMDK (WM9713)
TCP cubic registered
NET: Registered protocol family 17
can: controller area network core (rev 20090105 abi 8)
NET: Registered protocol family 29
can: raw protocol (rev 20090105)
can: broadcast manager protocol (rev 20090105 t)
lib80211: common routines for IEEE802.11 drivers
Registering the dns_resolver key type
s3c-rtc s3c64xx-rtc: setting system clock to 2020-12-08 16:32:08 UTC (1607445128)
yaffs: dev is 32505858 name is "mtdblock2" rw
yaffs: passed flags ""
usb 1-2: new full speed USB device number 2 using s3c2410-ohci
usb 1-2: device descriptor read/64, error -62
usb 1-2: device descriptor read/64, error -62
usb 1-2: new full speed USB device number 3 using s3c2410-ohci
usb 1-2: device descriptor read/64, error -62
usb 1-2: device descriptor read/64, error -62
usb 1-2: new full speed USB device number 4 using s3c2410-ohci
usb 1-2: device not accepting address 4, error -62
usb 1-2: new full speed USB device number 5 using s3c2410-ohci
usb 1-2: device not accepting address 5, error -62
hub 1-0:1.0: unable to enumerate USB device on port 2

VFS: Mounted root (yaffs2 filesystem) on device 31:2.
devtmpfs: error mounting -2
Freeing init memory: 172K
Failed to execute /linuxrc. Attempting defaults...
Kernel panic - not syncing: No init found. Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
[<c0039ca8>] (unwind_backtrace+0x0/0xfc) from [<c04ad004>] (dump_stack+0x18/0x1c)
[<c04ad004>] (dump_stack+0x18/0x1c) from [<c04ad068>] (panic+0x60/0x1ac)
[<c04ad068>] (panic+0x60/0x1ac) from [<c00335dc>] (init_post+0xc8/0x140)
[<c00335dc>] (init_post+0xc8/0x140) from [<c00084c8>] (kernel_init+0xf4/0x130)
[<c00084c8>] (kernel_init+0xf4/0x130) from [<c0034a34>] (kernel_thread_exit+0x0/0x8)
(打印信息完,我的DNW中就一直卡在这不动了。)
回复 支持 反对

使用道具 举报

0

主题

0

帖子

3

积分

 楼主| 发表于 2012-12-9 19:38:40 | 显示全部楼层
解决了,换了个busybox,另外,重新复制了Forlinx-Yaffs2中的etc,接着就可以用了。
回复 支持 反对

使用道具 举报

0

主题

0

帖子

3

积分

 楼主| 发表于 2012-12-9 20:11:40 | 显示全部楼层
和busybox没关系,主要是要注意自己编译出来的内核kernel文件uImage是否和你自己做的根文件系统rootfs中的etc文件中的文件匹配。我之前就是问题出现在这。结果在用nfs挂载时候出现如下错误:

s3c-rtc s3c64xx-rtc: setting system clock to 2020-12-09 20:03:44 UTC (1607544224)
dm9000 dm9000.0: eth0: link down
dm9000 dm9000.0: eth0: link up, 100Mbps, full-duplex, lpa 0x4DE1
VFS: Mounted root (nfs filesystem) on device 0:14.
devtmpfs: mounted
Freeing init memory: 176K
sh: /bin/hotplug: not found
/etc/init.d/rcS: line 21: /bin/hotplug: not found
/etc/rc.d/init.d/netd: line 16: /usr/sbin/inetd: not found
mkdir: can't create directory '/mnt/disk': File exists
Try to bring eth0 inte**ce up......nfs: server 192.168.0.10 not responding, still trying
usb 1-2: new full speed USB device number 2 using s3c2410-ohci
usb 1-2: device descriptor read/64, error -62
usb 1-2: device descriptor read/64, error -62
usb 1-2: new full speed USB device number 3 using s3c2410-ohci
usb 1-2: device descriptor read/64, error -62
usb 1-2: device descriptor read/64, error -62
usb 1-2: new full speed USB device number 4 using s3c2410-ohci
usb 1-2: device not accepting address 4, error -62
usb 1-2: new full speed USB device number 5 using s3c2410-ohci
usb 1-2: device not accepting address 5, error -62
hub 1-0:1.0: unable to enumerate USB device on port 2

回复 支持 反对

使用道具 举报

jove1987 该用户已被删除
发表于 2013-2-28 10:27:56 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋| 飞凌嵌入式 ( 冀ICP备12004394号-1 )

GMT+8, 2024-11-23 21:47

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表