Makefile 1.7 KB

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