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

Unix/Linux
Slackware中MPlayer的手动安装方法
rhel5硬盘安装常见问题
FC6 beryl 0.2.1 编译安装手记
Ubuntu Linux上安装SSH和Vsftpd的方法
新手看招 手把手教你安装VMware虚拟机
tomcat及jdk安装配置文档
Ubuntu6.06 Linux安装Mplayer过程解析
Linux下安装RPM和TAR管理软件包的方法
Linux操作系统下以太网卡的安装及配置
嵌入式Linux 中的应用中的GTK+
对远程数据同步工具Rsync的一些了解
使用自由软件Rexx 的实现来编写脚本
介绍一个Linux下画电路图的软件
集成了大量软件包的DSL Linux
Debian和Gentoo包管理机制比较及延伸
一步一步安装服务器监视软件MRTG
pacman终极提速--metalink
介绍linux上两种rootkits检测工具
Linux下用Mtrace来检查程序内存溢出
如何用APT维护红帽企业版Linux

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


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-01   浏览: 107 ::
收藏到网摘: 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