Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1475186
  • 博文数量: 213
  • 博客积分: 10418
  • 博客等级: 上将
  • 技术积分: 3358
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-09 23:49
文章分类

全部博文(213)

文章存档

2014年(1)

2013年(5)

2012年(11)

2011年(2)

2010年(8)

2009年(26)

2008年(160)

分类: LINUX

2008-04-13 23:40:43

以HELLO WORLD为例:hello.c和Makefile文件可以自己编写。

1.在/home/zxg/uClinux-dist/user/目录下建立test文件夹,并把hello.c和Makefile文件拷贝到文件夹下。

2.进入/home/zxg/uClinux-dist/user/目录,在Makefile文件中增加一行语句

dir_$(CONFIG_USER_HELLO_WORLD)              += test

3.进入/home/zxg/uClinux-dist/config目录,在Configure.help目录中增加

CONFIG_USER_HELLO_WORLD

  A simple hello world program      这行仅仅是说明,可以随意写

4.在上面目录中修改config.in文件,增加

#############################################################################

mainmenu_option next_comment

comment 'My Applications'

bool 'test'                     CONFIG_USER_HELLO_WORLD

comment 'My Applications'

endmenu

#############################################################################

5.  然后make menuconfig进入目录

a.按实际选取Vendor/Product Selection

       b.进入Kernel/Library/Defaults Selection目录,选取Customize Vendor/User Settings。一定要选中这一项。

       c.然后退出,选Yes…………..

       d.再弹出对话框时进入My hello,选中hello,然后退出,选Yes…………..

6.  make

7.  编译完成之后,/home/zxg/uClinux-dist/image/uImage即为内核镜像文件。

8.  通过串口下载到SDRAM:loadb 0x01000000(注意:使用的是kermit协议)。

9.  启动内核:bootm。用户的应用程序在/bin/目录下。

 

                                                                                                                  zxg623

                                                                                                                2007-10-19

阅读(998) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~