CoryXie 发表于 2005-10-8 10:03:58

Kernel2.6+Nand/JFFS2 released.

很高兴在这里和大家分享成功的喜悦!
1.小弟在Lumit4510板子上移植了uClinux with Linux Kernel 2.6.9,当然,大部分工作都是用的ESPD版的,但是在这个版本基础上完全更换了MTD子系统和JFFS2文件系统,使用了最新的MTD CVS版本。前几天新内核就可以跑了,但是
NAND Flash 上的JFFS2文件系统却有问题。换了MTD子系统和JFFS2文件系统后,就可以跑NAND Flash 上的JFFS2文件系统了。但是换得过程中遇到许多问题,修改了老半天,可以说现在的源代码已经和原来的代码有很大差别了。
2.为了能够访问Lumit4510板子上的NAND FLASH设备,更新了一下小弟前段时间移植的U-boot for lumit4510,添加了对外部I/O的访问控制。
3.我准备把所有的移植源文件都上传到公用空间上去,但是不知道空间够不够。这里先贴一些控制台信息,基本上是我移植完后将ROOTFS从NFS方式切换成JFFS2方式的整个过程。看大家有没有兴趣,有兴趣的话,给点鼓励啊!!呵呵,浪费空间了!!!
:oops:

limingth 发表于 2005-10-8 10:15:21

159.226.40.150上还有 16G 的空间,足够放没问题。 :lol:   
Cory 的进展很快啊,鼓励鼓励!

CoryXie 发表于 2005-10-8 10:30:16

几点说明

说明:
1。整个过程分成3个阶段,第一阶段使用ROMFS方式;第二阶段使用NFS方式;第三阶段就是JFFS2方式了。第一阶段主要是看能不能用ESPD版本的移植,发现该版本如果直接编译,将会有很多问题,启动后Exception很多,马上kernel panic.最后才发现,/etc/rc文件中最后一项dhcp相关一项出问题,注释掉就可以运行。当然,编译也不是很简单,需要换新的交叉编译环境arm-uclinux-gcc,是gcc 3.4版本,也要修改一些文件。关于编译,我另辟小节详述。第二阶段,是用NFS方式作为根文件系统,但是还使用原来romfs目录下面的文件,只是dev子目录下面的要大换血。此外,使内核能够支持NFS 方式作为ROOTFS还需要一些附加编译选项。这一点,也在别的小节叙述。第三阶段,是用JFFS2作为根文件系统,这要求JFFS2文件系统已经放到/dev/mtd0中。下面的控制台信息会显示如何完成这一步。当然,这也很简略,我想有时间还是把这个整个过程写一篇文档比较好。
2。u-boot可以传递内核启动参数,使用u-boot命令setenv,saveenv可以将启动参数保存历来。对于第一阶段,启动参数用:

lumit4510 #setenv bootargs root=/dev/ram0 rw keepinitrd
lumit4510 #saveenv

对于第二阶段,启动参数用

lumit4510 #setenv bootargs=root=/dev/nfs rw nfsroot=192.168.1.2:/root/lumit/src/uClinux/2.6/uClinux-dist/romfs ip=192.168.1.5:::::eth0:any
lumit4510 #saveenv

对于第三阶段,启动参数用

lumit4510 #setenvbootargs=root=/dev/mtdblock0 rw rootfstype=jffs2
lumit4510 #saveenv

CoryXie 发表于 2005-10-8 10:44:34

1。直接用NFS方式试一下,这次我把JFFS2文件系统已经写到NAND Flash
中了。关于如何写进去,待会我再写一次做演示,可以照着做。这次是检验一切正常可用。

U-Boot 1.1.3 (Sep 28 2005 - 00:33:39)
                                                                                                                                             
