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

Unix/Linux
LINUX下简单命令
初装ubuntu
Redhat AS 3的LANG的设置
Debian版本小知识
2003服务器,安装了IIS6架设网站问题
前几天最严重的一次错误,导致重装
[vsftpd] 只能上传不能下载
修改了usb_linux的do_mount.c的代码
Fedora Core3上ClamAntiVirus的安装
关于我们的BEIYU
html跳转语句
adobe reader for linux 7
中国黑客精英浮出江湖
Linux必学的系统安全命令
发现很多论坛存在注册ID的BUG
了解Linux的时钟
text
Linux下挂载windows硬盘
致像我一样的Linux初学者
现在开始学习openBSD了

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


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