[Need help] Image builder for Archer C9 v1

Hello there,

I'm trying to build an image OpenWRT 21.02.0 to TP-Link Archer C9 v1 (bcm53xx) on Ubuntu 18.04 x64 using Imagebuilder tools..

Here is my steps on terminal:

apt-get install -y subversion build-essential libncurses5-dev zlib1g-dev gawk git ccache gettext libssl-dev xsltproc wget unzip python time libncursesw5-dev rsync

wget https://downloads.openwrt.org/releases/21.02.0/targets/bcm53xx/generic/openwrt-imagebuilder-21.02.0-bcm53xx-generic.Linux-x86_64.tar.xz

tar -xf openwrt-imagebuilder-21.02.0-bcm53xx-generic.Linux-x86_64.tar.xz

cd openwrt-imagebuilder-21.02.0-bcm53xx-generic.Linux-x86_64

make info |grep c9

tplink_archer-c9-v1:
    SupportedDevices: tplink,archer-c9-v1

make -j4 image PROFILE="tplink_archer-c9-v1"

Start downloading and installing packages...

Building images for all bcm53xx devices...

At the end I got this:

[rootfs]
mode=ubi
vol_id=0
vol_type=dynamic
vol_name=rootfs
image=/root/openwrt-imagebuilder-21.02.0-bcm53xx-generic.Linux-x86_64/build_dir/target-arm_cortex-a9_musl_eabi/linux-bcm53xx_generic/root.squashfs
vol_size=2026496
[rootfs_data]
mode=ubi
vol_id=1
vol_type=dynamic
vol_name=rootfs_data
vol_size=1MiB
vol_flags=autoresize
3956+1 records in
3956+1 records out
2025910 bytes (2.0 MB, 1.9 MiB) copied, 0.0496262 s, 40.8 MB/s
3956+1 records in
3956+1 records out
2025910 bytes (2.0 MB, 1.9 MiB) copied, 0.0117662 s, 172 MB/s
mjn3's trx replacement - v0.81.1
WARNING: maxlen exceeds default maximum!  Beware of overwriting nvram!
os-image partition too big (more than 2097152 bytes): Success
Makefile:454: recipe for target '/root/openwrt-imagebuilder-21.02.0-bcm53xx-generic.Linux-x86_64/build_dir/target-arm_cortex-a9_musl_eabi/linux-bcm53xx_generic/tmp/openwrt-21.02.0-bcm53xx-generic-tplink_archer-c5-v2-squashfs.bin' failed
make[3]: *** [/root/openwrt-imagebuilder-21.02.0-bcm53xx-generic.Linux-x86_64/build_dir/target-arm_cortex-a9_musl_eabi/linux-bcm53xx_generic/tmp/openwrt-21.02.0-bcm53xx-generic-tplink_archer-c5-v2-squashfs.bin] Error 1
Makefile:183: recipe for target 'build_image' failed
make[2]: *** [build_image] Error 2
Makefile:116: recipe for target '_call_image' failed
make[1]: *** [_call_image] Error 2
Makefile:238: recipe for target 'image' failed
make: *** [image] Error 2

I would appreciate any help... thanks

Hmmm......

Yeah... so need to remove some packages?

This is the default packages:

make -j4 image PROFILE="tplink_archer-c9-v1"
Building images for bcm53xx - TP-Link Archer C9 v1
Packages: base-files busybox ca-bundle dnsmasq dropbear firewall fstools ip6tables iptables kernel kmod-gpio-button-hotplug kmod-ipt-offload kmod-leds-gpio kmod-phy-bcm-ns-usb2 kmod-phy-bcm-ns-usb3 kmod-usb-ledtrig-usbport kmod-usb-ohci kmod-usb2 kmod-usb3 libc libgcc libustream-wolfssl logd mtd netifd nvram odhcp6c odhcpd-ipv6only opkg osafeloader oseama otrx ppp ppp-mod-pppoe procd swconfig uci uclient-fetch urandom-seed urngd

That's what I would try 1st.

All right... I'll do it..

Just for compare, I did the same on version 19.07.10...

And I got the same warning but works..

[rootfs]
mode=ubi
vol_id=0
vol_type=dynamic
vol_name=rootfs
image=/root/openwrt-imagebuilder-19.07.10-bcm53xx.Linux-x86_64/build_dir/target-arm_cortex-a9_musl_eabi/linux-bcm53xx/root.squashfs
[rootfs_data]
mode=ubi
vol_id=1
vol_type=dynamic
vol_name=rootfs_data
vol_size=1MiB
vol_flags=autoresize
ubinize: volume size was not specified in section "rootfs", assume minimum to fit image "/root/openwrt-imagebuilder-19.07.10-bcm53xx.Linux-x86_64/build_dir/target-arm_cortex-a9_musl_eabi/linux-bcm53xx/root.squashfs"1471110 bytes (1.4 MiB)
2873+1 records in
2873+1 records out
1471110 bytes (1.5 MB, 1.4 MiB) copied, 0.0117635 s, 125 MB/s
2873+1 records in
2873+1 records out
1471110 bytes (1.5 MB, 1.4 MiB) copied, 0.0127101 s, 116 MB/s
mjn3's trx replacement - v0.81.1
WARNING: maxlen exceeds default maximum!  Beware of overwriting nvram!
2873+1 records in
2873+1 records out
1471110 bytes (1.5 MB, 1.4 MiB) copied, 0.0120472 s, 122 MB/s
mjn3's trx replacement - v0.81.1
WARNING: maxlen exceeds default maximum!  Beware of overwriting nvram!

