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

Unix/Linux
Problems with ClusterKnoppix 3.6
配置kmail
john carmack访谈二
吹牛奇文(php)
红旗软件、Miracle Linux、Haansoft共同预发布基于2.6核心的Asianux2.
红旗输入法管理器
在安装操作系统之前
郁闷中
为什么机器是非标准的1280*768分辨率,修改xorg.conf,还是失败
并行启动服务加快系统启动速度
软件raid(线性模式)+Reiserfs+根分区
拯救你的文件系统-- 修复超级块
安装NVIDIA-6629小记
更改分区后,linux无法启动,恢复小记
QEMU:开始简单又快速的模拟OS吧
通过chroot方式安装Arch Linux
LFS,MDK使用心得,也说说新手如何选择发行版
如何创建,增加SWAP?
firefox使用小技巧
保持numlock处于开启状态

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


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