Adding patch to kernel in oecore setup

working on oe-core setup to build a custom layer. in that layer i created

FILESEXTRAPATHS_prepend := "${THISDIR}/linux-toradex_4.4:"
SRC_URI = "file://0001-rtc_fbtft.patch \

0001-rtc_fbtft.patch and defconfig has been attached

i was following this link to modify rtc driver from 1307 to ds3232 and include a driver from statging area

link text

and then i run bitbake -f -c compile linux-toradex

after that i get this error

ERROR: linux-toradex-4.4-2.7.5 do_patch: Command Error: 'quilt --quiltrc /home/saurabh/oe-core_later/build/tmp-glibc/sysroots/x86_64-linux/etc/quiltrc push' exited with 0  Output:
Applying patch 0001-rtc_fbtft.patch
can't find file to patch at input line 15
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
|From 0b7d2e27f4062f6d33f5245f1c2dc3c134e43c2b Mon Sep 17 00:00:00 2001
|Date: Thu, 15 Mar 2018 13:04:25 +0530
|Subject: [PATCH] rtc_fbtft
|Signed-off-by: SAURABH 
| arch/arm/boot/dts/vf-colibri-eval-v3.dtsi | 6 ++++--
| 1 file changed, 4 insertions(+), 2 deletions(-)
|diff --git a/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi b/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi
|index 8392dcd..287cb44 100644
|--- a/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi
|+++ b/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
Patch 0001-rtc_fbtft.patch does not apply (enforce with -f)
ERROR: linux-toradex-4.4-2.7.5 do_patch: Function failed: patch_do_patch
ERROR: Logfile of failure stored in: /home/saurabh/oe-core_later/build/tmp-glibc/work/colibri_vf-angstrom-linux-gnueabi/linux-toradex/4.4-2.7.5/temp/log.do_patch.12015
ERROR: Task (/home/saurabh/oe-core_later/build/../layers/meta-freescale-3rdparty/recipes-kernel/linux/ failed with exit code '1'

am i missing something in my bbappend file… ?

hi saurabh

check this out to see an example of a recipe.
By the way, if you just want to change the device tree file and change the config you can also check for this site to do the build much faster.

thanks for the reference link. eventually I am able to modify my kernel configuration with the following bbappend file from my custom layer.

FILESEXTRAPATHS_prepend := "${THISDIR}/linux-toradex_4.4:"

//Trying to modify through 

SRC_URI += "file://3232.cfg"

do_configure_append() {

cat ../*.cfg >> ${B}/.config

and 3232.cfg just contains


so this worked for me