aboutsummaryrefslogtreecommitdiffstats
path: root/package/boot/uboot-fritz4040/Makefile
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2017-03-14 10:19:17 +0100
committerJohn Crispin <john@phrozen.org>2017-03-22 09:45:18 +0100
commit5c617aec051de5c9dc788d592931a673d58b053d (patch)
tree048fbdc79c600d95a8cae48251182048c71dc3e4 /package/boot/uboot-fritz4040/Makefile
parent93aa8604052305830ea6801f0b93ffe2f0d55721 (diff)
downloadupstream-5c617aec051de5c9dc788d592931a673d58b053d.tar.gz
upstream-5c617aec051de5c9dc788d592931a673d58b053d.tar.bz2
upstream-5c617aec051de5c9dc788d592931a673d58b053d.zip
uboot-fritz4040: add an ipq806x u-boot for FritzBox 4040
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package/boot/uboot-fritz4040/Makefile')
-rw-r--r--package/boot/uboot-fritz4040/Makefile54
1 files changed, 54 insertions, 0 deletions
diff --git a/package/boot/uboot-fritz4040/Makefile b/package/boot/uboot-fritz4040/Makefile
new file mode 100644
index 0000000000..9f9b4e05f4
--- /dev/null
+++ b/package/boot/uboot-fritz4040/Makefile
@@ -0,0 +1,54 @@
+#
+# 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:=6946ebbaf7b12a4a092d763c8f0c87a25984f103
+PKG_SOURCE_DATE:=2017-01-29
+PKG_MIRROR_HASH:=5c2394f51a083dca2a2bf9cb36fa717f252112fc792c9eeae64f6383ad08987b
+
+PKG_RELEASE:=1
+
+include $(INCLUDE_DIR)/u-boot.mk
+include $(INCLUDE_DIR)/package.mk
+
+define U-Boot/Default
+ BUILD_TARGET:=ipq806x
+ 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 -lz
+ $(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) ./files/upload-to-f4040.sh $(1)/
+endef
+
+UBOOT_TARGETS := fritz4040
+
+$(eval $(call BuildPackage/U-Boot))