Skip to content

qps615-dlkm: fix devtool build directory and package version - #3163

Open
paddy-chiu wants to merge 1 commit into
qualcomm-linux:masterfrom
paddy-chiu:master
Open

paddy-chiu wants to merge 1 commit into
qualcomm-linux:masterfrom
paddy-chiu:master

Conversation

@paddy-chiu

Copy link
Copy Markdown

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.

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+<SRCREV>. Align PKGV for devtool builds with regular builds to prevent buildhistory package-version QA failures.

Signed-off-by: Paddy Chiu <pohuchiu@qti.qualcomm.com>
@paddy-chiu

Copy link
Copy Markdown
Author

Without EXTERNALSRC_BUILD, we will face "no makefile found" (log.do_compile.326282.txt) when running devtool build qps615-dlkm
Without PKGV, we might face "ERROR: QA Issue: Package version" (log.do_packagedata.387258.txt) when running devtool build qps615-dlkm since the package version will become 6.0.3+git (PV) without commit ID.

@quaresmajose

Copy link
Copy Markdown
Contributor

Can you please try the following? I think it does the same thing, if I understand correctly.

--- a/recipes-kernel/qps615-module/qps615-dlkm_git.bb
+++ b/recipes-kernel/qps615-module/qps615-dlkm_git.bb
@@ -13,6 +13,17 @@ SRC_URI = "git://github.com/qualcomm-linux/TC9564_Host_Driver.git;protocol=https
 
 PV = "6.0.3+git"
 
+def qps615_pkgv_suffix(d):
+    import bb.fetch
+
+    data = d.createCopy()
+    data.setVar("SRC_URI", d.getVar("SRC_URI"))
+    return bb.fetch.get_pkgv_string(data)
+
+PKGV .= "${@'' if not d.getVar('EXTERNALSRC') else qps615_pkgv_suffix(d)}"
+
+EXTERNALSRC_BUILD = "${EXTERNALSRC}/drivers/net/ethernet/toshiba/tc956x"
+
 B = "${S}/drivers/net/ethernet/toshiba/tc956x"
 
 # The original Makefile uses an "ifeq ($(pf), 1)" check to pick the default config.

Please wrap the text at ~70 characters in commit message.

# 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')}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Above changes should be separated on a different commit.

Also, is this really qps615-dlkm specific? I think this is just an oe-core issue.


# 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"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part is ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants