If you want to modify the Linux kernel sources instead, insert the following commands to create an image of the actual used sources:
~$ mkdir -p /home/architech/Documents/linux-kernel
~$ cd /home/architech/Documents/linux-kernel
~/Documents/linux-kernel$ cp /home/architech/architech_sdk/architech/pengwyn/yocto/poky/meta-silica/recipes-kernel/linux/linux-pengwyn-3.2/linux-pengwyn* .
~/Documents/linux-kernel$ tar -xzf linux-pengwyn_3.2.tar.gz
~/Documents/linux-kernel$ mv linux-pengwyn_3.2 a
~/Documents/linux-kernel$ patch -p1 -d a/ < linux-pengwyn_3.2.patch
patching file ...
...
~/Documents/linux-kernel$ cp -r a/ b/
Modify the sources contained inside directory b, than create your patch
~/Documents/linux-kernel$ diff -Naur a/ b/ > linux-pengwyn_3.2.mine.patch
~/Documents/linux-kernel$ cp linux-pengwyn_3.2.mine.patch /home/architech/architech_sdk/architech/pengwyn/yocto/poky/meta-silica/recipes-kernel/linux/linux-pengwyn-3.2/
Create a file named linux-pengwyn_3.2.bbappend inside directory /home/architech/architech_sdk/architech/pengwyn/yocto/poky/meta-silica/recipes-kernel/linux/ and write the following text inside the .bbappend file:
SRC_URI += "file://linux-pengwyn_3.2.mine.patch \
"
Clean and build:
bitbake linux-pengwyn -c cleanall
bitbake linux-pengwyn
The following commands are used to build the kernel without bitbake. First of all, install the package uboot-mkimage:
apt-get install uboot-mkimage
and setup the environment:
export PATH="$PATH:/opt/poky/1.2.1/sysroots/i686-pokysdk-linux/usr/bin/armv5te-poky-linux-gnueabi"
After that, in linux kernel folder, set the kernel options:
make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- menuconfig
and build the kernel:
make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- uImage
It is not necessary using make clean to rebuild the kernel image after have modified source code.
Note
Use option -j with make to speed up the compilation
example: make -j 4 ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- uImage