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
|
2022-05-13 19:44:30 +00:00
|
|
|
PKG_SOURCE_VERSION:=9d89013f9cc963eca25856c61fa066091d35f8de
|
|
|
|
PKG_SOURCE_DATE:=2022-05-01
|
2024-04-07 10:29:11 +00:00
|
|
|
PKG_MIRROR_HASH:=4e8106a7877ae6aa8da44bf95401b860d11f7d51417cc5a61ce59a353d4ee866
|
2017-03-14 09:19:17 +00:00
|
|
|
|
2023-05-17 13:08:40 +00:00
|
|
|
PKG_RELEASE:=5
|
2017-03-14 09:19:17 +00:00
|
|
|
|
|
|
|
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
|
2019-09-06 08:29:50 +00:00
|
|
|
BUILD_SUBTARGET:=generic
|
2019-02-18 22:58:33 +00:00
|
|
|
UBOOT_BOARD:=$(1)
|
|
|
|
UBOOT_IMAGE:=uboot-$(1).bin
|
2017-03-14 09:19:17 +00:00
|
|
|
endef
|
|
|
|
|
2019-09-10 19:07:23 +00:00
|
|
|
define U-Boot/fritz1200
|
|
|
|
NAME:=FritzRepeater 1200
|
|
|
|
BUILD_DEVICES:=avm_fritzrepeater-1200
|
|
|
|
endef
|
|
|
|
|
2019-03-11 17:05:32 +00:00
|
|
|
define U-Boot/fritz3000
|
|
|
|
NAME:=FritzRepeater 3000
|
|
|
|
BUILD_DEVICES:=avm_fritzrepeater-3000
|
|
|
|
endef
|
|
|
|
|
2017-03-14 09:19:17 +00:00
|
|
|
define U-Boot/fritz4040
|
|
|
|
NAME:=FritzBox 4040
|
2019-01-04 20:17:20 +00:00
|
|
|
BUILD_DEVICES:=avm_fritzbox-4040
|
2017-03-14 09:19:17 +00:00
|
|
|
endef
|
|
|
|
|
2022-07-15 05:59:15 +00:00
|
|
|
define U-Boot/fritz7520
|
|
|
|
NAME:=FritzBox 7520
|
|
|
|
BUILD_DEVICES:=avm_fritzbox-7530
|
|
|
|
endef
|
|
|
|
|
2019-02-18 22:58:34 +00:00
|
|
|
define U-Boot/fritz7530
|
|
|
|
NAME:=FritzBox 7530
|
|
|
|
BUILD_DEVICES:=avm_fritzbox-7530
|
|
|
|
endef
|
|
|
|
|
2017-03-14 09:19:17 +00:00
|
|
|
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)
|
2019-05-17 19:32:50 +00:00
|
|
|
$(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $(PKG_BUILD_DIR)/fritz/lzma2eva $(PKG_BUILD_DIR)/fritz/src/lzma2eva.c -lz
|
|
|
|
$(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $(PKG_BUILD_DIR)/fritz/tichksum $(PKG_BUILD_DIR)/fritz/src/tichksum.c
|
2017-03-14 09:19:17 +00:00
|
|
|
ln -sf $(STAGING_DIR_HOST)/bin/lzma $(PKG_BUILD_DIR)/fritz
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Compile
|
|
|
|
$(Build/Compile/U-Boot)
|
2019-02-18 22:58:33 +00:00
|
|
|
(cd $(PKG_BUILD_DIR); ./fritz/fritzcreator.sh $(UBOOT_BOARD);)
|
2017-03-14 09:19:17 +00:00
|
|
|
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
|
|
|
|
|
2022-07-15 05:59:15 +00:00
|
|
|
UBOOT_TARGETS := fritz1200 fritz3000 fritz4040 fritz7520 fritz7530
|
2017-03-14 09:19:17 +00:00
|
|
|
|
|
|
|
$(eval $(call BuildPackage/U-Boot))
|