summaryrefslogtreecommitdiff
path: root/target/wag54g/Makefile
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2009-06-04 19:48:44 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2009-06-04 19:48:44 +0200
commit9bd4456c5a83c3474fdf9fe5cf14004a0874e2c8 (patch)
tree2c8ac1a18a6f40388a5e2a64e86c32ec63a42f3f /target/wag54g/Makefile
parenta1373c5ba4bbc90e4b20191e56f728df797bf7bc (diff)
add experimental linksys wag54h ar7 support
- network interface does not work, but system can boot
Diffstat (limited to 'target/wag54g/Makefile')
-rw-r--r--target/wag54g/Makefile54
1 files changed, 54 insertions, 0 deletions
diff --git a/target/wag54g/Makefile b/target/wag54g/Makefile
new file mode 100644
index 000000000..2c7f1581b
--- /dev/null
+++ b/target/wag54g/Makefile
@@ -0,0 +1,54 @@
+# $Id: Makefile 30 2008-09-04 13:31:09Z wbx $
+#-
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(TOPDIR)/rules.mk
+include $(TOPDIR)/mk/kernel.mk
+include $(TOPDIR)/mk/modules.mk
+include $(TOPDIR)/mk/kernel-build.mk
+include $(TOPDIR)/mk/image.mk
+
+$(TOOLS_BUILD_DIR):
+ mkdir -p $(TOOLS_BUILD_DIR)
+
+tools-compile: $(TOOLS_BUILD_DIR)
+ $(MAKE) -C tools/addpattern
+ $(MAKE) -C tools/srec2bin
+ $(MAKE) -C tools/squashfs prepare compile install
+
+kernel-install: tools-compile
+ PATH='${TARGET_PATH}' \
+ mipsel-linux-objcopy -S -O srec $(LINUX_DIR)/vmlinux \
+ $(LINUX_DIR)/vmlinux.srec
+ PATH='${TARGET_PATH}' \
+ srec2bin $(LINUX_DIR)/vmlinux.srec $(LINUX_DIR)/vmlinux.bin
+ (dd if=/dev/zero bs=16 count=1; cat $(LINUX_DIR)/vmlinux.bin) > \
+ $(LINUX_DIR)/vmlinux.tmp
+ PATH='${TARGET_PATH}' \
+ addpattern -p WA21 -i $(LINUX_DIR)/vmlinux.tmp \
+ -o $(BIN_DIR)/${DEVICE}-${ARCH}-kernel
+
+ifeq ($(FS),squashfs)
+imageinstall: $(BIN_DIR)/$(ROOTFSTARBALL)
+ @echo
+ @echo 'The kernel file is: ${BIN_DIR}/${DEVICE}-${ARCH}-kernel'
+ @echo 'The nfs root tarball is: ${BIN_DIR}/${ROOTFSTARBALL}'
+ @echo 'You can flash the kernel via tftp:'
+ @echo 'tftp 192.168.1.1'
+ @echo 'tftp> binary'
+ @echo 'tftp> put wag54g-mips-kernel upgrade_code.bin'
+
+endif
+
+ifeq ($(FS),nfsroot)
+imageinstall: $(BIN_DIR)/$(ROOTFSTARBALL)
+ @echo
+ @echo 'The kernel file is: ${BIN_DIR}/${DEVICE}-${ARCH}-kernel'
+ @echo 'The nfs root tarball is: ${BIN_DIR}/${ROOTFSTARBALL}'
+ @echo 'You can flash the kernel via tftp:'
+ @echo 'tftp 192.168.1.1'
+ @echo 'tftp> binary'
+ @echo 'tftp> put wag54g-mips-kernel upgrade_code.bin'
+
+endif