国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 服務(wù)器 > Linux服務(wù)器 > 正文

uClinux中添加用戶應(yīng)用程序的詳細(xì)方法

2024-09-05 23:01:33
字體:
供稿:網(wǎng)友

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 = hello
OBJS = hello.o

all: $(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. 將用戶程序編譯進(jìn)romfs


# cd ~/uClinux-dist
# make menuconfig
# make dep
# make romfs 

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 华坪县| 泰安市| 邓州市| 修文县| 辽阳市| 那曲县| 资源县| 永安市| 永登县| 平南县| 驻马店市| 漳浦县| 湖南省| 双江| 崇仁县| 德钦县| 汶川县| 忻城县| 庐江县| 同德县| 弋阳县| 汤阴县| 惠州市| 龙口市| 怀仁县| 天柱县| 章丘市| 沙湾县| 苍山县| 布尔津县| 保靖县| 石家庄市| 怀化市| 博湖县| 宜黄县| 塔河县| 东光县| 通渭县| 巩留县| 海口市| 佳木斯市|