Makefile 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #
  2. # Copyright (C) 2006 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:=apex
  9. PKG_VERSION:=1.6.9
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=ftp://ftp.buici.com/pub/apex/ \
  13. ftp://metalab.unc.edu/pub/Linux/system/boot/apex/
  14. PKG_MD5SUM:=9606cf2e3fd2c9a86fe0b61388509a30
  15. PKG_TARGETS:=bin
  16. include $(INCLUDE_DIR)/package.mk
  17. export GCC_HONOUR_COPTS=s
  18. define Package/apex
  19. SECTION:=boot
  20. CATEGORY:=Boot Loaders
  21. DEPENDS:=@TARGET_ixp4xx
  22. DEFAULT:=y
  23. TITLE:=Boot loader for NSLU2, FSG3, NAS100D and others
  24. URL:=http://wiki.buici.com/wiki/Apex_Bootloader
  25. endef
  26. define build_apex
  27. $(MAKE) -C $(PKG_BUILD_DIR) \
  28. ARCH=arm \
  29. $(1)_config
  30. $(SED) 's,.*CONFIG_AEABI.*,$(if $(CONFIG_EABI_SUPPORT),CONFIG_AEABI=y,# CONFIG_AEABI is not set),' $(PKG_BUILD_DIR)/.config
  31. $(MAKE) -C $(PKG_BUILD_DIR) \
  32. $(TARGET_CONFIGURE_OPTS) \
  33. KBUILD_HAVE_NLS=no \
  34. ARCH=arm \
  35. clean all
  36. $(INSTALL_BIN) $(PKG_BUILD_DIR)/apex.bin $(PKG_BUILD_DIR)/out/apex-$(2).bin
  37. endef
  38. define Build/Compile
  39. $(INSTALL_DIR) $(PKG_BUILD_DIR)/out
  40. $(call build_apex,slugos-nslu2-armeb,nslu2-armeb)
  41. $(call build_apex,slugos-nslu2-16mb-armeb,nslu2-16mb-armeb)
  42. $(call build_apex,slugos-fsg3-armeb,fsg3-armeb)
  43. $(call build_apex,slugos-nas100d-armeb,nas100d-armeb)
  44. endef
  45. define Package/apex/install
  46. $(INSTALL_DIR) $(STAGING_DIR)/apex
  47. $(CP) $(PKG_BUILD_DIR)/out/*.bin $(1)/
  48. endef
  49. $(eval $(call BuildPackage,apex))