Makefile 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. include $(INCLUDE_DIR)/kernel.mk
  9. PKG_NAME:=u-boot
  10. PKG_VERSION:=2010.06
  11. PKG_RELEASE:=1
  12. PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
  13. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  14. PKG_SOURCE_URL:=ftp://ftp.denx.de/pub/u-boot
  15. PKG_MD5SUM:=
  16. PKG_CAT:=bzcat
  17. include $(INCLUDE_DIR)/package.mk
  18. UBOOT_CONFIG=$(call qstrip,$(CONFIG_UBOOT_TARGET))
  19. LAN_IP=$(call qstrip,$(CONFIG_UBOOT_IPADDR))
  20. LAN_SERVERIP=$(call qstrip,$(CONFIG_UBOOT_SERVERIP))
  21. define Build/Compile
  22. $(MAKE) -C $(PKG_BUILD_DIR) $(UBOOT_CONFIG)_config
  23. export CROSS_COMPILE=$(TARGET_CROSS); \
  24. export LAN_IP=$(LAN_IP); \
  25. export LAN_SERVERIP=$(LAN_SERVERIP); \
  26. $(MAKE) -C $(PKG_BUILD_DIR)
  27. mkdir -p $(PKG_BUILD_DIR)/ubclient
  28. $(CP) ./ubclient/* $(PKG_BUILD_DIR)/ubclient
  29. export LAN_IP=$(LAN_IP); \
  30. export LAN_SERVERIP=$(LAN_SERVERIP); \
  31. #$(MAKE) -C $(PKG_BUILD_DIR)/ubclient \
  32. # $(TARGET_CONFIGURE_OPTS) \
  33. # CFLAGS="$(TARGET_CFLAGS) -Dtarget_$(BOARD)=1"
  34. endef
  35. define Build/InstallDev
  36. dd if=$(PKG_BUILD_DIR)/u-boot.bin of=$(PKG_BUILD_DIR)/u-boot.block bs=232k count=1 conv=sync
  37. # $(INSTALL_DIR) $(STAGING_DIR)/ubclient/sbin
  38. # $(INSTALL_BIN) $(PKG_BUILD_DIR)/ubclient/ubpar $(STAGING_DIR)/ubclient/sbin/
  39. # $(CP) $(PKG_BUILD_DIR)/ubclient/ubpar ../../base-files/sbin
  40. mkdir -p $(BIN_DIR)/
  41. cp $(PKG_BUILD_DIR)/u-boot.bin $(BIN_DIR)/u-boot.$(PKG_VERSION).bin
  42. endef
  43. $(eval $(call Build/DefaultTargets))