U-Boot code: 00ED0000 -> 00EE8434BSS: -> 00EF2688
IRQ Stack: 00eaef7c
FIQ Stack: 00eadf7c
RAM Configuration:
Bank #0: 00000000 16 MB
Flash:2 MB
In:    serial
Out:   serial
Err:   serial
Hit any key to stop autoboot:0
lumit4510 # tftp
TFTP from server 192.168.1.2; our IP address is 192.168.1.5
Filename 'uImage.bin'.
Load address: 0x100000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         ############################
done
Bytes transferred = 1473412 (167b84 hex)
lumit4510 # bootm
## Booting image at 00100000 ...
   Image Name:   Linux 2.6.9-hcs0 Kernel Image
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1473348 Bytes =1.4 MB
   Load Address: 00008000
   Entry Point:00008000
   Verifying Checksum ... OK
OK
                                                                                                                                             
Starting kernel ...
                                                                                                                                             
Linux version 2.6.9-hsc0 ([email protected]) (gcc version 3.4.0) #3 Sat Oct 8 02:00:46 CST 2005
CPU: Samsung-S3C4510B [36807001] revision 1 (ARMv4T)
Machine: ESPD 4510B(S3C4510B)
Built 1 zonelists
Kernel command line: root=/dev/nfs rw nfsroot=192.168.1.2:/root/lumit/src/uClinux/2.6/uClinux-dist/romfs ip=192.168.1.5:::::eth0:any
PID hash table entries: 128 (order: 7, 2048 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 16MB = 16MB total
Memory: 14680KB available (1264K code, 181K data, 68K init)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
NET: Registered protocol family 16
JFFS2 version 2.2. (NAND) (SUMMARY)(C) 2001-2003 Red Hat, Inc.
Initializing Cryptographic API
ttyS0 at I/O 0x3ffd000 (irq = 4) is a Samsung S3C4510B Internal UART
ttyS1 at I/O 0x3ffe000 (irq = 6) is a Samsung S3C4510B Internal UART
RAMDISK driver initialized: 16 RAM disks of 1024K size 1024 blocksize
loop: loaded (max 8 devices)
Samsung S3C4510B Ethernet Driver version 0.2 (2004-06-13) <[email protected]>
Using anticipatory io scheduler
NAND device: Manufacturer ID: 0xec, Chip ID: 0x73 (Samsung NAND 16MiB 3,3V 8-bit)
Scanning device for bad blocks
Creating 2 MTD partitions on "NAND 16MiB 3,3V 8-bit":
0x00000000-0x00800000 : "LUMIT4510 flash partition A"
mtd: Giving out device 0 to LUMIT4510 flash partition A
0x00800000-0x01000000 : "LUMIT4510 flash partition B"
mtd: Giving out device 1 to LUMIT4510 flash partition B
NET: Registered protocol family 2
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 1024 bind 2048)
NET: Registered protocol family 1
NET: Registered protocol family 17
IP-Config: Guessing netmask 255.255.255.0
IP-Config: Complete:
      device=eth0, addr=192.168.1.5, mask=255.255.255.0, gw=255.255.255.255,
   host=192.168.1.5, domain=, nis-domain=(none),
   bootserver=255.255.255.255, rootserver=192.168.1.2, rootpath=
Looking up port of RPC 100003/2 on 192.168.1.2
Looking up port of RPC 100005/1 on 192.168.1.2
VFS: Mounted root (nfs filesystem).
Freeing init memory: 68K
Shell invoked to run file: /etc/rc
Command: hostname Samsung
Command: mount -t proc proc /proc
Command: cat /etc/motd
Welcome to
          ____ __
         /__| ||_|
    _   _| || | _ _____   ___
   | | | | || || |_ \| | | |\ \/ /
   | |_| | |__| || | | | | |_| |/    \
   |___\____|_||_|_| |_|\____|\_/\_/
   | |
   |_|
                                                                                                                                             
For further information check:
http://www.uclinux.org/
                                                                                                                                             
Command: ifconfig lo 127.0.0.1
Command: route add -net 127.0.0.0 netmask 255.255.255.0 lo
Command: ifconfig eth0 192.168.1.5
Execution Finished, Exiting
                                                                                                                                             
Sash command shell (version 1.1.1)
/> ping 192.168.1.2
PING 192.168.1.2 (192.168.1.2): 56 data bytes
64 bytes from 192.168.1.2: icmp_seq=0 ttl=64 time=2.5 ms
64 bytes from 192.168.1.2: icmp_seq=1 ttl=64 time=2.5 ms
64 bytes from 192.168.1.2: icmp_seq=2 ttl=64 time=2.5 ms
                                                                                                                                             
