天嵌 ARM开发社区

 找回密码
 注册
查看: 3456|回复: 8

yaffs2文件系统求助

[复制链接]
maxiaohui 发表于 2010-5-6 19:29:47 | 显示全部楼层 |阅读模式
求助各位大侠:
      本人买的是TQ2440 256MB nand的版本,按照<天嵌科技出品-Linux移植之Step By Step_V4.2_20100125.pdf>文档编译最新提供的光盘上的u-boot,kernel,busybox,唯一的不同是我使用的是crosstool-ng编译的交叉编译工具链,gcc版本是4.4.2,我选择了EABI,软件浮点等,生成的工具链编译u-boot,kernel,busybox(我没修改.config文件,直接编译)都能过,且u-boot,kernel均能在板子上启动,但编译busybox后,使用光盘附带mkxxxximage_tools.tar.bz2的mkyaffs2image生成的bin写入板子起不来,报错如下:

No device for DAI UDA134X
No device for DAI s3c24xx-i2s
S3C24XX_UDA134X SoC Audio driver
mmcblk0: mmc0:0001  1.85 GiB
mmcblk0: p1 p2 p3
UDA134X SoC Audio Codec
asoc: UDA134X <-> s3c24xx-i2s mapping ok
ALSA device list:
#0: S3C24XX_UDA134X (UDA134X)
TCP cubic registered
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
lib80211: common routines for IEEE802.11 drivers
s3c2410-rtc s3c2410-rtc: setting system clock to 2030-05-06 19:09:29 UTC (1904324969)
yaffs: dev is 32505858 name is "mtdblock2"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.2, "mtdblock2"
yaffs: auto selecting yaffs2
block 498 is bad
yaffs_read_super: isCheckpointed 0
VFS: Mounted root (yaffs filesystem) on device 31:2.
Freeing init memory: 476K
Kernel panic - not syncing: Attempted to kill init!
Backtrace:
[<c0083fa8>] (dump_backtrace+0x0/0x10c) from [<c02f5320>] (dump_stack+0x18/0x1c)
r7:c381ded0 r6:c3815000 r5:0000000b r4:c0401980
[<c02f5308>] (dump_stack+0x0/0x1c) from [<c02f5370>] (panic+0x4c/0x10c)
[<c02f5324>] (panic+0x0/0x10c) from [<c009531c>] (do_exit+0x5e8/0x614)
r3:c03de778 r2:c381dce4 r1:00002710 r0:c0387248
[<c0094d34>] (do_exit+0x0/0x614) from [<c009538c>] (do_group_exit+0x44/0xc4)
[<c0095348>] (do_group_exit+0x0/0xc4) from [<c009ef40>] (get_signal_to_deliver+0x194/0x32c)
r5:c381c000 r4:00106001
[<c009edac>] (get_signal_to_deliver+0x0/0x32c) from [<c008273c>] (do_signal+0x60/0x4d8)
[<c00826dc>] (do_signal+0x0/0x4d8) from [<c0082be4>] (do_notify_resume+0x30/0x34)
[<c0082bb4>] (do_notify_resume+0x0/0x34) from [<c007fe4c>] (work_pending+0x1c/0x20)

可以确认的是板子正常,因为烧录原厂镜像没问题,此外生成的文件系统的bin大小也是2112的整数倍,应该也没问题,另外,我使用我编译的kernel+原厂root_qtopia_2.2.0_2.6.30.4_256MB_20091216.bin文件系统,也能启动,不会出现Kernel panic ,只是应用起不来(因为EABI编译器gcc的版本不一致),因此基本确定是制作的文件系统镜像文件格式不太对,但是我是按照文档来做的,很奇怪,此外我注意到,生成的文件系统bin大小例如是11180928,能够被2112整除,但使用usb的dnw上传后,提示大小增加了10字节,如下:

USB host is connected. Waiting a download.

Now, Downloading [ADDRESS:30000000h,TOTAL:11180938]
RECEIVED FILE SIZE:11180938 (642KB/S, 17S)

NAND erase: device 0 offset 0x200000, size 0x200000
Erasing at 0x3e0000 -- 100% complete.
OK

NAND write: device 0 offset 0x200000, size 0x200000

Writing data at 0x3ff800 -- 100% complete.
2097152 bytes written: OK

请版主、大侠们帮忙看看~~~
谢谢~~~
 楼主| maxiaohui 发表于 2010-5-6 22:37:51 | 显示全部楼层
补充一下:
我用于编译工具链和编译uboot kernel的系统是centos 5.4

编译的kernel是天嵌光盘中的linux-2.6.30.4_20091030.tar.bz2,busybox-1.13.0.tar.bz2

我还测试了用天嵌原厂kernel+我生成的文件系统,烧入后第一次启动报如下错误:

