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

Unix/Linux
Red Hat Enterprise Linux AS 3 Update 5 Release
kmess1.4pre1(绝对可以上msn)
BabyLinux,很精彩的文章
精彩一问一答地址
linux的自动登陆脚本
IC行业白手起家赢利模式问题之探讨(ZT)
JDK安装手册
RedHat Enterprise Linux 介绍
一个Linux高手写给初学者的话
创建LINUX 文件系统(EXT2/EXT3)
增加/删除SWAP分区空间的方法
在RHEL 3中建立软RAID。
RHEL 3中创建VLM实例。
IBM的Linux之路
关于jabber安装
My gentoo screenshot
linuxdown多线程下载软件的源代码分析
三言两语 之 逻辑卷
三言两语 之 网卡,DNS,网关的设置
调整屏幕偏离的问题

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


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