--- 192.168.1.2 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 2.5/2.5/2.5 ms
/>

让我们看一下16MB的NAND Flash是怎么被分区的。对于NAND FLASH的驱动代码,我放在drivers/mtd/nand/lumit4510_mtd.c中。

/> cat /proc/mtd
dev:    size   erasesizename
mtd0: 00800000 00004000 "LUMIT4510 flash partition A"
mtd1: 00800000 00004000 "LUMIT4510 flash partition B"

其实从其启动信息中您也可以看到:

Creating 2 MTD partitions on "NAND 16MiB 3,3V 8-bit":
0x00000000-0x00800000 : "LUMIT4510 flash partition A"
mtd: Giving out device 0 to LUMIT4510 flash partition A
0x00800000-0x01000000 : "LUMIT4510 flash partition B"
mtd: Giving out device 1 to LUMIT4510 flash partition B

接着,如前所述,我已经将JFFS2文件系统写到/dev/mtd0中,所以我来看看
能不能mount到目前用NFS方式的根文件系统的/mnt下面。

/> mount -t jffs2 /dev/mtdblock0 /mnt
Empty flash at 0x000b9070 ends at 0x000b9200[注意,这里的信息好像并不重要]
/> cd /mnt
/mnt> ls
bin
dev
etc
home
lib
mnt
proc
sbin
tmp
usr
var
/mnt>

看来是没有问题的。

CoryXie 发表于 2005-10-8 11:01:41

既然上面的操作都能正常进行,那我就再来写一次。注意,这时,我还是用NFS方式在作根文件系统,所以,我可以在PC机上用mkfs.jffs2工具来讲uClinux-dist/romfs这个目录整个生成JFFS2文件系统映像。方法如下:

#cd uClinux-dist
#mkfs.jffs2 -l -n --pagesize=0x200 --eraseblock=0x4000 --pad=0x30000 -d romfs -o jffs2.img
注意,上面的命令是在PC机上运行。当然,我也编译了在lumit4510上运行的mkfs.jffs2。

好了,来写一次。
当然,写之前,先用flash_eraseall命令来erase掉/dev/mtd0.这个flash_eraseall可是换了MTD-utils之后才有的命令哦,它比以前的eraseall可是好多了,能顺带格式化FLASH,使得可以支持JFFS2和YAFFS(我的下一个目标就是他了)。

flash_eraseall -j /dev/mtd0
.................................................[省略了大部分的输出信息,一样的]
Erasing 16 Kibyte @ 7e4000 -- 98 % complete.MTD_ioctl
MTD_ioctl
MTD_ioctl
Erasing 16 Kibyte @ 7e8000 -- 98 % complete.MTD_ioctl
MTD_ioctl
MTD_ioctl
Erasing 16 Kibyte @ 7ec000 -- 99 % complete.MTD_ioctl
MTD_ioctl
MTD_ioctl
Erasing 16 Kibyte @ 7f0000 -- 99 % complete.MTD_ioctl
MTD_ioctl
MTD_ioctl
Erasing 16 Kibyte @ 7f4000 -- 99 % complete.MTD_ioctl
MTD_ioctl
MTD_ioctl
Erasing 16 Kibyte @ 7f8000 -- 99 % complete.MTD_ioctl
MTD_ioctl
MTD_ioctl
Erasing 16 Kibyte @ 7fc000 -- 99 % complete.MTD_ioctl
MTD_ioctl
Cleanmarker written at 7fc000.
MTD_close

现在开始写:
使用nandwrite命令,也是新版本才有的功能哦。

/> nandwrite --help
Usage: nandwrite [OPTION] MTD_DEVICE INPUTFILE
Writes to the specified MTD device.
                                                                                                                                             
-a, --autoplace       Use auto oob layout
-j, --jffs2         force jffs2 oob layout (legacy support)
-y, --yaffs         force yaffs oob layout (legacy support)
-f, --forcelegacy   force legacy support on autoplacement enabled mtd device
-n, --noecc         write without ecc
-o, --oob             image contains oob data
-s addr, --start=addr set start address (default is 0)
-p, --pad             pad to page size
-b, --blockalign=1|2|4 set multiple of eraseblocks to align to
-q, --quiet         don't display progress messages
      --help            display this help and exit
      --version         output version information and exit

