BUILD.bazel 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. package(
  2. default_visibility = [
  3. "//visibility:public",
  4. ],
  5. )
  6. load("//build/kernel/kleaf:kernel.bzl", "ddk_headers")
  7. ddk_headers(
  8. name = "camera_uapi_headers",
  9. hdrs = glob(["include/uapi/camera/**/*.h"]),
  10. includes = [
  11. "include/uapi/camera",
  12. "include/uapi/camera/media",
  13. ],
  14. )
  15. driver_header_globs = [
  16. "drivers/**/*.h",
  17. "drivers/camera_main.h",
  18. "dt-bindings/msm-camera.h",
  19. ]
  20. # Generated list with: find drivers -type f -name '*.h' -printf '"%h",\n' | sort -u
  21. driver_includes = [
  22. "drivers",
  23. "drivers/cam_cdm",
  24. "drivers/cam_core",
  25. "drivers/cam_cpas",
  26. "drivers/cam_cpas/cpas_top",
  27. "drivers/cam_cpas/include",
  28. "drivers/cam_cre",
  29. "drivers/cam_cre/cam_cre_hw_mgr",
  30. "drivers/cam_cre/cam_cre_hw_mgr/cre_hw",
  31. "drivers/cam_cre/cam_cre_hw_mgr/cre_hw/bus_rd",
  32. "drivers/cam_cre/cam_cre_hw_mgr/cre_hw/bus_wr",
  33. "drivers/cam_cre/cam_cre_hw_mgr/cre_hw/include",
  34. "drivers/cam_cre/cam_cre_hw_mgr/cre_hw/top",
  35. "drivers/cam_cust",
  36. "drivers/cam_cust/cam_custom_hw_mgr",
  37. "drivers/cam_cust/cam_custom_hw_mgr/cam_custom_csid",
  38. "drivers/cam_cust/cam_custom_hw_mgr/cam_custom_hw1",
  39. "drivers/cam_cust/cam_custom_hw_mgr/include",
  40. "drivers/cam_fd",
  41. "drivers/cam_fd/fd_hw_mgr",
  42. "drivers/cam_fd/fd_hw_mgr/fd_hw",
  43. "drivers/cam_icp",
  44. "drivers/cam_icp/fw_inc",
  45. "drivers/cam_icp/icp_hw/bps_hw",
  46. "drivers/cam_icp/icp_hw/icp_hw_mgr",
  47. "drivers/cam_icp/icp_hw/icp_hw_mgr/include",
  48. "drivers/cam_icp/icp_hw/icp_proc",
  49. "drivers/cam_icp/icp_hw/icp_proc/icp_common",
  50. "drivers/cam_icp/icp_hw/icp_proc/icp_v1_hw",
  51. "drivers/cam_icp/icp_hw/icp_proc/icp_v2_hw",
  52. "drivers/cam_icp/icp_hw/include",
  53. "drivers/cam_icp/icp_hw/ipe_hw",
  54. "drivers/cam_icp/icp_hw/ofe_hw",
  55. "drivers/cam_isp",
  56. "drivers/cam_isp/isp_hw_mgr",
  57. "drivers/cam_isp/isp_hw_mgr/hw_utils/include",
  58. "drivers/cam_isp/isp_hw_mgr/hw_utils/irq_controller",
  59. "drivers/cam_isp/isp_hw_mgr/include",
  60. "drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw",
  61. "drivers/cam_isp/isp_hw_mgr/isp_hw/include",
  62. "drivers/cam_isp/isp_hw_mgr/isp_hw/ppi_hw",
  63. "drivers/cam_isp/isp_hw_mgr/isp_hw/sfe_hw",
  64. "drivers/cam_isp/isp_hw_mgr/isp_hw/sfe_hw/sfe_bus",
  65. "drivers/cam_isp/isp_hw_mgr/isp_hw/sfe_hw/sfe_bus/include",
  66. "drivers/cam_isp/isp_hw_mgr/isp_hw/sfe_hw/sfe_top",
  67. "drivers/cam_isp/isp_hw_mgr/isp_hw/tfe_csid_hw",
  68. "drivers/cam_isp/isp_hw_mgr/isp_hw/tfe_hw",
  69. "drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw",
  70. "drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe17x",
  71. "drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_bus",
  72. "drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_bus/include",
  73. "drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_top",
  74. "drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_top/include",
  75. "drivers/cam_jpeg",
  76. "drivers/cam_jpeg/jpeg_hw",
  77. "drivers/cam_jpeg/jpeg_hw/include",
  78. "drivers/cam_jpeg/jpeg_hw/jpeg_dma_hw",
  79. "drivers/cam_jpeg/jpeg_hw/jpeg_enc_hw",
  80. "drivers/cam_lrme",
  81. "drivers/cam_lrme/lrme_hw_mgr",
  82. "drivers/cam_lrme/lrme_hw_mgr/lrme_hw",
  83. "drivers/cam_ope",
  84. "drivers/cam_ope/ope_hw_mgr",
  85. "drivers/cam_ope/ope_hw_mgr/ope_hw",
  86. "drivers/cam_ope/ope_hw_mgr/ope_hw/bus_rd",
  87. "drivers/cam_ope/ope_hw_mgr/ope_hw/bus_wr",
  88. "drivers/cam_ope/ope_hw_mgr/ope_hw/top",
  89. "drivers/cam_presil/inc",
  90. "drivers/cam_req_mgr",
  91. "drivers/cam_sensor_module/cam_actuator",
  92. "drivers/cam_sensor_module/cam_cci",
  93. "drivers/cam_sensor_module/cam_csiphy",
  94. "drivers/cam_sensor_module/cam_csiphy/include",
  95. "drivers/cam_sensor_module/cam_eeprom",
  96. "drivers/cam_sensor_module/cam_flash",
  97. "drivers/cam_sensor_module/cam_ois",
  98. "drivers/cam_sensor_module/cam_res_mgr",
  99. "drivers/cam_sensor_module/cam_sensor",
  100. "drivers/cam_sensor_module/cam_sensor_io",
  101. "drivers/cam_sensor_module/cam_sensor_utils",
  102. "drivers/cam_sensor_module/cam_tpg",
  103. "drivers/cam_sensor_module/cam_tpg/tpg_hw",
  104. "drivers/cam_sensor_module/cam_tpg/tpg_hw/tpg_hw_v_1_0",
  105. "drivers/cam_sensor_module/cam_tpg/tpg_hw/tpg_hw_v_1_2",
  106. "drivers/cam_sensor_module/cam_tpg/tpg_hw/tpg_hw_v_1_3",
  107. "drivers/cam_sensor_module/cam_tpg/tpg_hw/tpg_hw_v_1_4",
  108. "drivers/cam_smmu",
  109. "drivers/cam_sync",
  110. "drivers/cam_utils",
  111. ]
  112. ddk_headers(
  113. name = "camera_src_headers",
  114. hdrs = glob(driver_header_globs),
  115. includes = driver_includes + [
  116. ".",
  117. ],
  118. )
  119. ddk_headers(
  120. name = "camera_headers",
  121. hdrs = [
  122. ":camera_src_headers",
  123. ":camera_uapi_headers",
  124. ],
  125. )
  126. genrule(
  127. name = "camera_banner_header",
  128. srcs = [],
  129. outs = ["cam_generated.h"],
  130. cmd = """
  131. {
  132. printf '#define CAMERA_COMPILE_TIME "%s"\n' "$$(date)"
  133. printf '#define CAMERA_COMPILE_BY "%s"\n' "$$(whoami)"
  134. printf '#define CAMERA_COMPILE_HOST "%s"\n' "$$(uname -n)"
  135. } > "$@"
  136. """
  137. )
  138. ddk_headers(
  139. name = "camera_banner",
  140. hdrs = [":camera_banner_header"],
  141. )
  142. load(":camera_modules.bzl", "define_camera_module")
  143. define_camera_module()