##### EmbedSky BIOS for SKY2440/TQ2440 #####
Press Space key to Download Mode !
Booting Linux ...
Copy linux kernel from 0x00200000 to 0x30008000, size = 0x00200000 ... Copy Kernel to SDRAM done,NOW, Booting Linux......
Uncompressing Linux.................................................................................................................................... done, booting the kernel.
Linux version 2.6.30.4-EmbedSky (root@EmbedSky) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203) ) #17 Fri Oct 30 21:55:34 CST 2009
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
CPU: VIVT data cache, VIVT instruction cache
Machine: TQ2440
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 400.000 MHz, memory 100.000 MHz, peripheral 50.000 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/mtdblock2 init=/linuxrc console=ttySAC0
NR_IRQS:85
irq: clearing pending ext status 00080000
irq: clearing subpending status 00000002
PID hash table entries: 256 (order: 8, 1024 bytes)
Console: colour dummy device 80x30
console [ttySAC0] enabled
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: 60572KB available (3444K code, 374K data, 480K init, 0K highmem)
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Calibrating delay loop... 199.47 BogoMIPS (lpj=498688)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 296 bytes
NET: Registered protocol family 16
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
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
s3c2440-i2c s3c2440-i2c: slave address 0x10
s3c2440-i2c s3c2440-i2c: bus frequency set to 97 KHz
s3c2440-i2c s3c2440-i2c: i2c-0: S3C I2C adapter
cfg80211: Calling CRDA to update world regulatory domain
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
yaffs Oct 30 2009 21:01:24 Installing.
msgmni has been set to 118
alg: No test for stdrng (krng)
io scheduler noop registered (default)
*** Warning - bad CRC or NAND, using default environment



##### EmbedSky BIOS for SKY2440/TQ2440 #####
Press Space key to Download Mode !
Booting Linux ...
亚瑟王 发表于 2010-5-8 19:17:18 | 显示全部楼层
2楼的错误是配置单的配置导致的异常,建议你参考天嵌科技提供的配置单。
1楼的问题,建议换台电脑测试一下DNW的烧写。
 楼主| maxiaohui 发表于 2010-5-8 19:40:08 | 显示全部楼层
3# 亚瑟王


请问斑竹老大,"配置单的配置错误"是什么意思?是kernel的.config?

我现在吃饭,饭后就开始测试,准备用linux centos家台式机+linux dnw试一下

谢谢亚瑟王!结果出来我就贴上来.
亚瑟王 发表于 2010-5-8 20:08:24 | 显示全部楼层
yaffs Oct 30 2009 21:01:24 Installing.
msgmni has been set to 118
alg: No test for stdrng (krng)
io scheduler noop registered (default)
*** Warning - bad CRC or NAND, using default environment
这个启动了一半就挂掉了,应该是配置内核时选择了导致系统崩溃的选项。也就是.config
 楼主| maxiaohui 发表于 2010-5-8 21:37:26 | 显示全部楼层
亚瑟王斑竹,在linux上烧也是相同的错误啊......会是gcc问题吗?两个gcc比较:

[root@localhost bin]# ./arm-none-linux-gnueabi-gcc-4.3.3 -v
Using built-in specs.
Target: arm-none-linux-gnueabi
Configured with: /scratch/maxim/arm-lite/src-4.3-arm-none-linux-gnueabi-lite/gcc-4.3/configure --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --target=arm-none-linux-gnueabi --enable-threads --disable-libmudflap --disable-libssp --disable-libstdcxx-pch --with-gnu-as --with-gnu-ld --with-specs='%{funwind-tables|fno-unwind-tables|mabi=*|ffreestanding|nostdlib:;:-funwind-tables}' --enable-languages=c,c++ --enable-shared --enable-symvers=gnu --enable-__cxa_atexit --with-pkgversion='Sourcery G++ Lite 2009q1-176' --with-bugurl=https://support.codesourcery.com/GNUToolchain/ --disable-nls --prefix=/opt/codesourcery --with-sysroot=/opt/codesourcery/arm-none-linux-gnueabi/libc --with-build-sysroot=/scratch/maxim/arm-lite/install-4.3-arm-none-linux-gnueabi-lite/arm-none-linux-gnueabi/libc --with-gmp=/scratch/maxim/arm-lite/obj-4.3-arm-none-linux-gnueabi-lite/host-libs-2009q1-176-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --with-mpfr=/scratch/maxim/arm-lite/obj-4.3-arm-none-linux-gnueabi-lite/host-libs-2009q1-176-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --disable-libgomp --enable-poison-system-directories --with-build-time-tools=/scratch/maxim/arm-lite/install-4.3-arm-none-linux-gnueabi-lite/arm-none-linux-gnueabi/bin --with-build-time-tools=/scratch/maxim/arm-lite/install-4.3-arm-none-linux-gnueabi-lite/arm-none-linux-gnueabi/bin
Thread model: posix
gcc version 4.3.3 (Sourcery G++ Lite 2009q1-176)

