Quantcast

Problems patching the kernel with bitbake

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Problems patching the kernel with bitbake

Nerd Cube
Hi,

I got my build problem figured out, but now I want to add patches to my kernel.
I've read several tutorials on how to do this in bitbake, and from what I gather, once simply makes and/or downloads the desired patches, adds them to where bitbake can find them (i.e ${OVEROTOP}/org.openembedded.dev/recipies/linux/linux-omap3/ for 3.0.x kernels), and rebuilds (clean and recompile). I have done this and everything recompiles, but I am not seeing the effects of my patches when it boots.

In particular, I have downloaded the 3.0.36-rt57 patch from http://www.kernel.org/pub/linux/kernel/projects/rt/3.0/ and bitbake successfully applied it, but the -rt57 suffix was not added to the kernel name, and I am not seeing the typical signs of RT linux when I boot. As for configuration, I followed the instructions on https://rt.wiki.kernel.org/index.php/RT_PREEMPT_HOWTO, enabling CONFIG_PREEMPT_RT and the high-res timer.

I have also written my own patch that modifies the VDBG function in the storage_common.c file to add timestamps to the entires in var/log/syslog. I am not seeing these modifications either.

Bitbake seems to be accepting and applying my patches, as it does not tell me otherwise. Am I missing an essential step somewhere? 

Thanks

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problems patching the kernel with bitbake

adam.yh.lee
Hey nerd, 
Can't tell, but I think you need to run 'bitbake linux-omap -c patch' first to apply the patch. 
Let me know

Adam

On Wed, Jul 18, 2012 at 4:42 PM, Nerd Cube <[hidden email]> wrote:
Oh sorry, I forgot to mention in my first post that I also modified the bitbake recipe to specify the names of my added patches, like this:
SRC_URI = "git://www.sakoman.com/git/linux-omap-2.6.git;branch=omap-3.0-pm;protocol=git \
           file://defconfig \
           file://${BOOT_SPLASH} \
           file://my_patch.patch \
           file://patch-3.0.36-rt57 \
"

Do I need to add another SRC_URI line to explicitly define the new patches' location? I've noticed in a few recipe files there is a line like:
SRC_URI_append =" [...]
What is this for?

Sorry for the silly questions!

Thanks so much!
       


From: Adam Lee <[hidden email]>
To: Nerd Cube <[hidden email]>
Sent: Wednesday, July 18, 2012 4:26 PM

Subject: Re: [Gumstix-users] Problems patching the kernel with bitbake

Hey Nerd, 

In Scott's wiki, to apply the patch with bitbake, you should add a line something like this:

SRC_URI = "git://www.sakoman.com/git/linux-omap-2.6.git;branch=omap3-2.6.34;protocol=git \
file://defconfig \
+ file://my-board-overo.patch \
"
So in your recipe file, I think you should have a line that locates your patch file. From what you described in the first email, it seems like you simply grabbed the patch and dropped in the kernel recipe directory?

Adam

On Wed, Jul 18, 2012 at 4:21 PM, Nerd Cube <[hidden email]> wrote:
Hi Adam,

I was looking at these two in particular, though I gleaned some information from several places.

I'm very new to kernel development, so I may have misread/misunderstood something.

Thanks

From: Adam Lee <[hidden email]>
To: Nerd Cube <[hidden email]>
Sent: Wednesday, July 18, 2012 4:13 PM
Subject: Re: [Gumstix-users] Problems patching the kernel with bitbake

Hi Nerd, can you point me to the tutorials that you used to patch your kernel?

Not sure if it's as easy as just dropping the patch into the directory.

Regards,

Adam

On Wed, Jul 18, 2012 at 4:06 PM, Nerd Cube <[hidden email]> wrote:
Hi,

I got my build problem figured out, but now I want to add patches to my kernel.
I've read several tutorials on how to do this in bitbake, and from what I gather, once simply makes and/or downloads the desired patches, adds them to where bitbake can find them (i.e ${OVEROTOP}/org.openembedded.dev/recipies/linux/linux-omap3/ for 3.0.x kernels), and rebuilds (clean and recompile). I have done this and everything recompiles, but I am not seeing the effects of my patches when it boots.

