openwrt添加自定义应用程序开机启动

本文介绍了如何在OpenWRT中添加自定义应用程序开机启动。首先,在package目录下创建自定义文件夹及文件,然后在openwrt/package/base-files/files/etc/init.d下编写启动脚本,并设置启动优先级。接着,通过在/etc/rc.d下创建软链接确保脚本在启动时执行。最后,通过make menuconfig选择应用程序并进行编译。
摘要由CSDN通过智能技术生成

1 在package文件夹下,建立自定义的文件夹及文件

 

cd package

 

mkdir Helloworld ;

 

cd Helloworld

 

 

mkdir src

 

touch src/Makefile   /* Helloworld 编译Makefile */

 

touch ./Makefile /*建立顶层Makefile,这个Makefile文件是OpenWRT读的*/

 

 

编写模块编译Makefile:

 

 

Makefile文件模板内容如下:
##############################################
# OpenWrt Makefile for helloworld program
#
#
# Most of the variables used here are defined in
# the include directives below. We just need to
# specify a basic description of the package,
# where to build our program, where to find
# the source files, and where to install the
# compiled program on the router.
#
# Be very careful of spacing in this file.
# Indents should be tabs, not spaces, and
  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值