[root@localhost bin]# ./arm-softfloat-linux-gnueabi-gcc -v
Using built-in specs.
Target: arm-softfloat-linux-gnueabi
Configured with: /usr/local/lib/ct-ng-1.7.0/targets/src/gcc-4.4.2/configure --build=i386-build_redhat-linux-gnu --host=i386-build_redhat-linux-gnu --target=arm-softfloat-linux-gnueabi --prefix=/root/x-tools/arm-softfloat-linux-gnueabi --with-sysroot=/root/x-tools/arm-softfloat-linux-gnueabi/arm-softfloat-linux-gnueabi//sys-root --enable-languages=c,c++,fortran,java --disable-multilib --with-arch=armv4t --with-float=soft --with-pkgversion=crosstool-NG-1.7.0 --enable-__cxa_atexit --with-gmp=/usr/local/lib/ct-ng-1.7.0/targets/arm-softfloat-linux-gnueabi/build/static --with-mpfr=/usr/local/lib/ct-ng-1.7.0/targets/arm-softfloat-linux-gnueabi/build/static --with-ppl=/usr/local/lib/ct-ng-1.7.0/targets/arm-softfloat-linux-gnueabi/build/static --with-cloog=/usr/local/lib/ct-ng-1.7.0/targets/arm-softfloat-linux-gnueabi/build/static --with-mpc=/usr/local/lib/ct-ng-1.7.0/targets/arm-softfloat-linux-gnueabi/build/static --enable-threads=posix --with-local-prefix=/root/x-tools/arm-softfloat-linux-gnueabi/arm-softfloat-linux-gnueabi//sys-root --disable-nls --enable-symvers=gnu --enable-c99 --enable-long-long --enable-target-optspace
Thread model: posix
gcc version 4.4.2 (crosstool-NG-1.7.0)
 楼主| maxiaohui 发表于 2010-5-8 21:40:24 | 显示全部楼层
5# 亚瑟王

启动错误信息:
##### EmbedSky BIOS for SKY2440/TQ2440 #####
Press Space key to Download Mode !
Booting Linux ...
Copy linux kernel from 0x00200000 to 0x30008000, size = 0x00200000 ... Copy Kernel to SDRAM done,NOW, Booting Linux......
Uncompressing Linux............................................................................................................................
Linux version 2.6.30.4-EmbedSky (root@localhost) (gcc version 4.4.2 (crosstool-NG-1.7.0) ) #1 Fri May 7 01:27:23 CST 2010
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
CPU: VIVT data cache, VIVT instruction cache
Machine: TQ2440
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 400.000 MHz, memory 100.000 MHz, peripheral 50.000 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/mtdblock2 init=/linuxrc console=ttySAC0
NR_IRQS:85
irq: clearing pending ext status 00080000
irq: clearing subpending status 00000002
PID hash table entries: 256 (order: 8, 1024 bytes)
Console: colour dummy device 80x30
console [ttySAC0] enabled
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: 60596KB available (3420K code, 372K data, 476K init, 0K highmem)
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Calibrating delay loop... 199.47 BogoMIPS (lpj=498688)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 296 bytes
NET: Registered protocol family 16
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
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
s3c2440-i2c s3c2440-i2c: slave address 0x10
s3c2440-i2c s3c2440-i2c: bus frequency set to 97 KHz
s3c2440-i2c s3c2440-i2c: i2c-0: S3C I2C adapter
cfg80211: Calling CRDA to update world regulatory domain
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
yaffs May  7 2010 01:21:12 Installing.
msgmni has been set to 118
alg: No test for stdrng (krng)
io scheduler noop registered (default)
Console: switching to colour frame buffer device 100x30
fb0: s3c2410fb frame buffer device
backlight initialized
GPIO-Control initialized
PWM-Test initialized
adc initialized
s3c2440-uart.0: tq2440_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2440
s3c2440-uart.1: tq2440_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2440
s3c2440-uart.2: tq2440_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2440
loop: module loaded
Driver 'sd' needs updating - please use bus_type methods
dm9000 Ethernet Driver, V1.31
Now use the default MAC address: 10:23:45:67:89:ab
eth0 (dm9000): not using net_device_ops yet
eth0: dm9000e at c4814000,c4818004 IRQ 51 MAC: 10:23:45:67:89:ab (EmbedSky)
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c2440-nand s3c2440-nand: Tacls=2, 20ns Twrph0=3 30ns, Twrph1=2 20ns
NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung NAND 256MiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 529 at 0x000004220000
Creating 3 MTD partitions on "NAND 256MiB 3,3V 8-bit":
0x000000000000-0x000000040000 : "EmbedSky_Board_uboot"
0x000000200000-0x000000400000 : "EmbedSky_Board_kernel"
0x000000400000-0x00000ff80000 : "EmbedSky_Board_yaffs2"
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: 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 2.6.30.4-EmbedSky ohci_hcd
usb usb1: SerialNumber: s3c24xx
usb usb1: configuration #1 chosen from 1 choice
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.
usbcore: registered new interface driver usbserial
usbserial: USB Serial Driver core
USB Serial support registered for pl2303
usbcore: registered new interface driver pl2303
pl2303: Prolific PL2303 USB to serial adaptor driver
s3c2410_udc: debugfs dir creation failed -19
s3c2440-usbgadget s3c2440-usbgadget: S3C2440: increasing FIFO to 128 bytes
mice: PS/2 mouse device common for all mice
TQ2440 TouchScreen successfully loaded
input: TQ2440 TouchScreen as /devices/virtual/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.5.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: starting watchdog timer
s3c2410-wdt s3c2410-wdt: watchdog active, reset abled, irq enabled
mapped channel 0 to 0
s3c2440-sdi s3c2440-sdi: powered down.
s3c2440-sdi s3c2440-sdi: initialisation done.
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
mmc0: new SD card at address 0001
Advanced Linux Sound Architecture Driver Version 1.0.18a.
mmcblk0: mmc0:0001  1.85 GiB
mmcblk0:<4>No device for DAI UDA134X
No device for DAI s3c24xx-i2s
S3C24XX_UDA134X SoC Audio driver
p1 p2 p3
UDA134X SoC Audio Codec
asoc: UDA134X <-> s3c24xx-i2s mapping ok
ALSA device list:
  #0: S3C24XX_UDA134X (UDA134X)
