Can't get my archer c7 unbricked.. been trying all weekend

#20

First step is to install a solid, up-to-date Linux-based system, either on physical hardware or in a virtual machine.

For the former, I personally prefer Debian with Ubuntu a close second (Ubuntu is a little more user-friendly than Debian). For the latter, if you need a virtual machine, VirtualBox seems to work well for me on the Mac platform, as well as for others on the Windows platform. I'd suggest at least 32 GB for the drive, 64 GB is better ("dynamic allocation, or whatever they call it") and a bare minimum of 4 GB RAM.

1 Like

#21

Okay I'm getting that setup right now:)

0 Likes

#22

Okay so what's next?

0 Likes

#23

Make sure you have all the build pre-requisites installed as per that link. Current Debian/Ubuntu also need the python2 package installed. Make sure all your packages are updated.

Current git repo URL is https://git.openwrt.org/openwrt/openwrt.git

Once that's cloned, for testing purposes, checkout the lede-17.01 branch (since it's known to be "good" and compiles cleanly). Update and install the feeds as described. Run make menuconfig and set your general architecture and the specific device.

ar71xx
generic
archer-c7-v2

You might want to add LuCI if you're not comfortable with pure command-line access to the device.

make -jN clean download world

Where N is the number of "processing cores" to use. Typically the number of cores on your machine or VM +/- 1. On a four-core machine that I don't do anything else with while compiling, I use -j5 -- if you intend to do anything while compiling, go with the number of cores -1 at most.

1 Like

#24

Hit the daily post limit on the other account so I'll be posting with this one lol..

Here's what I've done so far:

Okay so so far I hav run:
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python3.6

Pretty lost on what to do next.

0 Likes

#25

You shouldn't need the "deadsnakes" PPA, as far as I know. python2.7-dev is still available for Ubuntu.

Follow the directions at https://openwrt.org/docs/guide-developer/build-system/install-buildsystem then move to the next page on starting your first builds.

From Build scripts that document changes and enable easy re-creation of build environment

### Prerequisites for buildroot
sudo apt-get install build-essential subversion libncurses5-dev zlib1g-dev
sudo apt-get install gawk gcc-multilib flex git-core gettext libssl-dev

### Prerequisite on Ubuntu 17.10 as it has python3 by default
sudo apt-get install python

You may also need "GNU time" -- see How install GNU gtime to avoid feeds and make menuconfig error if it isn't already installed on your system.

1 Like

#26

I'm going to start at it again.. But since you know so much about this... How hard would it be for you to build it for me? Or maybe by the grace of god I'll get this figured out:) Again thanks so much!!

0 Likes

#27

Where do I go from here?

Capture

0 Likes

#28
Target System (Atheros AR7xxx/AR9xxx)  --->
Subtarget (Generic)  --->
Target Profile (TP-LINK Archer C7 v2)  --->  

Under LuCI > Collections, select your personal choice of

  • luci
  • luci-ssl
  • luci-ssl-openssl

I prefer an SSL/TLS version. I use the OpenSSL variant as other packages I use already require the OpenSSL libraries. The luci-ssl variant uses the mbedTLS library, which is well respected.

Save, then

make -jN clean download world

grab a beer :wink:

0 Likes

#29

Man I'm so close to a cold one!! Just a couple more stupid questions:rofl:

Where in the world is LuCI?

0 Likes

#30

You need to update and install feeds in order to see packages like Luci.

Wiki gives you advice.
https://wiki.openwrt.org/doc/howto/build#updating_feeds

0 Likes

#31

Seems like it's stuck.. How long does it take to compile?

Here's part of the log:

tyler@tyler:~/openwrt$ make menuconfig
WARNING: Makefile 'package/utils/busybox/Makefile' has a dependency on 'libpam', which does not exist
WARNING: Makefile 'package/utils/busybox/Makefile' has a build dependency on 'libpam', which does not exist
WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libgnutls', which does not exist
WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libopenldap', which does not exist
WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libidn2', which does not exist
WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libssh2', which does not exist
WARNING: Makefile 'package/boot/kexec-tools/Makefile' has a dependency on 'liblzma', which does not exist
WARNING: Makefile 'package/network/services/lldpd/Makefile' has a dependency on 'libnetsnmp', which does not exist
configuration written to .config

*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.

