为什么这么做呢?源于虚荣心吧,不过更多的是方便!
设想方案:
方案A:如同引导Linux那样引导ucos,1:使用mkimage加工一下2:tftp下载3:bootm 实施-mkimage使用方法:
- Usage: mkimage -l image
- -l ==> list image header information
- mkimage [-x] -A arch -O os -T type -C comp -a addr -e ep -n name -d data_file[:data_file...] image
- -A ==> set architecture to 'arch'
- -O ==> set operating system to 'os'
- -T ==> set image type to 'type'
- -C ==> set compression type 'comp'
- -a ==> set load address to 'addr' (hex)
- -e ==> set entry point to 'ep' (hex)
- -n ==> set image name to 'name'
- -d ==> use image data from 'datafile'
- -x ==> set XIP (execute in place)
- mkimage [-D dtc_options] -f fit-image.its fit-image
建立shell脚本mkimage-sh:
- #/bin/bash
- mkimage -n 'kangear' -A arm -O ucos -T kernel -C none -a 0x30008000 -e 0x30008040 -d $1 $2
运行结果:
- [root@localhost uCos2]# ./mkimage-sh 2440ucos2_W35.bin 2440ucos2_W35.img
- Invalid OS Type - valid names are: linux, lynxos, netbsd, rtems, u-boot, qnx, vxworks, integrity, 4_4bsd, dell, esix, freebsd, irix, ncr, openbsd, psos, sco, solaris, svr4
- Usage: mkimage -l image
- -l ==> list image header information
- mkimage [-x] -A arch -O os -T type -C comp -a addr -e ep -n name -d data_file[:data_file...] image
- -A ==> set architecture to 'arch'
- -O ==> set operating system to 'os'
- -T ==> set image type to 'type'
- -C ==> set compression type 'comp'
- -a ==> set load address to 'addr' (hex)
- -e ==> set entry point to 'ep' (hex)
- -n ==> set image name to 'name'
- -d ==> use image data from 'datafile'
- -x ==> set XIP (execute in place)
- mkimage [-D dtc_options] -f fit-image.its fit-image
在U-BOOT支持的OS列表中并没有ucos,uCLinux看来这种方法行不通了。不过额外收获是OS里边居然有U-BOOT,那就说明把U-BOOT用mkimage加工一下也就可以用U-BOOT启动U-BOOT了。
方案B:直接下载,然后用go命令
1.下载ucos2
- [u-boot@MINI2440]# tftp 2440ucos2_W35.bin
- dm9000 i/o: 0x20000300, id: 0x90000a46
- DM9000: running in 16 bit mode
- MAC: 00:01:02:03:04:05
- operating at 100M full duplex mode
- Using dm9000 device
- TFTP from server 192.168.1.229; our IP address is 192.168.1.230
- Filename '2440ucos2_W35.bin'.
- Load address: 0x30008000
- Loading: T ################################
- done
- Bytes transferred = 462564 (70ee4 hex)
2.用go命令运行
- [u-boot@MINI2440]# go 30008000
- ## Starting application at 0x30008000 ...
- hello,FriendlyARM
(屏幕无任何变化)
说明运行失败,此实验暂告一段落……
阅读(230) | 评论(0) | 转发(0) |