Makefile 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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)/$(ADK_TARGET_KERNEL)
  7. QEMU:=qemu-system-hppa
  8. QEMU_ARGS:=-nographic
  9. # target helper text
  10. ifeq ($(ADK_TARGET_FS),archive)
  11. targethelp:
  12. @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
  13. endif
  14. ifeq ($(ADK_TARGET_FS),initramfs)
  15. targethelp:
  16. @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
  17. @echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
  18. ifeq ($(ADK_TARGET_QEMU),y)
  19. @echo "Start qemu with following command line:"
  20. @echo '$(QEMU) $(QEMU_ARGS) -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
  21. endif
  22. endif
  23. ifeq ($(ADK_TARGET_FS),initramfsarchive)
  24. targethelp:
  25. @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
  26. @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
  27. endif
  28. ifeq ($(ADK_TARGET_FS),initramfspiggyback)
  29. targethelp:
  30. @echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
  31. ifeq ($(ADK_TARGET_QEMU),y)
  32. @echo "Start qemu with following command line:"
  33. @echo '$(QEMU) $(QEMU_ARGS) -kernel $(FW_DIR)/$(TARGET_KERNEL)'
  34. endif
  35. endif
  36. ifeq ($(ADK_TARGET_FS),nfsroot)
  37. targethelp:
  38. @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
  39. @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
  40. endif
  41. kernel-strip:
  42. @cp $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL)
  43. kernel-install: kernel-strip
  44. @cp $(BUILD_DIR)/$(TARGET_KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
  45. # filesystem specific targets
  46. ifeq ($(ADK_TARGET_FS),archive)
  47. imageinstall: $(FW_DIR)/$(ROOTFSTARBALL) targethelp
  48. endif
  49. ifeq ($(ADK_TARGET_FS),initramfs)
  50. imageinstall: kernel-install $(FW_DIR)/$(INITRAMFS) targethelp
  51. endif
  52. ifeq ($(ADK_TARGET_FS),initramfsarchive)
  53. imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
  54. endif
  55. ifeq ($(ADK_TARGET_FS),initramfspiggyback)
  56. imageinstall: createinitramfs targethelp
  57. endif
  58. ifeq ($(ADK_TARGET_FS),nfsroot)
  59. imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
  60. endif