Makefile 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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-install:
  9. @cp $(LINUX_DIR)/arch/cris/boot/zImage \
  10. $(BIN_DIR)/${ADK_TARGET}-${FS}-kernel $(MAKE_TRACE)
  11. createinit:
  12. @-rm $(LINUX_DIR)/usr/initramfs_data.cpio.* $(MAKE_TRACE)
  13. $(SED) 's#^CONFIG_INITRAMFS_SOURCE.*#CONFIG_INITRAMFS_SOURCE="${BUILD_DIR}/${INITRAMFS_PIGGYBACK}"#' $(LINUX_DIR)/.config
  14. echo N |$(MAKE) -C $(LINUX_DIR) V=0 CROSS_COMPILE="$(TARGET_CROSS)" ARCH=$(ARCH) \
  15. CC="$(TARGET_CC)" oldconfig $(MAKE_TRACE)
  16. $(MAKE) -C $(LINUX_DIR) V=1 CROSS_COMPILE="$(TARGET_CROSS)" ARCH=$(ARCH) \
  17. CC="$(TARGET_CC)" $(MAKE_TRACE)
  18. $(CP) $(LINUX_DIR)/arch/cris/boot/zImage \
  19. $(BIN_DIR)/${ADK_TARGET}-${FS}-kernel
  20. ifeq ($(FS),archive)
  21. imageinstall: $(BIN_DIR)/$(ROOTFSUSERTARBALL)
  22. @echo
  23. @echo "The RootFS tarball is: $(BIN_DIR)/$(ROOTFSUSERTARBALL),"
  24. @echo "Use following command to create a QEMU Image:"
  25. @echo "sudo ./scripts/create-image.sh -f $(ADK_TARGET_ROOTFS) qemu-${CPU_ARCH}.img $(BIN_DIR)/$(ROOTFSUSERTARBALL)"
  26. @echo "Start qemu with following command line:"
  27. @echo 'qemu-system-cris -nographic -kernel $(BIN_DIR)/${ADK_TARGET}-${FS}-kernel qemu-${CPU_ARCH}.img'
  28. @echo 'Login as user root with password linux123 via ssh or console'
  29. endif
  30. ifeq ($(FS),initramfs)
  31. imageinstall: $(BIN_DIR)/$(INITRAMFS)
  32. @echo 'The kernel file is: ${BIN_DIR}/${ADK_TARGET}-${FS}-kernel'
  33. @echo 'The initramfs image is: ${BIN_DIR}/${INITRAMFS}'
  34. @echo "Start qemu with following command line:"
  35. @echo 'qemu-system-cris -nographic -kernel $(BIN_DIR)/${ADK_TARGET}-${FS}-kernel'
  36. @echo 'Login as user root with password linux123 via ssh or console'
  37. endif
  38. ifeq ($(FS),initramfs-piggyback)
  39. imageinstall: ${BUILD_DIR}/${INITRAMFS_PIGGYBACK} createinit
  40. @echo 'The kernel file is: ${BIN_DIR}/${ADK_TARGET}-${FS}-kernel'
  41. @echo "Start qemu with following command line:"
  42. @echo 'qemu-system-cris -nographic -kernel $(BIN_DIR)/${ADK_TARGET}-${FS}-kernel'
  43. @echo 'Login as user root with password linux123 via ssh or console'
  44. endif