当前位置: 首页 > 图文教程 > 操作系统 > Unix/Linux > uClinux中添加用户应用程序的详细方法

Unix/Linux
Linux创建ADSL拨号上网方法
LINUX环境中配置WU-FTP服务器
Linux系统有效防御ARP攻击
linux sybase 安装全过程(写给初学者)
Sybase ASE数据库的常见问题解答
Linux中让进程在后台运行的方法
linux系统维护常见错误记录
CentOS支持reiserFS的设置方法
linux下安装Zend Optimizer的方法
linux内容批量替换的命令
linux vmstat输出方法解析
Smplayer播放wmv和avi的文件有箭头的问题解决方法
RHEL5 centos安装中文支持
linux构建动态WEB服务器安装篇
linux构建动态WEB服务器配置篇
Apache服务器优化方法小结
apache中并发控制参数prefork理解和调优
Gzip在apache2中的设置和squid对它的处理方法分析
apache Rewrite防盗链设置方法
linux下svn命令大全

Unix/Linux 中的 uClinux中添加用户应用程序的详细方法


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-01   浏览: 125 ::
收藏到网摘: n/a

1. uClinux-dist/user/Makefile

dir_$(CONFIG_USER_HELLO_WORLD)

+= hello

2. uClinux-dist/config/Configure.help

CONFIG_USER_HELLO_WORLD

A simple hello world program

3. uClinux-dist/config/config.in

找到下面两行

mainmenu_option next_comment

comment 'Miscellaneous Applications'

添加如下一行

bool 'hello'

CONFIG_USER_HELLO_WORLD

4.1.uClinux-dist/user/hello/Makefile

EXEC = helloOBJS = hello.oall: $(EXEC)$(EXEC): $(OBJS)$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS)romfs:$(ROMFSINST) /bin/$(EXEC)clean:-rm -f $(EXEC) *.elf *.gdb *.o

4.2.uClinux-dist/user/hello/hello.c

#include <stdio.h>int main(){printf("Hello, World\n");return 0;}

5. 将用户程序编译进romfs

# cd ~/uClinux-dist# make menuconfig# make dep# make romfs