Makefile 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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) $(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. @echo Use sudo ./boot_linux -F -i ${TARGET_KERNEL} to flash the kernel
  34. @echo Do not forget to set network boot jumper, before you start the foxboard
  35. @echo ${ROOTFSUSERTARBALL} is your nfs root and can be extracted on your nfs server
  36. endif