1
0

Makefile 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. QEMU_ARGS:=-nographic
  9. # target helper text
  10. ifeq ($(ADK_TARGET_FS),initramfs)
  11. targethelp:
  12. @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
  13. @echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
  14. ifeq ($(ADK_TARGET_QEMU),y)
  15. @echo "Start qemu with following command line:"
  16. @echo 'qemu-system-or32 ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
  17. endif
  18. endif
  19. ifeq ($(ADK_TARGET_FS),initramfsarchive)
  20. targethelp:
  21. @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
  22. @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
  23. endif
  24. ifeq ($(ADK_TARGET_FS),initramfspiggyback)
  25. targethelp:
  26. @echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
  27. ifeq ($(ADK_TARGET_QEMU),y)
  28. @echo "Start qemu with following command line:"
  29. @echo 'qemu-system-or32 ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL)'
  30. endif
  31. endif
  32. kernel-strip:
  33. $(TARGET_CROSS)objcopy $(OSTRIP) -S $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL)
  34. kernel-install: kernel-strip
  35. @cp $(BUILD_DIR)/$(TARGET_KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
  36. # filesystem specific targets
  37. ifeq ($(ADK_TARGET_FS),initramfs)
  38. imageinstall: kernel-install $(FW_DIR)/$(INITRAMFS) targethelp
  39. endif
  40. ifeq ($(ADK_TARGET_FS),initramfsarchive)
  41. imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
  42. endif
  43. ifeq ($(ADK_TARGET_FS),initramfspiggyback)
  44. imageinstall: createinitramfs targethelp
  45. endif