Makefile 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. @-find $(STAGING_TARGET_DIR)/usr/include -name .install -delete
  58. @-find $(STAGING_TARGET_DIR)/usr/include -name ..install.cmd -delete
  59. touch $@
  60. include ${ADK_TOPDIR}/mk/toolchain.mk