In particular, I have downloaded the 3.0.36-rt57 patch from http://www.kernel.org/pub/linux/kernel/projects/rt/3.0/ and bitbake successfully applied it, but the -rt57 suffix was not added to the kernel name, and I am not seeing the typical signs of RT linux when I boot. As for configuration, I followed the instructions on https://rt.wiki.kernel.org/index.php/RT_PREEMPT_HOWTO, enabling CONFIG_PREEMPT_RT and the high-res timer.

I have also written my own patch that modifies the VDBG function in the storage_common.c file to add timestamps to the entires in var/log/syslog. I am not seeing these modifications either.

Bitbake seems to be accepting and applying my patches, as it does not tell me otherwise. Am I missing an essential step somewhere? 

Thanks

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users









------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problems patching the kernel with bitbake

Nerd Cube
In reply to this post by Nerd Cube
Oh sorry, I forgot to mention in my first post that I also modified the bitbake recipe to specify the names of my added patches, like this:
SRC_URI = "git://www.sakoman.com/git/linux-omap-2.6.git;branch=omap-3.0-pm;protocol=git \
           file://defconfig \
           file://${BOOT_SPLASH} \
           file://my_patch.patch \
           file://patch-3.0.36-rt57 \
"

Even with this, my patches do not seem to be working. I have also used the bitbake -c patch virtual/kernel command, but I noticed that the do_patch is called in bitbake -c configure virtual/kernel anyway, which is one of the commands I was using.

Any ideas?

Thanks!


From: Nerd Cube <[hidden email]>
To: "[hidden email]" <[hidden email]>
Sent: Wednesday, July 18, 2012 4:06 PM
Subject: [Gumstix-users] Problems patching the kernel with bitbake

Hi,

I got my build problem figured out, but now I want to add patches to my kernel.
I've read several tutorials on how to do this in bitbake, and from what I gather, once simply makes and/or downloads the desired patches, adds them to where bitbake can find them (i.e ${OVEROTOP}/org.openembedded.dev/recipies/linux/linux-omap3/ for 3.0.x kernels), and rebuilds (clean and recompile). I have done this and everything recompiles, but I am not seeing the effects of my patches when it boots.

In particular, I have downloaded the 3.0.36-rt57 patch from http://www.kernel.org/pub/linux/kernel/projects/rt/3.0/ and bitbake successfully applied it, but the -rt57 suffix was not added to the kernel name, and I am not seeing the typical signs of RT linux when I boot. As for configuration, I followed the instructions on https://rt.wiki.kernel.org/index.php/RT_PREEMPT_HOWTO, enabling CONFIG_PREEMPT_RT and the high-res timer.

I have also written my own patch that modifies the VDBG function in the storage_common.c file to add timestamps to the entires in var/log/syslog. I am not seeing these modifications either.

Bitbake seems to be accepting and applying my patches, as it does not tell me otherwise. Am I missing an essential step somewhere? 

Thanks

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problems patching the kernel with bitbake

Scott Ellis
Try giving your patch a .patch extension.

Not every file in that SRC_URI list is a patch file or treated as such.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problems patching the kernel with bitbake

Nerd Cube
Oh, ok. The RT patch actually did come with a patch extension, but it was rejected when I kept the extension. Removing it removed that error, but now that you mention it, it probably just wasn't applying it.

This leads to another question: My kernel is 3.0.0, the patch is for 3.0.36, and the patch is probably being rejected because of this. How can I change my bitbake environment to build a 3.0.36 kernel instead? Just changing PREFERRED_VERSION in distro.conf doesn't seem to work.

Thanks so much!


From: jumpnowdev <[hidden email]>
To: [hidden email]
Sent: Thursday, July 19, 2012 6:28 AM
Subject: Re: [Gumstix-users] Problems patching the kernel with bitbake

Try giving your patch a .patch extension.

Not every file in that SRC_URI list is a patch file or treated as such.


