From patchwork Sat Aug 19 15:09:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= X-Patchwork-Id: 1823325 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RSj0L6w0xz1yfn for ; Sun, 20 Aug 2023 01:12:32 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=m0PynmhEIdOXeOiWIejQhZgjLmD86Rh6iHK2phadDCM=; b=K1oD63G5DMOK/n l/h7fqIXXMFNBPIRPH+gP9De52uGvpT26KX36a8/MEdVhwzcwnGjEaXvaeYqUQTzy/JuU0HrbIvzS S1jvdBHm96dotaFOCvOoBuZ9HEqEj8vydXw9fSPsuqEIFitTt8QZ9xupi4PaEGIwBSzAoiyGVVp3b 1klzVo0cx+oN7XuTtmdqlNl/XKvAtm7vHqGTzdhmr9k0zcigMCyXINMdadA2VP4pCbZYNdGeDc+zY 6lGcZxtlJRXONYiXsiaa/rHtmm9fAF9qKOL9qqMuIJW5Rhm4t1nFMZjkE4AfPn2Narf1DBlolVwUu tEEPexA/jDh0J0/RLSLA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qXNa0-00Azdx-1i; Sat, 19 Aug 2023 15:09:32 +0000 Received: from relay1-d.mail.gandi.net ([217.70.183.193]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qXNZv-00Azcy-0c for openwrt-devel@lists.openwrt.org; Sat, 19 Aug 2023 15:09:31 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id DBC88240006; Sat, 19 Aug 2023 15:09:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arinc9.com; s=gm1; t=1692457761; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Th4vKEHw8sF6RjFWotb+kBtKoXqY5oWCMV4cKuUwQ/I=; b=iyoiluBVW9Tw18XNm1vJCk4szAHa7ebqWaXLh6U6hmbaLZfWYxr3GhdHSVacD6qBGLQxVT 6QmqlCT4UMYPGrBn8ATgFOYjDYTSbNUkLniPYQtZHoMQLYXcUvr+VIM34OmIiHjNUKyio6 oV5QZpGtLb71hmGtuuP3ntTVbrvCGmdS2l8wvG0dI2d2znevkM42mRWAWAh8D1JxbaQ2aq 1eN25+5U/6Zv+4xrRlGD/poK+xU6QXxYarqK+pj1PabP/mNjvSF+Dikamm+tXDYEkJTuXg zst71iIKDVBKtDdDGHucU8gkYwlMKZIi3hkZU/QSI5u1uyLeQKQcb0OcxLl0PA== From: =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= To: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= Cc: =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= , openwrt-devel@lists.openwrt.org Subject: [PATCH] bcm53xx: add nand subtarget Date: Sat, 19 Aug 2023 18:09:04 +0300 Message-Id: <20230819150904.742961-1-arinc.unal@arinc9.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-GND-Sasl: arinc.unal@arinc9.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230819_080927_532293_0C016BC8 X-CRM114-Status: GOOD ( 20.50 ) X-Spam-Score: -0.9 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The NVMEM_BRCM_NVRAM driver won't work properly with NVRAM in NAND. It causes the devices with NVRAM in NAND to bootloop. Create a subtarget for NAND devices and disable the driver on it. Disable NVMEM too as the bgmac_bcma driver will hang trying to retrieve the MAC address without NVMEM_BRCM_NVRAM enabled. Content analysis details: (-0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [217.70.183.193 listed in wl.mailspike.net] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [217.70.183.193 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org The NVMEM_BRCM_NVRAM driver won't work properly with NVRAM in NAND. It causes the devices with NVRAM in NAND to bootloop. Create a subtarget for NAND devices and disable the driver on it. Disable NVMEM too as the bgmac_bcma driver will hang trying to retrieve the MAC address without NVMEM_BRCM_NVRAM enabled. Signed-off-by: Arınç ÜNAL --- target/linux/bcm53xx/Makefile | 8 +- target/linux/bcm53xx/generic/target.mk | 4 + target/linux/bcm53xx/image/Makefile | 338 +---------------------- target/linux/bcm53xx/image/generic.mk | 43 +++ target/linux/bcm53xx/image/nand.mk | 293 ++++++++++++++++++++ target/linux/bcm53xx/nand/config-default | 3 + target/linux/bcm53xx/nand/target.mk | 6 + 7 files changed, 352 insertions(+), 343 deletions(-) create mode 100644 target/linux/bcm53xx/image/generic.mk create mode 100644 target/linux/bcm53xx/image/nand.mk create mode 100644 target/linux/bcm53xx/nand/config-default create mode 100644 target/linux/bcm53xx/nand/target.mk diff --git a/target/linux/bcm53xx/Makefile b/target/linux/bcm53xx/Makefile index 84f08f1f80..6bf8ebbd18 100644 --- a/target/linux/bcm53xx/Makefile +++ b/target/linux/bcm53xx/Makefile @@ -7,17 +7,13 @@ include $(TOPDIR)/rules.mk ARCH:=arm BOARD:=bcm53xx BOARDNAME:=Broadcom BCM47xx/53xx (ARM) -FEATURES:=squashfs nand usb pci pcie gpio pwm +FEATURES:=squashfs usb pci pcie gpio pwm CPU_TYPE:=cortex-a9 -SUBTARGETS:=generic +SUBTARGETS:=generic nand KERNEL_PATCHVER:=5.15 KERNEL_TESTING_PATCHVER:=6.1 -define Target/Description - Build firmware images for Broadcom based BCM47xx/53xx routers with ARM CPU, *not* MIPS. -endef - include $(INCLUDE_DIR)/target.mk KERNELNAME:=zImage dtbs diff --git a/target/linux/bcm53xx/generic/target.mk b/target/linux/bcm53xx/generic/target.mk index f5cb1fb19b..2b55583077 100644 --- a/target/linux/bcm53xx/generic/target.mk +++ b/target/linux/bcm53xx/generic/target.mk @@ -1 +1,5 @@ BOARDNAME:=Generic + +define Target/Description + Build firmware images for Broadcom based BCM47xx/53xx routers with ARM CPU, *not* MIPS. +endef diff --git a/target/linux/bcm53xx/image/Makefile b/target/linux/bcm53xx/image/Makefile index 5158b432b3..4af12d0222 100644 --- a/target/linux/bcm53xx/image/Makefile +++ b/target/linux/bcm53xx/image/Makefile @@ -105,22 +105,6 @@ define Build/seama-nand -i $@.entity endef -define Build/dwl8610ap-image - mkdir -p $@.tmptar - # The DWL8610AP pretends to be a Broadcom reference design - echo "bcm953012er" > $@.tmptar/board - echo "LVL7" > $@.tmptar/model - # Something high beyond what D-Link has put out - echo "5.0.0.0" > $@.tmptar/version - # Create rootfs.bin, this is just a NAND image including everything - cp $@ $@.tmptar/rootfs.bin - # Hash the rootfs.bin - cat $@.tmptar/rootfs.bin | md5sum > $@.tmptar/rootfs.md5 - cd $@.tmptar && tar -c -f $@.new * - rm -rf $@.tmptar - mv $@.new $@ -endef - DEVICE_VARS += ASUS_PRODUCTID DEVICE_VARS += BUFFALO_TAG_PLATFORM BUFFALO_TAG_VERSION BUFFALO_TAG_MINOR DEVICE_VARS += SIGNATURE @@ -159,54 +143,6 @@ define Device/asus IMAGE/trx := append-ubi | trx-nand | asus-trx endef -define Device/asus_rt-ac3100 - $(call Device/asus) - DEVICE_MODEL := RT-AC3100 - DEVICE_PACKAGES := $(BRCMFMAC_4366B1) $(BRCMFMAC_4366C0) $(USB3_PACKAGES) - ASUS_PRODUCTID := RT-AC3100 -endef -TARGET_DEVICES += asus_rt-ac3100 - -define Device/asus_rt-ac56u - $(call Device/asus) - DEVICE_MODEL := RT-AC56U - DEVICE_PACKAGES := $(B43) $(USB3_PACKAGES) - ASUS_PRODUCTID := RT-AC56U -endef -TARGET_DEVICES += asus_rt-ac56u - -define Device/asus_rt-ac68u - $(call Device/asus) - DEVICE_MODEL := RT-AC68U - DEVICE_PACKAGES := $(USB3_PACKAGES) - ASUS_PRODUCTID := RT-AC68U -endef -TARGET_DEVICES += asus_rt-ac68u - -define Device/asus_rt-ac87u - $(call Device/asus) - DEVICE_MODEL := RT-AC87U - DEVICE_PACKAGES := $(USB3_PACKAGES) - ASUS_PRODUCTID := RT-AC87U -endef -TARGET_DEVICES += asus_rt-ac87u - -define Device/asus_rt-ac88u - $(call Device/asus) - DEVICE_MODEL := RT-AC88U - DEVICE_PACKAGES := $(BRCMFMAC_4366B1) $(BRCMFMAC_4366C0) $(USB3_PACKAGES) - ASUS_PRODUCTID := RT-AC88U -endef -TARGET_DEVICES += asus_rt-ac88u - -define Device/asus_rt-n18u - $(call Device/asus) - DEVICE_MODEL := RT-N18U - DEVICE_PACKAGES := $(USB3_PACKAGES) - ASUS_PRODUCTID := RT-N18U -endef -TARGET_DEVICES += asus_rt-n18u - # Buffalo devices have TFTP recovery mode which can work nicely with initramfs # kernels. # We should have two initramfs images for Buffalo: plain initramfs kernel and @@ -218,186 +154,18 @@ define Device/buffalo/Default KERNEL_INITRAMFS = $$(KERNEL) endef -define Device/buffalo_wxr-1900dhp - $(call Device/buffalo/Default) - DEVICE_MODEL := WXR-1900DHP - DEVICE_PACKAGES := $(USB3_PACKAGES) -endef -TARGET_DEVICES += buffalo_wxr-1900dhp - -define Device/buffalo_wzr-600dhp2 - $(call Device/buffalo/Default) - DEVICE_MODEL := WZR-600DHP2 - DEVICE_PACKAGES := $(B43) $(USB2_PACKAGES) -endef -TARGET_DEVICES += buffalo_wzr-600dhp2 - -define Device/buffalo_wzr-900dhp - $(call Device/buffalo/Default) - DEVICE_MODEL := WZR-900DHP - DEVICE_PACKAGES := $(B43) $(USB3_PACKAGES) - BUFFALO_TAG_PLATFORM := bcm - BUFFALO_TAG_VERSION := 9.99 - BUFFALO_TAG_MINOR := 9.99 - IMAGES += factory-DHP-EU.bin factory-DHP2-JP.bin - IMAGE/factory-DHP-EU.bin := \ - append-ubi | trx-nand | buffalo-wzr-header WZR-900DHP EU | \ - buffalo-enc WZR-900DHP $$(BUFFALO_TAG_VERSION) | \ - buffalo-tag-dhp WZR-900DHP EU mlang20 | buffalo-enc-tag | \ - buffalo-dhp-image - IMAGE/factory-DHP2-JP.bin := \ - append-ubi | trx-nand | buffalo-wzr-header WZR-900DHP2 JP | \ - buffalo-enc WZR-900DHP2 $$(BUFFALO_TAG_VERSION) | \ - buffalo-tag-dhp WZR-900DHP2 JP jp | buffalo-enc-tag | \ - buffalo-dhp-image -endef -TARGET_DEVICES += buffalo_wzr-900dhp - -define Device/buffalo_wzr-1750dhp - $(call Device/buffalo/Default) - DEVICE_MODEL := WZR-1750DHP - DEVICE_PACKAGES := $(B43) $(USB3_PACKAGES) -endef -TARGET_DEVICES += buffalo_wzr-1750dhp - define Device/dlink DEVICE_VENDOR := D-Link IMAGES := bin IMAGE/bin := append-ubi | seama-nand endef -define Device/dlink_dir-885l - DEVICE_MODEL := DIR-885L - DEVICE_PACKAGES := $(BRCMFMAC_4366B1) $(USB3_PACKAGES) - $(Device/dlink) - SIGNATURE := wrgac42_dlink.2015_dir885l -endef -TARGET_DEVICES += dlink_dir-885l - -define Device/dlink_dwl-8610ap - DEVICE_VENDOR := D-Link - DEVICE_MODEL := DWL-8610AP - DEVICE_PACKAGES := $(B43) - IMAGES := factory.tar - IMAGE/factory.tar := append-ubi | trx-nand | dwl8610ap-image -endef -TARGET_DEVICES += dlink_dwl-8610ap - -define Device/linksys_ea6300-v1 - DEVICE_VENDOR := Linksys - DEVICE_MODEL := EA6300 - DEVICE_VARIANT := v1 - DEVICE_PACKAGES := $(B43) $(USB3_PACKAGES) -endef -TARGET_DEVICES += linksys_ea6300-v1 - -define Device/linksys_ea6500-v2 - DEVICE_VENDOR := Linksys - DEVICE_MODEL := EA6500 - DEVICE_VARIANT := v2 - DEVICE_PACKAGES := $(B43) $(USB3_PACKAGES) -endef -TARGET_DEVICES += linksys_ea6500-v2 - -define Device/linksys_ea9200 - DEVICE_VENDOR := Linksys - DEVICE_MODEL := EA9200 - DEVICE_VARIANT := v1 - DEVICE_PACKAGES := $(BRCMFMAC_43602A1) $(USB3_PACKAGES) -endef -TARGET_DEVICES += linksys_ea9200 - -define Device/linksys_ea9500 - DEVICE_VENDOR := Linksys - DEVICE_MODEL := EA9500 - DEVICE_PACKAGES := $(BRCMFMAC_4366C0) $(USB3_PACKAGES) - DEVICE_DTS := bcm47094-linksys-panamera -endef -TARGET_DEVICES += linksys_ea9500 - define Device/luxul DEVICE_VENDOR := Luxul IMAGES := lxl IMAGE/lxl := append-ubi | trx-nand | luxul-lxl endef -define Device/luxul_abr-4500 - $(Device/luxul) - DEVICE_MODEL := ABR-4500 - DEVICE_PACKAGES := $(USB3_PACKAGES) - LUXUL_BOARD := ABR-4500 -endef -TARGET_DEVICES += luxul_abr-4500 - -define Device/luxul_xap-1610 - $(Device/luxul) - DEVICE_MODEL := XAP-1610 - DEVICE_PACKAGES := $(BRCMFMAC_4366C0) - IMAGE/lxl := append-rootfs | trx-serial | luxul-lxl - LUXUL_BOARD := XAP-1610 -endef -TARGET_DEVICES += luxul_xap-1610 - -define Device/luxul_xbr-4500 - $(Device/luxul) - DEVICE_MODEL := XBR-4500 - DEVICE_PACKAGES := $(USB3_PACKAGES) - LUXUL_BOARD := XBR-4500 -endef -TARGET_DEVICES += luxul_xbr-4500 - -define Device/luxul_xwr-3150 - $(Device/luxul) - DEVICE_MODEL := XWR-3150 - DEVICE_PACKAGES := $(BRCMFMAC_4366C0) $(USB3_PACKAGES) - DEVICE_DTS := bcm47094-luxul-xwr-3150-v1 - LUXUL_BOARD := XWR-3150 -endef -TARGET_DEVICES += luxul_xwr-3150 - -define Device/meraki_mr26 - DEVICE_VENDOR := Meraki - DEVICE_MODEL := MR26 - DEVICE_PACKAGES := $(B43) kmod-i2c-bcm-iproc kmod-eeprom-at24 \ - kmod-hwmon-ina2xx kmod-leds-uleds nu801 - DEVICE_DTS := bcm53015-meraki-mr26 -# resize the initramfs to fit the size of the existing part.safe. - KERNEL_LOADADDR := 0x00008000 - KERNEL_INITRAMFS_SUFFIX := .bin - KERNEL_INITRAMFS := kernel-bin | append-dtb | gzip | uImage gzip | pad-to 9310208 -# LZMA is not supported by the uboot - KERNEL := kernel-bin | append-dtb | gzip | uImage gzip - IMAGES += sysupgrade.bin - IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata -endef -TARGET_DEVICES += meraki_mr26 - -define Device/meraki_mr32 - DEVICE_VENDOR := Meraki - DEVICE_MODEL := MR32 - DEVICE_PACKAGES := $(B43) kmod-i2c-bcm-iproc kmod-eeprom-at24 \ - kmod-leds-pwm kmod-hwmon-ina2xx kmod-bluetooth - DEVICE_DTS := bcm53016-meraki-mr32 -# Meraki FW r23 tries to resize the part.safe partition before it will -# flash the image. This is a bit of a problem, since resizing will fail -# if the partition is smaller than the old one. - KERNEL_LOADADDR := 0x00008000 - KERNEL_INITRAMFS_SUFFIX := .bin - DEVICE_DTS_DELIMITER := @ - DEVICE_DTS_CONFIG := config@1 - KERNEL_INITRAMFS := kernel-bin | fit none $$(DTS_DIR)/$$(DEVICE_DTS).dtb | \ - pad-to 10362880 - KERNEL := kernel-bin | fit none $$(DTS_DIR)/$$(DEVICE_DTS).dtb - IMAGES += sysupgrade.bin - IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata - -# The loader is specifically looking for fdt@2: -# [ 3.190000] find_itb_subimage: error finding fdt@2: FDT_ERR_NOTFOUND -# The image won't boot, if it isn't found. :( - DEVICE_FDT_NUM := 2 -endef -TARGET_DEVICES += meraki_mr32 - define Device/netgear DEVICE_VENDOR := NETGEAR IMAGES := chk @@ -405,110 +173,6 @@ define Device/netgear NETGEAR_REGION := 1 endef -define Device/netgear_r6250 - DEVICE_MODEL := R6250 - DEVICE_PACKAGES := $(B43) $(USB3_PACKAGES) - $(Device/netgear) - NETGEAR_BOARD_ID := U12H245T00_NETGEAR -endef -TARGET_DEVICES += netgear_r6250 - -define Device/netgear_r6300-v2 - DEVICE_MODEL := R6300 - DEVICE_VARIANT := v2 - DEVICE_PACKAGES := $(B43) $(USB3_PACKAGES) - $(Device/netgear) - NETGEAR_BOARD_ID := U12H240T00_NETGEAR -endef -TARGET_DEVICES += netgear_r6300-v2 - -define Device/netgear_r7000 - DEVICE_MODEL := R7000 - DEVICE_PACKAGES := $(USB3_PACKAGES) - $(Device/netgear) - NETGEAR_BOARD_ID := U12H270T00_NETGEAR -endef -TARGET_DEVICES += netgear_r7000 - -define Device/netgear_r7900 - DEVICE_MODEL := R7900 - DEVICE_PACKAGES := $(BRCMFMAC_43602A1) $(USB3_PACKAGES) - $(Device/netgear) - NETGEAR_BOARD_ID := U12H315T30_NETGEAR -endef -TARGET_DEVICES += netgear_r7900 - -define Device/netgear_r8000 - DEVICE_MODEL := R8000 - DEVICE_PACKAGES := $(BRCMFMAC_43602A1) $(USB3_PACKAGES) - $(Device/netgear) - NETGEAR_BOARD_ID := U12H315T00_NETGEAR -endef -TARGET_DEVICES += netgear_r8000 - -define Device/netgear_r8500 - DEVICE_MODEL := R8500 - DEVICE_PACKAGES := $(BRCMFMAC_4366B1) $(USB3_PACKAGES) - $(Device/netgear) - NETGEAR_BOARD_ID := U12H334T00_NETGEAR - DEFAULT := n -endef -TARGET_DEVICES += netgear_r8500 - -define Device/smartrg_sr400ac - DEVICE_VENDOR := SmartRG - DEVICE_MODEL := SR400ac - DEVICE_PACKAGES := $(BRCMFMAC_43602A1) $(USB3_PACKAGES) - IMAGES := trx - IMAGE/trx := append-rootfs | trx-serial - KERNEL_INITRAMFS_SUFFIX := .bin - KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma-d16 -endef -TARGET_DEVICES += smartrg_sr400ac - -define Device/phicomm_k3 - DEVICE_VENDOR := PHICOMM - DEVICE_MODEL := K3 - DEVICE_ALT0_VENDOR := Wavlink - DEVICE_ALT0_MODEL := QUANTUM DAX - DEVICE_ALT1_VENDOR := Wavlink - DEVICE_ALT1_MODEL := WL-WN538A8 - DEVICE_PACKAGES := $(BRCMFMAC_4366C0) $(USB3_PACKAGES) - IMAGES := trx -endef -TARGET_DEVICES += phicomm_k3 - -define Device/tenda_ac9 - DEVICE_VENDOR := Tenda - DEVICE_MODEL := AC9 - DEVICE_PACKAGES := $(B43) $(USB2_PACKAGES) - IMAGES := trx - IMAGE/trx := append-rootfs | trx-serial -endef -TARGET_DEVICES += tenda_ac9 - -define Device/tplink_archer-c5-v2 - DEVICE_VENDOR := TP-Link - DEVICE_MODEL := Archer C5 - DEVICE_VARIANT := v2 - DEVICE_PACKAGES := $(B43) $(USB2_PACKAGES) - IMAGES := bin - IMAGE/bin := append-rootfs | bcm53xx-tplink-safeloader - TPLINK_BOARD := ARCHER-C5-V2 - BROKEN := y -endef -#TARGET_DEVICES += tplink_archer-c5-v2 - -define Device/tplink_archer-c9-v1 - DEVICE_VENDOR := TP-Link - DEVICE_MODEL := Archer C9 - DEVICE_VARIANT := v1 - DEVICE_PACKAGES := $(USB3_PACKAGES) - IMAGES := bin - IMAGE/bin := append-rootfs | bcm53xx-tplink-safeloader - TPLINK_BOARD := ARCHERC9 - BROKEN := y -endef -#TARGET_DEVICES += tplink_archer-c9-v1 +include $(SUBTARGET).mk $(eval $(call BuildImage)) diff --git a/target/linux/bcm53xx/image/generic.mk b/target/linux/bcm53xx/image/generic.mk new file mode 100644 index 0000000000..7c66dd2d93 --- /dev/null +++ b/target/linux/bcm53xx/image/generic.mk @@ -0,0 +1,43 @@ +define Device/smartrg_sr400ac + DEVICE_VENDOR := SmartRG + DEVICE_MODEL := SR400ac + DEVICE_PACKAGES := $(BRCMFMAC_43602A1) $(USB3_PACKAGES) + IMAGES := trx + IMAGE/trx := append-rootfs | trx-serial + KERNEL_INITRAMFS_SUFFIX := .bin + KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma-d16 +endef +TARGET_DEVICES += smartrg_sr400ac + +define Device/tenda_ac9 + DEVICE_VENDOR := Tenda + DEVICE_MODEL := AC9 + DEVICE_PACKAGES := $(B43) $(USB2_PACKAGES) + IMAGES := trx + IMAGE/trx := append-rootfs | trx-serial +endef +TARGET_DEVICES += tenda_ac9 + +define Device/tplink_archer-c5-v2 + DEVICE_VENDOR := TP-Link + DEVICE_MODEL := Archer C5 + DEVICE_VARIANT := v2 + DEVICE_PACKAGES := $(B43) $(USB2_PACKAGES) + IMAGES := bin + IMAGE/bin := append-rootfs | bcm53xx-tplink-safeloader + TPLINK_BOARD := ARCHER-C5-V2 + BROKEN := y +endef +#TARGET_DEVICES += tplink_archer-c5-v2 + +define Device/tplink_archer-c9-v1 + DEVICE_VENDOR := TP-Link + DEVICE_MODEL := Archer C9 + DEVICE_VARIANT := v1 + DEVICE_PACKAGES := $(USB3_PACKAGES) + IMAGES := bin + IMAGE/bin := append-rootfs | bcm53xx-tplink-safeloader + TPLINK_BOARD := ARCHERC9 + BROKEN := y +endef +#TARGET_DEVICES += tplink_archer-c9-v1 diff --git a/target/linux/bcm53xx/image/nand.mk b/target/linux/bcm53xx/image/nand.mk new file mode 100644 index 0000000000..813c34470b --- /dev/null +++ b/target/linux/bcm53xx/image/nand.mk @@ -0,0 +1,293 @@ +define Build/dwl8610ap-image + mkdir -p $@.tmptar + # The DWL8610AP pretends to be a Broadcom reference design + echo "bcm953012er" > $@.tmptar/board + echo "LVL7" > $@.tmptar/model + # Something high beyond what D-Link has put out + echo "5.0.0.0" > $@.tmptar/version + # Create rootfs.bin, this is just a NAND image including everything + cp $@ $@.tmptar/rootfs.bin + # Hash the rootfs.bin + cat $@.tmptar/rootfs.bin | md5sum > $@.tmptar/rootfs.md5 + cd $@.tmptar && tar -c -f $@.new * + rm -rf $@.tmptar + mv $@.new $@ +endef + +define Device/asus_rt-ac3100 + $(call Device/asus) + DEVICE_MODEL := RT-AC3100 + DEVICE_PACKAGES := $(BRCMFMAC_4366B1) $(BRCMFMAC_4366C0) $(USB3_PACKAGES) + ASUS_PRODUCTID := RT-AC3100 +endef +TARGET_DEVICES += asus_rt-ac3100 + +define Device/asus_rt-ac56u + $(call Device/asus) + DEVICE_MODEL := RT-AC56U + DEVICE_PACKAGES := $(B43) $(USB3_PACKAGES) + ASUS_PRODUCTID := RT-AC56U +endef +TARGET_DEVICES += asus_rt-ac56u + +define Device/asus_rt-ac68u + $(call Device/asus) + DEVICE_MODEL := RT-AC68U + DEVICE_PACKAGES := $(USB3_PACKAGES) + ASUS_PRODUCTID := RT-AC68U +endef +TARGET_DEVICES += asus_rt-ac68u + +define Device/asus_rt-ac87u + $(call Device/asus) + DEVICE_MODEL := RT-AC87U + DEVICE_PACKAGES := $(USB3_PACKAGES) + ASUS_PRODUCTID := RT-AC87U +endef +TARGET_DEVICES += asus_rt-ac87u + +define Device/asus_rt-ac88u + $(call Device/asus) + DEVICE_MODEL := RT-AC88U + DEVICE_PACKAGES := $(BRCMFMAC_4366B1) $(BRCMFMAC_4366C0) $(USB3_PACKAGES) + ASUS_PRODUCTID := RT-AC88U +endef +TARGET_DEVICES += asus_rt-ac88u + +define Device/asus_rt-n18u + $(call Device/asus) + DEVICE_MODEL := RT-N18U + DEVICE_PACKAGES := $(USB3_PACKAGES) + ASUS_PRODUCTID := RT-N18U +endef +TARGET_DEVICES += asus_rt-n18u + +define Device/buffalo_wxr-1900dhp + $(call Device/buffalo/Default) + DEVICE_MODEL := WXR-1900DHP + DEVICE_PACKAGES := $(USB3_PACKAGES) +endef +TARGET_DEVICES += buffalo_wxr-1900dhp + +define Device/buffalo_wzr-600dhp2 + $(call Device/buffalo/Default) + DEVICE_MODEL := WZR-600DHP2 + DEVICE_PACKAGES := $(B43) $(USB2_PACKAGES) +endef +TARGET_DEVICES += buffalo_wzr-600dhp2 + +define Device/buffalo_wzr-900dhp + $(call Device/buffalo/Default) + DEVICE_MODEL := WZR-900DHP + DEVICE_PACKAGES := $(B43) $(USB3_PACKAGES) + BUFFALO_TAG_PLATFORM := bcm + BUFFALO_TAG_VERSION := 9.99 + BUFFALO_TAG_MINOR := 9.99 + IMAGES += factory-DHP-EU.bin factory-DHP2-JP.bin + IMAGE/factory-DHP-EU.bin := \ + append-ubi | trx-nand | buffalo-wzr-header WZR-900DHP EU | \ + buffalo-enc WZR-900DHP $$(BUFFALO_TAG_VERSION) | \ + buffalo-tag-dhp WZR-900DHP EU mlang20 | buffalo-enc-tag | \ + buffalo-dhp-image + IMAGE/factory-DHP2-JP.bin := \ + append-ubi | trx-nand | buffalo-wzr-header WZR-900DHP2 JP | \ + buffalo-enc WZR-900DHP2 $$(BUFFALO_TAG_VERSION) | \ + buffalo-tag-dhp WZR-900DHP2 JP jp | buffalo-enc-tag | \ + buffalo-dhp-image +endef +TARGET_DEVICES += buffalo_wzr-900dhp + +define Device/buffalo_wzr-1750dhp + $(call Device/buffalo/Default) + DEVICE_MODEL := WZR-1750DHP + DEVICE_PACKAGES := $(B43) $(USB3_PACKAGES) +endef +TARGET_DEVICES += buffalo_wzr-1750dhp + +define Device/dlink_dir-885l + DEVICE_MODEL := DIR-885L + DEVICE_PACKAGES := $(BRCMFMAC_4366B1) $(USB3_PACKAGES) + $(Device/dlink) + SIGNATURE := wrgac42_dlink.2015_dir885l +endef +TARGET_DEVICES += dlink_dir-885l + +define Device/dlink_dwl-8610ap + DEVICE_VENDOR := D-Link + DEVICE_MODEL := DWL-8610AP + DEVICE_PACKAGES := $(B43) + IMAGES := factory.tar + IMAGE/factory.tar := append-ubi | trx-nand | dwl8610ap-image +endef +TARGET_DEVICES += dlink_dwl-8610ap + +define Device/linksys_ea6300-v1 + DEVICE_VENDOR := Linksys + DEVICE_MODEL := EA6300 + DEVICE_VARIANT := v1 + DEVICE_PACKAGES := $(B43) $(USB3_PACKAGES) +endef +TARGET_DEVICES += linksys_ea6300-v1 + +define Device/linksys_ea6500-v2 + DEVICE_VENDOR := Linksys + DEVICE_MODEL := EA6500 + DEVICE_VARIANT := v2 + DEVICE_PACKAGES := $(B43) $(USB3_PACKAGES) +endef +TARGET_DEVICES += linksys_ea6500-v2 + +define Device/linksys_ea9200 + DEVICE_VENDOR := Linksys + DEVICE_MODEL := EA9200 + DEVICE_VARIANT := v1 + DEVICE_PACKAGES := $(BRCMFMAC_43602A1) $(USB3_PACKAGES) +endef +TARGET_DEVICES += linksys_ea9200 + +define Device/linksys_ea9500 + DEVICE_VENDOR := Linksys + DEVICE_MODEL := EA9500 + DEVICE_PACKAGES := $(BRCMFMAC_4366C0) $(USB3_PACKAGES) + DEVICE_DTS := bcm47094-linksys-panamera +endef +TARGET_DEVICES += linksys_ea9500 + +define Device/luxul_abr-4500 + $(Device/luxul) + DEVICE_MODEL := ABR-4500 + DEVICE_PACKAGES := $(USB3_PACKAGES) + LUXUL_BOARD := ABR-4500 +endef +TARGET_DEVICES += luxul_abr-4500 + +define Device/luxul_xap-1610 + $(Device/luxul) + DEVICE_MODEL := XAP-1610 + DEVICE_PACKAGES := $(BRCMFMAC_4366C0) + IMAGE/lxl := append-rootfs | trx-serial | luxul-lxl + LUXUL_BOARD := XAP-1610 +endef +TARGET_DEVICES += luxul_xap-1610 + +define Device/luxul_xbr-4500 + $(Device/luxul) + DEVICE_MODEL := XBR-4500 + DEVICE_PACKAGES := $(USB3_PACKAGES) + LUXUL_BOARD := XBR-4500 +endef +TARGET_DEVICES += luxul_xbr-4500 + +define Device/luxul_xwr-3150 + $(Device/luxul) + DEVICE_MODEL := XWR-3150 + DEVICE_PACKAGES := $(BRCMFMAC_4366C0) $(USB3_PACKAGES) + DEVICE_DTS := bcm47094-luxul-xwr-3150-v1 + LUXUL_BOARD := XWR-3150 +endef +TARGET_DEVICES += luxul_xwr-3150 + +define Device/meraki_mr26 + DEVICE_VENDOR := Meraki + DEVICE_MODEL := MR26 + DEVICE_PACKAGES := $(B43) kmod-i2c-bcm-iproc kmod-eeprom-at24 \ + kmod-hwmon-ina2xx kmod-leds-uleds nu801 + DEVICE_DTS := bcm53015-meraki-mr26 +# resize the initramfs to fit the size of the existing part.safe. + KERNEL_LOADADDR := 0x00008000 + KERNEL_INITRAMFS_SUFFIX := .bin + KERNEL_INITRAMFS := kernel-bin | append-dtb | gzip | uImage gzip | pad-to 9310208 +# LZMA is not supported by the uboot + KERNEL := kernel-bin | append-dtb | gzip | uImage gzip + IMAGES += sysupgrade.bin + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata +endef +TARGET_DEVICES += meraki_mr26 + +define Device/meraki_mr32 + DEVICE_VENDOR := Meraki + DEVICE_MODEL := MR32 + DEVICE_PACKAGES := $(B43) kmod-i2c-bcm-iproc kmod-eeprom-at24 \ + kmod-leds-pwm kmod-hwmon-ina2xx kmod-bluetooth + DEVICE_DTS := bcm53016-meraki-mr32 +# Meraki FW r23 tries to resize the part.safe partition before it will +# flash the image. This is a bit of a problem, since resizing will fail +# if the partition is smaller than the old one. + KERNEL_LOADADDR := 0x00008000 + KERNEL_INITRAMFS_SUFFIX := .bin + DEVICE_DTS_DELIMITER := @ + DEVICE_DTS_CONFIG := config@1 + KERNEL_INITRAMFS := kernel-bin | fit none $$(DTS_DIR)/$$(DEVICE_DTS).dtb | \ + pad-to 10362880 + KERNEL := kernel-bin | fit none $$(DTS_DIR)/$$(DEVICE_DTS).dtb + IMAGES += sysupgrade.bin + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata + +# The loader is specifically looking for fdt@2: +# [ 3.190000] find_itb_subimage: error finding fdt@2: FDT_ERR_NOTFOUND +# The image won't boot, if it isn't found. :( + DEVICE_FDT_NUM := 2 +endef +TARGET_DEVICES += meraki_mr32 + +define Device/netgear_r6250 + DEVICE_MODEL := R6250 + DEVICE_PACKAGES := $(B43) $(USB3_PACKAGES) + $(Device/netgear) + NETGEAR_BOARD_ID := U12H245T00_NETGEAR +endef +TARGET_DEVICES += netgear_r6250 + +define Device/netgear_r6300-v2 + DEVICE_MODEL := R6300 + DEVICE_VARIANT := v2 + DEVICE_PACKAGES := $(B43) $(USB3_PACKAGES) + $(Device/netgear) + NETGEAR_BOARD_ID := U12H240T00_NETGEAR +endef +TARGET_DEVICES += netgear_r6300-v2 + +define Device/netgear_r7000 + DEVICE_MODEL := R7000 + DEVICE_PACKAGES := $(USB3_PACKAGES) + $(Device/netgear) + NETGEAR_BOARD_ID := U12H270T00_NETGEAR +endef +TARGET_DEVICES += netgear_r7000 + +define Device/netgear_r7900 + DEVICE_MODEL := R7900 + DEVICE_PACKAGES := $(BRCMFMAC_43602A1) $(USB3_PACKAGES) + $(Device/netgear) + NETGEAR_BOARD_ID := U12H315T30_NETGEAR +endef +TARGET_DEVICES += netgear_r7900 + +define Device/netgear_r8000 + DEVICE_MODEL := R8000 + DEVICE_PACKAGES := $(BRCMFMAC_43602A1) $(USB3_PACKAGES) + $(Device/netgear) + NETGEAR_BOARD_ID := U12H315T00_NETGEAR +endef +TARGET_DEVICES += netgear_r8000 + +define Device/netgear_r8500 + DEVICE_MODEL := R8500 + DEVICE_PACKAGES := $(BRCMFMAC_4366B1) $(USB3_PACKAGES) + $(Device/netgear) + NETGEAR_BOARD_ID := U12H334T00_NETGEAR + DEFAULT := n +endef +TARGET_DEVICES += netgear_r8500 + +define Device/phicomm_k3 + DEVICE_VENDOR := PHICOMM + DEVICE_MODEL := K3 + DEVICE_ALT0_VENDOR := Wavlink + DEVICE_ALT0_MODEL := QUANTUM DAX + DEVICE_ALT1_VENDOR := Wavlink + DEVICE_ALT1_MODEL := WL-WN538A8 + DEVICE_PACKAGES := $(BRCMFMAC_4366C0) $(USB3_PACKAGES) + IMAGES := trx +endef +TARGET_DEVICES += phicomm_k3 diff --git a/target/linux/bcm53xx/nand/config-default b/target/linux/bcm53xx/nand/config-default new file mode 100644 index 0000000000..d6ea56ade2 --- /dev/null +++ b/target/linux/bcm53xx/nand/config-default @@ -0,0 +1,3 @@ +CONFIG_NVMEM=n +CONFIG_NVMEM_BRCM_NVRAM=n +CONFIG_NVMEM_SYSFS=n diff --git a/target/linux/bcm53xx/nand/target.mk b/target/linux/bcm53xx/nand/target.mk new file mode 100644 index 0000000000..c81b3c6cc6 --- /dev/null +++ b/target/linux/bcm53xx/nand/target.mk @@ -0,0 +1,6 @@ +BOARDNAME:=Generic devices with NAND flash +FEATURES+=nand + +define Target/Description + Build firmware images for generic devices with NAND flash. +endef