启动问题??
工具: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 (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文件??? :(:(
没有人遇到过吗?
是不是跟uClinux-dist-20051110.tar.gz有关啊??? 是不是PATH_RC没有定义啊你检索以下是在那里调用/etc/rc这个脚本的,然后自己加上试试 Shell invoked to run file
这句是在sash.c中打印出来的
新的问题
多谢lumit-support-1。我将sash.c中main()函数中的argv直接赋值为 /etc/rc (argv = "/etc/rc"; ), 之后重新编译.
make user_only
make romfs
make
make image
再用前面的命令将linux-2.4.x目录下的linux文件转换为image.ram, 下载到板子上,最后出的信息如下:
Shell invoked to run file: /etc/rc
Command: hostname Samsung
?): applet not found
pid 8: failed 256
Command: /bin/expand /etc/ramfs.img /dev/ram0
Can't open compressed file ?=
pid 9: failed 512
Command: mount -t proc proc /proc
?): applet not found
pid 10: failed 256
Command: mount -t ext2 /dev/ram0 /var
?): applet not found
pid 11: failed 256
Command: mkdir /var/config
/var/config: Read-only file system
Command: mkdir /var/tmp
/var/tmp: Read-only file system
Command: mkdir /var/log
/var/log: Read-only file system
Command: mkdir /var/run
/var/run: Read-only file system
Command: mkdir /var/lock
/var/lock: Read-only file system
Command: mkdir /var/empty
/var/empty: Read-only file system
Command: cat /etc/motd
Welcome to
____ __
/ __|||_|
_ _|| || _ _____ __ _
||||| |||| _\||| |\\//
||_|||__ ||||||||_| |/ \
| ___\____|_||_|_||_|\____|\_/\_/
||
|_|
For further information check:
http://www.uclinux.org/
Command: ifconfig lo 127.0.0.1
ifconfig: Error 0
ifconfig: `--help' gives usage information.
pid 12: failed 256
Command: route add -net 127.0.0.0 netmask 255.255.255.0 lo
?): applet not found
pid 13: failed 256
Command: dhcpcd &
Execution Finished, Exiting
Sash command shell (version 1.1.1)
/> Jan1 00:00:00 dhcpcd: dhcpStart: ioctl SIOCGIFHWADDR: No such device
为什么又会出这么些稀奇古怪的输出?
真是不知是我的编译有问题还是和uClinux-dist-20051110有关??? 前面的问题好像是busybox的问题吧
后面的问题是ramdisk没有挂载成功导致的
你可以尝试一下lumit的linux包 我用uClinux-dist-20040408.tar.gz照lumit4510-howto-v1.1.pdf 编译,成功,无上述问题。不知和别人的情况是否一样?
我也头疼!!!
我遇到相同的问题,我发现是由于Shell 不知为何找不到文件,我尝试输入 sh /etc/rc 结果一样,于是我手工输入rc里的指令,结果和你直接改的效果一样,/> cd etc
/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> hostname Samsung
?): applet not found
pid 16: failed 256
/etc> 问题有人解决吗? 我的宿主机 ubuntu LTS 6.06
使用uClinux-dist-20040408.tar.gz
我使用uClinux-dist-20040408.tar.gz编译无上述问题。 busybox问题吧用高版本的busybox试试 我也是同样的问题,如果你运行 $/bin/sh /etc/rc,我跟踪了一下sh的argv根本没有传入/etc/rc 而是乱码.用如果用以前版本编译好的sash--〉sh来替换的话都正常工作的,所以问题肯定不在Kernel有什么设置问题,要有可能的话会是uClibc吗,还是编译选项的问题。
所以可以确定的是不是BusyBox版本的问题.
希望这个对大家有点启示. 有人使用uClinux-dist-20051110.tar.gz,成功编译启动吗? 编译是可以的不过就是出现前前面的问题??, 郁闷
页:
[1]