Makefile 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. $(TOOLS_BUILD_DIR):
  10. @mkdir -p $(TOOLS_BUILD_DIR)
  11. tools-compile: $(TOOLS_BUILD_DIR)
  12. $(MAKE) -C ../tools/grub prepare compile install
  13. ifeq ($(FS),archive)
  14. imageinstall: $(BIN_DIR)/$(ROOTFSTARBALL)
  15. @cp $(KERNEL) $(BIN_DIR)/${ADK_TARGET}-${FS}-kernel
  16. @echo 'The kernel file is: ${BIN_DIR}/${ADK_TARGET}-${FS}-kernel'
  17. @echo 'The RootFS tarball is: ${BIN_DIR}/${ROOTFSTARBALL}'
  18. ifeq ($(ADK_HARDWARE_QEMU_X86_64),y)
  19. @echo "Use following command to create a QEMU Image:"
  20. @echo "sudo ./scripts/create-image.sh -f ${ADK_TARGET_ROOTFS} qemu-${CPU_ARCH}.img $(BIN_DIR)/$(ROOTFSTARBALL)"
  21. @echo "Start qemu with following command line:"
  22. @echo 'qemu -nographic -net user,hostfwd=tcp::2222-:22 -net nic,model=e1000 -kernel $(BIN_DIR)/${ADK_TARGET}-${FS}-kernel qemu-${CPU_ARCH}.img'
  23. endif
  24. endif
  25. ifeq ($(FS),usb)
  26. imageinstall: tools-compile $(BIN_DIR)/$(ROOTFSTARBALL)
  27. @echo "The RootFS tarball is: $(BIN_DIR)/$(ROOTFSTARBALL)"
  28. @echo "To install everything to USB use scripts/install.sh"
  29. endif
  30. ifeq ($(FS),initramfs)
  31. imageinstall: $(BIN_DIR)/$(INITRAMFS)
  32. @cp $(KERNEL) $(BIN_DIR)/${ADK_TARGET}-${FS}-kernel
  33. @echo 'The kernel file is: ${BIN_DIR}/${ADK_TARGET}-${FS}-kernel'
  34. @echo 'The initramfs image is: ${BIN_DIR}/${INITRAMFS}'
  35. ifeq ($(ADK_HARDWARE_QEMU_X86_64),y)
  36. @echo "Start qemu with following command line:"
  37. @echo 'qemu-system-x86_64 -nographic -net user,hostfwd=tcp::2222-:22 -net nic,model=e1000 -kernel $(BIN_DIR)/${ADK_TARGET}-${FS}-kernel -initrd ${BIN_DIR}/${INITRAMFS}'
  38. endif
  39. endif
  40. ifeq ($(FS),initramfs-piggyback)
  41. imageinstall: ${BUILD_DIR}/${INITRAMFS_PIGGYBACK} createinitramfs
  42. @cp $(KERNEL) $(BIN_DIR)/${ADK_TARGET}-${FS}-kernel
  43. @echo 'The kernel file is: ${BIN_DIR}/${ADK_TARGET}-${FS}-kernel'
  44. ifeq ($(ADK_HARDWARE_QEMU_X86_64),y)
  45. @echo "Start qemu with following command line:"
  46. @echo 'qemu-system-x86_64 -nographic -net user,hostfwd=tcp::2222-:22 -net nic,model=e1000 -kernel $(BIN_DIR)/${ADK_TARGET}-${FS}-kernel'
  47. endif
  48. endif