diff --git a/recipes-openharmony/openharmony/openharmony-standard-3.0/display-Mock-interface-for-standard-system.patch b/recipes-openharmony/openharmony/openharmony-standard-3.0/display-Mock-interface-for-standard-system.patch deleted file mode 100644 index 1330103a0405babb4d60f073e3e4fb16a8fc3874..0000000000000000000000000000000000000000 --- a/recipes-openharmony/openharmony/openharmony-standard-3.0/display-Mock-interface-for-standard-system.patch +++ /dev/null @@ -1,142 +0,0 @@ -# SPDX-FileCopyrightText: Huawei Inc. -# -# SPDX-License-Identifier: Apache-2.0 - -diff --git a/drivers/peripheral/display/hal/BUILD.gn b/drivers/peripheral/display/hal/BUILD.gn -index a232730b..3e374d56 100644 ---- a/drivers/peripheral/display/hal/BUILD.gn -+++ b/drivers/peripheral/display/hal/BUILD.gn -@@ -15,6 +15,77 @@ if (defined(ohos_lite)) { - group("hdi_display") { - public_deps = [ "//device/${device_company}/hardware/display:hdi_display" ] - } -+} else if (true) { -+ import("//build/ohos.gni") -+ -+ config("display_hdi_public_config") { -+ visibility = [ ":*" ] -+ include_dirs = [ -+ "//drivers/peripheral/base", -+ "//drivers/peripheral/display/interfaces/include", -+ "//drivers/peripheral/display/hal", -+ "//drivers/framework/include/utils", -+ "//drivers/adapter/uhdf2/osal/include", -+ "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", -+ "//third_party/bounds_checking_function/include", -+ ] -+ } -+ -+ group("hdi_display") { -+ deps = [ -+ ":hdi_display_device", -+ ":hdi_display_gfx", -+ ":hdi_display_gralloc", -+ ":hdi_display_layer", -+ ] -+ } -+ -+ ohos_shared_library("hdi_display_device") { -+ sources = [ -+ "//drivers/peripheral/display/hal/default/standard_system/display_device.c", -+ ] -+ public_configs = [ ":display_hdi_public_config" ] -+ subsystem_name = "hdf" -+ part_name = "mocks" -+ } -+ -+ ohos_shared_library("hdi_display_layer") { -+ sources = [ -+ "//device/qemu/hardware/display/display_layer.c", -+ ] -+ deps = [ -+ "//third_party/bounds_checking_function:libsec_static", -+ "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog" -+ ] -+ public_configs = [ ":display_hdi_public_config" ] -+ subsystem_name = "hdf" -+ part_name = "mocks" -+ } -+ -+ ohos_shared_library("hdi_display_gfx") { -+ sources = [ -+ "//device/qemu/hardware/display/display_gfx.c", -+ ] -+ deps = [ -+ "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog" -+ ] -+ public_configs = [ ":display_hdi_public_config" ] -+ subsystem_name = "hdf" -+ part_name = "mocks" -+ } -+ -+ ohos_shared_library("hdi_display_gralloc") { -+ sources = [ -+ "//device/qemu/hardware/display/display_gralloc.c", -+ ] -+ deps = [ -+ "//third_party/bounds_checking_function:libsec_static", -+ "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog" -+ ] -+ public_configs = [ ":display_hdi_public_config" ] -+ subsystem_name = "hdf" -+ part_name = "mocks" -+ } - } else { - config("display_hdi_public_config") { - visibility = [ ":*" ] -diff --git a/drivers/adapter/uhdf2/ohos.build b/drivers/adapter/uhdf2/ohos.build -index f56e333..f897f4b 100644 ---- a/drivers/adapter/uhdf2/ohos.build -+++ b/drivers/adapter/uhdf2/ohos.build -@@ -6,43 +6,16 @@ - "//drivers/adapter/uhdf2/osal:libhdf_utils", - "//drivers/adapter/uhdf2/ipc:libhdf_ipc_adapter", - "//drivers/adapter/uhdf2/hdi:libhdi", -- "//drivers/adapter/uhdf2/manager:hdf_devmgr", -- "//drivers/adapter/uhdf2/manager:hdf_devmgr.rc", -- "//drivers/adapter/uhdf2/host:hdf_devhost", -- "//drivers/adapter/uhdf2/host:libhdf_host", -- "//drivers/adapter/uhdf2/config:libhdf_hcs", -- "//drivers/adapter/uhdf2/host/test/unittest/sample_driver:libsample_driver", -- "//drivers/adapter/uhdf2/hcs:hdf_default.hcb", -- "//drivers/peripheral/input/hal:hdi_input", -- "//drivers/peripheral/display/hal:hdi_display", -- "//drivers/peripheral/wlan/client:wifi_driver_client", -- "//drivers/peripheral/wlan/hal:wifi_hal", -- "//drivers/peripheral/base:hdf_peripheral.rc", -- "//drivers/peripheral/sensor/hal:hdi_sensor", -- "//device/hisilicon/drivers/firmware/common/wlan:wifi_firmware", -- "//drivers/peripheral/wlan/hdi_service:wifi_hdi_device", -- "//drivers/peripheral/wlan/hdi_service:wifi_hdi_c_device", -- "//drivers/peripheral/audio:hdi_audio", -- "//drivers/peripheral/audio:audio_sample_client", -- "//drivers/peripheral/usb:libusb_ddk", -- "//drivers/peripheral/camera/hal:camera_hal", -- "//drivers/peripheral/misc/vibrator/hal:hdi_vibrator", -- "//drivers/peripheral/input/udriver:libhdf_input_hotplug", -- "//drivers/peripheral/codec/hdi_service:codec_client", -- "//drivers/peripheral/codec/hdi_service:codec_service" -+ "//drivers/peripheral/display/interfaces/hdi_cpp/client:display_client", -+ "//drivers/peripheral/camera/interfaces/include/client:libcamera_client" - ], - "test_list": [ -- "//drivers/peripheral/wlan/test:hdf_test_wifi", -- "//drivers/peripheral/sensor/test:hdf_test_sensor", -- "//drivers/adapter/uhdf2/test:hdf_test_uhdf", -- "//drivers/adapter/uhdf2/osal/test:unittest", -- "//drivers/adapter/uhdf2/host/test:unittest", -- "//drivers/adapter/uhdf2/hdi/test:unittest", -- "//drivers/peripheral/misc/vibrator/test:hdf_test_vibrator", -- "//drivers/peripheral/wlan/test/hdi_service:unittest", -- "//drivers/peripheral/audio/test/systemtest:systemtest", -- "//drivers/peripheral/usb/test:hdf_test_usb", -- "//drivers/peripheral/audio/test:hdf_test_audio" -+ "//drivers/adapter/uhdf2/osal/test:unittest" -+ ] -+ }, -+ "mocks": { -+ "module_list": [ -+ "//drivers/peripheral/display/hal:hdi_display" - ] - } - } diff --git a/recipes-openharmony/openharmony/openharmony-standard-3.0/display-Use-temporary-qemuarm-implementation.patch b/recipes-openharmony/openharmony/openharmony-standard-3.0/display-Use-temporary-qemuarm-implementation.patch new file mode 100644 index 0000000000000000000000000000000000000000..dafc1138d088b01d6ba6b6ca8ceea721cf49d420 --- /dev/null +++ b/recipes-openharmony/openharmony/openharmony-standard-3.0/display-Use-temporary-qemuarm-implementation.patch @@ -0,0 +1,73 @@ +# SPDX-FileCopyrightText: Huawei Inc. +# +# SPDX-License-Identifier: Apache-2.0 + +display: Use temporary qemuarm implementation + +OpenHarmony 3.0 requires two display components: + +- hdi_display_device +- hdi_display_gralloc + +none of which is available for qemuarm standard system. Therefore we have to +provide mock implementation of non-essential hdi_display_device and a proper +implementation of hdi_display_gralloc without which OpenHarmony graphic stack +will not work. + +Signed-off-by: Robert Drab <robert.drab@huawei.com> +Upstream-Status: Inappropriate + +diff --git a/display/hal/BUILD.gn b/display/hal/BUILD.gn +index a232730b..80f03706 100644 +--- a/display/hal/BUILD.gn ++++ b/display/hal/BUILD.gn +@@ -11,10 +11,49 @@ + # See the License for the specific language governing permissions and + # limitations under the License. + ++import("//build/ohos.gni") ++ + if (defined(ohos_lite)) { + group("hdi_display") { + public_deps = [ "//device/${device_company}/hardware/display:hdi_display" ] + } ++} else if (product_name == "yocto-ohos-qemuarm") { ++ config("display_hdi_public_config") { ++ visibility = [ ":*" ] ++ include_dirs = [ ++ "//drivers/peripheral/base", ++ "//drivers/peripheral/display/interfaces/include", ++ "//drivers/peripheral/display/hal", ++ "//drivers/framework/include/utils", ++ "//drivers/adapter/uhdf2/osal/include", ++ "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", ++ "//third_party/bounds_checking_function/include", ++ ] ++ } ++ ++ group("hdi_display") { ++ deps = [ ++ ":hdi_display_device", ++ ":hdi_display_gralloc", ++ ] ++ public_configs = [ ":display_hdi_public_config" ] ++ } ++ ++ ohos_shared_library("hdi_display_device") { ++ sources = [ ++ "//drivers/peripheral/display/hal/default/standard_system/display_device.c", ++ ] ++ public_configs = [ ":display_hdi_public_config" ] ++ subsystem_name = "hdf" ++ part_name = "display_device_driver" ++ } ++ ++ group("hdi_display_gralloc") { ++ deps = [ ++ "//device/hihope/hardware/display:display_gralloc" ++ ] ++ public_configs = [ ":display_hdi_public_config" ] ++ } + } else { + config("display_hdi_public_config") { + visibility = [ ":*" ] diff --git a/recipes-openharmony/openharmony/openharmony-standard-3.0/display_gralloc_gbm.c-Use-card-drm-node.patch b/recipes-openharmony/openharmony/openharmony-standard-3.0/display_gralloc_gbm.c-Use-card-drm-node.patch new file mode 100644 index 0000000000000000000000000000000000000000..9adf845c464a61c25626e2fa0fb62687aac368ea --- /dev/null +++ b/recipes-openharmony/openharmony/openharmony-standard-3.0/display_gralloc_gbm.c-Use-card-drm-node.patch @@ -0,0 +1,28 @@ +# SPDX-FileCopyrightText: Huawei Inc. +# +# SPDX-License-Identifier: Apache-2.0 + +display_gralloc_gbm.c: Use card drm node + +DRM_IOCTL_MODE_CREATE_DUMB ioctl is not allowed for render nodes. + +This patch is applied to //device/hihope directory containing Apache-2.0 +licensed HiHope gralloc implementation. This directory is a part of the +OpenHarmony 3.1 device_board_hihope.git repository. + +Signed-off-by: Robert Drab <robert.drab@huawei.com> +Upstream-Status: Inappropriate + +diff --git a/hardware/display/src/display_gralloc/display_gralloc_gbm.c b/hardware/display/src/display_gralloc/display_gralloc_gbm.c +index 2dad8c1..1445819 100644 +--- a/hardware/display/src/display_gralloc/display_gralloc_gbm.c ++++ b/hardware/display/src/display_gralloc/display_gralloc_gbm.c +@@ -34,7 +34,7 @@ + #include "display_gralloc_private.h" + #include "display_common.h" + +-const char *g_drmFileNode = "/dev/dri/renderD128"; ++const char *g_drmFileNode = "/dev/dri/card0"; + static GrallocManager *g_grallocManager = NULL; + static pthread_mutex_t g_lock; + diff --git a/recipes-openharmony/openharmony/openharmony-standard-3.0/hihope-gralloc-Backport-to-3.0.patch b/recipes-openharmony/openharmony/openharmony-standard-3.0/hihope-gralloc-Backport-to-3.0.patch new file mode 100644 index 0000000000000000000000000000000000000000..04de7729cfb6be1d2c7cab80d92e7eb631e279b0 --- /dev/null +++ b/recipes-openharmony/openharmony/openharmony-standard-3.0/hihope-gralloc-Backport-to-3.0.patch @@ -0,0 +1,210 @@ +# SPDX-FileCopyrightText: Huawei Inc. +# +# SPDX-License-Identifier: Apache-2.0 + +Backport just the gralloc implementation to 3.0 from the HiHope 3.1 repository. + +Signed-off-by: Robert Drab <robert.drab@huawei.com> +Upstream-Status: Inappropriate + +diff --git a/hardware/display/BUILD.gn b/hardware/display/BUILD.gn +index f403896..e9adb4f 100644 +--- a/hardware/display/BUILD.gn ++++ b/hardware/display/BUILD.gn +@@ -13,13 +13,17 @@ + + import("//build/ohos.gni") + +-group("display_group") { +- deps = [ +- ":display_device", +- ":display_gfx", +- ":display_gralloc", +- ":higbm", +- ] ++#group("display_group") { ++# deps = [ ++# ":display_device", ++# ":display_gfx", ++# ":display_gralloc", ++# ":higbm", ++# ] ++#} ++ ++declare_args() { ++ chipset_base_dir = "system" + } + + ohos_static_library("higbm") { +@@ -79,87 +83,87 @@ + part_name = "display_device_driver" + } + +-ohos_shared_library("display_gfx") { +- sources = [ "src/display_gfx/display_gfx.c" ] +- include_dirs = [ +- "include", +- "//drivers/peripheral/display/interfaces/include", +- "//drivers/peripheral/base", +- "//drivers/framework/include/utils", +- "//drivers/adapter/uhdf2/adapter/osal/include/", +- "//utils/native/base/include", +- "//foundation/graphic/standard/utils/include", +- "//device/hihope/hardware/rga/include/", +- "//base/hiviewdfx/interfaces/innerkits/libhilog/include", +- ] +- output_name = "display_gfx" +- cflags = [ "-Wno-macro-redefined" ] +- deps = [ +- ":display_gralloc", +- "//device/hihope/hardware/rga:librga", +- "//utils/native/base:utils", +- ] +- +- external_deps = [ "hiviewdfx_hilog_native:libhilog" ] +- +- install_enable = true +- install_images = [ chipset_base_dir ] +- subsystem_name = "hdf" +- part_name = "display_device_driver" +-} +- +-ohos_shared_library("display_device") { +- sources = [ +- "src/display_device/drm_connector.cpp", +- "src/display_device/drm_crtc.cpp", +- "src/display_device/drm_device.cpp", +- "src/display_device/drm_display.cpp", +- "src/display_device/drm_encoder.cpp", +- "src/display_device/drm_plane.cpp", +- "src/display_device/drm_vsync_worker.cpp", +- "src/display_device/hdi_composer.cpp", +- "src/display_device/hdi_device_interface.cpp", +- "src/display_device/hdi_display.cpp", +- "src/display_device/hdi_drm_composition.cpp", +- "src/display_device/hdi_drm_layer.cpp", +- "src/display_device/hdi_gfx_composition.cpp", +- "src/display_device/hdi_layer.cpp", +- "src/display_device/hdi_netlink_monitor.cpp", +- "src/display_device/hdi_session.cpp", +- ] +- output_name = "display_device" +- include_dirs = [ +- "src/display_device", +- "include", +- "//drivers/peripheral/display/interfaces/include", +- "//drivers/peripheral/base", +- "//drivers/framework/include/utils", +- "//drivers/adapter/uhdf2/osal/include", +- "//utils/native/base/include", +- "//foundation/graphic/standard/utils/include", +- "//foundation/graphic/standard/prebuilts/librarys/drm/include", +- "//base/hiviewdfx/interfaces/innerkits/libhilog/include", +- ] +- deps = [ +- ":display_gfx", +- ":display_gralloc", +- "//third_party/libdrm:libdrm", +- "//utils/native/base:utils", +- ] +- cflags = [ "-Wno-unused-function" ] +- external_deps = [ "hiviewdfx_hilog_native:libhilog" ] +- +- install_enable = true +- install_images = [ chipset_base_dir ] +- subsystem_name = "hdf" +- part_name = "display_device_driver" +-} +- +-group("display_layer") { +- deps = [ +- ":display_device", +- ":display_gfx", +- ":display_gralloc", +- ":higbm", +- ] +-} ++#ohos_shared_library("display_gfx") { ++# sources = [ "src/display_gfx/display_gfx.c" ] ++# include_dirs = [ ++# "include", ++# "//drivers/peripheral/display/interfaces/include", ++# "//drivers/peripheral/base", ++# "//drivers/framework/include/utils", ++# "//drivers/adapter/uhdf2/adapter/osal/include/", ++# "//utils/native/base/include", ++# "//foundation/graphic/standard/utils/include", ++# "//device/hihope/hardware/rga/include/", ++# "//base/hiviewdfx/interfaces/innerkits/libhilog/include", ++# ] ++# output_name = "display_gfx" ++# cflags = [ "-Wno-macro-redefined" ] ++# deps = [ ++# ":display_gralloc", ++# "//device/hihope/hardware/rga:librga", ++# "//utils/native/base:utils", ++# ] ++# ++# external_deps = [ "hiviewdfx_hilog_native:libhilog" ] ++# ++# install_enable = true ++# install_images = [ chipset_base_dir ] ++# subsystem_name = "hdf" ++# part_name = "display_device_driver" ++#} ++ ++#ohos_shared_library("display_device") { ++# sources = [ ++# "src/display_device/drm_connector.cpp", ++# "src/display_device/drm_crtc.cpp", ++# "src/display_device/drm_device.cpp", ++# "src/display_device/drm_display.cpp", ++# "src/display_device/drm_encoder.cpp", ++# "src/display_device/drm_plane.cpp", ++# "src/display_device/drm_vsync_worker.cpp", ++# "src/display_device/hdi_composer.cpp", ++# "src/display_device/hdi_device_interface.cpp", ++# "src/display_device/hdi_display.cpp", ++# "src/display_device/hdi_drm_composition.cpp", ++# "src/display_device/hdi_drm_layer.cpp", ++# "src/display_device/hdi_gfx_composition.cpp", ++# "src/display_device/hdi_layer.cpp", ++# "src/display_device/hdi_netlink_monitor.cpp", ++# "src/display_device/hdi_session.cpp", ++# ] ++# output_name = "display_device" ++# include_dirs = [ ++# "src/display_device", ++# "include", ++# "//drivers/peripheral/display/interfaces/include", ++# "//drivers/peripheral/base", ++# "//drivers/framework/include/utils", ++# "//drivers/adapter/uhdf2/osal/include", ++# "//utils/native/base/include", ++# "//foundation/graphic/standard/utils/include", ++# "//foundation/graphic/standard/prebuilts/librarys/drm/include", ++# "//base/hiviewdfx/interfaces/innerkits/libhilog/include", ++# ] ++# deps = [ ++# ":display_gfx", ++# ":display_gralloc", ++# "//third_party/libdrm:libdrm", ++# "//utils/native/base:utils", ++# ] ++# cflags = [ "-Wno-unused-function" ] ++# external_deps = [ "hiviewdfx_hilog_native:libhilog" ] ++# ++# install_enable = true ++# install_images = [ chipset_base_dir ] ++# subsystem_name = "hdf" ++# part_name = "display_device_driver" ++#} ++ ++#group("display_layer") { ++# deps = [ ++# ":display_device", ++# ":display_gfx", ++# ":display_gralloc", ++# ":higbm", ++# ] ++#} diff --git a/recipes-openharmony/openharmony/openharmony-standard-3.0/peripherals-Limit-drivers-list-to-supported-by-the-qemuarm.patch b/recipes-openharmony/openharmony/openharmony-standard-3.0/peripherals-Limit-drivers-list-to-supported-by-the-qemuarm.patch new file mode 100644 index 0000000000000000000000000000000000000000..056b353038beb21fa784ddfe3c05084d2e697faa --- /dev/null +++ b/recipes-openharmony/openharmony/openharmony-standard-3.0/peripherals-Limit-drivers-list-to-supported-by-the-qemuarm.patch @@ -0,0 +1,66 @@ +# SPDX-FileCopyrightText: Huawei Inc. +# +# SPDX-License-Identifier: Apache-2.0 + +peripherals: Limit list to supported by the qemuarm + +Signed-off-by: Robert Drab <robert.drab@huawei.com> +Upstream-Status: Inappropriate + +diff --git a/uhdf2/ohos.build b/uhdf2/ohos.build +index f56e333..38db541 100644 +--- a/uhdf2/ohos.build ++++ b/uhdf2/ohos.build +@@ -6,43 +6,17 @@ + "//drivers/adapter/uhdf2/osal:libhdf_utils", + "//drivers/adapter/uhdf2/ipc:libhdf_ipc_adapter", + "//drivers/adapter/uhdf2/hdi:libhdi", +- "//drivers/adapter/uhdf2/manager:hdf_devmgr", +- "//drivers/adapter/uhdf2/manager:hdf_devmgr.rc", +- "//drivers/adapter/uhdf2/host:hdf_devhost", +- "//drivers/adapter/uhdf2/host:libhdf_host", +- "//drivers/adapter/uhdf2/config:libhdf_hcs", +- "//drivers/adapter/uhdf2/host/test/unittest/sample_driver:libsample_driver", +- "//drivers/adapter/uhdf2/hcs:hdf_default.hcb", +- "//drivers/peripheral/input/hal:hdi_input", +- "//drivers/peripheral/display/hal:hdi_display", +- "//drivers/peripheral/wlan/client:wifi_driver_client", +- "//drivers/peripheral/wlan/hal:wifi_hal", +- "//drivers/peripheral/base:hdf_peripheral.rc", +- "//drivers/peripheral/sensor/hal:hdi_sensor", +- "//device/hisilicon/drivers/firmware/common/wlan:wifi_firmware", +- "//drivers/peripheral/wlan/hdi_service:wifi_hdi_device", +- "//drivers/peripheral/wlan/hdi_service:wifi_hdi_c_device", +- "//drivers/peripheral/audio:hdi_audio", +- "//drivers/peripheral/audio:audio_sample_client", +- "//drivers/peripheral/usb:libusb_ddk", +- "//drivers/peripheral/camera/hal:camera_hal", +- "//drivers/peripheral/misc/vibrator/hal:hdi_vibrator", +- "//drivers/peripheral/input/udriver:libhdf_input_hotplug", +- "//drivers/peripheral/codec/hdi_service:codec_client", +- "//drivers/peripheral/codec/hdi_service:codec_service" ++ "//drivers/peripheral/display/interfaces/hdi_cpp/client:display_client", ++ "//drivers/peripheral/camera/interfaces/include/client:libcamera_client" + ], + "test_list": [ +- "//drivers/peripheral/wlan/test:hdf_test_wifi", +- "//drivers/peripheral/sensor/test:hdf_test_sensor", +- "//drivers/adapter/uhdf2/test:hdf_test_uhdf", +- "//drivers/adapter/uhdf2/osal/test:unittest", +- "//drivers/adapter/uhdf2/host/test:unittest", +- "//drivers/adapter/uhdf2/hdi/test:unittest", +- "//drivers/peripheral/misc/vibrator/test:hdf_test_vibrator", +- "//drivers/peripheral/wlan/test/hdi_service:unittest", +- "//drivers/peripheral/audio/test/systemtest:systemtest", +- "//drivers/peripheral/usb/test:hdf_test_usb", +- "//drivers/peripheral/audio/test:hdf_test_audio" ++ "//drivers/adapter/uhdf2/osal/test:unittest" ++ ] ++ }, ++ "display_device_driver": { ++ "module_list": [ ++ "//drivers/peripheral/display/hal:hdi_display", ++ "//device/hihope/hardware/display:display_gralloc" + ] + } + } diff --git a/recipes-openharmony/openharmony/openharmony-standard-sources-3.0.inc b/recipes-openharmony/openharmony/openharmony-standard-sources-3.0.inc index 53b2bf47637292c6e6b09ff43678baa832054354..ae0c2c8f85271f418b6c16dc5c2136b939f55bfe 100644 --- a/recipes-openharmony/openharmony/openharmony-standard-sources-3.0.inc +++ b/recipes-openharmony/openharmony/openharmony-standard-sources-3.0.inc @@ -65,6 +65,15 @@ SRC_URI += "${GITEE_URL}/developtools_profiler.git;protocol=https;branch=OpenHar SRC_URI += "${GITEE_URL}/device_qemu.git;protocol=https;branch=OpenHarmony-3.0-LTS;rev=00bf590c9d04ee5af641ccff7e8a02eb6ff727e0;destsuffix=${OH_SRCDIR}/device/qemu" SRC_URI += "${GITEE_URL}/drivers_adapter.git;protocol=https;branch=OpenHarmony-3.0-LTS;rev=9f6cd92cfa61cae193328e53577899f51d5b5fca;destsuffix=${OH_SRCDIR}/drivers/adapter" +# TODO: This should be removed whenever upstream OpenHarmony provides qemu +# compatible gralloc implementation. Currently we have to use OpenHarmony 3.1 +# HiHope implementation from a repository that contains, alongside required +# sources, binaries that we do not want. Therefore it is cloned to temporary +# repository, from which only necessary files will be copied to the OH_SRCDIR +# and the rest will be removed in the do_unpack stage postfunc. +OH_GRALLOC_TMP_DIR = "tmp_hihope" +SRC_URI += "${GITEE_URL}/device_board_hihope.git;protocol=https;branch=OpenHarmony-3.1-Release;rev=baab11f2692d9ddbebf8790a5e4a0edd48bdb9bf;destsuffix=${OH_GRALLOC_TMP_DIR}" + # The 2 next repositories are set to different revisions from the ones # they are set to in the official release of OpenHarmony 3.0-LTS. # These revisions are known to boot the Linux kernel on the HiSpark AI @@ -225,6 +234,22 @@ create_symlinks() { fi } +# TODO: This should be removed whenever upstream OpenHarmony provides qemu +# compatible gralloc implementation. +# Cherry-pick display directory containing required gralloc implementation +# out of hihope board repository and remove the rest +cherry_pick_sources() { + if [ ! -d "${WORKDIR}/${OH_GRALLOC_TMP_DIR}" ]; then + bbfatal "OH_GRALLOC_TMP_DIR (${WORKDIR}/${OH_GRALLOC_TMP_DIR}) not found!" + fi + + TARGET_DIR="${WORKDIR}/${OH_SRCDIR}/device/hihope/hardware/" + install -d "${TARGET_DIR}" + cp -R "${WORKDIR}/${OH_GRALLOC_TMP_DIR}/hardware/display" "${TARGET_DIR}" + rm -r "${WORKDIR}/${OH_GRALLOC_TMP_DIR}" +} + do_unpack[postfuncs] += "create_symlinks" +do_unpack[postfuncs] += "cherry_pick_sources" require oniro-prebuilts.inc diff --git a/recipes-openharmony/openharmony/openharmony-standard_3.0.bb b/recipes-openharmony/openharmony/openharmony-standard_3.0.bb index 64d987d026343348fff6901e45f2abb3b21eedcf..508b91d653e403110bc5ac521053dc0f545b9c0f 100644 --- a/recipes-openharmony/openharmony/openharmony-standard_3.0.bb +++ b/recipes-openharmony/openharmony/openharmony-standard_3.0.bb @@ -54,8 +54,12 @@ SRC_URI += "file://hdc-build-system-files.patch;patchdir=${S}/developtools/hdc_s SRC_URI += "file://vendor-qemu-uhdf-files.patch;patchdir=${S}/drivers/peripheral" SRC_URI += "git://gitlab.eclipse.org/eclipse/oniro-core/openharmony-vendor-oniro.git;protocol=https;branch=main;rev=c7f69115d7af1a37f81bd4fc0462100d0aa87c2d;destsuffix=${S}/vendor/oniro" -SRC_URI += "file://display-Mock-interface-for-standard-system.patch" +SRC_URI += "file://peripherals-Limit-drivers-list-to-supported-by-the-qemuarm.patch;patchdir=${S}/drivers/adapter" SRC_URI += "file://display_device.c;subdir=${S}/drivers/peripheral/display/hal/default/standard_system" +SRC_URI += "file://display-Use-temporary-qemuarm-implementation.patch;patchdir=${S}/drivers/peripheral" +SRC_URI += "file://display_gralloc_gbm.c-Use-card-drm-node.patch;patchdir=${S}/device/hihope" +SRC_URI += "file://hihope-gralloc-Backport-to-3.0.patch;patchdir=${S}/device/hihope" + inherit python3native gn_base ptest @@ -265,7 +269,7 @@ generate_parts_json() { "global:resmgr_standard", "graphic:graphic_standard", "hdf:hdf", - "hdf:mocks", + "hdf:display_device_driver", "hiviewdfx:faultloggerd", "hiviewdfx:hilog", "hiviewdfx:hilog_native",