tyler@tyler:~/openwrt$ ./scripts/feeds update -a
Updating feed 'packages' from 'https://git.openwrt.org/feed/packages.git' ...
Cloning into './feeds/packages'...
remote: Counting objects: 4208, done.
remote: Compressing objects: 100% (3561/3561), done.
remote: Total 4208 (delta 179), reused 3326 (delta 102)
Receiving objects: 100% (4208/4208), 2.54 MiB | 226.00 KiB/s, done.
Resolving deltas: 100% (179/179), done.
Create index file './feeds/packages.index' 
Collecting package info: done
Collecting target info: done
Updating feed 'luci' from 'https://git.openwrt.org/project/luci.git' ...
Cloning into './feeds/luci'...
remote: Counting objects: 4004, done.
remote: Compressing objects: 100% (2291/2291), done.
remote: Total 4004 (delta 828), reused 2485 (delta 379)
Receiving objects: 100% (4004/4004), 3.76 MiB | 222.00 KiB/s, done.
Resolving deltas: 100% (828/828), done.
Create index file './feeds/luci.index' 
Collecting package info: done
Collecting target info: done
Updating feed 'routing' from 'https://git.openwrt.org/feed/routing.git' ...
Cloning into './feeds/routing'...
remote: Counting objects: 388, done.
remote: Compressing objects: 100% (324/324), done.
remote: Total 388 (delta 26), reused 139 (delta 2)
Receiving objects: 100% (388/388), 262.38 KiB | 244.00 KiB/s, done.
Resolving deltas: 100% (26/26), done.
Create index file './feeds/routing.index' 
Collecting package info: done
Collecting target info: done
Updating feed 'telephony' from 'https://git.openwrt.org/feed/telephony.git' ...
Cloning into './feeds/telephony'...
remote: Counting objects: 253, done.
remote: Compressing objects: 100% (241/241), done.
remote: Total 253 (delta 21), reused 29 (delta 0)
Receiving objects: 100% (253/253), 164.79 KiB | 440.00 KiB/s, done.
Resolving deltas: 100% (21/21), done.
Create index file './feeds/telephony.index' 
Collecting package info: done
Collecting target info: done
tyler@tyler:~/openwrt$ ./scripts/feeds install -a
WARNING: Makefile 'package/utils/busybox/Makefile' has a dependency on 'libpam', which does not exist
WARNING: Makefile 'package/utils/busybox/Makefile' has a build dependency on 'libpam', which does not exist
WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libgnutls', which does not exist
WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libopenldap', which does not exist
WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libidn2', which does not exist
WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libssh2', which does not exist
WARNING: Makefile 'package/boot/kexec-tools/Makefile' has a dependency on 'liblzma', which does not exist
WARNING: Makefile 'package/network/services/lldpd/Makefile' has a dependency on 'libnetsnmp', which does not exist
Installing all packages from feed packages.
Installing package 'acl' from packages
Installing package 'attr' from packages
Installing package 'acme' from packages
Installing package 'netcat' from packages
Installing package 'luci-base' from luci
Installing package 'luci-lib-nixio' from luci
Installing package 'luci-lib-ip' from luci
Installing package 'luci-lib-jsonc' from luci
Installing package 'lucihttp' from luci
Installing package 'luci-app-uhttpd' from luci
Installing package 'acpica-unix' from packages
Installing package 'acpid' from packages
Installing package 'adblock' from packages
Installing package 'addrwatch' from packages
Installing package 'aggregate' from packages
Installing package 'aircrack-ng' from packages
Installing package 'procps-ng' from packages
Installing package 'pciutils' from packages
Installing package 'kmod' from packages
Installing package 'alpine' from packages
Installing package 'libpam' from packages
Installing package 'alsa-lib' from packages
Installing package 'alsa-utils' from packages
Installing package 'announce' from packages
Installing package 'ap51-flash' from packages
Installing package 'apache' from packages
Installing package 'apr' from packages
Installing package 'apr-util' from packages
Installing package 'expat' from packages
Installing package 'sqlite3' from packages
Installing package 'pcre' from packages
Installing package 'unixodbc' from packages
Installing package 'postgresql' from packages
Installing package 'apcupsd' from packages
Installing package 'libgd' from packages
Installing package 'libjpeg' from packages
Installing package 'libpng' from packages
Installing package 'tiff' from packages
Installing package 'freetype' from packages
Installing package 'apinger' from packages
Installing package 'aria2' from packages
Installing package 'gnutls' from packages
Installing package 'libtasn1' from packages
Installing package 'p11-kit' from packages
Installing package 'cryptodev-linux' from packages
Installing package 'libgcrypt' from packages
Installing package 'libgpg-error' from packages
Installing package 'libxml2' from packages
Installing package 'libssh2' from packages
Installing package 'c-ares' from packages
Installing package 'ariang' from packages
Installing package 'arp-scan' from packages
Installing package 'at' from packages
Installing package 'atftp' from packages
Installing package 'attendedsysupgrade-common' from packages
Installing package 'auc' from packages
Installing package 'autoconf' from packages
Installing package 'm4' from packages
Installing package 'perl' from packages
Installing package 'db47' from packages
Installing package 'gdbm' from packages
Installing package 'automake' from packages
Installing package 'autossh' from packages
Installing package 'avahi' from packages
Installing package 'intltool' from packages
Installing package 'dbus' from packages
Installing package 'libdaemon' from packages
Installing package 'avrdude' from packages
Installing package 'libftdi1' from packages
Installing package 'confuse' from packages
Installing package 'avro' from packages
Installing package 'jansson' from packages
Installing package 'xz' from packages
Installing package 'bash' from packages
Installing package 'bandwidthd' from packages
Installing package 'php7' from packages
Installing package 'uw-imap' from packages
Installing package 'icu' from packages
Installing package 'openldap' from packages
Installing package 'cyrus-sasl' from packages
Installing package 'mariadb' from packages
Installing package 'libaio' from packages
Installing package 'net-snmp' from packages
Installing package 'banhosts' from packages
Installing package 'bc' from packages
Installing package 'bcp38' from packages
Installing package 'beanstalkd' from packages
Installing package 'beep' from packages
Installing package 'bind' from packages
Installing package 'bitlbee' from packages
Installing package 'glib2' from packages
Installing package 'libffi' from packages
Installing package 'bluelog' from packages
Installing package 'bluez' from packages
Installing package 'python' from packages
Installing package 'python-pip-conf' from packages
Installing package 'libical' from packages
Installing package 'bmon' from packages
Installing package 'bmx7-dnsupdate' from packages
Installing package 'bmx7' from routing
Installing package 'inotify-tools' from packages
Installing package 'bogofilter' from packages
Installing package 'bonnie++' from packages
Installing package 'boost' from packages
Installing package 'python3' from packages
Installing package 'bridge-utils' from packages
Installing package 'btrfs-progs' from packages
Installing package 'bwm-ng' from packages
Installing package 'canutils' from packages
Installing package 'ccid' from packages
Installing package 'pcsc-lite' from packages
Installing package 'ccrypt' from packages
Installing package 'cgi-io' from packages
Installing package 'chaosvpn' from packages
Installing package 'tinc' from packages
Installing package 'chardet' from packages
Installing package 'check' from packages
Installing package 'chrony' from packages
Installing package 'pps-tools' from packages
Installing package 'libcap' from packages
Installing package 'cifs-utils' from packages
Installing package 'clamav' from packages
Installing package 'pcre2' from packages
Installing package 'musl-fts' from packages
Installing package 'clamsmtp' from packages
Installing package 'classpath' from packages
Installing package 'file' from packages
Installing package 'click' from packages
Installing package 'cmdpad' from packages
Installing package 'collectd' from packages
Installing package 'libmodbus' from packages
Installing package 'mosquitto' from packages
Installing package 'libwebsockets' from packages
Installing package 'libuv' from packages
Installing package 'nut' from packages
Installing package 'tcp_wrappers' from packages
Installing package 'owfs' from packages
Installing package 'liboping' from packages
Installing package 'rrdtool1' from packages
Installing package 'lm-sensors' from packages
Installing package 'conserver' from packages
Installing package 'coova-chilli' from packages
Installing package 'coreutils' from packages
Installing package 'crconf' from packages
Installing package 'crelay' from packages
Installing package 'hidapi' from packages
Installing package 'crtmpserver' from packages
Installing package 'cryptsetup' from packages
Installing package 'lvm2' from packages
Installing package 'cshark' from packages
Installing package 'daemonlogger' from packages
Installing package 'libdnet' from packages
Installing package 'danish' from packages
Installing package 'python-dns' from packages
Installing package 'python-pcapy' from packages
Installing package 'python-dpkt' from packages
Installing package 'darkstat' from packages
Installing package 'davfs2' from packages
Installing package 'neon' from packages



