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. $(TOOLS_BUILD_DIR):
  9. @mkdir -p $(TOOLS_BUILD_DIR)
  10. tools-compile: $(TOOLS_BUILD_DIR)
  11. $(MAKE) -C ../tools/uboot-mkimage
  12. KERNEL:=$(BUILD_DIR)/${ADK_TARGET}-${FS}-kernel
  13. LOADADDR:= 0x20008000
  14. kernel-install: tools-compile
  15. @gzip -9 < $(LINUX_DIR)/arch/arm/boot/Image > ${BUILD_DIR}/Image.gz
  16. PATH='${TARGET_PATH}' mkimage -A arm -O linux -T kernel -C gzip \
  17. -a ${LOADADDR} -e ${LOADADDR} -d ${BUILD_DIR}/Image.gz \
  18. -n foxg20 $(TARGET_DIR)/boot/vmlinuz-adk $(MAKE_TRACE)
  19. @cp $(TARGET_DIR)/boot/vmlinuz-adk \
  20. $(BUILD_DIR)/${ADK_TARGET}-${FS}-kernel
  21. ifeq ($(FS),nfsroot)
  22. imageinstall: kernel-install ${BIN_DIR}/${ROOTFSUSERTARBALL}
  23. @cp $(BUILD_DIR)/${ADK_TARGET}-${FS}-kernel \
  24. $(BIN_DIR)/${ADK_TARGET}-${FS}-kernel
  25. @echo 'Type dhcp via u-boot prompt to load kernel'
  26. @echo 'After that type bootm to load the kernel'
  27. endif
  28. ifeq ($(FS),ext2-block)
  29. imageinstall: kernel-install $(BIN_DIR)/$(ROOTFSTARBALL)
  30. @echo "The RootFS tarball is:"
  31. @echo "$(BIN_DIR)/$(ROOTFSTARBALL)"
  32. @echo 'Before booting from MicroSD card you need to set following u-boot environment variables:'
  33. @echo "setenv bootcmd 'mmc init; sleep 1; fatload mmc 0 0x22000000 vmlinuz-adk; bootm 0x22000000'"
  34. @echo
  35. @echo "Boot the board via network and use adkinstall."
  36. @echo "If you just want to update, use adkupdate."
  37. endif