Tuesday, April 21, 2009
GSoC 2009申请总结
总结起来,这次申请失败很大的一个原因是当初选择项目的时候没有考虑mentor的因素。我申请的Maemo社区的mainlining N800/N810 kernel。之所以选择这个项目,一来是自己还是想做kernel相关的project,二来是实验室正好在做Maemo平台的项目。但是我忽略了很重要的一点,打算指导这个项目的mentor把自己的名字写在了好几个项目的后面——这意味着我还需要和不同项目的学生直接竞争,因为mentor最后(大多)是只会指导一个项目的。而且这也影响了申请阶段和mentor之间的交流。在写proposal那段时间,我几乎没有和mentor有什么交流,每次去问问题,他总说没很忙没时间,just submit it。或许这次申请失败从那个时候开始就注定了。这也反映出我长期的一个坏习惯——做事情只是从自己的角度考虑,选择最佳方法,而忽略了其他相关的方面。但世事不总是那么straightforward,所以我需要学习,从更全面的角度去思考问题,更缜密的考虑解决方案。
另外一个教训是不要被表象所迷惑。我刚刚提交申请当天,就得到了Maemo社区这次GSoC的组织者的很好的评价。其后又有两个mentor(包括愿意指导这个项目的mentor)的很positive的comments。但是最后我还是落选了。可见public review并没有想象中的那么重要。而mentor对项目是否积极回应,应该在很大程度上决定项目是否会落选。
Saturday, April 04, 2009
proposal for maemo 09 GSoC:mainlining N800/N810 kernel
The Maemo Diablo kernel is based on the 2.6.21 version of linux-omap kernel, which is too old now. And since the mainline kernel is the desired target for all merging processes, it is more appropriate to base the Maemo kernel on the mainline kernel. This project aims to get drivers from Maemo's Linux kernel to the mainline (Linus's 2.6.30+) kernel release, patch the mainline kernel with WiFi support from the stlc45xx driver, and boot the mainline kernel in N800s and N810s.
Content:
- Project title.
Mainlining the N800/N810 kernel
- Project Abstract (short description).
The Maemo Diablo kernel is based on the 2.6.21 version of linux-omap kernel, which is too old now. And since the mainline kernel is the desired target for all merging processes, it is more appropriate to base the Maemo kernel on the mainline kernel. This project aims to get drivers from Maemo's Linux kernel to the mainline (Linus's 2.6.30+) kernel release, patch the mainline kernel with WiFi support from the stlc45xx driver, and boot the mainline kernel on N800s and N810s.
- Project full description.
Maemo Diablo is still running on a patched 2.6.21 omap kernel, which is too old and missing some new features. It's time to rebase Maemo Diablo kernel on a vanilla kernel. This project aims to get the mainline kernel working for N800/N810 devices, and use the new stlc45xx WiFi driver in the mainline kernel. To do this, the vanilla kernel must be patched with several drivers from the Maemo kernel and the linux-omap kernel.
Because many N800/N810 hardware drivers (such as the N800/N810 board drivers) haven't made their way into the mainline kernel, my first goal would be porting enough hardware drivers from linux-omap tree to make the mainline kernel bootable on N800/N810.
The Maemo 5.0 kernel is ready rebased on the 2.6.28 vanilla kernel[1]. I tried to apply the Maemo 5.0 kernel patch to a 2.6.29 vanilla kernel. Most of it applied, with some already merged and a few failures. Therefore, I can generate a new patch based on the Maemo 5.0 kernel patch and make it applicable to a newer mainline kernel (currently 2.6.29, in the future 2.6.30+). By doing this, I will get a bootable kernel on N800/N810 having all hardware supported. The DSP gateway drivers are also included in the Maemo 5.0 kernel patch. The original project idea on Maemo GSoC wiki skipped the DSP gateway support, but it should be supported here.
The next goal is to get N800/N810 booting with WiFi support from stlc45xx. Stlc45xx is an open source WLAN driver based on mac80211 for Nokia N800 and N810 devices. Nokia has been contributing a lot to the stlc45xx driver. It's time to make it usable for Maemo users.
However, stlc45xx is based on the linux-omap tree[2]. There might be problems getting it working on top of Linus's tree. So first I need to find out what stlc45xx needs from linux-omap tree. If something is missing in Linus's tree, I have two options then: either apply the missing commits from linux-omap tree to Linus's tree (preferred), or fall back to an older version of stlc45xx that is supported by Linus's tree.
- Project tasks and deliverables.
As described above, there are basically two goals for this project:
1. Port missing drivers to make the mainline kernel bootable on N800/N810.
2. Port stlc45xx driver to the mainline kernel, and boot N800/N810 with WiFi support.
At the end of GSoC 2009, I will be submitting the following deliverables:
1.A binary image (built on Linus's tree) that will boot on N800/N810 with all hardware supported and WiFi support from stlc45xx.
2. A patchset against latest Linus's tree that has all changes necessary to build a
working kernel image, as well as corresponding .config file.
3. A website that records every problem I meet and how I solve it. And there will be a summary on my experience of patching the Linux kernel and upgrading the N800/N810 kernel. I plan to place a site on my googlepages (as I did last year), but it can be relocated upon request.
4. A detailed developer guide demonstrating how to collect Maemo Diablo patches, apply them to the vanilla kernel, compile the kernel and flash it into N800/N810 devices. A summary on using stlc45xx driver in N800/N810 will be included too.
- Project schedule.
To complete above tasks, I have a brief timeline as follows:
Before May 23, get familiar with the Maemo kernel, compare mainline kernel with Maemo kernel and collect what is missing in the mainline kernel.
May 23 - May 29, port N800/N810 drivers from Maemo 5.0 kernel to the mainline kernel, and resolve conflicts.
May 30 - June 5, build/flash/test/debug
June 6 - June 12, build/flash/test/debug. Should have a bootable mainline kernel here.
June 13 - June 19, generate a patch set against the mainline kernel.
June 20 - June 26, collect what stlc45xx depends on linux-omap tree and is missing in vanilla kernel.
June 27 - July 3, write documents and prepare for midterm evaluation.
July 4 - July 10, port stlc45xx and necessary dependencies to mainline kernel, resolve conflicts.
July 11 - July 17, build/flash/test/debug.
July 18 - July 24, build/flash/test/debug. Should have WiFi support in mainline kernel.
July 25 - July 31, write test cases (especially for the stlc45xx driver).
Aug 1 - Aug 7, scrub code, generate a patch set which includes WiFi support, and improve documentation.
Aug 8 - Aug 10, prepare for final evaluation and submitting.
- Do you have other commitments during the summer of code coding period ? If yes, what kind of commitments ?
No. I will be a full-time participant.
- Why are you the right person for this project ?
Basically, I am the right person for the following reasons:
1. Solid programming skills. I've been writing C/C++ programs in Linux for over 3 years.
2. I'm familiar with Linux kernel drivers and the kernel community. I have
been working with kernel drivers and kernel community since last year's
GSoC (see the biography section). I also send patches to e2fsprogs.
3. Because I am developing some N810 user-land applications in my lab, I
already have an N810 at hand which can be used for testing
conveniently. I've been playing with it for some time.
4. Last but not less important at all, I have a passion for open source and Linux
kernel hacking. I have read a lot of code in the ext4 directory last year, and this year, I've been reading the code of logfs (a scalable flash filesystem trying to make its way into mainline) in my spare time. Currently, I am still following the ext4 mailing list and have learnt a lot there.
- What are the benefits of your project for the Maemo Community ?
1. A bootable latest mainline kernel that brings in new features for all Maemo users.
2. Plenty of documents guiding Maemo users to use stlc45xx drivers and showing developers how to patch/test/debug the Maemo kernel.
3. A well documented GSoC project that can be used as a good example for future advocating.
- Short Biography (academic work, open source background and other activities that you like to do).
My name is Peng Tao. I'm a postgraduate from China majored in computer science. I completed another GSoC project for openSuSE mentored by ColyLi last year. It enables GRUB legacy to boot on ext4 partitions. Since then, I have been following the ext4 development and sent several patches to e2fsprogs. Besides that, I am an active member of linuxfb.org and BLUG (Beijing Linux User group). I also gave speeches on open source topics at linuxfb.org meetings, BLUG meetings, Novell/Intel OTC workshop, and Gnome Asia Summit 2008.
Here are some useful links for my background:
My blog: http://bardofschool.blogspot.com/
My resume: http://bergwolf.googlepages.com/resume
The GSoC 2008 project I completed: http://bergwolf.googlepages.com/grub4ext4
References:
[1] http://repository.maemo.org/pool/maemo5.0alpha/free/k/kernel/
[2] http://stlc45xx.garage.maemo.org/