From 346197c11b74b17974d8b260ac83f1d7d170e79b Mon Sep 17 00:00:00 2001 From: Cristinel Panfir Date: Tue, 20 Oct 2020 14:20:24 +0300 Subject: [PATCH] imx-test: Upgrade recipe to imx_5.4.47_2.2.0 branch - Drop the mxc_v4l2_test patch - the compilation error fix is included in the source code - Add pxp_test patch to fix format-security error Signed-off-by: Cristinel Panfir --- ...x-compilation-error-produced-by-gcc9.patch | 39 ------------------- ...1-pxp-test-Fix-format-security-error.patch | 32 +++++++++++++++ recipes-bsp/imx-test/imx-test_git.bb | 9 ++--- 3 files changed, 35 insertions(+), 45 deletions(-) delete mode 100644 recipes-bsp/imx-test/imx-test/0001-mxc_v4l2_test-fix-compilation-error-produced-by-gcc9.patch create mode 100644 recipes-bsp/imx-test/imx-test/0001-pxp-test-Fix-format-security-error.patch diff --git a/recipes-bsp/imx-test/imx-test/0001-mxc_v4l2_test-fix-compilation-error-produced-by-gcc9.patch b/recipes-bsp/imx-test/imx-test/0001-mxc_v4l2_test-fix-compilation-error-produced-by-gcc9.patch deleted file mode 100644 index 3fb9d4ef..00000000 --- a/recipes-bsp/imx-test/imx-test/0001-mxc_v4l2_test-fix-compilation-error-produced-by-gcc9.patch +++ /dev/null @@ -1,39 +0,0 @@ -From d2e35983281a811b38e540ab82e7643322e84aab Mon Sep 17 00:00:00 2001 -From: Andrey Zhizhikin -Date: Wed, 4 Dec 2019 14:17:50 +0000 -Subject: [PATCH] mxc_v4l2_test: fix compilation error produced by gcc9 - -Fix trivial compilation error when GCC9 is used: - -error: call to '__open_missing_mode' declared with attribute error: open -with O_CREAT or O_TMPFILE in second argument needs 3 arguments - -This is now caused by not explicitly supplying the mode when O_CREAT is -used as disposition. - -Upstream-Status: Pending - -Signed-off-by: Andrey Zhizhikin ---- - test/mxc_v4l2_test/mx8_v4l2_cap_drm.c | 4 ---- - 1 file changed, 4 deletions(-) - -diff --git a/test/mxc_v4l2_test/mx8_v4l2_cap_drm.c b/test/mxc_v4l2_test/mx8_v4l2_cap_drm.c -index 6e10744..d63b2db 100644 ---- a/test/mxc_v4l2_test/mx8_v4l2_cap_drm.c -+++ b/test/mxc_v4l2_test/mx8_v4l2_cap_drm.c -@@ -561,11 +561,7 @@ static int open_save_file(struct video_channel *video_ch) - - for (i = 0; i < NUM_SENSORS; i++) { - if ((g_cam >> i) & 0x01) { --#ifdef BUILD_FOR_ANDROID - fd = open(video_ch[i].save_file_name, O_RDWR | O_CREAT, 0660); --#else -- fd = open(video_ch[i].save_file_name, O_RDWR | O_CREAT); --#endif - if (fd < 0) { - v4l2_err("Channel[%d] unable to create recording file\n", i); - while (i) --- -2.17.1 - diff --git a/recipes-bsp/imx-test/imx-test/0001-pxp-test-Fix-format-security-error.patch b/recipes-bsp/imx-test/imx-test/0001-pxp-test-Fix-format-security-error.patch new file mode 100644 index 00000000..1fe997d7 --- /dev/null +++ b/recipes-bsp/imx-test/imx-test/0001-pxp-test-Fix-format-security-error.patch @@ -0,0 +1,32 @@ +From 97a55fe4b1e02b9a4992517234a8b24f8f9f0009 Mon Sep 17 00:00:00 2001 +From: "i.MX Yocto Project Build" +Date: Mon, 27 Jan 2020 13:43:47 -0600 +Subject: [PATCH] pxp test: Fix format-security error + +| pxp_lib_test/pxp_test.c: In function 'main': +| pxp_lib_test/pxp_test.c:541:2: error: format not a string literal and no format arguments [-Werror=format-security] +| 541 | printf(usage); +| | ^~~~~~ + +Upstream-Status: Pending + +Signed-off-by: Tom Hochstein +--- + test/pxp_lib_test/pxp_test.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/pxp_lib_test/pxp_test.c b/test/pxp_lib_test/pxp_test.c +index 107198f..72c984d 100644 +--- a/test/pxp_lib_test/pxp_test.c ++++ b/test/pxp_lib_test/pxp_test.c +@@ -538,6 +538,6 @@ int main(int argc, char *argv[]) + + return 0; + usage: +- printf(usage); ++ printf("%s", usage); + return -1; + } +-- +2.17.1 + diff --git a/recipes-bsp/imx-test/imx-test_git.bb b/recipes-bsp/imx-test/imx-test_git.bb index 61f5e9d4..b9c12e18 100644 --- a/recipes-bsp/imx-test/imx-test_git.bb +++ b/recipes-bsp/imx-test/imx-test_git.bb @@ -16,13 +16,13 @@ DEPENDS_append_imxvpu = " virtual/imxvpu" PE = "1" PV = "7.0+${SRCPV}" -SRCBRANCH = "lf-5.4.y" +SRCBRANCH = "imx_5.4.47_2.2.0" SRC_URI = " \ git://source.codeaurora.org/external/imx/imx-test.git;protocol=https;branch=${SRCBRANCH} \ - file://0001-mxc_v4l2_test-fix-compilation-error-produced-by-gcc9.patch \ + file://0001-pxp-test-Fix-format-security-error.patch \ file://memtool_profile \ " -SRCREV = "6d20e84f2dbe5940fe6d629c2839e1390994ee1f" +SRCREV = "31623a4972bf6f2f4239b4667aeb33baba07a3c8" S = "${WORKDIR}/git" inherit module-base use-imx-headers @@ -49,9 +49,6 @@ PACKAGECONFIG_append_imxvpu = " vpu" PACKAGECONFIG[x11] = ",,libx11 libxdamage libxrender libxrandr" PACKAGECONFIG[vpu] = "HAS_VPU=true,HAS_VPU=false,virtual/imxvpu" -# FIXME: Fail to build due to misuse of printf -SECURITY_STRINGFORMAT = "" - do_compile() { CFLAGS="${TOOLCHAIN_OPTIONS}" oe_runmake V=1 VERBOSE='' \ -- 2.40.1