Makefile 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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 $(ADK_TOPDIR)/rules.mk
  4. include $(ADK_TOPDIR)/mk/kernel.mk
  5. include $(ADK_TOPDIR)/mk/modules.mk
  6. include $(ADK_TOPDIR)/mk/kernel-build.mk
  7. include $(ADK_TOPDIR)/mk/image.mk
  8. KERNEL:=$(LINUX_DIR)/vmlinux
  9. OSTRIP:=-R .reginfo -R .notes -R .note -R .comment -R .mdebug -R .note.gnu.build-id
  10. # target helper text
  11. ifeq ($(ADK_TARGET_FS),initramfs)
  12. targethelp:
  13. @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
  14. @echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
  15. endif
  16. ifeq ($(ADK_TARGET_FS),initramfsarchive)
  17. targethelp:
  18. @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
  19. @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
  20. endif
  21. ifeq ($(ADK_TARGET_FS),initramfspiggyback)
  22. targethelp:
  23. @echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
  24. ifeq ($(ADK_TARGET_SIM),y)
  25. @echo "Run the simulator via:"
  26. @echo '$(TARGET_CROSS)gdb $(FW_DIR)/$(TARGET_KERNEL)'
  27. @echo 'gdb> target sim'
  28. @echo 'gdb> sim intmode 1'
  29. @echo 'gdb> sim sci net 12345'
  30. @echo 'gdb> load'
  31. @echo 'start telnet localhost 12345 in a second shell'
  32. @echo 'gdb> run earlyprintk=h8300-sim console=ttySC0'
  33. endif
  34. endif
  35. kernel-strip:
  36. $(TARGET_CROSS)objcopy $(OSTRIP) -S $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL)
  37. kernel-install: kernel-strip
  38. @cp $(BUILD_DIR)/$(TARGET_KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
  39. # filesystem specific targets
  40. ifeq ($(ADK_TARGET_FS),initramfs)
  41. imageinstall: kernel-install $(FW_DIR)/$(INITRAMFS) targethelp
  42. endif
  43. ifeq ($(ADK_TARGET_FS),initramfsarchive)
  44. imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
  45. endif
  46. ifeq ($(ADK_TARGET_FS),initramfspiggyback)
  47. imageinstall: createinitramfs targethelp
  48. endif