Calculating checksums...

It looks like ok for me..

ls -lah ./build_dir/target-arm_cortex-a9_musl_eabi/linux-bcm53xx/tmp 
-rw-r--r-- 1 root     root     5,9M nov 28 18:52 openwrt-19.07.10-bcm53xx-asus-rt-ac56u-squashfs.trx
-rw-r--r-- 1 root     root     5,9M nov 28 18:52 openwrt-19.07.10-bcm53xx-asus-rt-ac68u-squashfs.trx
-rw-r--r-- 1 root     root     5,9M nov 28 18:52 openwrt-19.07.10-bcm53xx-asus-rt-ac87u-squashfs.trx
-rw-r--r-- 1 root     root     5,9M nov 28 18:52 openwrt-19.07.10-bcm53xx-asus-rt-n18u-squashfs.trx
-rw-r--r-- 1 root     root     5,9M nov 28 18:52 openwrt-19.07.10-bcm53xx-buffalo-wxr-1900dhp-squashfs.trx
-rw-r--r-- 1 root     root     5,9M nov 28 18:52 openwrt-19.07.10-bcm53xx-buffalo-wzr-1750dhp-squashfs.trx
-rw-r--r-- 1 root     root     5,9M nov 28 18:52 openwrt-19.07.10-bcm53xx-buffalo-wzr-600dhp2-squashfs.trx
-rw-r--r-- 1 root     root     5,9M nov 28 18:52 openwrt-19.07.10-bcm53xx-buffalo-wzr-900dhp-squashfs.factory-DHP2-JP.bin
-rw-r--r-- 1 root     root     5,9M nov 28 18:52 openwrt-19.07.10-bcm53xx-buffalo-wzr-900dhp-squashfs.factory-DHP-EU.bin
-rw-r--r-- 1 root     root     5,9M nov 28 18:52 openwrt-19.07.10-bcm53xx-buffalo-wzr-900dhp-squashfs.trx
-rw-r--r-- 1 root     root     5,8M nov 28 18:52 openwrt-19.07.10-bcm53xx-dlink-dir-885l-squashfs.bin
-rw-r--r-- 1 root     root     5,8M nov 28 18:52 openwrt-19.07.10-bcm53xx-dlink-dir-885l-squashfs.bin.entity
-rw-r--r-- 1 root     root     5,9M nov 28 18:52 openwrt-19.07.10-bcm53xx-linksys-ea6500-v2-squashfs.trx
-rw-r--r-- 1 root     root     5,9M nov 28 18:52 openwrt-19.07.10-bcm53xx-luxul-abr-4500-squashfs.lxl
-rw-r--r-- 1 root     root     3,5M nov 28 18:52 openwrt-19.07.10-bcm53xx-luxul-xap-1610-squashfs.lxl
-rw-r--r-- 1 root     root     5,9M nov 28 18:52 openwrt-19.07.10-bcm53xx-luxul-xbr-4500-squashfs.lxl
-rw-r--r-- 1 root     root     5,9M nov 28 18:52 openwrt-19.07.10-bcm53xx-luxul-xwr-3150-squashfs.lxl
-rw-r--r-- 1 root     root     5,9M nov 28 18:52 openwrt-19.07.10-bcm53xx-netgear-r6250-squashfs.chk
-rw-r--r-- 1 root     root     5,9M nov 28 18:52 openwrt-19.07.10-bcm53xx-netgear-r6300-v2-squashfs.chk
-rw-r--r-- 1 root     root     5,9M nov 28 18:52 openwrt-19.07.10-bcm53xx-netgear-r7000-squashfs.chk
-rw-r--r-- 1 root     root     5,9M nov 28 18:52 openwrt-19.07.10-bcm53xx-netgear-r7900-squashfs.chk
-rw-r--r-- 1 root     root     5,9M nov 28 18:52 openwrt-19.07.10-bcm53xx-netgear-r8000-squashfs.chk
-rw-r--r-- 1 root     root     5,9M nov 28 18:52 openwrt-19.07.10-bcm53xx-phicomm-k3-squashfs.trx
-rw-r--r-- 1 root     root     3,5M nov 28 18:52 openwrt-19.07.10-bcm53xx-smartrg-sr400ac-squashfs.trx
-rw-r--r-- 1 root     root     3,5M nov 28 18:52 openwrt-19.07.10-bcm53xx-tenda-ac9-squashfs.trx
-rw-r--r-- 1 root     root     3,2M nov 28 18:52 openwrt-19.07.10-bcm53xx-tplink-archer-c5-v2-squashfs.bin
-rw-r--r-- 1 root     root     3,2M nov 28 18:52 openwrt-19.07.10-bcm53xx-tplink-archer-c9-v1-squashfs.bin

Is 3.2MB image too big for this router?

Here says its has 16MB to flash..

Even removing some packages I still got the same error...

I was checking the sources on github and I found something nothing good...

Link

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

$(eval $(call BuildImage))

BROKEN := y

Is it means broken to build?

1 Like

oh....

https://github.com/openwrt/openwrt/commit/fd67908647390b916470501c88b4f5258123da95#commitcomment-57004057

So broken means cannot build... so sad :expressionless:

I hope there is someone looking into this..

Thx guys...I'll wait for some news about this router..