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

Unix/Linux
Fedora Core 5(FC-5)正式版下载
Fedora 7.0 中文输入法
Fedora Core 8中yum设置
官方发布 Fedora 9 Re-Spin
防止SSH暴力破解密码的方法(DenyHosts)
让Fedora6 支持超过4G的内存
Fedora 9官方最终版下载
重装Windows系统,修复Fedora Linux启动
Fedora linux启动时网卡eth0激活慢
Fedora 9.0 Apache+PHP+MYSQL 环境安装
Fedora 4升级到Fedora 9
Linux x86_64下安装Flash Player 9
Fedora 9.0下触摸板不能点击的解决方案
fedora 系统下grub修复
Fedora 9 texlive + vim-latex + kile安装配置
运行fedora 9下的3D特效
装完Fedora 9后系统的简单设置
Fedora系统下检测声卡的命令
Fedora 9 系统下ALSA声卡驱动下载及安装方法
Fedora环境下快速建立chroot环境的方法

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


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