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