Makefile 1.6 KB

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