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

Unix/Linux
如何编译xvidcore-0.9.1(转帖)
忘记root密码的解决方法
Building a Chrooted sftp Environment on Linux
Mandrake10.1全解压硬盘安装
Unix 备份与压缩
Mandrake10.1硬盘部分解压安装
Vi 编辑器使用说明
Linux下启动ftp及xdm配置
ip命令手册
硬盘的物理结构
GRUB安装方式
GNU/Wget 使用手册
mini-itx的嵌入式linux开发的第一套设备
Linux下DNS配置
32M DOM或CF嵌入式Linux系统启动盘制作
英国政府的研究报告正式公布力推开源
几个不错的java网站
CFLAGS参数详解(Desktop cflags)
怎样制造Linux?
Cell

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


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