aboutsummaryrefslogtreecommitdiffstats
path: root/package/boot/uboot-bcm4908/Makefile
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2022-03-04 09:39:04 +0100
committerRafał Miłecki <rafal@milecki.pl>2022-03-14 08:51:01 +0100
commit45b3f2aa0f57c7ca694317aca462d6ed1e183a67 (patch)
tree706cd70dc80ca203443548d6d03d6e74b4cd1386 /package/boot/uboot-bcm4908/Makefile
parent604274c24b5705a893bfbae01be776ef0b5944c0 (diff)
downloadupstream-45b3f2aa0f57c7ca694317aca462d6ed1e183a67.tar.gz
upstream-45b3f2aa0f57c7ca694317aca462d6ed1e183a67.tar.bz2
upstream-45b3f2aa0f57c7ca694317aca462d6ed1e183a67.zip
uboot-bcm4908: add package with BCM4908 U-Boot
New BCM4908 devices come with U-Boot instead of CFE. Firmwares for such devices has to include U-Boot. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 0d45e1ea96ef29649f080c54f99fb1c80482421b)
Diffstat (limited to 'package/boot/uboot-bcm4908/Makefile')
-rw-r--r--package/boot/uboot-bcm4908/Makefile48
1 files changed, 48 insertions, 0 deletions
diff --git a/package/boot/uboot-bcm4908/Makefile b/package/boot/uboot-bcm4908/Makefile
new file mode 100644
index 0000000000..489b4d69bf
--- /dev/null
+++ b/package/boot/uboot-bcm4908/Makefile
@@ -0,0 +1,48 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/kernel.mk
+
+PKG_RELEASE:=$(AUTORELEASE)
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://git.openwrt.org/project/bcm63xx/u-boot.git
+PKG_SOURCE_DATE:=2022-03-03
+PKG_SOURCE_VERSION:=92e9eca819c9c898d9d2010e1a217726c42c8c47
+PKG_MIRROR_HASH:=11c37fe4c18d55e799153600d1cfd8ee9ca7da8326d0024c1d825f4a327c5f0d
+
+include $(INCLUDE_DIR)/u-boot.mk
+include $(INCLUDE_DIR)/package.mk
+
+define U-Boot/Default
+ BUILD_TARGET:=bcm4908
+ UBOOT_IMAGE:=u-boot-nodtb.bin
+ DEFAULT:=y
+endef
+
+define U-Boot/bcm4908
+ NAME:=Broadcom's BCM4908
+ UBOOT_CONFIG:=bcm94908
+endef
+
+UBOOT_TARGETS := \
+ bcm4908
+
+define Build/Prepare
+ $(call Build/Prepare/Default)
+ mkdir -p $(PKG_BUILD_DIR)/include/generated/
+ ( cd $(PKG_BUILD_DIR)/board/broadcom/bcmbca/httpd/html/ && \
+ xxd -i index.html > ../../../../../include/generated/index.h && \
+ xxd -i flashing.html > ../../../../../include/generated/flashing.h && \
+ xxd -i fail.html > ../../../../../include/generated/fail.h && \
+ xxd -i 404.html > ../../../../../include/generated/404.h )
+endef
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(STAGING_DIR_IMAGE)/u-boot
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) $(STAGING_DIR_IMAGE)/u-boot/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/u-boot.dtb $(STAGING_DIR_IMAGE)/u-boot/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/arch/arm/dts/*.dtb $(STAGING_DIR_IMAGE)/u-boot/
+endef
+
+$(eval $(call BuildPackage/U-Boot))