From f04bc56395ddfb4688dd38a7866e61609f44d43e Mon Sep 17 00:00:00 2001 From: Khang Nguyen Date: Wed, 10 Jan 2018 13:43:48 +0700 Subject: rcar-gen3: omx-control: Add a python function to check build vp9dec_lib with M3N vp9dec_lib only supports M3N (SoC: r8a77965), this commit adds a trap to prevent building this library with other SoC, in case of wrong setup, it will cause the error as | ERROR: omx-user-module-1.0-r0 do_vp9_checking: vp9dec_lib only supports M3N (SoC: r8a77965), please disable this feature in your local configuration | ERROR: omx-user-module-1.0-r0 do_vp9_checking: Function failed: do_vp9_checking Signed-off-by: Khang Nguyen Signed-off-by: Takamitsu Honda --- meta-rcar-gen3/include/omx-control.inc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/meta-rcar-gen3/include/omx-control.inc b/meta-rcar-gen3/include/omx-control.inc index caaa994..00b4e80 100644 --- a/meta-rcar-gen3/include/omx-control.inc +++ b/meta-rcar-gen3/include/omx-control.inc @@ -77,6 +77,18 @@ USE_VP8E_OMX = "${@'1' if 'vp8enc_lib' in '${DISTRO_FEATURES}' else '0'}" # USE_VP9D_OMX for OMX Media Component VP9 Decoder Library USE_VP9D_OMX = "${@'1' if 'vp9dec_lib' in '${DISTRO_FEATURES}' else '0'}" +# This function is to make sure vp9dec_lib only build with M3N +python do_vp9_checking() { + soc = d.getVar('SOC_FAMILY') + soc = soc.split(':')[1] + use_vp9d = d.getVar('USE_VP9D_OMX') + if use_vp9d == "1": + if soc != 'r8a77965': + bb.fatal("vp9dec_lib only supports M3N (SoC: r8a77965), please disable this feature in your local configuration") +} + +addtask vp9_checking before do_configure after do_patch + # OMX Video Decoder Flag list LIST_OMX_VIDEO_DEC_FLAG = " \ ${USE_H263D_OMX} \ -- cgit 1.2.3-korg