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:

  1. place openwrt makefile openwrt/package/name folder
  2. run make menuconfig
  3. in pop-up dialog choose package want compile putting either m or * next it.
  4. run make package/name/compile
  5. you'll find .ipk file in openwrt/bin/

Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -