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

Unix/Linux
FB5.4+gnome2.10.0
FreeBsd
OpenBSD+Samba+eFax架设传真服务器
有关mount时的中文问题
在freebsd上安装linuxigd
Package Filter (1)
在Sparc机器上网络安装OpenBSD系统
PDF文件的各种转换工具
通过com口来管理OpenBSD
FREEBSD5.3架站纪实
终于解决了CS1.5的CLASS C问题
双重引导系统的潜在问题以及限制(BSD)
FreeBSD 内核网络处理流程分析
FreeBSD远程操作基础指南
FreeBSD & Jail
4.x 的sysinstall 不能安装5.3的系统了;(
我的.cshrc文件
解决使用gtk图形显示的程序的字体问题
FreeBSD4.8 IPFW How to
apache的带宽和并发限制模块

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


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