--
View this message in context: http://gumstix.8.n6.nabble.com/Problems-patching-the-kernel-with-bitbake-tp4964951p4964956.html
Sent from the Gumstix mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problems patching the kernel with bitbake

Scott Ellis
Kernels from the sakoman.com repository likely have patches for the Overo that make it different from the kernels coming from http://www.kernel.org to begin with. Patches you probably want.

If it were me trying to do this ...

I'd clone the sakoman kernel and checkout the omap-3.0-pm branch you want somewhere on your system where you can do some work, outside the OE directories.

Use the OE defconfig as your starting kernel config.

Make sure you can build the initial kernel and modules outside of OE, using the cross-compiler you already built with OE.

Next apply your my_patch.patch to that source and commit it.

Make sure things still build.

Next try to apply the rt patch you want. You'll probably get errors and will just have to fix them manually. (This is the part that goes much faster then if you were using OE.)

Once you have a kernel that builds again, commit your changes and generate a patch file from this modified source tree using a git diff from your 'my_patch.patch' commit to the latest commit.

Finally take that patch file over to use in OE and rebuild you kernel and rootfs. It should apply cleanly now.

Just because you get a kernel that builds is no guarantee that it will run ;-)
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problems patching the kernel with bitbake

Nerd Cube
In reply to this post by Nerd Cube
I am still having problems with this.

I added the .patch extension to both the RT and the 3.0.36 patches, but both are rejected in bitbake with a 3.0.0 kernel base. When I manually patch the kernel during a non-bitbake compile, the patches are accepted, but I get errors later when I make the modules.

I have also tried applying all the patches between 3.0.0 and 3.0.36 in order, since the kernel is 3.0.0 and I want it to be 3.0.36. There only appears to be patches starting from 3.0.5, so I applied 3.0.5, 3.0.6 ... 3.0.36. When I do this both manually and with bitbake, patch 3.0.5 is accepted, and the rest reject. Am I missing something?

Why aren't my patches being accepted in bitbake? And can I directly apply the 3.0.36 patch to a 3.0.0 kernel?

Thanks


From: Nerd Cube <[hidden email]>
To: General mailing list for gumstix users. <[hidden email]>
Sent: Thursday, July 19, 2012 7:38 AM
Subject: Re: [Gumstix-users] Problems patching the kernel with bitbake

Oh, ok. The RT patch actually did come with a patch extension, but it was rejected when I kept the extension. Removing it removed that error, but now that you mention it, it probably just wasn't applying it.

This leads to another question: My kernel is 3.0.0, the patch is for 3.0.36, and the patch is probably being rejected because of this. How can I change my bitbake environment to build a 3.0.36 kernel instead? Just changing PREFERRED_VERSION in distro.conf doesn't seem to work.

Thanks so much!


From: jumpnowdev <[hidden email]>
To: [hidden email]
Sent: Thursday, July 19, 2012 6:28 AM
Subject: Re: [Gumstix-users] Problems patching the kernel with bitbake

Try giving your patch a .patch extension.

Not every file in that SRC_URI list is a patch file or treated as such.


--
View this message in context: http://gumstix.8.n6.nabble.com/Problems-patching-the-kernel-with-bitbake-tp4964951p4964956.html
Sent from the Gumstix mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users





------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problems patching the kernel with bitbake

Philipp Lutz
Yes, that is what I would highly recommend.
Have a look at the PREEMPT_RT mailing list announce messages [1] and
just apply the 3.0.36 patch on top of sakomans 3.0.0 kernel and on top
of that apply the rt58 patch.

[1] http://article.gmane.org/gmane.linux.rt.user/8607
[2] http://www.kernel.org/pub/linux/kernel/v3.0/patch-3.0.36.xz


-------- Original Message  --------
Subject: Re: [Gumstix-users] Problems patching the kernel with bitbake
From: Nerd Cube <[hidden email]>
To: General mailing list for gumstix users.
<[hidden email]>
Date: 08/02/2012 01:41 AM
> And can I directly apply the 3.0.36 patch to a 3.0.0 kernel?


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Loading...