unable to apply patch: "git am" did not work - dubious ownership
Subsystems (2)
Hi,
I'm trying to apply a patch to the kernel sources for trouble shooting a problem but the patch doesn't seem to apply, I get the following error:
| (2/4) 0002-add-phy_debug_logs.patch | [INFO]: check of .kernel-meta//patches///0002-add-phy_debug_logs.patch with "git am" did not pass, trying reduced context. | [INFO]: Context reduced git-am of .kernel-meta//patches///0002-add-phy_debug_logs.patch with "git am" did not work, trying "apply". | error: patch failed: drivers/net/mdio/of_mdio.c:286 | error: drivers/net/mdio/of_mdio.c: patch does not apply | [ERROR]: Application of .kernel-meta//patches///0002-add-phy_debug_logs.patch failed. | Patch needs to be refreshed. Sample resolution script: | .git/rebase-apply/resolve_rejects | ERROR: Could not apply patches for smarc-rzg2l. | ERROR: Patch failures can be resolved in the linux source directory /home/yocto/rzg_vlp_v3.0.0/build/tmp/work-shared/smarc-rzg2l/kernel-source) | WARNING: exit code 1 from a shell command. | ERROR: Execution of '/home/yocto/rzg_vlp_v3.0.0/build/tmp/work/smarc_rzg2l-poky-linux/linux-renesas/5.10.83-cip1+gitAUTOINC+e52825e45b-r1/temp/run.do_patch.22155' failed with exit code 1
ERROR: Task (/home/yocto/rzg_vlp_v3.0.0/build/../meta-renesas/recipes-common/recipes-kernel/linux/linux-renesas_5.10.bb:do_patch) failed with exit code '1'
NOTE: Tasks Summary: Attempted 5186 tasks of which 4784 didn't need to be rerun and 1 failed.
So I tried to launch a devshell with $ bitbake -c devshell linux-renesas
I confirmed the availability of my patch in build/tmp/work-shared/smarc-rzg2l/kernel-source/.kernel-meta/patches/ invoked "git am" and got the following:
# git am 0002-add-phy_debug_logs.patch fatal: detected dubious ownership in repository at '/home/yocto/rzg_vlp_v3.0.0/build/tmp/work-shared/smarc-rzg2l/kernel-source' To add an exception for this directory, call:
git config --global --add safe.directory /home/yocto/rzg_vlp_v3.0.0/build/tmp/work-shared/smarc-rzg2l/kernel-source
I'm not sure about what would be dubious about the ownership of my files. I'm running out of a container and all files in /home/yocto/rzg_vlp_v3.0.0/build/tmp/work-shared/smarc-rzg2l/kernel-source are owned by uid 1000, I double checked that with
# tree -upf /home/yocto/rzg_vlp_v3.0.0/build/tmp/work-shared/smarc-rzg2l/kernel-source | grep -v 1000
For reference, the patch looks like:
drivers/net/mdio/of_mdio.c +0 -0
@@ -286,8 +286,10 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)
if (of_mdiobus_child_is_phy(child))
rc = of_mdiobus_register_phy(mdio, child, addr);
+ printk("of_mdiobus_child_is_phy returned true, expected! \nof_mdiobus_register_phy() rc %d", rc); else
rc = of_mdiobus_register_device(mdio, child, addr);
+ printk("of_mdiobus_child_is_phy returned false, not expected! \nof_mdiobus_register_phy()rc %d\n", rc);
if (rc == -ENODEV)
dev_err(&mdio->dev,
Can anyone help me out here to find what the problem might be?
Signature · 1 line
Rron