This is an old revision of the document!


tplink.jpg

OpenWRT

Check-out
mkdir -p /embedded/openwrt/
cd /embedded/openwrt
git clone git://github.com/openwrt/openwrt.git openwrt-wr841.git
chown -R nobody:nogroup /embedded/openwrt/openwrt-wr841.git
/bin/su nobody
cd /embedded/openwrt/openwrt-wr841.git
Set up standard feeds
./scripts/feeds update -a
Or, set up feeds for Pickle Microchip PIC ICSP and NFS
cp feeds.conf.default feeds.conf.default.orig
echo "src-git openwrtfiles git://github.com/GBert/openwrt-files" >> feeds.conf.default
./scripts/feeds clean
./scripts/feeds update -a
./scripts/feeds install pickle
./scripts/feeds install nfs-utils
Configure a standard build
make menuconfig

 [Target System  = Atheros AR7xxx/AR9xxx]
 [Target Profile = TP-LINK TL-WR841N/ND]

 [Exit] [Yes]
Or, configure for Pickle Microchip PIC ICSP and NFS (build I2C support)
make menuconfig

 [Target System  = Atheros AR7xxx/AR9xxx]
 [Target Profile = TP-LINK TL-WR841N/ND]

ENABLE: <M>
 [Kernel modules] [Filesystems] [kmod-fs-nfs]
 [Kernel modules] [I2C support] [kmod-i2c-core]
 [Kernel modules] [I2C support] [kmod-i2c-gpio-custom]
 [Kernel modules] [Other Modules] [kmod-bit-bang-gpio]

ENABLE: <*>
 [Kernel modules] [Wireless Drivers] [kmod-ath] [Force Atheros drivers to respect the user's regdomain settings]
 [Utilities] [Filesystem] [nfs-utils]
 [Utilities] [pickle]

DISABLE: < >
 [Global build settings] [Enable IPv6 support in packages]
 [Base system] [dnsmasq]
 [Base system] [firewall]
 [Network] [Firewall] [iptables]
 [Network] [odhcpd]
 [Network] [ppp]
 [Kernel modules] [Network Support] [kmod-ppp]
 [Kernel modules] [Netfilter Extensions] [all]
 [Kernel modules] [USB Support] [all]

 [Exit] [Yes]
Build

This will take a long time.

make V=s
Install
ls -1 bin/ar71xx/*factory*
bin/ar71xx/openwrt-ar71xx-generic-tl-wr841nd-v1.5-squashfs-factory.bin
bin/ar71xx/openwrt-ar71xx-generic-tl-wr841nd-v3-squashfs-factory.bin
bin/ar71xx/openwrt-ar71xx-generic-tl-wr841nd-v5-squashfs-factory.bin
bin/ar71xx/openwrt-ar71xx-generic-tl-wr841nd-v7-squashfs-factory.bin
bin/ar71xx/openwrt-ar71xx-generic-tl-wr841n-v8-squashfs-factory.bin
bin/ar71xx/openwrt-ar71xx-generic-tl-wr841n-v9-squashfs-factory.bin
bin/ar71xx/openwrt-ar71xx-generic-tl-wr847n-v8-squashfs-factory.bin
scp bin/ar71xx/openwrt-ar71xx-generic-tl-wr841n-v8-squashfs-factory.bin root@192.168.1.1:/tmp/
ssh root@192.168.1.1
sysupgrade -v /tmp/ar71xx/openwrt-ar71xx-generic-tl-wr841n-v8-squashfs-factory.bin
Initialise
ssh root@192.168.1.1
firstboot
reboot -f
NFS

Copy the packages to the router's tmp directory, Eg.

scp bin/ar71xx/packages/base/kmod-dnsresolver_4.1.15-1_ar71xx.ipk root@192.168.1.1:/tmp
scp bin/ar71xx/packages/base/kmod-fs-nfs-common_4.1.15-1_ar71xx.ipk root@192.168.1.1:/tmp
scp bin/ar71xx/packages/base/kmod-fs-nfs_4.1.15-1_ar71xx.ipk root@192.168.1.1:/tmp

Then, on the router install the packages.

opkg install kmod-dnsresolver_4.1.15-1_ar71xx.ipk 
opkg install kmod-fs-nfs-common_4.1.15-1_ar71xx.ipk 
opkg install kmod-fs-nfs_4.1.15-1_ar71xx.ipk 

Serial

VDD
GND
RX
TX

GPIO

 
      1   2 GND
GPIO1 3   4 GND
GPIO2 5   6 GND
GPIO3 7   8 GND
GPOP0 9  10 GND
      11 12
      13 14

Pins 1, 3, 7 and 9 are pulled to ground via 10K resistors.
Pin 11 may have originally been RESET but there is missing link to it's left.

Pickle Microchip PIC ICSP

Bit-bang GPIO (gpio-bb).

insmod gpio-bb && mknod /dev/gpio-bb c 180 0

Pickle configuration.

DEVICE=/dev/gpio-bb
BITRULES=0x1000
SLEEP=1
BUSY=0
VPP=2
PGM=1
PGC=3
PGD=0
DEBUG=1

Resources

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies