歡迎您光臨本站 註冊首頁

移植linux2.6.24.3+yaffs到MAX2440

←手機掃碼閱讀     火星人 @ 2014-03-26 , reply:0

之前將yaffs移植到linux時,需要添加devfs,還要手動關掉ecc校驗,比較麻煩,偶爾還是會有ecc錯誤的提示.

下了最新穩定版的2.6.24.3內核加最新的yaffs,已經不需這些操就直接可以用了.

max2440以arch/arm/mach-s3c2440mach-osiris.c為藍本進行修改而成.后將yaffs2源碼patch-ker.sh進內核即可.

源碼路徑:
linux-2.6.24.3.tar.bz2
yaffs2.tar.gz

啟動信息:
Read chip id = ec76
Nand flash status = c0
Set boot params = root=/dev/mtdblock2 init=/linuxrc load_ramdisk=0 console=ttySAC1,115200 mem=65536K devfs=mount display=shp240
Load Kernel...
Linux version 2.6.24.3 (wwwww@ubuntu) (gcc version 3.4.1) #25 Sun Mar 16 20:21:59 CST 2008
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
Machine: Max2440
ATAG_INITRD is deprecated; please update your bootloader.
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id 0x32440001)
S3C244X: core 240.000 MHz, memory 60.000 MHz, peripheral 60.000 MHz
S3C24XX 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 in Zone order, mobility grouping on. Total pages: 16256
Kernel command line: root=/dev/mtdblock2 init=/linuxrc load_ramdisk=0 console=ttySAC1,115200 mem=65536K devfs=mount display=shp240
irq: clearing pending ext status 0004f700
irq: clearing subpending status 0000009a
irq: clearing subpending status 00000092
PID hash table entries: 256 (order: 8, 1024 bytes)
timer tcon=00090000, tcnt c34f, tcfg 00000200,00000000, usec 0000199a
Console: colour dummy device 80x30
console [ttySAC1] 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: 62780KB available (1736K code, 241K data, 96K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
S3C2440: Initialising architecture
S3C2440: IRQ Support
S3C2440: Clock Support, DVS off
S3C24XX DMA Driver, (c) 2003-2004,2006 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
NetWinder Floating Point Emulator V0.97 (double precision)
yaffs Mar 16 2008 20:21:40 Installing.
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
lp: driver loaded but no devices found
ppdev: user-space parallel port driver
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
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
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
loop: module loaded
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c2440-nand s3c2440-nand: Tacls=1, 16ns Twrph0=2 33ns, Twrph1=1 16ns
NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB 3,3V 8-bit)
Scanning device for bad blocks
Creating 4 MTD partitions on "NAND 64MiB 3,3V 8-bit":
0x00000000-0x00030000 : "Boot Agent"
mtd: Giving out device 0 to Boot Agent
0x00030000-0x00200000 : "/boot"
mtd: Giving out device 1 to /boot
0x00200000-0x02000000 : "user1"
mtd: Giving out device 2 to user1
0x02000000-0x04000000 : "user2"
mtd: Giving out device 3 to user2
mice: PS/2 mouse device common for all mice
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
s3c2440-i2c s3c2440-i2c: slave address 0x10
s3c2440-i2c s3c2440-i2c: bus frequency set to 375 KHz
s3c2440-i2c s3c2440-i2c: i2c-0: S3C I2C adapter
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
VFS: Mounted root (cramfs filesystem) readonly.
Freeing init memory: 96K
/linuxrc: line 29: cannot create /proc/sys/kernel/hotplug: nonexistent directory
init started: BusyBox v1.8.2 (2008-03-16 01:58:42 CST)
starting pid 746, tty '': '/etc/init.d/rcS'
ifconfig: socket: Function not implemented
ifconfig: socket: Function not implemented

Please press Enter to activate this console.
starting pid 750, tty '': '/bin/sh'
~ # ls /proc
1 721 driver locks sysrq-trigger
2 750 execdomains meminfo sysvipc
3 751 fb misc timer_list
4 754 filesystems modules tty
42 755 fs mounts uptime
48 761 ide mtd version
5 buddyinfo interrupts pagetypeinfo vmstat
6 bus iomem partitions yaffs
69 cmdline ioports sched_debug zoneinfo
70 cpu irq self
702 cpuinfo kallsyms slabinfo
71 devices kmsg stat
72 diskstats loadavg sys
~ # cd /tmp
/tmp # ls
/tmp # mkdir user2
/tmp # mount /dev/mtdblock3 user2
yaffs: dev is 32505859 name is "mtdblock3"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.3, "mtdblock3"
/tmp # cd user2
/tmp/user2 # ls
aaaa linuxrc lost+found testok
/tmp/user2 # cat testok
test ok!
/tmp/user2 # mount
rootfs on / type rootfs (rw)
/dev/root on / type cramfs (ro)
/proc on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev type tmpfs (rw)
ramfs on /tmp type ramfs (rw)
/dev/mtdblock3 on /tmp/user2 type yaffs (rw)
/tmp/user2 # df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/mtdblock2 5296 5296 0 100% /
none 31472 0 31472 0% /dev
/dev/mtdblock3 32768 208 32560 1% /tmp/user2
/tmp/user2 # cat /linuxrc
#!/bin/sh
/bin/mount -t proc /proc /proc
/bin/mount -t sysfs none /sys
/bin/mount -o mode=0755 -t tmpfs none /dev
/bin/mknod /dev/console c 5 1
/bin/mknod /dev/null c 1 3
/bin/mknod /dev/zero c 1 5
/bin/mkdir /dev/pts
/bin/mkdir /dev/shm
/sbin/mdev -s
echo /bin/mdev -s > /proc/sys/kernel/hotplug
/bin/mount -n -t ramfs ramfs /tmp
exec /sbin/init
/tmp/user2 #

[火星人 ] 移植linux2.6.24.3+yaffs到MAX2440已經有476次圍觀

http://coctec.com/docs/linux/show-post-187164.html