Makefile 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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 $(ADK_TOPDIR)/rules.mk
  4. include ../rules.mk
  5. include $(ADK_TOPDIR)/mk/$(ADK_TARGET_OS)-ver.mk
  6. include $(ADK_TOPDIR)/mk/$(ADK_TARGET_OS).mk
  7. include $(ADK_TOPDIR)/mk/buildhlp.mk
  8. # override linux dir here, as build_bla_bla/linux does not exist yet
  9. LINUX_DIR=${WRKBUILD}
  10. include $(ADK_TOPDIR)/mk/kernel-vars.mk
  11. $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)/linux-$(KERNEL_FILE_VER)/.patched:
  12. ifeq ($(ADK_TARGET_SYSTEM_PCENGINES_APU),y)
  13. ifeq ($(ADK_KERNEL_ROOT_NFS),y)
  14. cd $(DL_DIR) && wget http://distfiles.openadk.org/realtek-firmware-1.1.tar.xz
  15. tar xf $(DL_DIR)/realtek-firmware-1.1.tar.xz \
  16. --strip-components=2 -C $(WRKSRC)/firmware realtek-firmware-1.1
  17. endif
  18. endif
  19. ifeq ($(ADK_TARGET_ARCH_XTENSA),y)
  20. ifeq ($(ADK_TARGET_ABI),)
  21. tar xf $(ADK_TOPDIR)/target/xtensa/overlay/xtensa_$(ADK_TARGET_CPU_TYPE).tar \
  22. --strip-components=1 -C $(WRKSRC) linux
  23. else
  24. tar xf $(ADK_TOPDIR)/target/xtensa/overlay/xtensa_$(ADK_TARGET_CPU_TYPE)_$(ADK_TARGET_ABI).tar \
  25. --strip-components=1 -C $(WRKSRC) linux
  26. endif
  27. endif
  28. ifneq ($(ADK_DISABLE_KERNEL_PATCHES),y)
  29. $(TRACE) kernel-patch
  30. $(PATCH) $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)/linux-$(KERNEL_FILE_VER) \
  31. $(ADK_TOPDIR)/target/linux/patches/$(KERNEL_FILE_VER) *.patch $(MAKE_TRACE)
  32. ifeq ($(ADK_KERNEL_PATCH_REALTIME),y)
  33. $(TRACE) linux-rt-kernel-patch
  34. $(PATCH) $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)/linux-$(KERNEL_FILE_VER) \
  35. $(ADK_TOPDIR)/target/linux/patches/$(KERNEL_FILE_VER) patch-realtime $(MAKE_TRACE)
  36. endif
  37. endif
  38. ifneq ($(ADK_DISABLE_TARGET_KERNEL_PATCHES),y)
  39. $(TRACE) kernel-target-patch
  40. $(PATCH) $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)/linux-$(KERNEL_FILE_VER) \
  41. $(ADK_TOPDIR)/target/$(ADK_TARGET_ARCH)/$(ADK_TARGET_BOARD)/patches/$(KERNEL_FILE_VER) *.patch $(MAKE_TRACE)
  42. $(PATCH) $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)/linux-$(KERNEL_FILE_VER) \
  43. $(ADK_TOPDIR)/target/$(ADK_TARGET_ARCH)/$(ADK_TARGET_SYSTEM)/patches/$(KERNEL_FILE_VER) *.patch $(MAKE_TRACE)
  44. endif
  45. touch $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)/linux-$(KERNEL_FILE_VER)/.scmversion
  46. touch $@
  47. $(WRKBUILD)/.configured: $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)/linux-$(KERNEL_FILE_VER)/.patched
  48. ${KERNEL_MAKE} INSTALL_HDR_PATH=$(STAGING_TARGET_DIR)/usr headers_install
  49. ifeq ($(ADK_TARGET_ARCH_CRIS),y)
  50. ifeq ($(ADK_TARGET_CPU_ARCH),crisv32)
  51. cd $(STAGING_TARGET_DIR)/usr/include && ln -sf arch-v32/arch arch
  52. else
  53. cd $(STAGING_TARGET_DIR)/usr/include && ln -sf arch-v10/arch arch
  54. endif
  55. endif
  56. @-find $(STAGING_TARGET_DIR)/usr/include -name .install -delete
  57. @-find $(STAGING_TARGET_DIR)/usr/include -name ..install.cmd -delete
  58. touch $@
  59. include ${ADK_TOPDIR}/mk/toolchain.mk