[OpenWrt-Devel] [PATCH][bcm63xx]: Add DGND3700 v1 / DGND3800B support

Jonas Gorski jogo at openwrt.org
Fri Feb 27 13:28:50 EST 2015


On Fri, Feb 20, 2015 at 1:08 PM, dani <dgcbueu at gmail.com> wrote:
> This adds support for the Netgear DGND3700 v1 and DGND3800B.

Thanks, I have one lying around but never got around to properly
adding support for it. A few things before I can commit it ...

> DGND3700 v1 and DGND3800B are exactly the same router, only one difference,
> the factory firmware. This patch produces two factory firmwares for each router.
> The miniPCI card have two radios, I included sprom fixups bor both spite wifi works
> ok without it.

At least my dgnd3700 has properly populated/valid sproms on the card
and does not need any fixups, so I wonder where you took the values
from.

Also I added DT support for the gpio drivero (finally), so please move
any buttons/leds to it. Should also help to reduce the patch size.

> The router includes an onboard NAND flash for extra storage. NAND is currently
> not supported in bcm63xx, so no code added for this part. The NOR flash (32MB)
> is enough for storing an openwrt firmware.

Makes sense if there is no driver.

(snip)
> diff --git a/target/linux/brcm63xx/image/Makefile b/target/linux/brcm63xx/image/Makefile
> index fd1e157..4520f06 100755
> --- a/target/linux/brcm63xx/image/Makefile
> +++ b/target/linux/brcm63xx/image/Makefile
> @@ -105,6 +105,11 @@ define Image/Build/HCS
>                 --output_file=$(BIN_DIR)/openwrt-$(2)-$(1).bin
>  endef
>
> +define Image/Build/Chk
> +       $(STAGING_DIR_HOST)/bin/mkchkimg -o $(BIN_DIR)/openwrt-$(5)-$(1)-factory.chk \
> +       -k $(BIN_DIR)/openwrt-$(2)-$(1)-cfe.bin -b $(3) -r $(4)
> +endef
> +
>  define Build/Clean
>         $(MAKE) -C lzma-loader clean
>  endef
> @@ -209,6 +214,11 @@ define Image/Build
>         # build dtb image list
>         $(foreach image,$(TARGET_$(PROFILE)_IMAGES),$(call Image/Build/$(image),$(1)))
>
> +       #Netgear DGND3700 v1 factory firmware
> +       $(call Image/Build/Chk,$(1),DGND3700v1_3800B,U12L144T01_NETGEAR_NEWLED,1,DGND3700v1)
> +       #Netgear DGND3800B factory firmware
> +       $(call Image/Build/Chk,$(1),DGND3700v1_3800B,U12L144T11_NETGEAR_NEWLED,1,DGND3800B)
> +

Please don't add any further calls here but instead let the ImageDTB
call an aprpriate define that does these wraps.

>    ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
>         $(call Image/Build/Initramfs)
>    endif
> @@ -298,6 +308,8 @@ $(eval $(call ImageDTB,CFEDTB,HG556a_AB,hg556a-b,HW556,6358,HG556a_B,--rsa-signa
>  $(eval $(call ImageDTB,CFEDTB,HG556a_C,hg556a-c,HW556,6358,HG556a_C,--rsa-signature "EchoLife_HG556a" --image-offset 0x20000 --block-size 0x20000 --tag-version 8))
>  # Netgear DG834GT/PN
>  $(eval $(call ImageDTB,CFEDTB,DG834GTPN,dg834gtpn,96348GW-10,6348,DG834GT_PN))
> +# Netgear DGND3700 v1 / DGND3800B
> +$(eval $(call ImageDTB,CFEDTB,DGND3700v1_3800B,dgnd3700v1,96368MVWG,6368,DGND3700v1_3800B,--image-offset 0x20000 --block-size 0x20000))
>  # Pirelli Alice Gate VoIP 2 Plus Wi-Fi AGPF-S0
>  $(eval $(call ImageDTB,CFEDTB,AGPF_S0,agpf-s0,AGPF-S0,6358,AGV2+W,--block-size 0x20000 --image-offset 0x20000 --signature2 IMAGE --tag-version 8))
>  # Pirelli A226G
> diff --git a/target/linux/brcm63xx/profiles/netgear.mk b/target/linux/brcm63xx/profiles/netgear.mk
> index 562e0f5..a731b36 100644
> --- a/target/linux/brcm63xx/profiles/netgear.mk
> +++ b/target/linux/brcm63xx/profiles/netgear.mk
> @@ -13,3 +13,13 @@ define Profile/DG834GTPN/Description
>    Package set optimized for DG834GT/PN.
>  endef
>  $(eval $(call Profile,DG834GTPN))
> +
> +define Profile/DGND3700v1_3800B
> +  NAME:=Netgear DGND3700 v1 / DGND3800B
> +  PACKAGES:=kmod-b43 wpad-mini \
> +       kmod-usb2 kmod-usb-ohci kmod-ledtrig-usbdev
> +endef
> +define Profile/DGND3700v1_3800B/Description
> +  Package set optimized for DGND3700 v1 / DGND3800B.
> +endef
> +$(eval $(call Profile,DGND3700v1_3800B))
> diff --git a/target/linux/brcm63xx/dts/dgnd3700v1.dts b/target/linux/brcm63xx/dts/dgnd3700v1.dts
> new file mode 100644
> index 0000000..a647476
> --- /dev/null
> +++ b/target/linux/brcm63xx/dts/dgnd3700v1.dts
> @@ -0,0 +1,36 @@
> +/dts-v1/;
> +
> +/include/ "bcm6368.dtsi"
> +
> +/ {
> +       model = "Netgear DGND3700v1/DGND3800B";
> +       compatible = "netgear,dgnd3700v1", "brcm,bcm6368";
> +};
> +
> +&pflash {
> +       status = "ok";
> +
> +       linux,part-probe = "bcm63xxpart";
> +
> +       cfe at 0 {
> +               label = "CFE";
> +               reg = <0x000000 0x020000>;
> +               read-only;
> +       };
> +
> +       linux at 20000 {
> +               label = "linux";
> +               reg = <0x020000 0x1e20000>;
> +       };
> +
> +       netgear_parts at 1e40000 {
> +               label = "netgear_parts";

Let's call this partition board_data, like it is done for other targets.


Jonas
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list