0

I am new to buildroot and working to build Linaro with buildroot ..I have multiple fragment kernel config files and specified that in buildroot defconfig.

I have specified a custom kernel patches directory with BR2_LINUX_PATCH_DIR .

I dont have some of the config flags not set which are supposed to be there in the .config files..so i suspect that the Patches are applied successfully..so i tried giving a non existing location as Linux Patch dir and it does not give any error..

Is there anything other than giving value to BR2_LINUX_PATCH_DIR and what should be the format of the dir structure...in buildroot manual it says it should be Package_name/patch name..For linux what should be the package name? It should be the same with which linux dir is created.for example for me it is linux-custom

Plz suggest and guide me in this.

Thanks in Advance

1 Answers1

2

The option is named BR2_LINUX_KERNEL_PATCH, there is nothing named BR2_LINUX_PATCH_DIR. It applies all patches listed in this option (if those are files), or all files named *.patch if what's given in this option is a directory. See the code in linux/linux.mk:

define LINUX_APPLY_LOCAL_PATCHES
        for p in $(filter-out ftp://% http://% https://%,$(LINUX_PATCHES)) ; do \
                if test -d $$p ; then \
                        $(APPLY_PATCHES) $(@D) $$p \*.patch || exit 1 ; \
                else \
                        $(APPLY_PATCHES) $(@D) `dirname $$p` `basename $$p` || exit 1; \
                fi \
        done
endef

Also, I would recommend that you watch the output of Buildroot: it shows everything it is doing, especially it lists the patches it applied. Look at the line >>> linux .... Patching, which is the marker for the beginning of the patching step of the linux package.

tleb
  • 4,395
  • 3
  • 25
  • 33
Thomas Petazzoni
  • 5,636
  • 17
  • 25
  • Hi Thomas, I have given the patch dir location with BR2_LINUX_KERNEL_PATCH , but looking at the log it seems there is something wrong because below code should show the dir location as well: for p in ; do if test -d $p ; then support/scripts/apply-patches.sh – logic seeker Aug 22 '17 at 13:07
  • Now, the dir location is not displayed, but Buildroot shows a message for each patch applied. – Thomas Petazzoni Aug 23 '17 at 21:08
  • I had to run `make linux-dirclean && make linux-rebuild` after modifying `BR2_LINUX_KERNEL_PATCH`. – Robert Calhoun Dec 01 '21 at 15:10