Chinaunix首页 | 论坛 | 博客
  • 博客访问: 542800
  • 博文数量: 67
  • 博客积分: 1625
  • 博客等级: 上尉
  • 技术积分: 1053
  • 用 户 组: 普通用户
  • 注册时间: 2012-02-04 14:40
文章分类

全部博文(67)

文章存档

2012年(67)

分类: LINUX

2012-06-20 20:25:04

为什么这么做呢?源于虚荣心吧,不过更多的是方便!

设想方案:

方案A:如同引导Linux那样引导ucos,1:使用mkimage加工一下2tftp下载3bootm 实施-mkimage使用方法:


  1. Usage: mkimage -l image
  2.      -l ==> list image header information
  3.      mkimage [-x] -A arch -O os -T type -C comp -a addr -e ep -n name -d data_file[:data_file...] image
  4.      -A ==> set architecture to 'arch'
  5.      -O ==> set operating system to 'os'
  6.      -T ==> set image type to 'type'
  7.      -C ==> set compression type 'comp'
  8.      -a ==> set load address to 'addr' (hex)
  9.      -e ==> set entry point to 'ep' (hex)
  10.      -n ==> set image name to 'name'
  11.      -d ==> use image data from 'datafile'
  12.      -x ==> set XIP (execute in place)
  13.      mkimage [-D dtc_options] -f fit-image.its fit-image

建立shell脚本mkimage-sh


  1. #/bin/bash
  2.     mkimage -n 'kangear' -A arm -O ucos -T kernel -C none -a 0x30008000 -e 0x30008040 -d $1 $2

运行结果:

  1. [root@localhost uCos2]# ./mkimage-sh 2440ucos2_W35.bin 2440ucos2_W35.img
  2.     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
  3.     Usage: mkimage -l image
  4.      -l ==> list image header information
  5.      mkimage [-x] -A arch -O os -T type -C comp -a addr -e ep -n name -d data_file[:data_file...] image
  6.      -A ==> set architecture to 'arch'
  7.      -O ==> set operating system to 'os'
  8.      -T ==> set image type to 'type'
  9.      -C ==> set compression type 'comp'
  10.      -a ==> set load address to 'addr' (hex)
  11.      -e ==> set entry point to 'ep' (hex)
  12.      -n ==> set image name to 'name'
  13.      -d ==> use image data from 'datafile'
  14.      -x ==> set XIP (execute in place)
  15.      mkimage [-D dtc_options] -f fit-image.its fit-image

U-BOOT支持的OS列表中并没有ucosuCLinux看来这种方法行不通了。不过额外收获是OS里边居然有U-BOOT,那就说明把U-BOOTmkimage加工一下也就可以用U-BOOT启动U-BOOT了。

方案B直接下载,然后用go命令

1.下载ucos2

  1. [u-boot@MINI2440]# tftp 2440ucos2_W35.bin
  2. dm9000 i/o: 0x20000300, id: 0x90000a46
  3. DM9000: running in 16 bit mode
  4. MAC: 00:01:02:03:04:05
  5. operating at 100M full duplex mode
  6. Using dm9000 device
  7. TFTP from server 192.168.1.229; our IP address is 192.168.1.230
  8. Filename '2440ucos2_W35.bin'.
  9. Load address: 0x30008000
  10. Loading: T ################################
  11. done
  12. Bytes transferred = 462564 (70ee4 hex)

2.go命令运行

  1. [u-boot@MINI2440]# go 30008000
  2. ## Starting application at 0x30008000 ...
  3. hello,FriendlyARM

(屏幕无任何变化)

说明运行失败,此实验暂告一段落……

阅读(4764) | 评论(0) | 转发(2) |
0

上一篇:串口,RS232,USB转串概念

下一篇:PCB覆铜步骤

给主人留下些什么吧!~~