/>nandwrite -j -f -p -q /dev/mtd0 jffs2.img
.............[我还以为-q选项可以不输出那么多信息,还是有,只是没有progress了。原来-q, --quiet         don't display progress messages]
MTD_write
MTD_write
MTD_write
MTD_write
MTD_write
MTD_write
MTD_ioctl
MTD_write
MTD_write
MTD_write
MTD_write
MTD_write
MTD_write
MTD_write
MTD_write
MTD_close

CoryXie 发表于 2005-10-8 11:14:11

我们可以重新用NFS作为根文件系统的方式启动内核,然后再看看我们新写入的JFFS2文件系统能不能mount上.

/> mount -t jffs2 /dev/mtdblock0 /mnt
/> cd /mnt
/mnt> ls
bin
dev
etc
home
lib
mnt
proc
sbin
tmp
usr
var
/mnt>

没问题。所以,我们下一步就可以切换成直接将内核的引导参数改成JFFS2方式。
reset一下板子之后,进入u-boot的命令行模式:

lumit4510 # setenv bootargs root=/dev/mtdblock0 rw rootfstype=jffs2
lumit4510 # save
Saving Environment to Flash...
Un-Protected 1 sectors
Erasing Flash... done
Erased 1 sectors
Writing to Flash... done
Protected 1 sectors
lumit4510 #

这样,我们重新tftp,bootm内核时,就可以让内核从NAND Flash中的加载JFFS2文件系统了。我们的文件系统放在/dev/mtd0,但是引导参数中却要写成/dev/mtdblock0,这是NAND FLASH作为字符设备和块设备的区别,别处说。

lumit4510 # tftp
TFTP from server 192.168.1.2; our IP address is 192.168.1.5
Filename 'uImage.bin'.
Load address: 0x100000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         ############################
done
Bytes transferred = 1473412 (167b84 hex)
lumit4510 # bootm
## Booting image at 00100000 ...
   Image Name:   Linux 2.6.9-hcs0 Kernel Image
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1473348 Bytes =1.4 MB
   Load Address: 00008000
   Entry Point:00008000
   Verifying Checksum ... OK
OK
                                                                                                                                             
Starting kernel ...
                                                                                                                                             
Linux version 2.6.9-hsc0 ([email protected]) (gcc version 3.4.0) #3 Sat Oct 8 02:00:46 CST 2005
CPU: Samsung-S3C4510B [36807001] revision 1 (ARMv4T)
Machine: ESPD 4510B(S3C4510B)
Built 1 zonelists
Kernel command line: root=/dev/mtdblock0 rw rootfstype=jffs2
PID hash table entries: 128 (order: 7, 2048 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 16MB = 16MB total
Memory: 14680KB available (1264K code, 181K data, 68K init)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
NET: Registered protocol family 16
JFFS2 version 2.2. (NAND) (SUMMARY)(C) 2001-2003 Red Hat, Inc.
Initializing Cryptographic API
ttyS0 at I/O 0x3ffd000 (irq = 4) is a Samsung S3C4510B Internal UART
ttyS1 at I/O 0x3ffe000 (irq = 6) is a Samsung S3C4510B Internal UART
RAMDISK driver initialized: 16 RAM disks of 1024K size 1024 blocksize
loop: loaded (max 8 devices)
Samsung S3C4510B Ethernet Driver version 0.2 (2004-06-13) <[email protected]>
Using anticipatory io scheduler
NAND device: Manufacturer ID: 0xec, Chip ID: 0x73 (Samsung NAND 16MiB 3,3V 8-bit)
Scanning device for bad blocks
Creating 2 MTD partitions on "NAND 16MiB 3,3V 8-bit":
0x00000000-0x00800000 : "LUMIT4510 flash partition A"
mtd: Giving out device 0 to LUMIT4510 flash partition A
0x00800000-0x01000000 : "LUMIT4510 flash partition B"
mtd: Giving out device 1 to LUMIT4510 flash partition B
NET: Registered protocol family 2
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 1024 bind 2048)
NET: Registered protocol family 1
NET: Registered protocol family 17
VFS: Mounted root (jffs2 filesystem).
Freeing init memory: 68K
Shell invoked to run file: /etc/rc
Command: hostname Samsung
Command: mount -t proc proc /proc
Command: cat /etc/motd
Welcome to
          ____ __
         /__| ||_|
    _   _| || | _ _____   ___
   | | | | || || |_ \| | | |\ \/ /
   | |_| | |__| || | | | | |_| |/    \
   |___\____|_||_|_| |_|\____|\_/\_/
   | |
   |_|
                                                                                                                                             
For further information check:
http://www.uclinux.org/
                                                                                                                                             
Command: ifconfig lo 127.0.0.1
Command: route add -net 127.0.0.0 netmask 255.255.255.0 lo
Command: ifconfig eth0 192.168.1.5
Execution Finished, Exiting
                                                                                                                                             
Sash command shell (version 1.1.1)
/> ls
bin
dev
etc
home
lib
mnt
proc
sbin
tmp
usr
var
/> ping 192.168.1.2
PING 192.168.1.2 (192.168.1.2): 56 data bytes
64 bytes from 192.168.1.2: icmp_seq=0 ttl=64 time=18.3 ms
64 bytes from 192.168.1.2: icmp_seq=1 ttl=64 time=2.5 ms
                                                                                                                                             
--- 192.168.1.2 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 2.5/10.4/18.3 ms


好了,我们的JFFS2文件系统被成功识别和加载。大功快告成了。

CoryXie 发表于 2005-10-8 11:33:03

我在这里干脆把内核烧写到Nor Flash中去。这个功能由u-boot来完成。

lumit4510 # tftp
TFTP from server 192.168.1.2; our IP address is 192.168.1.5
Filename 'uImage.bin'.
Load address: 0x100000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         ############################
done
Bytes transferred = 1473412 (167b84 hex)
lumit4510 # protect off 1030000 1200000
Un-Protected 29 sectors
lumit4510 # era 1030000 1200000
done
Erased 29 sectors
lumit4510 # cp.b 100000 1030000 $(filesize)
Copy to Flash... done
lumit4510 # boot
## Booting image at 01030000 ...
   Image Name:   Linux 2.6.9-hcs0 Kernel Image
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1473348 Bytes =1.4 MB
   Load Address: 00008000
   Entry Point:00008000
   Verifying Checksum ... OK
OK
                                                                                                                                             
Starting kernel ...
                                                                                                                                             
Linux version 2.6.9-hsc0 ([email protected]) (gcc version 3.4.0) #3 Sat Oct 8 02:00:46 CST 2005
CPU: Samsung-S3C4510B [36807001] revision 1 (ARMv4T)
Machine: ESPD 4510B(S3C4510B)
Built 1 zonelists
Kernel command line: root=/dev/mtdblock0 rw rootfstype=jffs2
PID hash table entries: 128 (order: 7, 2048 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 16MB = 16MB total
Memory: 14680KB available (1264K code, 181K data, 68K init)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
NET: Registered protocol family 16
JFFS2 version 2.2. (NAND) (SUMMARY)(C) 2001-2003 Red Hat, Inc.
Initializing Cryptographic API
ttyS0 at I/O 0x3ffd000 (irq = 4) is a Samsung S3C4510B Internal UART
ttyS1 at I/O 0x3ffe000 (irq = 6) is a Samsung S3C4510B Internal UART
RAMDISK driver initialized: 16 RAM disks of 1024K size 1024 blocksize
loop: loaded (max 8 devices)
Samsung S3C4510B Ethernet Driver version 0.2 (2004-06-13) <[email protected]>
Using anticipatory io scheduler
NAND device: Manufacturer ID: 0xec, Chip ID: 0x73 (Samsung NAND 16MiB 3,3V 8-bit)
Scanning device for bad blocks
Creating 2 MTD partitions on "NAND 16MiB 3,3V 8-bit":
0x00000000-0x00800000 : "LUMIT4510 flash partition A"
mtd: Giving out device 0 to LUMIT4510 flash partition A
0x00800000-0x01000000 : "LUMIT4510 flash partition B"
mtd: Giving out device 1 to LUMIT4510 flash partition B
NET: Registered protocol family 2
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 1024 bind 2048)
NET: Registered protocol family 1
NET: Registered protocol family 17
VFS: Mounted root (jffs2 filesystem).
Freeing init memory: 68K
Shell invoked to run file: /etc/rc
Command: hostname Samsung
Command: mount -t proc proc /proc
Command: cat /etc/motd
Welcome to
          ____ __
         /__| ||_|
    _   _| || | _ _____   ___
   | | | | || || |_ \| | | |\ \/ /
   | |_| | |__| || | | | | |_| |/    \
   |___\____|_||_|_| |_|\____|\_/\_/
   | |
   |_|
                                                                                                                                             
For further information check:
http://www.uclinux.org/
                                                                                                                                             
Command: ifconfig lo 127.0.0.1
Command: route add -net 127.0.0.0 netmask 255.255.255.0 lo
Command: ifconfig eth0 192.168.1.5
Execution Finished, Exiting
                                                                                                                                             
Sash command shell (version 1.1.1)
/>

可见,我先用u-boot将内核用tftp下载到内存的0x100000位置,然后用u-boot将这个内核从0x100000处拷贝到0x1030000到0x1200000之间。
我们的整个存储器空间分配是这样的:(u-boot在启动时已经remap过lumit4510的存储器空间,关于这一点,有时间我叙述一下u-boot的remap过程,还是很精巧的!!使用片内的8KB SRAM来完成的。)
0x00000000---0x01000000,16MB SDRAM 内存。
0x01000000---0x01200000,2MB Nor Flash。
所以,我上面将内核从0x100000处拷贝到0x1030000到0x1200000之间,实际上就是把内核放到了Nor Flash中去了。当然,本来u-boot是放在Nor Flash的0x00000000---0x00030000之间的,经过remap之后就是在0x01000000---0x1030000之间了(这是说存放u-boot的地方,只是u-boot并不在这个区间运行,而是在
U-Boot code: 00ED0000 -> 00EE8434BSS: -> 00EF2688
之间运行。因为我将TEXT_ADDR该成了 00ED0000。这是u-boot的话了,别处详述。

CoryXie 发表于 2005-10-8 11:35:16

好了,这次我们不用人工干预,reset板子之后让他自己运行,当从7,6,5,4,3,2,1,0后,系统自动运行了。

U-Boot 1.1.3 (Sep 28 2005 - 00:33:39)
                                                                                                                                             
U-Boot code: 00ED0000 -> 00EE8434BSS: -> 00EF2688
IRQ Stack: 00eaef7c
FIQ Stack: 00eadf7c
RAM Configuration:
Bank #0: 00000000 16 MB
Flash:2 MB
In:    serial
Out:   serial
Err:   serial
Hit any key to stop autoboot:0
## Booting image at 01030000 ...
   Image Name:   Linux 2.6.9-hcs0 Kernel Image
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1473348 Bytes =1.4 MB
   Load Address: 00008000
   Entry Point:00008000
   Verifying Checksum ... OK
OK
                                                                                                                                             
Starting kernel ...
                                                                                                                                             
Linux version 2.6.9-hsc0 ([email protected]) (gcc version 3.4.0) #3 Sat Oct 8 02:00:46 CST 2005
CPU: Samsung-S3C4510B [36807001] revision 1 (ARMv4T)
Machine: ESPD 4510B(S3C4510B)
Built 1 zonelists
Kernel command line: root=/dev/mtdblock0 rw rootfstype=jffs2
PID hash table entries: 128 (order: 7, 2048 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 16MB = 16MB total
Memory: 14680KB available (1264K code, 181K data, 68K init)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
NET: Registered protocol family 16
JFFS2 version 2.2. (NAND) (SUMMARY)(C) 2001-2003 Red Hat, Inc.
Initializing Cryptographic API
ttyS0 at I/O 0x3ffd000 (irq = 4) is a Samsung S3C4510B Internal UART
ttyS1 at I/O 0x3ffe000 (irq = 6) is a Samsung S3C4510B Internal UART
RAMDISK driver initialized: 16 RAM disks of 1024K size 1024 blocksize
loop: loaded (max 8 devices)
Samsung S3C4510B Ethernet Driver version 0.2 (2004-06-13) <[email protected]>
Using anticipatory io scheduler
NAND device: Manufacturer ID: 0xec, Chip ID: 0x73 (Samsung NAND 16MiB 3,3V 8-bit)
Scanning device for bad blocks
Creating 2 MTD partitions on "NAND 16MiB 3,3V 8-bit":
0x00000000-0x00800000 : "LUMIT4510 flash partition A"
mtd: Giving out device 0 to LUMIT4510 flash partition A
0x00800000-0x01000000 : "LUMIT4510 flash partition B"
mtd: Giving out device 1 to LUMIT4510 flash partition B
NET: Registered protocol family 2
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 1024 bind 2048)
NET: Registered protocol family 1
NET: Registered protocol family 17
VFS: Mounted root (jffs2 filesystem).
Freeing init memory: 68K
Shell invoked to run file: /etc/rc
Command: hostname Samsung
Command: mount -t proc proc /proc
Command: cat /etc/motd
Welcome to
          ____ __
         /__| ||_|
    _   _| || | _ _____   ___
   | | | | || || |_ \| | | |\ \/ /
   | |_| | |__| || | | | | |_| |/    \
   |___\____|_||_|_| |_|\____|\_/\_/
   | |
   |_|
                                                                                                                                             
For further information check:
http://www.uclinux.org/
                                                                                                                                             
Command: ifconfig lo 127.0.0.1
Command: route add -net 127.0.0.0 netmask 255.255.255.0 lo
Command: ifconfig eth0 192.168.1.5
Execution Finished, Exiting
                                                                                                                                             
Sash command shell (version 1.1.1)
/>

CoryXie 发表于 2005-10-8 23:41:47

已经将所有相关文件上传到

http://159.226.40.150/ftp_root/upload/lumit/CoryXie/NewKernelPorting/

可以到相关目录下载.由于时间限制,还没有写出完整的文档,以后慢慢补齐.
在src目录下面是我用到的一些文件,在tools下面是工具,在release下面是已经移植
编译过的uClinux-dist,可以致用这个压缩包和工具来实验.
src下面的文件占用了很多空间,如果必要,版主可以删去,我放到那里主要是为了方便
到别的网站去下,很慢,我下载uClinux-dist-20041215.tar.bz2用了整整一天时间.

coolwyc 发表于 2006-1-6 16:00:59

可以给我一个nandwrite,flash_eraseall源码吗?
[email protected]

rootlinger 发表于 2006-2-14 16:46:38

怎样用mkimage在uclinux系统下uImage文件??????

yuhw 发表于 2006-3-2 09:32:09

我用你的release编译后,启动时出现如下错误,大侠能否帮忙解决一下,几种环境变量都试过,都不行,这是第一种
Scanning device for bad blocks
Creating 2 MTD partitions on "NAND 32MiB 3,3V 8-bit":
0x00000000-0x00800000 : "LUMIT4510 flash partition A"
mtd: Giving out device 0 to LUMIT4510 flash partition A
0x00800000-0x01000000 : "LUMIT4510 flash partition B"
mtd: Giving out device 1 to LUMIT4510 flash partition B
NET: Registered protocol family 2
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 1024 bind 2048)
NET: Registered protocol family 1
NET: Registered protocol family 17
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)

yuhw 发表于 2006-4-2 00:23:24

问题终于解决

是设备节点建立的有问题

rootlinger 发表于 2006-4-3 08:38:06

yuhw
大侠,你在用kernel2.6+jffs2时,telnetd能否使用阿?我编译的内核,telnetd不能启动,显示all net prot in use!不知道怎么改 :lol:

sxwglxq 发表于 2006-4-3 17:11:34

强烈支持搂主!!
页: [1] 2
查看完整版本: Kernel2.6+Nand/JFFS2 released.