linux2.6.14 yaffs移植遇到问题

unbuntu13.04

hfrk2410

linux2.6.14

内核移植yaffs2

使用友善之臂sbc2410的mkyaffsimage rootfs rootfs.img 

vivi使用友善之臂sbc_vivi

busybox1.2.0


------------遇到问题---------



VIVI version 0.1.4 ([email protected]) (gcc version 2.95.3 20010315 (re
lease)) #0.1.4 Sun Jul 2 18:43:06 EDT 2006
MMU table base address = 0x33FBC000
Succeed memory mapping.
+---------------------------------------------+
| S3C2410X USB Downloader ver R1.11 SEP/03/02 |
+---------------------------------------------+
FCLK=200MHz,DMA mode
USB: IN_ENDPOINT:1 OUT_ENDPOINT:3
FORMAT: <ADDR(DATA):4>+<SIZE(n+10):4>+<DATA:n>+<CS:2>
NAND device: Manufacture ID: 0xec, Chip ID: 0x76 (Samsung K9D1208V0M)
Found saved vivi parameters.
Press Return to start the LINUX/Wince now, any other key for vivi
type "help" for help.
FriendlyARM>     load flash kernel u
USB host is connected. Waiting a download.


Now, Downloading [ADDRESS:30000000h,TOTAL:752130]
RECEIVED FILE SIZE:  752130 (734KB/S, 1S)
Downloaded file at 0x30000000, size = 752120 bytes
Found block size = 0x000b8000
Erasing...    ... done
Writing...    ... done
Written 752120 bytes
Erase TOC of Wince ..., OK!
FriendlyARM> boot
Copy linux kernel from 0x00050000 to 0x30008000, size = 0x00350000 ... done
zImage magic = 0x016f2818
Setup linux parameters at 0x30000100
linux command line is: "noinitrd root=/dev/mtdblock4 init=/linuxrc console=ttySA
C0,115200"
MACH_TYPE = 193
NOW, Booting Linux......
Uncompressing Linux................................................... done, boo
ting the kernel.
Linux version 2.6.14 (root@ubuntu) (gcc version 3.4.1) #29 PREEMPT Mon Feb 9 16:
48:21 PST 2015
CPU: ARM920Tid(wb) [41129200] revision 0 (ARMv4T)
Machine: SMDK2410
ATAG_INITRD is deprecated; please update your bootloader.
Memory policy: ECC disabled, Data cache writeback
CPU S3C2410A (id 0x32410002)
S3C2410: core 200.000 MHz, memory 100.000 MHz, peripheral 50.000 MHz
S3C2410 Clocks, (c) 2004 Simtec Electronics
CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
CPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
Built 1 zonelists
Kernel command line: noinitrd root=/dev/mtdblock4 init=/linuxrc console=ttySAC0,
115200
irq: clearing pending ext status 00000100
irq: clearing subpending status 00000007
irq: clearing subpending status 00000002
PID hash table entries: 512 (order: 9, 8192 bytes)
timer tcon=00000000, tcnt a2c1, tcfg 00000200,00000000, usec 00001eb8
Console: colour dummy device 80x30
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 64MB = 64MB total
Memory: 63232KB available (1230K code, 287K data, 84K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
softlockup thread 0 started up.
Linux NoNET1.0 for Linux 2.6
S3C2410: Initialising architecture
S3C2410 DMA Driver, (c) 2003-2004 Simtec Electronics
DMA channel 0 at c4800000, irq 33
DMA channel 1 at c4800040, irq 34
DMA channel 2 at c4800080, irq 35
DMA channel 3 at c48000c0, irq 36
devfs: 2004-01-31 Richard Gooch ([email protected])
devfs: boot_options: 0x1
yaffs Feb  9 2015 16:48:15 Installing.
Console: switching to colour frame buffer device 40x30
fb0: s3c2410fb frame buffer device
fb1: Virtual frame buffer device, using 1024K of video memory
s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2410
s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2410
s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2410
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c2410-nand: mapped registers at c4980000
s3c2410-nand: timing: Tacls 10ns, Twrph0 40ns, Twrph1 10ns
NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB 3,3V 8-bit
)
NAND_ECC_NONE selected by board driver. This is not recommended !!
Scanning device for bad blocks
Creating 5 MTD partitions on "NAND 64MiB 3,3V 8-bit":
0x00000000-0x00020000 : "viviboot"
0x00020000-0x00040000 : "eboot"
0x00040000-0x00050000 : "param"
0x00050000-0x00400000 : "kernel"
0x00400000-0x03ff0000 : "root"
mice: PS/2 mouse device common for all mice
Reading data from NAND FLASH without ECC is not recommended
yaffs: dev is 32505860 name is "mtdblock4"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.4, "mtdblock4"
yaffs_read_super: isCheckpointed 0
VFS: Mounted root (yaffs filesystem).
Mounted devfs on /dev
Freeing init memory: 84K