TCP cubic registered
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
lib80211: common routines for IEEE802.11 drivers
s3c2410-rtc s3c2410-rtc: setting system clock to 2030-05-08 21:25:49 UTC (1904505949)
yaffs: dev is 32505858 name is "mtdblock2"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.2, "mtdblock2"
yaffs: auto selecting yaffs2
block 498 is bad
yaffs_read_super: isCheckpointed 0
VFS: Mounted root (yaffs filesystem) on device 31:2.
Freeing init memory: 476K
Kernel panic - not syncing: Attempted to kill init!
Backtrace:
[<c0083fa8>] (dump_backtrace+0x0/0x10c) from [<c02f5320>] (dump_stack+0x18/0x1c)
r7:c381ded0 r6:c3815000 r5:0000000b r4:c0401980
[<c02f5308>] (dump_stack+0x0/0x1c) from [<c02f5370>] (panic+0x4c/0x10c)
[<c02f5324>] (panic+0x0/0x10c) from [<c009531c>] (do_exit+0x5e8/0x614)
r3:c03de778 r2:c381dce4 r1:00002710 r0:c0387248
[<c0094d34>] (do_exit+0x0/0x614) from [<c009538c>] (do_group_exit+0x44/0xc4)
[<c0095348>] (do_group_exit+0x0/0xc4) from [<c009ef40>] (get_signal_to_deliver+0x194/0x32c)
r5:c381c000 r4:00106001
[<c009edac>] (get_signal_to_deliver+0x0/0x32c) from [<c008273c>] (do_signal+0x60/0x4d8)
[<c00826dc>] (do_signal+0x0/0x4d8) from [<c0082be4>] (do_notify_resume+0x30/0x34)
[<c0082bb4>] (do_notify_resume+0x0/0x34) from [<c007fe4c>] (work_pending+0x1c/0x20)
错误和以前的一致.......谢谢斑竹!请帮忙分析分析,看看还有什么解决或测试的方法......郁闷啊
亚瑟王 发表于 2010-5-10 15:46:24 | 显示全部楼层
你用的那个编译器不是支持EABI的编译器。
你使用天嵌科技提供的内核和编译器,编译镜像,然后你烧写天嵌科技光盘里面提供的文件系统镜像,能不能正常使用?
 楼主| maxiaohui 发表于 2010-5-18 12:10:08 | 显示全部楼层
8# 亚瑟王

谢谢亚瑟王,前几天忙工作来的,昨天测试发现使用gcc 4.3.3就没问题了,看来是我编译的gcc不对导致的,谢谢~~~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

i.MX8系列ARM cortex A53 M4 工控板上一条 /1 下一条

Archiver|手机版|小黑屋|天嵌 嵌入式开发社区 ( 粤ICP备11094220号-2 )

GMT+8, 2024-9-20 02:51 , Processed in 1.038996 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2020, Tencent Cloud.

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