Makefile 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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. $(TOOLS_BUILD_DIR):
  9. mkdir -p $(TOOLS_BUILD_DIR)
  10. tools-compile: $(TOOLS_BUILD_DIR)
  11. $(MAKE) -C tools/mkfimage
  12. $(MAKE) -C tools/e100boot prepare compile install
  13. $(MAKE) -C ../tools/squashfs prepare compile install
  14. $(INSTALL_BIN) tools/boot_linux $(BIN_DIR)/
  15. kernel-install: tools-compile
  16. PATH='${TARGET_PATH}' mkfimage $(LINUX_DIR)/arch/cris/boot/zImage \
  17. $(BIN_DIR)/${ADK_TARGET}-${FS}-kernel $(MAKE_TRACE)
  18. ifeq ($(FS),squashfs)
  19. imageinstall: kernel-install $(BIN_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 ($(FS),nfsroot)
  30. imageinstall: kernel-install ${BIN_DIR}/${ROOTFSUSERTARBALL}
  31. @echo Use sudo ./boot_linux -F -i ${ADK_TARGET}-${FS}-kernel to flash the kernel
  32. @echo Do not forget to set network boot jumper, before you start the foxboard
  33. @echo ${ROOTFSUSERTARBALL} is your nfs root and can be extracted on your nfs server
  34. endif