You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.4 KiB
54 lines
1.4 KiB
#
|
|
# 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
|
|
PKG_SOURCE_VERSION:=5da78cca60814ea31065a50376d9c905425b03a1
|
|
PKG_SOURCE_DATE:=2018-12-09
|
|
PKG_MIRROR_HASH:=ff7bc2498de1066dde24d7ef68e440c3847244a5b8bb35ce4275e3918f230aa3
|
|
|
|
PKG_RELEASE:=1
|
|
|
|
include $(INCLUDE_DIR)/u-boot.mk
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
define U-Boot/Default
|
|
BUILD_TARGET:=ipq40xx
|
|
UBOOT_IMAGE:=uboot-fritz4040.bin
|
|
endef
|
|
|
|
define U-Boot/fritz4040
|
|
NAME:=FritzBox 4040
|
|
endef
|
|
|
|
UBOOT_CONFIGURE_VARS += USE_PRIVATE_LIBGCC=yes
|
|
UBOOT_MAKE_FLAGS = USE_PRIVATE_LIBGCC=yes
|
|
export DTC
|
|
|
|
define Build/Configure
|
|
$(Build/Configure/U-Boot)
|
|
$(HOSTCC) -o $(PKG_BUILD_DIR)/fritz/lzma2eva $(PKG_BUILD_DIR)/fritz/src/lzma2eva.c
|
|
$(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
|
|
|
|
define Package/u-boot/install
|
|
$(Package/u-boot/install/default)
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/upload-to-f4040.sh $(1)/
|
|
endef
|
|
|
|
UBOOT_TARGETS := fritz4040
|
|
|
|
$(eval $(call BuildPackage/U-Boot))
|
|
|