[OE-core] How to patch a local file in a simple elegant way?
Hello, Is anyway to patch a local file without committing to the git source? I did not realize a local patch is that hard or if it is impossible. In my OE build, I want to make a patch file for mx6ullevk.h in meta-freescale/recipes-bsp/u-boot/u-boot-imx_2017.03.bb, to customize mtdparts and bootargs as I could not find a simple way to do it using bbapaend, I did not and I don't want to submit the patch to the git source. So I got a bunch of errors: ERROR: u-boot-imx-2017.03-r0 do_fetch: Fetcher failure: Unable to find revision 8be98e9322040c655b9e5c9fb2c494e002e3fad9 in branch imx_v2017.03_4.9.123_imx8mm_gafile://mx6ullevk.patch even from upstream ERROR: u-boot-imx-2017.03-r0 do_fetch: Fetcher failure for URL: 'git://source.codeaurora.org/external/imx/uboot-imx.git;protocol=https;branch=imx_v2017.03_4.9.123_imx8mm_gafile://mx6ullevk.patch'. Unable to fetch URL from any source. ERROR: u-boot-imx-2017.03-r0 do_fetch: Function failed: base_do_fetch ERROR: Logfile of failure stored in: /build/Installation/sa_platform_build/Source/Yocto/build/tmp-glibc/work/solar-oe-linux-gnueabi/u-boot-imx/2017.03-r0/temp/log.do_fetch.25780 ERROR: Task (/build/Installation/sa_platform_build/Source/Yocto/oe-core/../meta-freescale/recipes-bsp/u-boot/u-boot-imx_2017.03.bb:do_fetch) failed with exit code '1' Googling Internet, there are many suggestions to workarounds, git to local repository, git to your own repository, or even copy all git source to build u-boot offline. None of is elegant, I am sure there are some nice way to do it. Could you please advise if there is a simple elegant way to do it? Thank you. Kind regards, - jh -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] How to patch a local file in a simple elegant way?
On Tue, 2020-02-04 at 18:26 +1100, JH wrote: > Hello, > > Is anyway to patch a local file without committing to the git source? > I did not realize a local patch is that hard or if it is impossible. > > In my OE build, I want to make a patch file for mx6ullevk.h in > meta-freescale/recipes-bsp/u-boot/u-boot-imx_2017.03.bb, to customize > mtdparts and bootargs as I could not find a simple way to do it using > bbapaend, I did not and I don't want to submit the patch to the git > source. So I got a bunch of errors: > > ERROR: u-boot-imx-2017.03-r0 do_fetch: Fetcher failure: Unable to > find > revision 8be98e9322040c655b9e5c9fb2c494e002e3fad9 in branch > imx_v2017.03_4.9.123_imx8mm_gafile://mx6ullevk.patch even from > upstream > ERROR: u-boot-imx-2017.03-r0 do_fetch: Fetcher failure for URL: > 'git://source.codeaurora.org/external/imx/uboot- > imx.git;protocol=https;branch=imx_v2017.03_4.9.123_imx8mm_ga > file://mx6ullevk.patch'. > Unable to fetch URL from any source. > ERROR: u-boot-imx-2017.03-r0 do_fetch: Function failed: base_do_fetch > ERROR: Logfile of failure stored in: > /build/Installation/sa_platform_build/Source/Yocto/build/tmp- > glibc/work/solar-oe-linux-gnueabi/u-boot-imx/2017.03- > r0/temp/log.do_fetch.25780 > ERROR: Task (/build/Installation/sa_platform_build/Source/Yocto/oe- > core/../meta-freescale/recipes-bsp/u-boot/u-boot- > imx_2017.03.bb:do_fetch) > failed with exit code '1' I think your approach was right, you just need to fix the whitespace issue. Note how the above error says: 123_imx8mm_gafile://mx6u You need a space before the "file://" so probably _append = " file://xxx" instead of what I'd guess you had: _append = "file://xxx" Cheers, Richard -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core