[Buildroot] BR2_TARGET_UBOOT_PATCH setting not working

Marko Stanisic sankerspace at gmail.com
Fri Apr 15 17:57:48 UTC 2022


Thank you Arnout for your answer, 

Yes I use a git repository , but I have to build two uboot for different situations  , 
1) one uboot with disabled console 
(release build )
2) and another uboot debug build with enabled console.
3) depending on which buildroot defconfig I use (release or build)

I wanted to orchestrate the builds over different defconfigs (buildroot) and in consequence different uboot defconfigs(one enables console, another has silent console) feature enabled. 
But it is also necessary to perform a patch on header and c file of a current uboot repo on the fly as preparation for a build. 
( environment setting for silent console ) 

There is another solution for sure , but a patch seems to me more elegant to solve this multi source problem cases:
Case A) console on (uboot defconfig A)
Case B) console off (uboot defconfig B with silent console feature)+changes in source code regarding uboot environment 

Maybe direct use of patches inside uboot would be more correct , but i saw no mechanisms for that. 
(Nothing in Readme, no hint to uboot patch directories or using patches before uboot build)
 
Is buildroot able to handle such situations?

Best regards,
Marko.

Sent from my iPhone

> On 14.04.2022, at 21:00, Arnout Vandecappelle <arnout at mind.be> wrote:
> 
> 
> 
>> On 13/04/2022 12:58, Marko Stanisic wrote:
>> Hello,
>> With buildroot i try to build an uboot which should be patched before, Uboot ist build by buildroot, but there is no reaction on following setting
>> BR2_TARGET_UBOOT_PATCH="$(BR2_EXTERNAL_GINO_PATH)/patches/uboot"
>> Inside <BR2_EXTERNAL_GINO_PATH>/patches/uboot there is a .patch file named according to https://buildroot.org/downloads/manual/manual.html#patch-policy with
>> |<number>-uboot-<description>.patch|
>> |Patches inside directories can be executed according documentation.
>> |
>> |Uboot is used insied a submodul of my repo and buidlroot hass acces to it over UBOOT_OVERRIDE_SRCDIR.
>> |
>> |
>> |
>> |I have no clue why patching is not performed:|
>> 1. |checked with make -s printvars VARS='BR2_TARGET_UBOOT_PATCH'|
>> 2. checked make -s printvars VARS='UBOOT_PATCHES' , UBOOT_PATCHES is set inside
>>    boot.mk
>> 3. make -s printvars VARS='UBOOT_POST_PATCH_HOOKS'
>>    UBOOT_POST_PATCH_HOOKS=UBOOT_APPLY_LOCAL_PATCHES UBOOT_FIXUP_LIBFDT_INCLUDE
>> 4. BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_GINO_PATH)/patches is also set
>> 5. It seems that everything fine, maybe one thin is not very clear to me
>> I use *UBOOT_OVERRIDE_SRCDIR*and maybe thats make troubles here? because of the comment
>> |When Buildroot finds that for a given package, an +<pkg>_OVERRIDE_SRCDIR+ has been defined, it will no longer attempt to download, extract and patch the package. Instead, it will directly use the source code available in the specified directory and +make clean+ will not touch this directory.|
> 
> Indeed, as this text says: if you use OVERRIDE_SRCDIR, you can't use patches.
> 
> 
>>             5.1 If Point (5) makes the problem how can i solve it to apply a proper patch over buildroot, or do i have to put it inside the submodul directly and how?
> 
> If you have a local directory with the source, it's assumed that you are able to modify that source and apply the patches directly.
> 
> If for whatever reason that's not an option, there are a few options:
> 
> - make a tarball and point BR2_TARGET_UBOOT_CUSTOM_TARBALL to it; or
> - if it's a git repository, you can point BR2_TARGET_UBOOT_CUSTOM_GIT to it.
> 
> 
> Regards,
> Arnout
> 
> 
>>        6. I didn't use the deprecated setting BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR
>>        7. Tried to build uboot package
>> |make uboot-dirclean make uboot-extract make uboot-patch ## nothing worked make uboot-build make uboot-install |
>> Maybe i forgot something?
>> thank you
>> ||
>> _______________________________________________
>> buildroot mailing list
>> buildroot at buildroot.org
>> https://lists.buildroot.org/mailman/listinfo/buildroot



More information about the buildroot mailing list