ltib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ltib] Can LTIB compile just one single module without recompiling w


From: Peter Barada
Subject: Re: [Ltib] Can LTIB compile just one single module without recompiling whole kernel???
Date: Thu, 02 Sep 2010 11:02:43 -0400

On Thu, 2010-09-02 at 16:26 +1000, Quentin YANG wrote:
Hi Stuart,

I am a bit confused now.

If keeping kernel source un-packed, how do I modify the 'spidev.c' source code?

The only thing I can think of is modifying 'spidev.c' and then zip it back into
"X:\lpc3250\ltib-qs\rpm\SOURCES\linux-2.6.34.tar.bz2" before running a
new build ' ./ltib '

Not sure is this what you suggested?
Please advise.
Thanks.

Quentin,

That's one possibility, but you then lose the history of all your changes.

Instead, try:

./ltib -p kernel -m prep

to unpack the kernel source into rpm/BUILD/linux-2.6.34

Then modify the code in the kernel, build, boot, verify, and when you have it modified the way you want, then:

./ltib -p kernel -m patchmerge

This moves your kernel to rpm/BUILD/linux-2.6.34.modified, unpacks a fresh copy of the kernel into rom/BUILD/linux-2.6.34 and diffs it to rpm/BUILD/linux-2.6.34.modified and creates a unified patch, then places the freshely created patch in /opt/ltib/pkgs, and updates the kernel .spec.in file to reference the new patch.  In the process LTIB tells you where it placed the created patch and the .spec.in file that it modified to add your new patch reference.

You can then move the patch from /opt/ltib/pkgs to a directory that .ltibrc %ldirs refers to (so LTIB can find it).  You can also rename the patch to something more descripty (as long as you modifying the corresponding patch reference in your kernel .spec.in file to match the new name).

Then the next time you execute "./ltib -p kernel -m prep", LTIB will unpack the kernel and automatically patch it with the newly created patch. You can repeat this process to create multiple patches applied in sequence to the pristine sources.

As an example, I have omap35x 2.6.32 kernel in my version of LTIB that has 67 patches applied to it that add all the bits of functionality on top of a pristine 2.6.32 kernel from kernel.org.

Hope this helps.


Regards,
Quentin


On Wed, Sep 1, 2010 at 5:32 AM, Stuart Hughes <address@hidden> wrote:
> Hi Quentin,
>
> No, I would not recommend moving stuff out of the kernel and into a
> separate package.  If it's already in the kernel leave it there.
>
> A re-build of the un-packed kernel source should be quick, a minute or
> so once you've built it once.
>
> Regards, Stuart
>
> Quentin YANG wrote:
>> Thanks. Stuart.
>>
>> So, similar like what we've done for 'helloworld' module.
>> " X:\lpc3250\ltib-qs\rpm\BUILD\hello_mod-1.2\"
>>
>> I need to copy 'spidev.c/h' to a folder, say "
>> X:\lpc3250\ltib-qs\rpm\BUILD\spidev_mod\ ", and remove all
>> unpacked kernel source codes under "
>> X:\lpc3250\ltib-qs\rpm\BUILD\linux-2.6.34\ ".
>>
>> I'll give it a go.
>>
>> Regards,
>> Quentin
>>
>>
>> On Mon, Aug 30, 2010 at 8:06 PM, Stuart Hughes <address@hidden> wrote:
>>> Hi Quentin,
>>>
>>> If you leave the kernel source unpacked (there's an option for this),
>>> then the re-compiles should be quick, as only the module and a bit of
>>> house-keeping is done.
>>>
>>> Regards, Stuart
>>>
>>>
>>> Quentin YANG wrote:
>>>> Hi,
>>>>
>>>> I am modifying a module driver 'spidev.c'
>>>>
>>>> I already settled the kernel to use this as a module driver and,
>>>> compiling it together with the kernel, it runs ok.
>>>>
>>>> To save time, I am wondering can LTIB compile 'spidev module' without
>>>> re-compiling the whole kernel. ( Takes 2 or 3 minutes each compile
>>>> with a tiny module source code change ).
>>>>
>>>> Can anyone advise me how to get LTIB to compile a single module only?
>>>> (Only saw single package compile in LTIB -help)
>>>>
>>>> Thanks very much.
>>>>
>>>>
>>>> Regards,
>>>> Quentin
>>>>
>>>>
>>
>

_______________________________________________
LTIB home page: http://ltib.org

Ltib mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/ltib


reply via email to

[Prev in Thread] Current Thread [Next in Thread]