From 97b76de5762214c5e4d4883234fee056b7155185 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Fri, 19 Nov 2021 14:32:58 +0100 Subject: bcm4908: continue work on images for U-Boot based devices MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It still isn't ready though - more data needs to be added to the bootfs. Signed-off-by: Rafał Miłecki (cherry picked from commit 494c033f9cbad67ea2cee3860894bdfffea65109) --- target/linux/bcm4908/image/Makefile | 10 +++++++ target/linux/bcm4908/image/pkgtb-bcm4908.its | 43 ++++++++++++++++++++++++++++ target/linux/bcm4908/image/pkgtb-bcm4912.its | 43 ++++++++++++++++++++++++++++ 3 files changed, 96 insertions(+) create mode 100644 target/linux/bcm4908/image/pkgtb-bcm4908.its create mode 100644 target/linux/bcm4908/image/pkgtb-bcm4912.its (limited to 'target/linux/bcm4908') diff --git a/target/linux/bcm4908/image/Makefile b/target/linux/bcm4908/image/Makefile index cbbbcbb526..aa674c0142 100644 --- a/target/linux/bcm4908/image/Makefile +++ b/target/linux/bcm4908/image/Makefile @@ -5,9 +5,11 @@ include $(INCLUDE_DIR)/image.mk DEVICE_VARS += ASUS_PRODUCTID ASUS_BUILD_NO ASUS_FW_REV ASUS_EXT_NO DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_REGION +DEVICE_VARS += PKGTB_ITS define Image/Prepare cp bootfs-generic.its $(KDIR)/ + sed -i "s=\$$$${dts_dir}=$(DTS_DIR)=" $(KDIR)/bootfs-generic.its endef define Build/bootfs @@ -49,6 +51,14 @@ define Build/bcm4908lzma mv $@.new $@ endef +define Build/pkgtb + mv $@ $@.rootfs + cp $(PKGTB_ITS) $@.its + sed -i "s=\$${bootfs}=$(KDIR)/bootfs-generic.itb=" $@.its + sed -i "s=\$${rootfs}=$@.rootfs=" $@.its + PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@ +endef + define Device/Default KERNEL := kernel-bin | bcm4908lzma | bcm4908kernel KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts) diff --git a/target/linux/bcm4908/image/pkgtb-bcm4908.its b/target/linux/bcm4908/image/pkgtb-bcm4908.its new file mode 100644 index 0000000000..295997184a --- /dev/null +++ b/target/linux/bcm4908/image/pkgtb-bcm4908.its @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +/dts-v1/; + +/ { + description = "Broadcom image upgrade package tree binary"; + #address-cells = <1>; + + images { + bootfs_4908_a0+ { + description = "bootfs"; + data = /incbin/("${bootfs}"); + type = "multi"; + compression = "none"; + + hash-1 { + algo = "sha256"; + }; + }; + + nand_squashfs { + description = "rootfs"; + data = /incbin/("${rootfs}"); + type = "filesystem"; + compression = "none"; + + hash-1 { + algo = "sha256"; + }; + }; + }; + + configurations { + default = "conf_4908_a0+_nand_squashfs"; + + conf_4908_a0+_nand_squashfs { + description = "Brcm Image Bundle"; + bootfs = "bootfs_4908_a0+"; + rootfs = "nand_squashfs"; + compatible = "flash=nand;chip=4908;rev=a0+;ip=ipv6,ipv4;ddr=ddr3;fstype=squashfs"; + }; + }; +}; diff --git a/target/linux/bcm4908/image/pkgtb-bcm4912.its b/target/linux/bcm4908/image/pkgtb-bcm4912.its new file mode 100644 index 0000000000..113b1278cd --- /dev/null +++ b/target/linux/bcm4908/image/pkgtb-bcm4912.its @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +/dts-v1/; + +/ { + description = "Broadcom image upgrade package tree binary"; + #address-cells = <1>; + + images { + bootfs_4912_a0+ { + description = "bootfs"; + data = /incbin/("${bootfs}"); + type = "multi"; + compression = "none"; + + hash-1 { + algo = "sha256"; + }; + }; + + nand_squashfs { + description = "rootfs"; + data = /incbin/("${rootfs}"); + type = "filesystem"; + compression = "none"; + + hash-1 { + algo = "sha256"; + }; + }; + }; + + configurations { + default = "conf_4912_a0+_nand_squashfs"; + + conf_4912_a0+_nand_squashfs { + description = "Brcm Image Bundle"; + bootfs = "bootfs_4912_a0+"; + rootfs = "nand_squashfs"; + compatible = "flash=nand;chip=4912;rev=a0+;ip=ipv6,ipv4;ddr=ddr3,ddr4;fstype=squashfs"; + }; + }; +}; -- cgit v1.2.3