**NOTE** Trunk now has this patch in place now

Cheap Plug Server - dir 505To compile dir 505

This I my attempt for an inexpensive PLUG SERVER 🙂 If you hurry they are selling them at Costco (Canada) for 30 bucks!

1) Checkout Code

svn co svn://svn.openwrt.org/openwrt/tags/attitude_adjustment_12.09/

***NOTE***
* IF you already checked it out and ran menuconfig the patch will not take affect! Check out a CLEAN version
* Don’t run as root, even with FORCE=1 it will fail later, so save yourself some trouble now!

2) store the following PATCH file in the same directory IE myfile.patch
(or another but adjust the patch command line patch)

CREDIT: Original patch from DANZ (http://pastie.org/7936110) was stored in “reverse”. Updated patch below. Also missing lines added.

**NOTE** I since fried my DIR 515.. and then trying to access the serial port used to big wires and ripped the traces of the board 🙁 but for those that wanted a downloadble file here it is…**

DIR-515 Patch

Index: target/linux/ar71xx/image/Makefile
===================================================================
--- target/linux/ar71xx/image/Makefile (revision 36849)
+++ target/linux/ar71xx/image/Makefile (working copy)
@@ -168,6 +168,7 @@
ap136_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,6336k(rootfs),1408k(kernel),64k(mib0),64k(art)ro,7744k@0x50000(firmware)
cameo7240_mtdlayout=mtdparts=spi0.0:192k(u-boot)ro,64k(nvram)ro,960k(kernel),2752k(rootfs),64k(mac)ro,64k(art)ro,3712k@0x40000(firmware)
cameo913x_mtdlayout=mtdparts=spi0.0:128k(u-boot)ro,64k(config)ro,960k(kernel),2880k(rootfs),64k(art)ro,3840k@0x30000(firmware)
+cameo9330_mtdlayout=mtdparts=spi0.0:64k(u-boot)ro,64k(art)ro,64k(mac)ro,64k(nvram)ro,256k(language)ro,1024k(kernel),6656k(rootfs),7680k@0x80000(firmware)
cameo933x_mtdlayout=mtdparts=spi0.0:64k(u-boot)ro,64k(art)ro,64k(mac)ro,64k(nvram)ro,192k(language)ro,896k(kernel),2752k(rootfs),3648k@0x70000(firmware)
cap4200ag_mtdlayout=mtdparts=spi0.0:256k(u-boot),64k(u-boot-env),320k(custom)ro,1536k(kernel),12096k(rootfs),2048k(failsafe),64k(art),13632k@0xa0000(firmware)
db120_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,6336k(rootfs),1408k(kernel),64k(nvram),64k(art)ro,7744k@0x50000(firmware)
@@ -345,6 +346,14 @@
$(call MkuImageLzma/initramfs,$(2),$(3) $(cameo7240_mtdlayout))
endef

+define Image/Build/Cameo9330
+ $(call Image/Build/CameoHornet,$(1),$(2),$(3),$(cameo9330_mtdlayout),1048576,6422528,$(4))
+endef
+
+define Image/Build/Cameo9330/initramfs
+ $(call MkuImageLzma/initramfs,$(2),$(3) $(cameo9330_mtdlayout))
+endef
+
define Image/Build/Cameo933x
$(call Image/Build/CameoHornet,$(1),$(2),$(3),$(cameo933x_mtdlayout),917504,2818048,$(4))
endef
@@ -413,6 +422,8 @@
-o $(call factoryname,$(1),$(2))
endef

+$(eval $(call SingleProfile,Cameo9330,$(fs_squash),DIR505A1,dir-505-a1,DIR-505-A1,ttyATH0,115200,"HORNET-PACKET-DIR505A1-3"))
+$(eval $(call SingleProfile,Cameo933x,$(fs_squash),TEW712BR,tew-712br,TEW-712BR,ttyATH0,115200,"HORNET-RT-TEW712BR-3"))

define Image/Build/UBDEV
$(call MkuImageLzma,$(2),$(3) $(ubdev_mtdlayout))
Index: target/linux/ar71xx/config-3.3
===================================================================
--- target/linux/ar71xx/config-3.3 (revision 36849)
+++ target/linux/ar71xx/config-3.3 (working copy)
@@ -32,6 +32,7 @@
CONFIG_ATH79_MACH_AW_NR580=y
CONFIG_ATH79_MACH_CAP4200AG=y
CONFIG_ATH79_MACH_DB120=y
+CONFIG_ATH79_MACH_DIR_505_A1=y
CONFIG_ATH79_MACH_DIR_600_A1=y
CONFIG_ATH79_MACH_DIR_615_C1=y
CONFIG_ATH79_MACH_DIR_825_B1=y
Index: target/linux/ar71xx/base-files/lib/ar71xx.sh
===================================================================
--- target/linux/ar71xx/base-files/lib/ar71xx.sh (revision 36849)
+++ target/linux/ar71xx/base-files/lib/ar71xx.sh (working copy)
@@ -324,6 +324,9 @@
*TEW-712BR)
name="tew-712br"
;;
+ *DIR-505-A1)
+ name="dir-505-a1"
+ ;;
*"TL-WR1041N v2")
name="tl-wr1041n-v2"
;;
Index: target/linux/ar71xx/base-files/lib/upgrade/platform.sh
===================================================================
--- target/linux/ar71xx/base-files/lib/upgrade/platform.sh (revision 36849)
+++ target/linux/ar71xx/base-files/lib/upgrade/platform.sh (working copy)
@@ -102,6 +102,7 @@
;;
ap81 | \
ap83 | \
+ dir-505-a1 | \
dir-600-a1 | \
dir-615-c1 | \
dir-615-e4 | \
Index: target/linux/ar71xx/base-files/etc/uci-defaults/network
===================================================================
--- target/linux/ar71xx/base-files/etc/uci-defaults/network (revision 36849)
+++ target/linux/ar71xx/base-files/etc/uci-defaults/network (working copy)
@@ -136,6 +136,8 @@