*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.

tyler@tyler:~/openwrt$ make -j5 clean download world
 make[1] clean
time: target/linux/prereq#0.34#0.03#0.49
 make[1] tools/flock/compile
 make[2] -C tools/flock compile
 make[1] tools/download
 make[2] -C tools/gmp download
 make[2] -C tools/mpc download
 make[2] -C tools/mpfr download
 make[2] -C tools/libelf download
 make[2] -C tools/expat download
 make[2] -C tools/m4 download
 make[2] -C tools/libtool download
 make[2] -C tools/autoconf download
 make[2] -C tools/automake download
 make[2] -C tools/flex download
 make[2] -C tools/bison download
 make[2] -C tools/pkg-config download
 make[2] -C tools/mklibs download
 make[2] -C tools/zlib download
 make[2] -C tools/sstrip download
 make[2] -C tools/make-ext4fs download
 make[2] -C tools/e2fsprogs download
 make[2] -C tools/mtd-utils download
 make[2] -C tools/mkimage download
 make[2] -C tools/firmware-utils download
 make[2] -C tools/patch-image download
 make[2] -C tools/quilt download
 make[2] -C tools/padjffs2 download
 make[2] -C tools/mm-macros download
 make[2] -C tools/missing-macros download
 make[2] -C tools/cmake download
 make[2] -C tools/scons download
 make[2] -C tools/bc download
 make[2] -C tools/findutils download
 make[2] -C tools/gengetopt download
 make[2] -C tools/patchelf download
 make[2] -C tools/mtools download
 make[2] -C tools/dosfstools download
 make[2] -C tools/libressl download
 make[2] -C tools/lzma-old download
 make[2] -C tools/squashfs download
 make[2] -C tools/lzma download
 make[2] -C tools/squashfs4 download
 make[2] -C tools/tar download
 make[2] -C tools/xz download
 make[2] -C tools/patch download
 make[2] -C tools/flock download
 make[2] -C tools/sed download
 make[1] toolchain/download
 make[2] -C toolchain/binutils download
 make[2] -C toolchain/kernel-headers download
 make[2] -C toolchain/gdb download
 make[2] -C toolchain/gcc/initial download
 make[2] -C toolchain/gcc/final download
 make[2] -C toolchain/musl download
 make[2] -C toolchain/fortify-headers download
 make[1] package/download
 make[2] -C feeds/luci/collections/luci download
 make[2] -C package/boot/uboot-envtools download
 make[2] -C package/base-files download
 make[2] -C feeds/luci/applications/luci-app-firewall download
 make[2] -C feeds/luci/modules/luci-base download
 make[2] -C feeds/luci/libs/luci-lib-ip download
 make[2] -C feeds/luci/libs/luci-lib-jsonc download
 make[2] -C feeds/luci/libs/luci-lib-nixio download
 make[2] -C feeds/luci/modules/luci-mod-admin-full download
 make[2] -C feeds/luci/protocols/luci-proto-ipv6 download
 make[2] -C feeds/luci/protocols/luci-proto-ppp download
 make[2] -C feeds/luci/collections/luci-ssl download
 make[2] -C feeds/luci/themes/luci-theme-bootstrap download
 make[2] -C feeds/luci/contrib/package/lucihttp download
 make[2] -C feeds/luci/libs/rpcd-mod-rrdns download
 make[2] -C package/firmware/ath10k-firmware download
 make[2] -C package/firmware/wireless-regdb download
 make[2] -C package/kernel/gpio-button-hotplug download
 make[2] -C package/kernel/linux download
 make[2] -C package/kernel/mac80211 download
 make[2] -C package/libs/libjson-c download
 make[2] -C package/libs/libnl-tiny download
 make[2] -C package/libs/libubox download
 make[2] -C package/libs/mbedtls download
 make[2] -C package/libs/toolchain download
 make[2] -C package/libs/uclient download
 make[2] -C package/libs/ustream-ssl download
