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

Unix/Linux
Linux指令篇文件打印--lpd
linux安装
grub多启动菜单配置样本
man wget
转载:用VMWARE 3.0安装LINUX 的一点心得
Linux下屏幕偏置问题的解决--(转)
linux下的网络配置工具:iproute
新一代网络配置工具iproute :命令篇(上)
iptables的状态检测机制
Nessus安全测试插件编写教程2
Nessus安全测试插件编写教程1
信息安全的隐患-GoogleHacking原理和防范
整理一下笔记 for iptables
configuration utility for the RAIDframe disk drive
历史上最牛的演讲
1.2 游戏的节奏控制
1.3 游戏的速度感
1.6 基础ActionScript程序(1)
FreeBSD 使用手册
freebsd+apache+mysql+php+phpmyadmin+zend+discuz安装指

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


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