下文只做记录使用,细节省略,仅作参考
目录结构如下:
Makefile:
include $(TOPDIR)/rules.mk PKG_NAME:=hello_world PKG_VERSION:=0.0.1 PKG_BUILD_DEPENDS:=rust/host PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk include $(TOPDIR)/feeds/packages/lang/rust/rust-package.mk define Package/hello_world SECTION:=LuCI CATEGORY:=vLai TITLE:=Rust Hello World example DEPENDS:=$(RUST_ARCH_DEPENDS) endef define Package/hello_world/description Hello World rust example for OpenWRT. endef $(eval $(call RustBinPackage,hello_world)) $(eval $(call BuildPackage,hello_world)) $(eval $(Build/Compile,hello_world))
make menuconfig
里面选中vLai
目录下的rust-hello-world
make V=s package/rust-hello-world/{clean,compile}
openwrt/bin/packages/mipsel_24kc/base
:ipk或者apk程序,openwrt/staging_dir/target-mipsel_24kc_musl/root-ramips/usr/bin
:可执行程序本文作者:vLai
本文链接:
版权声明:本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!