Makefile 1.8 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)/${ADK_TARGET}-${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. @echo 'Login as user root with password linux123 via ssh or console'
  37. endif
  38. ifeq ($(FS),nfsroot)
  39. imageinstall: $(BIN_DIR)/$(ROOTFSTARBALL)
  40. @echo
  41. @echo 'The kernel file is: ${BIN_DIR}/${ADK_TARGET}-${ARCH}-kernel'
  42. @echo 'The nfs root tarball is: ${BIN_DIR}/${ROOTFSTARBALL}'
  43. @echo 'You can flash the kernel via tftp:'
  44. @echo 'tftp 192.168.1.1'
  45. @echo 'tftp> binary'
  46. @echo 'tftp> put wag54g-mips-kernel upgrade_code.bin'
  47. @echo 'Login as user root with password linux123 via ssh or console'
  48. endif