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