Makefile 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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/cris/boot/zImage
  9. tools-compile:
  10. $(MAKE) -C ../tools/mkfimage all
  11. ifneq ($(ADK_HOST_DARWIN),y)
  12. $(MAKE) -C ../tools/e100boot all
  13. endif
  14. $(MAKE) -C ../tools/squashfs all
  15. $(INSTALL_BIN) ../tools/boot_linux $(BIN_DIR)/
  16. kernel-install: tools-compile
  17. PATH='${TARGET_PATH}' mkfimage $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL)
  18. ifeq ($(ADK_TARGET_FS),squashfs)
  19. imageinstall: kernel-install $(BUILD_DIR)/$(ROOTFSSQUASHFS)
  20. dd if=${BUILD_DIR}/${ROOTFSSQUASHFS} of=${BIN_DIR}/${ROOTFSSQUASHFS} \
  21. bs=4063232 conv=sync $(MAKE_TRACE)
  22. @if [ $$(stat --format=%s ${BIN_DIR}/${ROOTFSSQUASHFS}) -gt 4063232 ];then \
  23. echo 'Image is too big!'; \
  24. else \
  25. echo 'Use sudo ./boot_linux -F -i $(ROOTFSSQUASHFS) to flash'; \
  26. echo 'Do not forget to set the network boot jumper, before you start the foxboard'; \
  27. fi
  28. endif
  29. ifeq ($(ADK_TARGET_FS),nfsroot)
  30. imageinstall: kernel-install ${BIN_DIR}/${ROOTFSUSERTARBALL}
  31. @cp $(BUILD_DIR)/$(TARGET_KERNEL) $(BIN_DIR)/$(TARGET_KERNEL)
  32. @echo Use sudo ./boot_linux -F -i $(BIN_DIR)/${TARGET_KERNEL} to flash the kernel
  33. @echo Do not forget to set network boot jumper, before you start the foxboard
  34. @echo ${ROOTFSUSERTARBALL} is your nfs root and can be extracted on your nfs server
  35. endif