make package/download: build failed. Please re-run make with -j1 V=s to see what's going on
 make[1] target/download
 make[2] -C target/linux download
 make[1] world
 make[2] tools/compile
 make[2] package/cleanup
 make[3] -C tools/flock compile
 make[3] -C tools/sed compile
 make[3] -C tools/tar compile
 make[3] -C tools/xz compile
 make[3] -C tools/patch compile
^[[A make[3] -C tools/patch-image compile
 make[3] -C tools/expat compile
 make[3] -C tools/pkg-config compile
 make[3] -C tools/sstrip compile
 make[3] -C tools/m4 compile
 make[3] -C tools/scons compile
 make[3] -C tools/mtools compile
 make[3] -C tools/lzma compile
 make[3] -C tools/autoconf compile
 make[3] -C tools/missing-macros compile
 make[3] -C tools/libressl compile
 make[3] -C tools/automake compile
 make[3] -C tools/dosfstools compile
 make[3] -C tools/libtool compile
 make[3] -C tools/mkimage compile
 make[3] -C tools/cmake compile
 make[3] -C tools/gmp compile
 make[3] -C tools/libelf compile
 make[3] -C tools/flex compile
 make[3] -C tools/mklibs compile
 make[3] -C tools/e2fsprogs compile
 make[3] -C tools/mm-macros compile
 make[3] -C tools/gengetopt compile
 make[3] -C tools/patchelf compile
 make[3] -C tools/mpfr compile
 make[3] -C tools/bison compile
   make[3] -C tools/mpc compile
 make[3] -C tools/findutils compile
 make[3] -C tools/bc compile
 make[3] -C tools/quilt compile
 make[3] -C tools/padjffs2 compile
 make[3] -C tools/zlib compile
 make[3] -C tools/squashfs4 compile
 make[3] -C tools/lzma-old compile
 make[3] -C tools/mtd-utils compile
 make[3] -C tools/firmware-utils compile
 make[3] -C tools/make-ext4fs compile
 make[3] -C tools/squashfs compile
 make[2] toolchain/compile
 make[3] -C toolchain/binutils compile
 make[3] -C toolchain/fortify-headers compile
 make[3] -C toolchain/gdb compile
 make[3] -C toolchain/gcc/initial compile

0 Likes

#32

That doesn't look stuck, a targetted buildconfig (so not everything an the kitchen sink) takes somewhere between 20 and 30 minutes on a higher end consumer system - if you want to build 'everything' (no one does, except for the buildbots), you'd spend the better part of the day.

1 Like

#33

While you're waiting for it, if you haven't used any of the following utilities yet, a look at their man pages or tutorials would be helpful:

  • git -- find a tutorial on this one!
  • diff
  • patch
0 Likes

#34

You could also just modify the hwid from 0xc7000002 to 0xffffffff of a compiled image with a hexeditor...
This magic number has the offset 0x40 to the beginning of the image...
I have modified a trunk factory image for c7v2 for you openwrt-factory-c7v2

The next steps work only with a programmer or with a working openwrt:

What would be much better, if you flash a backup of your bootloader partition.
Did you have a backup?
If not, probably anyone could provide one and you change the mac to the one labeled on the bottom of your router.

Or you dump your bootloader partition and modify it to have the right values in it.
At the end of it there is your hwid, mac address and the wps pin. Look at this picture u-boot_mod. This should also be true for c7.

Or you send me the dump of your bootloader partition and your mac and i will modify it for you...

1 Like

Archer C7 V2 TFTP flash failing
#35

I will for sure try changing that factory image & let you know how it goes.

As far as the bootloader.. I don't have a backup of it. I got this router for free from a buddy. He for sure doesn't have one either. How would I go about dumping the bootloader?

0 Likes

#36

The easiest way is with a working openwrt running...

  1. dd if=/dev/mtd0 of=/www/uboot.bin (make a dump)
  2. http://192.168.1.1/uboot.bin (download to your pc if you have luci) or with ssh

Or with a hw spi programmer.

The linked factory image is currently only modified to your wrong hwid...
Have you tried my modified factory image?
If it fails to recover... Post serial log...

1 Like

#37

I'm not home right now so can't try it at the moment. I'll let you know in a few hours how it goes:)

0 Likes

#38

Just tried to flash the trunk factory image "openwrt-factory-c7v2" that you linked up above... And it failed too:(

Here's the log:

eth1 up
eth0, eth1
Setting 0x18116290 to 0x58b1214f
dup 1 speed 1000
Using eth1 device
TFTP from server 192.168.0.66; our IP address is 192.168.0.86
Filename 'ArcherC7v2_tp_recovery.bin'.
Load address: 0x80060000
Loading: T #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ###########################################
done
Bytes transferred = 9535488 (918000 hex)
original_product_id = ffffffff
 original_product_ver = ffffffff
 recovery_product_id = ffffffff
 recovery_product_ver = 01
 auto update firmware: product id verify fail!
Autobooting in 1 seconds
## Booting image at 9f020000 ...
   Uncompressing Kernel Image ... Stream with EOS marker is not supportedLZMA E                 RROR 1 - must RESET board to recover

0 Likes

#39

Now i had also modified the hwver to 0xffffffff (offset 0x44)...
Redownload from the same link and try again...

This should finally work, send me pm with your u-boot dump and your desired mac address and i will create you a fixed u-boot image...

0 Likes