add hackish makfile, so that other developers could build images. anyone shuld clean...
authorWaldemar Brodkorb <mail@waldemar-brodkorb.de>
Tue, 8 Feb 2005 08:21:32 +0000 (08:21 +0000)
committerWaldemar Brodkorb <mail@waldemar-brodkorb.de>
Tue, 8 Feb 2005 08:21:32 +0000 (08:21 +0000)
SVN-Revision: 225

openwrt/target/default/openwrt.mk [new file with mode: 0644]
openwrt/target/default/target_skeleton/etc/dnsmasq.conf
openwrt/target/default/target_skeleton/etc/init.d/S10boot
openwrt/target/default/target_skeleton/etc/preinit
openwrt/target/default/target_skeleton/sbin/wifi

diff --git a/openwrt/target/default/openwrt.mk b/openwrt/target/default/openwrt.mk
new file mode 100644 (file)
index 0000000..bf57786
--- /dev/null
@@ -0,0 +1,44 @@
+#############################################################
+#
+# create openwrt images
+#
+#############################################################
+
+# wrt tools
+WRT_DIR:=$(BUILD_DIR)/wrt-tools
+WRT_SOURCE=wrt-tools.tar.gz
+WRT_SITE=http://openwrt.openbsd-geek.de
+
+$(DL_DIR)/$(WRT_SOURCE):
+       $(WGET) -P $(DL_DIR) $(WRT_SITE)/$(WRT_SOURCE)
+
+$(WRT_DIR)/.unpacked: $(DL_DIR)/$(WRT_SOURCE)
+       zcat $(DL_DIR)/$(WRT_SOURCE) | tar -C $(BUILD_DIR) -xvf -
+       touch $(WRT_DIR)/.unpacked
+
+wrt-tools: $(WRT_DIR)/.unpacked
+       $(CC) -o $(BUILD_DIR)/trx $(WRT_DIR)/trx.c
+       $(CC) -o $(BUILD_DIR)/addpattern $(WRT_DIR)/addpattern.c
+
+openwrt-linux.trx.squashfs:    wrt-tools
+       $(BUILD_DIR)/trx -o openwrt-linux.trx.squashfs $(LINUX_DIR)/$(LINUX_BINLOC) $(IMAGE).squashfs
+
+openwrt-gs-code.bin.squashfs: openwrt-linux.trx.squashfs
+       $(BUILD_DIR)/addpattern -2 -i openwrt-linux.trx.squashfs -o openwrt-gs-code.bin.squashfs -g
+
+openwrt-g-code.bin.squashfs: openwrt-gs-code.bin.squashfs
+       sed -e "1s,^W54S,W54G," < openwrt-gs-code.bin.squashfs > openwrt-g-code.bin.squashfs
+
+openwrt-linux.trx.jffs2:       wrt-tools
+       $(BUILD_DIR)/trx -o openwrt-linux.trx.jffs2 $(LINUX_DIR)/$(LINUX_BINLOC) $(IMAGE).jffs2
+
+openwrt-gs-code.bin.jffs2: openwrt-linux.trx.jffs2
+       $(BUILD_DIR)/addpattern -2 -i openwrt-linux.trx.jffs2 -o openwrt-gs-code.bin.jffs2 -g
+
+openwrt-g-code.bin.jffs2: openwrt-gs-code.bin.jffs2
+       sed -e "1s,^W54S,W54G," < openwrt-gs-code.bin.jffs2 > openwrt-g-code.bin.jffs2
+
+openwrt-code.bin.squashfs: openwrt-gs-code.bin.squashfs openwrt-g-code.bin.squashfs
+
+openwrt-code.bin.jffs2: openwrt-gs-code.bin.jffs2 openwrt-g-code.bin.jffs2
+
index 293edc600ae0cadd4a9b7a27c812842d983b9178..61550717f0de55d266c1fd0a8a98977e86022d80 100644 (file)
@@ -11,7 +11,7 @@ domain=lan
 except-interface=vlan1
 
 # enable dhcp (start,end,netmask,leasetime)
-dhcp-authoritative
+#dhcp-authoritative
 dhcp-range=192.168.1.100,192.168.1.250,255.255.255.0,12h
 dhcp-leasefile=/tmp/dhcp.leases
 
index 81379bed4bd8d35236ab52414b0d53931e3df127..aad625f8d3f0b121a65b9b9e918d230d47aa5f67 100755 (executable)
@@ -13,7 +13,7 @@ mkdir -p /var/run
 }
 
 insmod et
-insmod wl
+insmod wi
 
 ifconfig lo 127.0.0.1 up
 ifconfig eth0 promisc
index 6e6a9c998aa51b3f7be1c02e35f6058e9bdcd880..95a2da8be08fbc811fa1564b617ba0f1a68642b5 100755 (executable)
@@ -14,7 +14,7 @@ else
   pivot_root /jffs /jffs/rom
   mount none /dev -t devfs
   mount none /proc -t proc
-  umount rom/proc rom/dev
+  umount rom/proc
 fi
 mount none /tmp -t ramfs
 exec /sbin/init
index 6360fff0497fa8eb790e250e1877a8f7d8093fa8..a8d413df073266444710635530c49dc245adcab8 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/ash
 alias debug=${DEBUG:-:}
 debug "### wifi $1 ###"
-if=$(awk 'sub(":","") {print $1}' /proc/net/wireless)
+if=$(cat /proc/net/dev | awk -F: '/eth/ {wifi=$1;} END { print wifi}')
 $DEBUG wlconf $if $1