首页 | 新闻 | 新品 | 文库 | 方案 | 视频 | 下载 | 商城 | 开发板 | 数据中心 | 座谈新版 | 培训 | 工具 | 博客 | 论坛 | 百科 | GEC | 活动 | 主题月 | 电子展
返回列表 回复 发帖

U-BOOT引导UCOS2

U-BOOT引导UCOS2

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

设想方案:

方案A:如同引导Linux那样引导ucos,1:使用mkimage加工一下2tftp下载3bootm
实施-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列表中并没有ucosuCLinux看来这种方法行不通了。不过额外收获是OS里边居然有U-BOOT,那就说明把U-BOOTmkimage加工一下也就可以用U-BOOT启动U-BOOT了。
继承事业,薪火相传
返回列表