From f78708e8e23babea04cd6ebb15c4b15fd5c0e381 Mon Sep 17 00:00:00 2001 From: Paddy Chiu Date: Sun, 13 Sep 2026 20:11:52 -0700 Subject: [PATCH] qps615-dlkm: fix devtool build directory and package version When using devtool, externalsrc defaults B to a separate work directory, but the driver Makefile is located under drivers/net/ethernet/toshiba/tc956x. Set EXTERNALSRC_BUILD to use the correct directory. externalsrc also removes the Git URI from SRC_URI, causing PKGV to remain 6.0.3+git instead of the normal 6.0.3+git0+. Align PKGV for devtool builds with regular builds to prevent buildhistory package-version QA failures. Signed-off-by: Paddy Chiu --- .../qps615-module/qps615-dlkm_git.bb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/recipes-kernel/qps615-module/qps615-dlkm_git.bb b/recipes-kernel/qps615-module/qps615-dlkm_git.bb index d6f750d9c..2d5672523 100644 --- a/recipes-kernel/qps615-module/qps615-dlkm_git.bb +++ b/recipes-kernel/qps615-module/qps615-dlkm_git.bb @@ -11,10 +11,29 @@ SRCREV = "2cbd7b9ddf2318d58044dcbd57dc187dfca55034" SRC_URI = "git://github.com/qualcomm-linux/TC9564_Host_Driver.git;protocol=https;branch=qcom" +QPS615_ORIGINAL_SRC_URI := "${SRC_URI}" + +def qps615_pkgv_suffix(d): + import bb.fetch + + data = d.createCopy() + data.setVar("SRC_URI", d.getVar("QPS615_ORIGINAL_SRC_URI")) + return bb.fetch.get_pkgv_string(data) + PV = "6.0.3+git" +# externalsrc removes the Git URI from SRC_URI, so package_setup_pkgv() cannot +# append the normal SCM revision suffix. Reuse BitBake's own revision formatter +# so devtool package versions match versions from the regular fetch/build path. +QPS615_PKGREV = "${@qps615_pkgv_suffix(d)}" +PKGV = "${@d.getVar('PV') + d.getVar('QPS615_PKGREV') if d.getVar('EXTERNALSRC') else d.getVar('PV')}" + B = "${S}/drivers/net/ethernet/toshiba/tc956x" +# devtool/externalsrc replaces B with a separate work directory unless the +# out-of-tree build directory is explicitly provided. +EXTERNALSRC_BUILD = "${EXTERNALSRC}/drivers/net/ethernet/toshiba/tc956x" + # The original Makefile uses an "ifeq ($(pf), 1)" check to pick the default config. # Therefore, pf=1 needs to be set while compiling for non-SRIOV VF config. EXTRA_OEMAKE += "KCFLAGS='-DTC956X -DCONFIG_TC956X_PLATFORM_SUPPORT -DTC956X_SRIOV_PF' pf=1"