uClinux boot User Guide for lumit4510 : how to boot uClinux kernel 说明: 本小节内容是关于如何在 bootloader 的基础上,启动 uClinux ------------------------------------------------------------------------- Step 1: 1、通过 help 可以看到 \>help help ------ show help ? ------ = help load ------ load file to memory prog ------ program flash boot ------ boot from flash ap ------ auto load image flie and program flash copy ------ copy flash from src to dst address ipcfg ------ show or set IP address dn ------ ev-7t bootloader download go ------ Go at 0x8000 2、执行 ipcfg 获得开发板的 ip 地址 (缺省即 192.168.168.101) \>ipcfg IP address : 192.168.168.101 \> Step 2: 1、下载 http://www.lumit.org/download/tools/tftp.exe 2、下载 http://www.lumit.org/download/software/image.ram.rar 3、解压缩 image.ram.rar 获得 image.ram ,该文件就是 uClinux kernel image Step 3: 1、修改设置 pc 主机的ip地址为 192.168.168.100 2、使用开发套件中的“网络对连线”连接 pc 主机的网口和 lumit 4510 开发板的网口 3、此时应该看到 D1, D2 led 亮了,说明网络连接正常 Step 4: 1、在开发板上执行 load 命令,表示从网络下载内核 \>load No begin address for download, use default address 0x8000 Mini TFTP Server 1.0 (IP : 192.168.168.101 PORT: 69) Load image file from host Type tftp -i 192.168.168.101 put filename at the host PC Press ESC key to exit 2、此时开发板开始等待主机发送 image.ram 3、在 pc 主机上刚才 Step 2 的下载目录中输入 tftp -i 192.168.168.101 put image.ram c:\temp>tftp -i 192.168.168.101 put image.ram Transfer successful: 1563584 bytes in 3 seconds, 521194 bytes/s 4、最后一行表示通过 tftp 传输成功,下载 uClinux kernel 完毕 5、此时在开发板上输入 ESC 键,表示退出传输模式 6、开发板显示 \> 提示符,重新又回到 bootloader 的 Shell 中 \>load No begin address for download, use default address 0x8000 Mini TFTP Server 1.0 (IP : 192.168.168.101 PORT: 69) Load image file from host Type tftp -i 192.168.168.101 put filename at the host PC Press ESC key to exit \> 7、此时执行 go 命令,开始运行 uClinux Kernel image 8、uClinux Kernel 开始输出,并进入到 uClinux 的 Sash 中 \>go go at address 0x8000 Linux version 2.4.22-uc0 (root@dailzh) (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/)) #24 17 18:54:45 CST 2003 Processor: Samsung S3C4510B revision 6 Architecture: SNDS100 On node 0 totalpages: 4096 zone(0): 0 pages. zone(1): 4096 pages. zone(2): 0 pages. Kernel command line: root=/dev/rom0 Calibrating delay loop... 49.76 BogoMIPS Memory: 16MB = 16MB total Memory: 14512KB available (1454K code, 156K data, 40K init) Dentry cache hash table entries: 2048 (order: 2, 16384 bytes) Inode cache hash table entries: 1024 (order: 1, 8192 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: 4096 (order: 2, 16384 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: C4358-17DB57 [VIRTUAL C4358-17DB57] (RO) RAMDISK driver initialized: 16 RAM disks of 1024K size 1024 blocksize Samsung S3C4510 Ethernet driver version 0.1 (2002-02-20) eth0: 00:40:95:36:35:34 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 1024 bind 1024) VFS: Mounted root (romfs filesystem) readonly. Freeing init memory: 40K Shell invoked to run file: /etc/rc Command: hostname Samsung Command: /bin/expand /etc/ramfs.img /dev/ram0 Command: /bin/expand /etc/ramfs2048.img /dev/ram1 Command: mount -t proc proc /proc Command: mount -t ext2 /dev/ram0 /var Command: mount -t ext2 /dev/ram1 /ramdisk Command: chmod 777 /ramdisk Command: mkdir /var/config Command: mkdir /var/tmp Command: mkdir /var/log Command: mkdir /var/run Command: mkdir /var/lock 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.168.101 netmask 255.255.255.0 up Command: cat /etc/motd Welcome to ____ _ _ / __| ||_| _ _| | | | _ ____ _ _ _ _ | | | | | | || | _ \| | | |\ \/ / | |_| | |__| || | | | | |_| |/ \ | ___\____|_||_|_| |_|\____|\_/\_/ | | |_| For further information check: http://www.uclinux.org/ Execution Finished, Exiting Sash command shell (version 1.1.1) /> 9、进入 /bin 目录,执行下面的应用程序,例如 ping/telnet/ftp/mount 等 例如: /> cd bin /bin> ping 192.168.168.100 PING 192.168.168.100 (192.168.168.100): 56 data bytes 64 bytes from 192.168.168.100: icmp_seq=0 ttl=128 time=0.0 ms 64 bytes from 192.168.168.100: icmp_seq=2 ttl=128 time=0.0 ms 64 bytes from 192.168.168.100: icmp_seq=3 ttl=128 time=0.0 ms 64 bytes from 192.168.168.100: icmp_seq=4 ttl=128 time=0.0 ms 64 bytes from 192.168.168.100: icmp_seq=5 ttl=128 time=0.0 ms 64 bytes from 192.168.168.100: icmp_seq=6 ttl=128 time=0.0 ms 64 bytes from 192.168.168.100: icmp_seq=7 ttl=128 time=0.0 ms 64 bytes from 192.168.168.100: icmp_seq=8 ttl=128 time=0.0 ms 64 bytes from 192.168.168.100: icmp_seq=9 ttl=128 time=0.0 ms 64 bytes from 192.168.168.100: icmp_seq=10 ttl=128 time=0.0 ms --- 192.168.168.100 ping statistics --- 11 packets transmitted, 11 packets received, 0% packet loss round-trip min/avg/max = 0.0/0.0/0.0 ms /bin> 可以看出 pc 主机与开发板的连接正常 另外如果在 pc 主机端启动 telnet/ftp server,还可以测试 telnet/ftp 等应用。 可以自己测试一下,telnet 到自己的 pc 上看看目录文件什么的还是很好玩的。 ┌-------------------------------------------------------------------------┐ │ │ │ Welcome to visit http://www.lumit.org for more information │ │ │ │ [lumit] - let us make it together │ │ │ │ │ │ lumit-admin │ │ │ └-------------------------------------------------------------------------┘