-----------------------------------------这里停止后无输出-------------------------------------

--正在解决-------

----------分析1---------------

VFS: Mounted root (yaffs filesystem).
Mounted devfs on /dev

从这两句可以看出,文件系统已经可以工作了,但是没有busybox的信息,说明busybox没有工作或者工作量串口没有输出

尝试修改etc/inittab 的s3c2410_serial0为ttyS0或ttySAC0均无效

#etc/inittab
::sysinit:/etc/init.d/rcS
s3c2410_serial0::askfirst:-/bin/sh
::ctrlaltdel:/sbin/reboot
::shutdown:/bin/umount -a -r

参考http://www.cnblogs.com/leaven/archive/2010/10/09/1846809.html

串口输出内容如下:
yaffs: dev is 32505859 name is "mtdblock3"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.3, "mtdblock3"
yaffs_read_super: isCheckpointed 0
VFS: Mounted root (yaffs filesystem).
Freeing init memory: 156K

原因一:

内核与文件系统中的busybox不是同一个版本的编译器编译出来的。在内核启动的过程中,会有如下打印信息,从中可以确认

是当前编译的内核:

Linux version 2.6.25.20 (root@ubuntu) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203) ) #5 Tue Oct 12 17:05:52 CST 2010

 ------------------------------------------

原因二

是busybox编译为armv6架构的,所以不能执行。

另外,在/etc/inittab文件中通过::respawn:-/bin/login  登录控制台,而密码文件/etc/passwd由于是从主机中拷贝过来的其内容为:

 root:x:0:0:root:/root:/bin/bash

修改为:

root:x:0:0:root:/root:/bin/ash   或者 root:x:0:0:root:/root:/bin/sh


-------------------------------------------

原因三

编译器编译出来的busybox配对使用的内核版本最好要与实际内核版本配对

file crootfs_leaven4.4.3/bin/busybox
crootfs_leaven4.4.3/bin/busybox: ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, for GNU/Linux 2.6.32, stripped
 


----------------------------------我的------------------------------------------------------------------------

Linux version 2.6.14 (root@ubuntu) (gcc version 3.4.1) #46 Fri Feb 13 17:09:49 P
ST 2015

《--------------》

root@ubuntu:/usr/rootfs/bin# file busybox
busybox: ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, for GNU/Linux 2.6.14, stripped

这个busybox1.2.0用gcc4.3.2编译的,用3.4.1编译出来是这样

root@ubuntu:/usr/rootfs/bin# file busybox
busybox: ELF 32-bit LSB executable, ARM, version 1, statically linked, for GNU/Linux 2.4.3, stripped

--------------------------------------------如何编译成for GNU/Linux 2.6.14-还不知道-----编译出来下载----------------------------------

Reading data from NAND FLASH without ECC is not recommended
yaffs_read_super: isCheckpointed 0
VFS: Mounted root (yaffs filesystem).
Freeing init memory: 104K
command='/etc/init.d/rcS' action='1' terminal='/dev/console'

command='-/bin/ash' action='4' terminal='/dev/console'

command='-/bin/ash' action='4' terminal='/dev/ttySAC0'

command='-/bin/ash' action='4' terminal='/dev/s3c2410_serial0'

command='-/bin/ash' action='4' terminal='/dev/tty0'

command='-/bin/ash' action='4' terminal='/dev/ttyS0'

command='/sbin/reboot' action='32' terminal='/dev/console'

command='/bin/umount -a -r' action='64' terminal='/dev/console'

/etc/init.d/rcS: /etc/init.d/rcS: 2: echo: not foun
Please press Enter to activate this console.
Please press Enter to activate this console.
Please press Enter to activate this console.

---------------------------------居然有输出了!!!!---之前一直不行---------总算可以回家过年了----弄来两个星期多了一直卡在这里---------------------------------------------------------------

接下来学习把配置文件做一下


猜你喜欢

转载自blog.csdn.net/diyer_zhou/article/details/43698977