openwrt添加autoconf-archive
openwrt默认会有autoconf、automake,但是没有autoconf-archive。

在编译外置包时可能需要使用autoconf-archive,以下是添加autoconf-archive步骤。

修改tools/Makefile

修改tools/Makfile添加autoconf-archive编译路径

  1. tools-$(BUILD_TOOLCHAIN) += gmp mpfr mpc libelf expat
  2. – tools-y += m4 libtool autoconf automake flex bison pkg-config mklibs zlib
  3. + tools-y += m4 libtool autoconf autoconf-archive automake flex bison pkg-config mklibs zlib
  4. tools-y += sstrip make-ext4fs e2fsprogs mtd-utils mkimage
  5. tools-y += firmware-utils patch-image quilt padjffs2
  6. tools-y += mm-macros missing-macros cmake scons bc findutils gengetopt patchelf
  7. tools-y += mtools dosfstools libressl
  8. tools-$(CONFIG_TARGET_orion_generic) += wrt350nv2-builder upslug2
  9. tools-$(CONFIG_TARGET_x86) += qemu
  10. tools-$(CONFIG_TARGET_mxs) += elftosb sdimage
  11. tools-$(CONFIG_TARGET_ar71xx) += lzma-old squashfs
  12. tools-$(CONFIG_USES_MINOR) += kernel2minor
  13. tools-y += lzma squashfs4
  14. tools-$(BUILD_B43_TOOLS) += b43-tools
  15. tools-$(BUILD_ISL) += isl
  16. tools-$(CONFIG_USE_SPARSE) += sparse
  17. tools-$(CONFIG_TARGET_apm821xx) += genext2fs
  18. # builddir dependencies
  19. $(curdir)/bison/compile := $(curdir)/flex/compile
  20. $(curdir)/flex/compile := $(curdir)/libtool/compile
  21. $(curdir)/libtool/compile := $(curdir)/m4/compile $(curdir)/autoconf/compile $(curdir)/automake/compile $(curdir)/missing-macros/compile
  22. $(curdir)/squashfs/compile := $(curdir)/lzma-old/compile
  23. $(curdir)/squashfs4/compile := $(curdir)/xz/compile $(curdir)/zlib/compile
  24. $(curdir)/quilt/compile := $(curdir)/autoconf/compile $(curdir)/findutils/compile
  25. $(curdir)/autoconf/compile := $(curdir)/m4/compile
  26. + $(curdir)/autoconf-archive/compile := $(curdir)/m4/compile $(curdir)/autoconf/compile
  27. $(curdir)/automake/compile := $(curdir)/m4/compile $(curdir)/autoconf/compile $(curdir)/pkg-config/compile $(curdir)/xz/compile

添加autoconf-archive软件包

进入tools目录创建autoconf-archive文件夹,进入autoconf-archive创建Makefile

  1. cd tools
  2. mkdir autoconf-archive
  3. cd autoconf-archive
  4. touch Makefile

Makefile内容如下

  1. #
  2. # Copyright (C) 2006-2015 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=autoconf-archive
  9. PKG_VERSION:=2013.11.01
  10. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  11. PKG_SOURCE_URL:=@GNU/autoconf-archive
  12. PKG_MD5SUM:=f01381c7d3570cf3fcf65093989e0d29
  13. include $(INCLUDE_DIR)/host-build.mk
  14. HOST_CONFIGURE_ARGS += \
  15. –datarootdir=$(STAGING_DIR_HOST)/share
  16. define Host/Compile
  17. export SHELL=“$(BASH)”; $(MAKE) -C $(HOST_BUILD_DIR)
  18. endef
  19. define Host/Install
  20. export SHELL=“$(BASH)”; $(MAKE) -C $(HOST_BUILD_DIR) install
  21. endef
  22. define Host/Clean
  23. -export SHELL=“$(BASH)”; $(MAKE) -C $(HOST_BUILD_DIR) uninstall
  24. $(call Host/Clean/Default)
  25. endef
  26. $(eval $(call HostBuild))

编译

make tools/autoconf-archive/{clean,compile} V=s
上一篇
下一篇