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

Unix/Linux
Linux 指令篇:起始管理--init
Linux 指令篇:起始管理--reboot
Linux 指令篇:使用者资讯与管理--chfn
Linux 指令篇:使用者资讯与管理--chsh
Linux 指令篇:使用者资讯与管理--finger
Linux 指令篇:使用者资讯与管理--last
Linux 指令篇:使用者资讯与管理--passwd
Linux 指令篇:使用者资讯与管理--who
Linux 指令篇:讯息传送与信件管理--aliases
Linux 指令篇:讯息传送与信件管理--mail
Linux 指令篇:讯息传送与信件管理--mailq
Linux 指令篇:讯息传送与信件管理--mesg
Linux 指令篇:DOS相容指令--mattrib
Linux 指令篇:DOS相容指令--mcd
Linux 指令篇:DOS相容指令--mcopy
Linux 指令篇:DOS相容指令--mdel
redhat 7.1中的网络服务配置
Linux开机过程的分析(关于bootsect.S )
Linux 网管 123 --- 第10章. 升级 Linux 及其他应用软体 -2.不使
Linux命令Man解释:groupdel :删除群组

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


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