wrt160nl)
ucidef_set_interfaces_lan_wan "eth0" "eth1"
+dir-505-a1 |\
+dir-505-a1 |\
ucidef_add_switch "eth0" "1" "1"
ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 4 5"
;;
Index: target/linux/ar71xx/base-files/etc/diag.sh
===================================================================
--- target/linux/ar71xx/base-files/etc/diag.sh (revision 36849)
+++ target/linux/ar71xx/base-files/etc/diag.sh (working copy)
@@ -60,6 +60,7 @@
db120)
status_led="db120:green:status"
;;
+ dir-505-a1 |\
dir-600-a1 |\
dir-615-e4)
status_led="d-link:green:power"
Index: target/linux/ar71xx/generic/profiles/d-link.mk
===================================================================
--- target/linux/ar71xx/generic/profiles/d-link.mk (revision 36849)
+++ target/linux/ar71xx/generic/profiles/d-link.mk (working copy)
@@ -5,6 +5,17 @@
# See /LICENSE for more information.
#

+define Profile/DIR505A1
+ NAME:=D-Link DIR-505 rev. A1
+ PACKAGES:=
+endef
+
+define Profile/DIR505A1/Description
+ Package set optimized for the D-Link DIR-505 rev. A1.
+endef
+
+$(eval $(call Profile,DIR505A1))
+
define Profile/DIR600A1
NAME:=D-Link DIR-600 rev. A1
PACKAGES:=

Apply The Patch

patch -p0 < myfile.patch

Run MenuConfig

make menuconfig

Configure


Target System - Atheros AR7xxx/AR9xxx
Target Profile - D-Link DIR-505 rev. A1

If Target Profile is missing the DIR make sure you checked out a clean copy and apply the patch BEFORE running menu config.

4 thoughts on “OpenWRT on a DIR-515

  1. Thanks for your work.

    I don’t understand your patch file is targeting to patch the “http://pastie.org/7936110” file or just skip that file and directly patching the AA 12.09 ?

    But in both of the cases, when I ran “patch -p0 < myfile.patch" to apply patch, I got :


    patching file target/linux/ar71xx/image/Makefile
    patch: **** malformed patch at line 6: ap136_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,6336k(rootfs),1408k(kernel),64k(mib0),64k(art)ro,7744k@0x50000(firmware)

    By the way, I can’t apply danz’s patch file too. I got the same result.

    What did I miss ?

  2. I can apply danz’s patch file now by rename AA 12.09 directory name to a simple ‘a’, but still unable to apply your patch.

  3. Buenos días tengo un aparato DIR505 pero darían ayudar no se como instalarlo

Leave a Reply

Your email address will not be published.