Petalinuxのカーネルを編集する

/project-spec/meta-user/recipes-kernel/linux/linux-xlnx/
にパッチファイル(.patch)を入れていけばいいみたい。

how to add or modify petalinux 2016.4 yocto kernel source or devictree source?
https://forums.xilinx.com/t5/Embedded-Linux/how-to-add-or-modify-petalinux-2016-4-yocto-kernel-source-or/td-p/742861

for the kernel modify

after build the kernel you will find the source code in the

/build/tmp/work-shared/plnx_arm/kernel-source

1. modify the code source in the /build/tmp/work-shared/plnx_arm/kernel-source

for example: drivers/w1/masters/w1-gpio.c

2. in the /build/tmp/work-shared/plnx_arm/kernel-source do like this

git add file1(like:drivers/w1/masters/w1-gpio.c) file2 ...

3. give a pacth tile

git commit -s -m 'your commit title'

4.create the pacth

git format-patch -1

#and then you will see the .pacth in you current directory.

5. copy this .pacth to the /project-spec/meta-user/recipes-kernel/linux/linux-xlnx/

and add the linux-xlnx_%.bbappend file in the /project-spec/meta-user/recipes-kernel/linux/

like:
SRC_URI_append = " file://xxxx.patch"

FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"

and then

and then petaliunx-build

and the new /build/tmp/work-shared/plnx_arm/kernel-source code will add your patch.

and i think this will be helpful with you.