uboot-fritz4040: bump version to 2019-03-03
[openwrt/staging/wigyori.git] / package / boot / uboot-fritz4040 / Makefile
1 #
2 # Copyright (C) 2013-2014 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9 include $(INCLUDE_DIR)/kernel.mk
10
11 PKG_SOURCE_URL:=https://github.com/chunkeey/FritzBox-4040-UBOOT
12 PKG_SOURCE_PROTO:=git
13 PKG_SOURCE_VERSION:=5f383305f4f0be631b51f89e3dc717318057bde9
14 PKG_SOURCE_DATE:=2019-03-03
15 PKG_MIRROR_HASH:=cb9153480648776cce21f038de8153a0f033066e3d44476ed4c802b48f500fae
16
17 PKG_RELEASE:=1
18
19 include $(INCLUDE_DIR)/u-boot.mk
20 include $(INCLUDE_DIR)/package.mk
21
22 define U-Boot/Default
23 BUILD_TARGET:=ipq40xx
24 UBOOT_BOARD:=$(1)
25 UBOOT_IMAGE:=uboot-$(1).bin
26 endef
27
28 define U-Boot/fritz4040
29 NAME:=FritzBox 4040
30 BUILD_DEVICES:=avm_fritzbox-4040
31 endef
32
33 define U-Boot/fritz7530
34 NAME:=FritzBox 7530
35 BUILD_DEVICES:=avm_fritzbox-7530
36 endef
37
38 UBOOT_CONFIGURE_VARS += USE_PRIVATE_LIBGCC=yes
39 UBOOT_MAKE_FLAGS = USE_PRIVATE_LIBGCC=yes
40 export DTC
41
42 define Build/Configure
43 $(Build/Configure/U-Boot)
44 $(HOSTCC) -o $(PKG_BUILD_DIR)/fritz/lzma2eva $(PKG_BUILD_DIR)/fritz/src/lzma2eva.c
45 $(HOSTCC) -o $(PKG_BUILD_DIR)/fritz/tichksum $(PKG_BUILD_DIR)/fritz/src/tichksum.c
46 ln -sf $(STAGING_DIR_HOST)/bin/lzma $(PKG_BUILD_DIR)/fritz
47 endef
48
49 define Build/Compile
50 $(Build/Compile/U-Boot)
51 (cd $(PKG_BUILD_DIR); ./fritz/fritzcreator.sh $(UBOOT_BOARD);)
52 endef
53
54 define Build/InstallDev
55 $(INSTALL_DIR) $(STAGING_DIR_IMAGE)
56 $(CP) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) $(STAGING_DIR_IMAGE)/$(UBOOT_IMAGE)
57 endef
58
59 define Package/u-boot/install
60 $(Package/u-boot/install/default)
61 $(INSTALL_BIN) $(PKG_BUILD_DIR)/upload-to-f4040.sh $(1)/
62 endef
63
64 UBOOT_TARGETS := fritz4040 fritz7530
65
66 $(eval $(call BuildPackage/U-Boot))