[OpenWrt-Devel] [PATCH] bcm63xx: AD1018: generate a factory image

Daniel González Cabanelas dgcbueu at gmail.com
Thu May 28 14:29:14 EDT 2020


Currently there is no image that can be flashed without opening the case
and accessing the serial port on the Sercomm AD1018 router.

We can use an unencrypted factory image to flash Openwrt through the
stock firmware. The router comes with 2 stock firmwares, we must perform
the flash operation from the 2nd one.

1st option: using the factory busybox CLI:
  - boot the second firmware
      flash_eraseall /dev/mtd8
      flash_eraseall /dev/mtd9
      echo -n "eRcOmM.000" | dd of=/dev/mtdblock8
      echo -n "eRcOmM.001" | dd of=/dev/mtdblock9
      reboot
 - flash the Openwrt factory image
      flash_eraseall -j /dev/mtd6
      dd if=openwrt-factory.bin of=/dev/mtdblock6
 - boot the first firmware
      flash_eraseall /dev/mtd8
      echo -n "eRcOmM.002" | dd of=/dev/mtdblock8
      reboot

2nd option: using the factory web UI
  - with sercomm make_img proprietary utility and the openwrt-factory.bin
    as the input, generate the openwrt-factory.img encrypted image
  - boot the second firmware
      flash_eraseall /dev/mtd8
      flash_eraseall /dev/mtd9
      echo -n "eRcOmM.000" | dd of=/dev/mtdblock8
      echo -n "eRcOmM.001" | dd of=/dev/mtdblock9
      reboot
  - flash the openwrt-factory.img image using the factory web UI

Signed-off-by: Daniel González Cabanelas <dgcbueu at gmail.com>
---
 target/linux/bcm63xx/image/bcm63xx_nand.mk | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/target/linux/bcm63xx/image/bcm63xx_nand.mk b/target/linux/bcm63xx/image/bcm63xx_nand.mk
index 5483c73077..510a6f26c8 100644
--- a/target/linux/bcm63xx/image/bcm63xx_nand.mk
+++ b/target/linux/bcm63xx/image/bcm63xx_nand.mk
@@ -113,6 +113,8 @@ TARGET_DEVICES += netgear_dgnd3700-v2
 ### Sercomm ###
 define Device/sercomm_ad1018
   $(Device/bcm63xx-nand)
+  IMAGES += factory.bin
+  IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi
   IMAGE/cfe.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | ad1018-jffs2-cferam | append-ubi | cfe-wfi-tag
   DEVICE_VENDOR := Sercomm
   DEVICE_MODEL := AD1018
-- 
2.26.2





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


More information about the openwrt-devel mailing list