|
工具:
arm-elf-tools-20030314.sh
uClinux-dist-20051110.tar.gz
编译:
照lumit4510-howto-v1.1.pdf
修改linux-2.4.x/arch/armnommu/vmlinux-armv.lds.in文件和vendors/Samsung/4510B/Makefile文件。
make xconfig
在 Vendor/Product Selection ---> 中选择
--- Select the Vendor you wish to target
(Samsung) Vendor
--- Select the Product you wish to target
(4510B) Samsung Products
在 Kernel/Library/Defaults Selection ---> 中选择
(linux-2.4.x) Kernel Version
(uClibc) Libc Version
Default all settings (lose changes)选中y
make dep
make lib_only
make user_only
make romfs
make
make image
得到./uClinux-dist/linux-2.4.x/linux 文件和 ./uClinux-dist/images/image.bin文件
images目录下的文件是:image.bin linux.data linux.text romfs.img
在linux-2.4.x目录下执行arm-elf-objcopy -O binary -R .note -R .comment -S linux image.ram
生成image.ram文件。
将其下载到板子上,启动信息如下:
## Starting application at 0x00008000 ...
Linux version 2.4.31-uc0 (root@localhost) (gcc version 2.95.3 20010315 (release)(ColdFire patches - 20010318 from http://fiddes.net/coldfire/)(uClinux XIP and shared lib patches from http://www.snapgear.com/)) #28 四 7月 13 14:32:01 CST 2006
Processor: Samsung S3C4510B revision 6
Architecture: SNDS100
Reserving page zero for vector table
hm, page 00000000 reserved twice.
hm, page 00001000 reserved twice.
hm, page 00002000 reserved twice.
hm, page 00003000 reserved twice.
hm, page 00004000 reserved twice.
hm, page 00005000 reserved twice.
hm, page 00006000 reserved twice.
hm, page 00007000 reserved twice.
On node 0 totalpages: 2048
zone(0): 0 pages.
zone(1): 2048 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/rom0
Calibrating delay loop... 49.76 BogoMIPS
Memory: 8MB = 8MB total
Memory: 6116KB available (1740K code, 160K data, 40K init)
Dentry cache hash table entries: 1024 (order: 1, 8192 bytes)
Inode cache hash table entries: 512 (order: 0, 4096 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 2048 (order: 1, 8192 bytes)
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
Samsung S3C4510 Serial driver version 0.9 (2001-12-27) with no serial options enabled
ttyS00 at 0x3ffd000 (irq = 5) is a S3C4510B
ttyS01 at 0x3ffe000 (irq = 7) is a S3C4510B
Blkmem copyright 1998,1999 D. Jeff Dionne
Blkmem copyright 1998 Kenneth Albanowski
Blkmem 1 disk images:
0: CD8F8-1C50F7 [VIRTUAL CD8F8-1C50F7] (RO) <ROMFS>
RAMDISK driver initialized: 16 RAM disks of 1024K size 1024 blocksize
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 512 bind 512)
VFS: Mounted root (romfs filesystem) readonly.
Freeing init memory: 40K
Shell invoked to run file: ?/
?/: No such file or directory
Sash command shell (version 1.1.1)
/> cd etc
/etc> ls
inetd.conf
inittab
motd
passwd
ramfs.img
rc
services
version
/etc> sh rc
Shell invoked to run file: ??
??: No such file or directory
/etc> cat rc
hostname Samsung
/bin/expand /etc/ramfs.img /dev/ram0
mount -t proc proc /proc
mount -t ext2 /dev/ram0 /var
mkdir /var/config
mkdir /var/tmp
mkdir /var/log
mkdir /var/run
mkdir /var/lock
mkdir /var/empty
cat /etc/motd
ifconfig lo 127.0.0.1
route add -net 127.0.0.0 netmask 255.255.255.0 lo
dhcpcd &
/etc>
为什么sash会找不到rc文件??? |
|