quilt and 2.6.12-ck[1|2]

2.6.12-ck1, the 'Baby Cigar', was out so i just tried it out. But it failed to compile:

> kernel/sched.c: In function `inc_nr_running':
> kernel/sched.c:527: error: structure has no member named `migration_thread'
> kernel/sched.c: In function `dec_nr_running':
> kernel/sched.c:537: error: structure has no member named `migration_thread'
> make[2]: *** [kernel/sched.o] Error 1
> make[1]: *** [kernel] Error 2

UP uses SMP-only stuff. It's easy to fix. A very trivial bug. I think Con might have been too happy/busy having a new baby that he has overlooked this. =)

We can simply add some #ifdef to comment out SMP code for UP. I dont want to mess this trivial fix patch with the 'official' ck patch so i use the quilt tool.

Simply put, quilt is a patch managing tool derived from Andrew Monton's patch scripts. It eases all the patch push/pop work in the process of developing/debugging/fixing/reverting.

Now, back to our case, we create our fix by the following command,

$ quilt new trivialfixsmp.diff

and then edit the file kernel/sched.c to add make some #ifdef,

$ quilt edit kernel/sched.c

and then we refrsesh the patch,

$ quilt refresh

and you'll see the patch at patches/trivialfixsmp.diff

Yeah, i made my patch, compiled the kernel, and found that Con noticed the issue too. And he soon (very soon, if you dont mind) released the ck2. And i found that Con's patch's a little bit different from mine (different patches to do the same thing, anyway). So to use the 'official' fix patch from ck2, we can first remove our patch,

$ quilt pop
$ quilt delete trivialfixsmp.diff

and then import Con's patch for this

$ quilt import sched-fix_up_build.patch

and finally apply it,

$ quilt push


Quilt neat. =)
For more information, you can read this pdf (it's in the quilt tar ball too).

Leave a comment

Recent Entries

  • Running Spaz on WebOS Emulator

    > You got root, you got everything. Yeah, Palm Pre is hot these days. Now with the [webos emulator](http://www.geektang.com/2009/06/linuxwebos.html) and [ssh](http://www.geektang.com/2009/06/sshwebos.html) available, you can have...

  • Haskell Platform

    >The Haskell Platform is a blessed library and tool suite for Haskell distilled from Hackage, along with installers for a wide variety of systems. IOW,...

  • When MT Meets iPhone/iPod Touch

    Just found [iMT](http://plugins.movabletype.org/imt/). It's the iphone / ipod touch interface for mt4. So now you can add/edit blog entries / comments on your favorite device...

  • All Project Euler Problems Solved

    [Project Euler](http://projecteuler.net) continues to be fun. First reached 100% when there were 240 problems. And have successfully guarded that honor since =). (As of this...

  • Million Digits of E, Sqrt(2), Pi

    > More puzzles, more fun. Besides [acm oj](http://acm.tju.edu.cn/toj/ranklist.html) and [projecteuler](http://projecteuler.net), i also like to solve the puzzles on [spoj](http://spoj.pl). The ACM/ICPC rules are rather limited...

Close