linux - How to cross compile a .c file for Openwrt? -
i trying cross compile .c file openwrt. downloaded openwrt , added file in package directory , created makefile while compiling skipping. don't know wrong
this makefile :
*
include $(topdir)/rules.mk include $(include_dir)/kernel.mk pkg_name:=gav pkg_version:=1 pkg_release:=1 include $(include_dir)/package.mk define package/gav section:=utils category:=base system title:=gaurav endef define package/gav/description package contains utility useful upgrade other firmware or older openwrt releases. endef define build/prepare mkdir -p $(pkg_build_dir/) $(cp) ./src/* $(pkg_build_dir)/ endef define package/gav/install $(install_dir) $(1)/sbin $(install_bin) $(pkg_build_dir)/gav $(1)/sbin/ endef $(eval $(call buildpackage,gav))
*
if toolchain skips makefile entirely, haven't run make menuconfig.
so steps are:
- place openwrt makefile openwrt/package/name folder
- run make menuconfig
- in pop-up dialog choose package want compile putting either m or * next it.
- run make package/name/compile
- you'll find .ipk file in openwrt/bin/
Comments
Post a Comment