Tp-linkBuildVM

From Ace Monster Toys Wiki

Jump to: navigation, search

Contents

About the VMware image

The image is debian with the tools needed to bootstrap the openwrt build image. It also has TFTP and http set up to serve the compiled binaries. For ease of use, it's set up to have eth0 be a local connection with the host machine, and eth1 be a USB ethernet that's directly connected to the openwrt box.

user: password is build:build

Building a custom image.

See the build instructions: http://www.thepowerbase.com/2012/01/openwrt-build-guide-start-to-finish/ , although I find the ones on the openwrt page better.


cd ~build/openwrt/trunk

  1. if very brave, svn up - this *will* break something.

make menuconfig

  1. log into 703 that's already flashed with openwrt.

cd /tmp wget http://192.168.3.100/ar71xx/openwrt-ar71xx-generic-tl-wr703n-v1-squashfs-sysupgrade.bin sysupgrade -v ./openwrt*bin

  1. This will reboot the box with the new config.
  1. Now log into the 703 again,

ifconfig eth0 192.168.3.1 opkg update


Transferring custom configs to the image

  1. On build vm

cd ~/openwrt/ /bin/sh mybuild.sh <hit ctrl C to stop sending the file>

  1. if need be, add more things to the ./mybuild tree - your own programs, alter the config files &etc.
  2. then re-run

mybuild.sh

  1. log into the 703 again

cd / ; nc 192.168.3.100 8888 |tar -zxvf -

  1. then run /tmp/build.sh


Common install groups

For 3g: opkg install usb-modeswitch opkg install usb-modeswitch-data opkg install luci-proto-3g opkg install ppp

echo "usbserial vendor=0x1410 product=0x6002" >/etc/modules.d/60-usb-serial

  1. for a wifi card that's USB but not all that stable.

opkg install kmod-rtl8187

  1. For arduino tinkering

opkg install kmod-usb-serial-ftdi opkg install kmod-usb-serial-cp210x


When you've bricked the device & need to recover from serial console.

Set up the vmware image to have eth1 be 192.168.1.100 and connect to bricked box via ethernet.

Break the autoboot on the serial console by typing tpl

hornet> tftpboot 0x81000000 openwrt-ar71xx-generic-tl-wr703n-v1-squashfs-factory.bin hornet> erase 0x9f020000 +0x3c0000 hornet> cp.b 0x81000000 0x9f020000 0x3c0000 hornet> bootm 9f020000

I learned how to do this from mrzaphodb at https://forum.openwrt.org/viewtopic.php?pid=154450


Misc stuff

If you want to run a different version of the kernel, you can change the value Linux_Version in trunk/target/linux/ platform /Makefile

Use a kernel number listed in trunk/include/kernel-version.mk

I haven't pulled this off yet, every time I end up breaking binutils or something else that gets updated with the new kernel.

If you're getting download errrors with a bad MD5, edit the MD5 in

toolchain/_package_/Makefile


Magic build incantation for testing kernel & etc. ARCH=mips CROSS_COMPILE=mips-openwrt-linux- make I made it easy by symlinking /usr/local/bin to the toolchain.

Adding a kernel module is nowhere as simple as http://wiki.openwrt.org/doc/devel/packages#creating.packages.for.kernel.modules doesn't tell the whole story.

I ended up patching a makefile & building a tarball rather than getting the package to work.


Other people's cool firmware

Vilage telco has been busy - asterisk running on wr703N!


Some configs Myles got working (email him on the list for more details):

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox