Makefile 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. KERNEL:=$(LINUX_DIR)/arch/x86/boot/bzImage
  9. ifeq ($(ADK_TARGET_FS),genext2fs)
  10. imageinstall: $(BIN_DIR)/$(ROOTFSTARBALL)
  11. @echo "The RootFS tarball is: $(BIN_DIR)/$(ROOTFSTARBALL)"
  12. @echo "To install everything to CompactFlash use scripts/genext2.sh"
  13. endif
  14. ifeq ($(ADK_TARGET_FS),cf)
  15. imageinstall: $(BIN_DIR)/$(ROOTFSTARBALL)
  16. @echo "The RootFS tarball is: $(BIN_DIR)/$(ROOTFSTARBALL)"
  17. @echo "To install everything to CompactFlash use scripts/install.sh"
  18. endif
  19. ifeq ($(ADK_TARGET_FS),nfsroot)
  20. imageinstall: $(BIN_DIR)/$(ROOTFSUSERTARBALL)
  21. @cp $(KERNEL) $(BIN_DIR)/$(TARGET_KERNEL)
  22. @echo 'The linux kernel is here: $(BIN_DIR)/$(TARGET_KERNEL)'
  23. @echo 'The nfs root tarball is: ${BIN_DIR}/${ROOTFSUSERTARBALL}'
  24. endif
  25. ifeq ($(ADK_TARGET_FS),archive)
  26. imageinstall: $(BIN_DIR)/$(ROOTFSTARBALL)
  27. @echo "The RootFS tarball is: $(BIN_DIR)/$(ROOTFSTARBALL)"
  28. ifeq ($(ADK_HARDWARE_QEMU),y)
  29. @cp $(KERNEL) $(BIN_DIR)/$(TARGET_KERNEL)
  30. @echo "Use following command to create a QEMU Image:"
  31. @echo "sudo ./scripts/create-image.sh -f ${ADK_TARGET_ROOTFS} qemu-${CPU_ARCH}.img $(BIN_DIR)/$(ROOTFSTARBALL)"
  32. @echo "Start qemu with following command line:"
  33. @echo 'qemu -nographic -net user,hostfwd=tcp::2222-:22 -net nic,model=e1000 -kernel $(BIN_DIR)/$(TARGET_KERNEL) qemu-${CPU_ARCH}.img'
  34. endif
  35. endif
  36. ifeq ($(ADK_TARGET_FS),usb)
  37. imageinstall: $(BIN_DIR)/$(ROOTFSTARBALL)
  38. @echo "The RootFS tarball is: $(BIN_DIR)/$(ROOTFSTARBALL)"
  39. @echo "To install everything to USB use scripts/install.sh"
  40. endif
  41. ifeq ($(ADK_TARGET_FS),initramfs)
  42. imageinstall: $(BIN_DIR)/$(INITRAMFS)
  43. @cp $(KERNEL) $(BIN_DIR)/$(TARGET_KERNEL)
  44. @echo 'The kernel file is: $(BIN_DIR)/${TARGET_KERNEL}'
  45. @echo 'The initramfs image is: ${BIN_DIR}/${INITRAMFS}'
  46. ifeq ($(ADK_HARDWARE_QEMU),y)
  47. @echo "Start qemu with following command line:"
  48. @echo 'qemu -nographic -net user,hostfwd=tcp::2222-:22 -net nic,model=e1000 -kernel $(BIN_DIR)/$(TARGET_KERNEL) -initrd ${BIN_DIR}/${INITRAMFS}'
  49. endif
  50. endif
  51. ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
  52. imageinstall: createinitramfs
  53. @cp $(KERNEL) $(BIN_DIR)/${TARGET_KERNEL}
  54. @echo 'The kernel+initramfs file is: $(BIN_DIR)/${TARGET_KERNEL}'
  55. ifeq ($(ADK_HARDWARE_QEMU),y)
  56. @echo "Start qemu with following command line:"
  57. @echo 'qemu -nographic -net user,hostfwd=tcp::2222-:22 -net nic,model=e1000 -kernel $(BIN_DIR)/$(TARGET_KERNEL)'
  58. endif
  59. endif