linux-ext-ocf-linux.mk 871 B

12345678910111213141516171819202122232425
  1. ##################################################
  2. # Linux OCF extension
  3. #
  4. # Patch the linux kernel with OCF
  5. ##################################################
  6. ifeq ($(BR2_LINUX_KERNEL_EXT_OCF_LINUX),y)
  7. LINUX_DEPENDENCIES += ocf-linux
  8. # Prepare kernel patch
  9. # The linux-3.2.1.patch is just the main inclusion, most of the code
  10. # resides in the ocf/ subdir.
  11. # It works for older kernel versions.
  12. # Run tested from 2.6.38+ and build tested from 2.6.35+
  13. define OCF_LINUX_PREPARE_KERNEL
  14. support/scripts/apply-patches.sh $(LINUX_DIR) \
  15. $(OCF_LINUX_DIR)/patches/ linux-3.2.1-ocf.patch ; \
  16. grep -q __mix_pool_bytes $(LINUX_DIR)/drivers/char/random.c && \
  17. $(SED) 's:wordcount\*4:&, NULL:' $(LINUX_DIR)/drivers/char/random.c ; \
  18. cp -rf $(OCF_LINUX_DIR)/ocf $(LINUX_DIR)/crypto/ocf ;
  19. endef
  20. LINUX_PRE_PATCH_HOOKS += OCF_LINUX_PREPARE_KERNEL
  21. endif #BR2_LINUX_EXT_OCF_LINUX