aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/wrt
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/wrt
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
downloadopenembedded-709c4d66e0b107ca606941b988bad717c0b45d9b.tar.gz
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/wrt')
-rw-r--r--recipes/wrt/loader-0.04/toolchain.patch16
-rw-r--r--recipes/wrt/loader_0.04.bb12
-rw-r--r--recipes/wrt/wrt-imagetools-native.bb17
-rw-r--r--recipes/wrt/wrt-init.bb21
-rw-r--r--recipes/wrt/wrt-init/finished4
-rwxr-xr-xrecipes/wrt/wrt-init/mount6
-rwxr-xr-xrecipes/wrt/wrt-init/wrtboot24
-rw-r--r--recipes/wrt/wrt-init/wrtvlans8
-rw-r--r--recipes/wrt/wrt-utils.bb50
-rw-r--r--recipes/wrt/wrt-utils/libshared-makefile.diff13
-rw-r--r--recipes/wrt/wrt-utils/nvram-makefile.diff13
11 files changed, 184 insertions, 0 deletions
diff --git a/recipes/wrt/loader-0.04/toolchain.patch b/recipes/wrt/loader-0.04/toolchain.patch
new file mode 100644
index 0000000000..81f92b26e1
--- /dev/null
+++ b/recipes/wrt/loader-0.04/toolchain.patch
@@ -0,0 +1,16 @@
+diff -Nur loader-0.04/Makefile loader-0.04-owrt/Makefile
+--- loader-0.04/Makefile 2005-03-08 11:32:32.000000000 +0100
++++ loader-0.04-owrt/Makefile 2005-04-30 13:44:39.000000000 +0200
+@@ -22,9 +22,10 @@
+
+ OBJCOPY := $(CROSS_COMPILE)objcopy -O binary -R .reginfo -R .note -R .comment -R .mdebug -S
+
+-CFLAGS = -D__KERNEL__ -Wall -Wstrict-prototypes -Wno-trigraphs -O2 \
++CFLAGS = -D__KERNEL__ -Wall -Wstrict-prototypes -Wno-trigraphs -Os \
+ -fno-strict-aliasing -fno-common -fomit-frame-pointer -G 0 -mno-abicalls -fno-pic \
+- -ffunction-sections -pipe -mcpu=r4600 -mips2 -Wa,--trap -m4710a0kern
++ -ffunction-sections -pipe -mlong-calls -fno-common \
++ -mabi=32 -march=mips32 -Wa,-32 -Wa,-march=mips32 -Wa,-mips32 -Wa,--trap
+ CFLAGS += -DLOADADDR=$(TEXT_START) -D_LZMA_IN_CB
+
+ ASFLAGS = $(CFLAGS) -D__ASSEMBLY__ -DBZ_TEXT_START=$(BZ_TEXT_START)
diff --git a/recipes/wrt/loader_0.04.bb b/recipes/wrt/loader_0.04.bb
new file mode 100644
index 0000000000..6ce3058af0
--- /dev/null
+++ b/recipes/wrt/loader_0.04.bb
@@ -0,0 +1,12 @@
+SRC_URI = "http://wl500g.dyndns.org/loader/loader-${PV}.tar.gz \
+ file://toolchain.patch;patch=1"
+
+S = "${WORKDIR}/${P}"
+
+do_compile() {
+ make CROSS_COMPILE=${TARGET_PREFIX}
+}
+
+do_install() {
+ install ${S}/loader.gz ${DEPLOY_DIR}/images/
+} \ No newline at end of file
diff --git a/recipes/wrt/wrt-imagetools-native.bb b/recipes/wrt/wrt-imagetools-native.bb
new file mode 100644
index 0000000000..f9f459eea6
--- /dev/null
+++ b/recipes/wrt/wrt-imagetools-native.bb
@@ -0,0 +1,17 @@
+#SRC_URI = "svn://svn.openwrt.org/openwrt;module=trunk/tools/firmware-utils/src;proto=https"
+SRC_URI = ${SOURCEFORGE_MIRROR}/gakusei/openwrt-imagetools-svn-rev7641.tar.bz2
+S = "${WORKDIR}/src/"
+
+inherit native
+
+do_compile() {
+ ${CC} -o trx trx.c
+ ${CC} -o motorola-bin motorola-bin.c
+ ${CC} -o addpattern addpattern.c
+}
+
+do_stage() {
+ install -m 0755 ${S}/trx ${STAGING_BINDIR}
+ install -m 0755 ${S}/motorola-bin ${STAGING_BINDIR}
+ install -m 0755 ${S}/addpattern ${STAGING_BINDIR}
+}
diff --git a/recipes/wrt/wrt-init.bb b/recipes/wrt/wrt-init.bb
new file mode 100644
index 0000000000..b3ea137f1a
--- /dev/null
+++ b/recipes/wrt/wrt-init.bb
@@ -0,0 +1,21 @@
+DESCRIPTION = "wrt init scripts"
+SECTION = "base"
+LICENSE = "GPL"
+
+SRC_URI = "file://mount file://wrtboot file://wrtvlans file://finished"
+
+do_install() {
+ install -d ${D}${sysconfdir}/rcS.d \
+ ${D}${sysconfdir}/rc2.d \
+ ${D}${sysconfdir}/init.d
+
+ install -m 0755 ${WORKDIR}/mount ${D}${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/wrtboot ${D}${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/wrtvlans ${D}${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/finished ${D}${sysconfdir}/init.d
+
+ ln -s ../init.d/mount ${D}${sysconfdir}/rcS.d/S05mount
+ ln -s ../init.d/wrtboot ${D}${sysconfdir}/rcS.d/S10wrtboot
+ ln -s ../init.d/wrtvlans ${D}${sysconfdir}/rcS.d/S30wrtvlans
+ ln -s ../init.d/finished ${D}${sysconfdir}/rc2.d/S99finished
+}
diff --git a/recipes/wrt/wrt-init/finished b/recipes/wrt/wrt-init/finished
new file mode 100644
index 0000000000..de85661f32
--- /dev/null
+++ b/recipes/wrt/wrt-init/finished
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# change LEDs
+echo 0x01 > /proc/sys/diag \ No newline at end of file
diff --git a/recipes/wrt/wrt-init/mount b/recipes/wrt/wrt-init/mount
new file mode 100755
index 0000000000..539dbfad59
--- /dev/null
+++ b/recipes/wrt/wrt-init/mount
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+mount -o remount,rw /
+mount /proc
+mount /var
+mount /dev/pts
diff --git a/recipes/wrt/wrt-init/wrtboot b/recipes/wrt/wrt-init/wrtboot
new file mode 100755
index 0000000000..c03d53f9bc
--- /dev/null
+++ b/recipes/wrt/wrt-init/wrtboot
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+echo "S" > /proc/jffs2_bbc
+
+[ "$(nvram get il0macaddr)" = "00:90:4c:5f:00:2a" ] && {
+ # if default wifi mac, set two higher than the lan mac
+ nvram set il0macaddr=$(nvram get et0macaddr|
+ awk '{OFS=FS=":";for(x=7,y=2;--x;){$x=sprintf("%02x",(y+="0x"$x)%256);y/=256}print}')
+}
+
+# set up the vlan*ports variables for the asus wl-500g deluxe
+# if they don't already exist
+[ "$(nvram get boardtype)" = "bcm95365r" ] && \
+[ "$(nvram get boardnum)" = "45" ] && {
+ [ -z "$(nvram get vlan0ports)" ] && \
+ [ -z "$(nvram get vlan1ports)" ] && {
+ nvram set vlan0ports="1 2 3 4 5*"
+ nvram set vlan1ports="0 5"
+ }
+}
+
+# well this is not really WRT specific
+HOSTNAME=`cat /etc/hostname`
+echo ${HOSTNAME}>/proc/sys/kernel/hostname
diff --git a/recipes/wrt/wrt-init/wrtvlans b/recipes/wrt/wrt-init/wrtvlans
new file mode 100644
index 0000000000..c5fd31d906
--- /dev/null
+++ b/recipes/wrt/wrt-init/wrtvlans
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+# the ethernet switch distinguishes the WAN port and the 4 LAN ports by VLAN tags
+# this might not yet be correct for all devices, only checked on the WRT54G
+vconfig set_name_type VLAN_PLUS_VID_NO_PAD
+ifconfig eth0 up
+vconfig add eth0 0
+vconfig add eth0 1
diff --git a/recipes/wrt/wrt-utils.bb b/recipes/wrt/wrt-utils.bb
new file mode 100644
index 0000000000..7e02f6830c
--- /dev/null
+++ b/recipes/wrt/wrt-utils.bb
@@ -0,0 +1,50 @@
+DESCRIPTION = "wrt tools"
+SECTION = "base"
+LICENSE = "broadcom"
+SRC_URI = "cvs://anonymous@openwrt.org/openwrt;module=openwrt/package/openwrt;tag=TESTED \
+ http://openwrt.inf.fh-brs.de/mirror/linksys-wlconf.tar.gz \
+ file://nvram-makefile.diff;patch=1;pnum=0 \
+ file://libshared-makefile.diff;patch=1;pnum=0"
+
+S = "${WORKDIR}/openwrt"
+
+inherit module-base
+
+TARGET_CFLAGS =+ "-I${STAGING_KERNEL_DIR}/include"
+
+do_compile() {
+ make -C libshared TARGET_CC="${CC}"
+ make -C libnvram TARGET_CC="${CC}"
+
+ ${CC} ${CFLAGS} -Iinclude -o wlc wlc.c -L./libshared -lshared
+ ${CC} ${CFLAGS} -o jffs2root jffs2root.c
+ ${CC} ${CFLAGS} -o mtd mtd.c
+
+ make -C ../linksys-wlconf TOP=${S} SRCBASE=${S} LDFLAGS="-L${S}/libnvram -lnvram -L${S}/libshared -lshared"
+
+ ${KERNEL_CC} -D__KERNEL__ -fno-strict-aliasing -fno-common -fomit-frame-pointer -G 0 \
+ -mno-abicalls -fno-pic -finline-limit=100000 -mabi=32 -march=mips32 -Wa,-32 \
+ -Wa,-march=mips32 -Wa,-mips32 -Wa,--trap -DMODULE -mlong-calls -fno-common \
+ -funsigned-char -nostdinc -iwithprefix include -I. -I${STAGING_KERNEL_DIR}/include \
+ -I${STAGING_KERNEL_DIR}/include/asm/gcc -I./include -c -o wlcompat.o wlcompat.c
+}
+
+do_install() {
+ install -d ${D}/usr/sbin/ ${D}/sbin/ ${D}/${libdir} ${D}/lib/modules/${KERNEL_VERSION}
+ install -m 644 libshared/libshared.so ${D}/${libdir}
+ install -m 755 libnvram/nvram ${D}/usr/sbin/
+ install -m 644 libnvram/libnvram.so ${D}/${libdir}
+
+ install -m 755 wlc ${D}/usr/sbin/
+ install -m 755 jffs2root ${D}/sbin/
+ install -m 755 mtd ${D}/sbin/
+
+ install -m 755 ../linksys-wlconf/wlconf ${D}/usr/sbin/
+ install -m 644 wlcompat.o ${D}/lib/modules/${KERNEL_VERSION}/
+}
+
+PACKAGES = "${PN}-dbg wrt-libs wrt-utils kernel-module-wlcompat"
+FILES_wrt-libs = "/usr/lib"
+FILES_wrt-utils = "/usr/sbin /sbin"
+FILES_kernel-module-wlcompat = "/lib/modules/"
+RDEPENDS_wrt-utils = "wrt-libs"
diff --git a/recipes/wrt/wrt-utils/libshared-makefile.diff b/recipes/wrt/wrt-utils/libshared-makefile.diff
new file mode 100644
index 0000000000..1c51776b65
--- /dev/null
+++ b/recipes/wrt/wrt-utils/libshared-makefile.diff
@@ -0,0 +1,13 @@
+--- libshared/Makefile.orig 2005-06-11 17:22:59.000000000 +0200
++++ libshared/Makefile 2005-06-11 17:22:42.000000000 +0200
+@@ -1,9 +1,8 @@
+ # $Id: Makefile,v 1.2 2005/03/19 14:40:56 wbx Exp $
+
+-include $(TOPDIR)/rules.mk
+
+ PKG_NAME:=libshared
+-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
++PKG_BUILD_DIR:=.
+
+ EXTRA_CFLAGS := -c -I. -I../include
+
diff --git a/recipes/wrt/wrt-utils/nvram-makefile.diff b/recipes/wrt/wrt-utils/nvram-makefile.diff
new file mode 100644
index 0000000000..db31e91374
--- /dev/null
+++ b/recipes/wrt/wrt-utils/nvram-makefile.diff
@@ -0,0 +1,13 @@
+--- libnvram/Makefile.o 2005-04-08 11:08:38.000000000 +0200
++++ libnvram/Makefile 2005-06-11 16:12:21.000000000 +0200
+@@ -1,9 +1,8 @@
+ # $Id: Makefile,v 1.4 2005/04/08 09:08:38 nbd Exp $
+
+-include $(TOPDIR)/rules.mk
+
+ PKG_NAME:=libnvram
+-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
++PKG_BUILD_DIR:=./
+
+ EXTRA_CFLAGS := -c -I. -I../include
+