2017-03-14 09:19:17 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2013-2014 OpenWrt.org
|
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
include $(INCLUDE_DIR)/kernel.mk
|
|
|
|
|
|
|
|
PKG_SOURCE_URL:=https://github.com/chunkeey/FritzBox-4040-UBOOT
|
|
|
|
PKG_SOURCE_PROTO:=git
|
2019-01-25 17:22:28 +00:00
|
|
|
PKG_SOURCE_VERSION:=a768e513b07b5999a8e7d7740ac8d9da04ee7e51
|
|
|
|
PKG_SOURCE_DATE:=2019-01-25
|
|
|
|
PKG_MIRROR_HASH:=eb552c946bcad53763557b19703b10210f7acabf0d135759beddb7b11fa4ef25
|
2017-03-14 09:19:17 +00:00
|
|
|
|
|
|
|
PKG_RELEASE:=1
|
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/u-boot.mk
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
define U-Boot/Default
|
2018-02-21 19:40:50 +00:00
|
|
|
BUILD_TARGET:=ipq40xx
|
2017-03-14 09:19:17 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define U-Boot/fritz4040
|
|
|
|
NAME:=FritzBox 4040
|
2019-01-04 20:17:20 +00:00
|
|
|
UBOOT_IMAGE:=uboot-fritz4040.bin
|
|
|
|
BUILD_DEVICES:=avm_fritzbox-4040
|
2017-03-14 09:19:17 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
UBOOT_CONFIGURE_VARS += USE_PRIVATE_LIBGCC=yes
|
2018-02-10 23:52:08 +00:00
|
|
|
UBOOT_MAKE_FLAGS = USE_PRIVATE_LIBGCC=yes
|
2017-03-14 09:19:17 +00:00
|
|
|
export DTC
|
|
|
|
|
|
|
|
define Build/Configure
|
|
|
|
$(Build/Configure/U-Boot)
|
2018-12-11 22:00:07 +00:00
|
|
|
$(HOSTCC) -o $(PKG_BUILD_DIR)/fritz/lzma2eva $(PKG_BUILD_DIR)/fritz/src/lzma2eva.c
|
2017-03-14 09:19:17 +00:00
|
|
|
$(HOSTCC) -o $(PKG_BUILD_DIR)/fritz/tichksum $(PKG_BUILD_DIR)/fritz/src/tichksum.c
|
|
|
|
ln -sf $(STAGING_DIR_HOST)/bin/lzma $(PKG_BUILD_DIR)/fritz
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Compile
|
|
|
|
$(Build/Compile/U-Boot)
|
|
|
|
(cd $(PKG_BUILD_DIR); ./fritz/fritzcreator.sh;)
|
|
|
|
endef
|
|
|
|
|
2019-01-04 20:17:20 +00:00
|
|
|
define Build/InstallDev
|
|
|
|
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
|
|
|
|
$(CP) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) $(STAGING_DIR_IMAGE)/$(UBOOT_IMAGE)
|
|
|
|
endef
|
|
|
|
|
2017-03-14 09:19:17 +00:00
|
|
|
define Package/u-boot/install
|
|
|
|
$(Package/u-boot/install/default)
|
2018-12-11 22:00:07 +00:00
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/upload-to-f4040.sh $(1)/
|
2017-03-14 09:19:17 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
UBOOT_TARGETS := fritz4040
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage/U-Boot))
|