1
0

Makefile 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # $Id: Makefile 30 2008-09-04 13:31:09Z wbx $
  2. #-
  3. # This file is part of the OpenADK project. OpenADK is copyrighted
  4. # material, please see the LICENCE file in the top-level directory.
  5. include $(TOPDIR)/rules.mk
  6. include $(TOPDIR)/mk/kernel.mk
  7. include $(TOPDIR)/mk/modules.mk
  8. include $(TOPDIR)/mk/kernel-build.mk
  9. include $(TOPDIR)/mk/image.mk
  10. $(TOOLS_BUILD_DIR):
  11. mkdir -p $(TOOLS_BUILD_DIR)
  12. tools-compile: $(TOOLS_BUILD_DIR)
  13. $(MAKE) -C tools/addpattern
  14. $(MAKE) -C tools/srec2bin
  15. $(MAKE) -C tools/squashfs prepare compile install
  16. kernel-install: tools-compile
  17. PATH='${TARGET_PATH}' \
  18. mipsel-linux-objcopy -S -O srec $(LINUX_DIR)/vmlinux \
  19. $(LINUX_DIR)/vmlinux.srec
  20. PATH='${TARGET_PATH}' \
  21. srec2bin $(LINUX_DIR)/vmlinux.srec $(LINUX_DIR)/vmlinux.bin
  22. (dd if=/dev/zero bs=16 count=1; cat $(LINUX_DIR)/vmlinux.bin) > \
  23. $(LINUX_DIR)/vmlinux.tmp
  24. PATH='${TARGET_PATH}' \
  25. addpattern -p WA21 -i $(LINUX_DIR)/vmlinux.tmp \
  26. -o $(BIN_DIR)/${DEVICE}-${ARCH}-kernel
  27. ifeq ($(FS),squashfs)
  28. imageinstall: $(BIN_DIR)/$(ROOTFSSQUASHFS)
  29. ${CP} ${BUILD_DIR}/${ROOTFSSQUASHFS} $(BIN_DIR)/$(ROOTFSSQUASHFS)
  30. @echo
  31. @echo The image file is $(ROOTFSSQUASHFS)
  32. @echo 'You can flash the image via tftp:'
  33. @echo 'tftp 192.168.1.1'
  34. @echo 'tftp> binary'
  35. @echo "tftp> put $(ROOTFSSQUASHFS) upgrade_code.bin"
  36. endif
  37. ifeq ($(FS),nfsroot)
  38. imageinstall: $(BIN_DIR)/$(ROOTFSTARBALL)
  39. @echo
  40. @echo 'The kernel file is: ${BIN_DIR}/${DEVICE}-${ARCH}-kernel'
  41. @echo 'The nfs root tarball is: ${BIN_DIR}/${ROOTFSTARBALL}'
  42. @echo 'You can flash the kernel via tftp:'
  43. @echo 'tftp 192.168.1.1'
  44. @echo 'tftp> binary'
  45. @echo 'tftp> put wag54g-mips-kernel upgrade_code.bin'
  46. endif