Makefile 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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/kernel-ver.mk
  6. include $(ADK_TOPDIR)/mk/linux.mk
  7. include ${ADK_TOPDIR}/mk/kernel-vars.mk
  8. include ${ADK_TOPDIR}/mk/buildhlp.mk
  9. $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)/linux-$(KERNEL_VERSION)/.patched:
  10. ifeq ($(ADK_TARGET_SYSTEM_PCENGINES_APU),y)
  11. ifeq ($(ADK_KERNEL_ROOT_NFS),y)
  12. cd $(DL_DIR) && wget http://openadk.org/distfiles/realtek-firmware-1.1.tar.xz
  13. tar xf $(DL_DIR)/realtek-firmware-1.1.tar.xz \
  14. --strip-components=2 -C $(WRKSRC)/firmware realtek-firmware-1.1
  15. endif
  16. endif
  17. ifeq ($(ADK_LINUX_XTENSA),y)
  18. tar xf $(ADK_TOPDIR)/target/xtensa/overlay/xtensa_dc232b.tar \
  19. --strip-components=1 -C $(WRKSRC) linux
  20. endif
  21. ifneq ($(ADK_DISABLE_KERNEL_PATCHES),y)
  22. $(TRACE) kernel-patch
  23. $(PATCH) $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)/linux-$(KERNEL_VERSION) \
  24. $(ADK_TOPDIR)/target/linux/patches/$(KERNEL_VERSION) *.patch $(MAKE_TRACE)
  25. endif
  26. ifneq ($(ADK_DISABLE_TARGET_KERNEL_PATCHES),y)
  27. $(TRACE) kernel-target-patch
  28. $(PATCH) $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)/linux-$(KERNEL_VERSION) \
  29. $(ADK_TOPDIR)/target/$(ADK_TARGET_ARCH)/$(ADK_TARGET_SYSTEM)/patches/$(KERNEL_VERSION) *.patch $(MAKE_TRACE)
  30. endif
  31. ifeq ($(ADK_KERNEL_ADDON_FBLOGO),y)
  32. $(TRACE) fblogo-kernel-patch
  33. $(PATCH) $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)/linux-$(KERNEL_VERSION) \
  34. $(ADK_TOPDIR)/target/linux/patches/$(KERNEL_VERSION) patch-fblogo $(MAKE_TRACE)
  35. endif
  36. ifeq ($(ADK_KERNEL_ADDON_YAFFS2),y)
  37. $(TRACE) yaffs2-kernel-patch
  38. $(PATCH) $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)/linux-$(KERNEL_VERSION) \
  39. $(ADK_TOPDIR)/target/linux/patches/$(KERNEL_VERSION) patch-yaffs2 $(MAKE_TRACE)
  40. endif
  41. ifeq ($(ADK_KERNEL_ADDON_GRSEC),y)
  42. $(TRACE) grsec-kernel-patch
  43. $(PATCH) $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)/linux-$(KERNEL_VERSION) \
  44. $(ADK_TOPDIR)/target/linux/patches/$(KERNEL_VERSION) patch-grsec $(MAKE_TRACE)
  45. endif
  46. ifeq ($(ADK_KERNEL_ADDON_MPTCP),y)
  47. $(TRACE) mptcp-kernel-patch
  48. $(PATCH) $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)/linux-$(KERNEL_VERSION) \
  49. $(ADK_TOPDIR)/target/linux/patches/$(KERNEL_VERSION) patch-mptcp $(MAKE_TRACE)
  50. endif
  51. touch $@
  52. $(WRKBUILD)/.headers: $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)/linux-$(KERNEL_VERSION)/.patched
  53. ${KERNEL_MAKE_ENV} $(MAKE) -C $(WRKBUILD) ${KERNEL_MAKE_OPTS} headers_check
  54. ${KERNEL_MAKE_ENV} $(MAKE) -C $(WRKBUILD) ${KERNEL_MAKE_OPTS} \
  55. INSTALL_HDR_PATH=$(STAGING_TARGET_DIR)/usr \
  56. headers_install
  57. ifeq ($(ADK_TARGET_ARCH),cris)
  58. ifeq ($(ADK_TARGET_CPU_ARCH),crisv32)
  59. cd $(STAGING_TARGET_DIR)/usr/include && ln -sf arch-v32/arch arch
  60. else
  61. cd $(STAGING_TARGET_DIR)/usr/include && ln -sf arch-v10/arch arch
  62. endif
  63. endif
  64. @-find $(STAGING_TARGET_DIR)/usr/include -name .install -delete
  65. @-find $(STAGING_TARGET_DIR)/usr/include -name ..install.cmd -delete
  66. touch $@
  67. include ${ADK_TOPDIR}/mk/toolchain.mk