[KERNEL][Huawei U8150] Noma - experimental Froyo hotness [20120514][GPL]

Search This thread

aorth

Senior Member
Nov 10, 2010
1,121
1,997
Nairobi, Kenya
mjanja.ch
Noma kernel for Huawei U8150

I'm introducing my custom kernel for Huawei U8150 IDEOS phones. In Kenyan Swahili noma usually means "tight," as in: "That music is tight!" It can be used in other ways too, but I like this connotation the best. ;)

Goals
My aim is to learn about Linux kernel internals, practice software development using git, and to share with the community. In addition to that, I want to explore and test tweaks which lead to increased/optimized performance on this bargain phone (it's very popular in Kenya). Some of the areas of improvement I have in mind are:
  • CPU scheduling (UI responsiveness, reducing lag)
  • CPU frequency scaling governors (smartass? ondemandX? interactiveX?)
  • I/O scheduling and filesystems (flash disk performance, throughput, latency, maybe simpleio scheduler?)
  • Security (network, local)
  • Newer drivers (mainstream, community kernel sources)
  • Newer GCC compilers (CodeSourcery, Linaro)
  • Easy rooting
  • Integrate ClockWorkMod Recovery
  • Integrate busybox
  • Explore different compression algorithms (LZO, gzip, LZF, etc) for zImage...
  • Compcache (zram) (info, announcement)
  • SLOB memory allocator for better memory allocation? (info)

Current features
Code:
- multi-touch gestures (on devices with [url=http://mjanja.co.ke/2011/08/does-your-huawei-u8150-support-multi-touch-gestures/]supported hardware[/url])
- over/under clocking of CPU frequencies
- Tiny RCU ([url=https://lwn.net/Articles/323929/]info[/url])
- BFQ I/O scheduler ([url=http://algo.ing.unimo.it/people/paolo/disk_sched/]info[/url])
- simpleio scheduler ([url=https://github.com/erasmux/hero-2.6.29-flykernel/wiki/Smartass]info[/url])
- "ck" patch set, including the Brain **** CPU scheduler (BFS) ([url=http://www.kernel.org/pub/linux/kernel/people/ck/patches/2.6/2.6.32/2.6.32-ck2/]info[/url])
- optimized memcopy/memmove ([url=https://github.com/alanorth/kernel_huawei_u8150/commit/871656cbba8ee70d0896ac5cae35a31c2e0873e3]info[/url])

Downloads
fastboot-flashable boot images:

Change log
Change logs are a pain in the ass to keep up to date, but you can see changes live in the git repository itself. See the commit history of the below branches if you're curious:

Source code

I respect the GPL (the license covering the Linux kernel), so all the up-to-date source code for this kernel is available on github. My kernel is, in turn, based on the publicly-avaiable Froyo kernel sources from Huawei. You're free to fork, modify, and re-release the code as your own, but you must provide the source code for your resulting work. Doing so ensures you honor the terms of the license, but you're also giving back to the community. Basically, don't be a ****.

Credits

I've written zero lines of C code for this kernel. My work is merely to search for interesting modifications to the Linux kernel and add them to a git repository. The real work has been put in by the following people:

Let me know if I've left you out.

Donations

Hahaha! No seriously, save your money; I am gainfully employed and I just do this for fun (and lulz)! Instead, just hit "thanks" on this thread. Or, if you're ever in Nairobi you could always buy me a cup of coffee. ;)
 
Last edited:

aorth

Senior Member
Nov 10, 2010
1,121
1,997
Nairobi, Kenya
mjanja.ch
Use fastboot!

Could you please post fashing instructions via custom recovery?

I usually just flash from fastboot lately, as I'm between ROMs too much and I don't bother installing a custom recovery. I suppose I should modify my build scripts to make recovery-flashable zips... hang tight!

... or, if you can't wait, check out my in-depth blog post about compiling and flashing custom kernels on Huawei 8150. I wrote it a few weeks ago when I was a U8150 n00b. ;)
 

aorth

Senior Member
Nov 10, 2010
1,121
1,997
Nairobi, Kenya
mjanja.ch
v47 (20110823)

Changes in 20110823v47 (from the git commit log):
  • Add new, lookup3-based jhash. See: http://burtleburtle.net/bob/hash/doobs.html
  • pids: fix a race in pid generation that causes pids to be reused immediately
  • lib/decompress_bunzip2.c: fix checkstack warning
  • kbuild: drop unifdef-y support
  • net sched: fix some kernel memory leaks
  • net/ipv4: Eliminate kstrdup memory leak
  • Add noma_defconfig. `ARCH=arm make noma_defconfig` to use.
Mostly security and memory leak fixes. The new jhash implementation is based on lookup3.c, a newer, more-efficient implementation (more info here). It's mainly used in the kernel's ipv4 and ipv6 stacks, so don't expect revolutionary performance increases, but it's backwards compatible with the old implementation, so it couldn't hurt to include it.

Default IO scheduler is now deadline (the same as stock Huawei) until I can do some performance tests of other schedulers on this device. Note: I've included BFQ, Anticipatory, CFQ, and noop as well, so you can use those if you like!

Download: noma_20110823v47_boot.img
 

aorth

Senior Member
Nov 10, 2010
1,121
1,997
Nairobi, Kenya
mjanja.ch
v49 (20110824)

Changes in 20110824v49 (from the git commit log):
  • Default to ZLO compression of kernel and ramdisk. LZO has roughly the same (but worse) compression, but is much faster to decompress.
  • Add LZO compression support for initramfs and old-style initrd
  • Add support for LZO-compressed kernels on x86
  • Add support for LZO-compressed kernels for ARM
  • Add support for LZO-compressed kernels
LZO compression is not as efficient but should be faster than the default compression (gzip), which should improve boot time. See: http://free-electrons.com/blog/lzo-kernel-compression/.

Download: noma_20110824v49_boot.img
 
Last edited:

aorth

Senior Member
Nov 10, 2010
1,121
1,997
Nairobi, Kenya
mjanja.ch
Why I'm still working on Froyo

Why are you working on Froyo and not on Gigerbread?

As this is basically a research project (for both me and the community), the primary reason I'm still "working" on Froyo is that most U8150s are still running Froyo. It's an incredibly popular phone in Kenya (maybe 250,000 - 500,000 units sold?), but I have a hunch very few of them are running non-stock ROMs. Sure, CyanogenMod 7 has a fairly-active U8150 port in progress, but it's not widely used yet.

Like I said, this is primarily a research project, so I'm experimenting for my own curiosity. A part of that is to help people get into Linux kernel, Android, and open-source software development. I want to help set an example of openness, collaboration, documentation, etc.

Also, a lot of the mods I'm making can just as well apply to Gingerbread when we finally get there.
 

aorth

Senior Member
Nov 10, 2010
1,121
1,997
Nairobi, Kenya
mjanja.ch
Custom kernel booting on U8150 CM7

Why are you working on Froyo and not on Gigerbread?

Fun times... I just got a custom kernel to boot on CM7. It's nowhere near as usable as tilal's kernel, but it is a good exercise. More info here on my blog.



I suppose that whenever I get bored enough with Froyo I could always hop over to CM7. AOSP is where my heart is anyways.
 
Last edited:

aorth

Senior Member
Nov 10, 2010
1,121
1,997
Nairobi, Kenya
mjanja.ch
v56 (20110827)

Changes (from the git commit history):
  • Add su, Superuser.apk, and busybox. This kernel/boot.img will now actively root Huawei stock ROMs.
  • Remove pre-zipped ramdisks as they are now generated on the fly from the compile scripts.
  • Correct the name of the compressed ramdisk (mkbootfs technically creates a cpio archive, which I then zip).
  • Make sure `make clean` doesn't delete our pre-compiled wireless module.
  • Add mkbootfs for creating ramdisks, and update compile.sh to create ramdisks on the fly instead of using a pre-zipped one.
  • Add ramdisk from U8150 V100R001C18B842
The build system is now a little more flexible and generates ramdisks on the fly. This should make it more powerful and complete. I've also included su, Superuser.apk, and busybox to enable a very cool new feature: rooting! If you haven't forked or cloned my kernel repository yet, what are you waiting for?

Regarding "rooting," forget what you've heard (it's probably wrong). Here's what it actually means:
  • Copying the su binary to /system/bin/su
  • Copying the Superuser.apk application to Superuser.apk
Period. What this means is that Android applications can call on the su binary whenever they want to do perform system administration actions (ie, not normal user actions), such as removing system applications with Titanium Backup. The Superuser.apk application is simply a frontend for su; whenever an application tries to execute su, a Superuser dialog pops up asking you to allow or deny the request. This notion, known as "privilege separation," is a common one in all operating systems.

Download: noma_20110827v56_boot.img
 

aorth

Senior Member
Nov 10, 2010
1,121
1,997
Nairobi, Kenya
mjanja.ch
v83 (20110903)

Changes (from the git commit history):
  • sched: export nr_running symbol for use by smartassV2 CPU governor.
  • config: sync with latest config
  • sched_fair: Restore less extereme latency values (latency of 6ms)
  • sched: enable HRTICK
  • sched_fair: Enable HRTICK
  • cpufreq: add smartassV2 governor
  • Switch busybox, older version (1.18.4) but slimmer, more appropriate for our needs (from https://faramir.eriador.org/r/).
  • Minimum frequency to 122MHz at boot, as well as smartassV2 governor.
  • Optimized ARM RWSEM algorithm
  • Cleanup after installation of su stuff. We're on a ramdisk after all, we need to conserve memory.
  • Change location of root stuff so it isn't in the $PATH
  • Add Simple I/O Scheduler
  • Add V(R) i/o scheduler
  • Update to latest Linaro GCC 4.6 compiler.
Two major changes are the addition of the simpleio IO scheduler and the smartassV2 CPU governor. The simpleio scheduler is based on/around the noop and deadline schedulers, designed specifically with non-rotating media in mind (flash disks, hello!). The smartassv2 CPU governor controls how your CPU switches between frequencies (from 122MHz at idle to 672MHz when in use). I haven't done any benchmarks, but these should improve responsiveness and battery life (in theory at least!).

Other than that, the latest Linaro GCC 4.6 compiler, some small optimizations to ARM-specific functions, and ramdisk/boot cleanups. If you're curious about smartassV2 there's more info here, on erasmux's github page here.

Download: noma_20110903v83_boot.img
 
  • Like
Reactions: zeekhopri

omernaeem17

Senior Member
Dec 5, 2007
100
1
cm7 nightly bugged one ?????? i dnt like it :p iz there iz n e fixed cm7 for ideos ????
btw your kernel doesnt works with cm7 :( and can u please make a kernel for samsung galaxy gio with smartass v2 ?? :p
 

Den15

Member
Jun 1, 2011
41
14
Beijing, China
Aorth, I tried flashing you kernal, and unfortunately there is one error when flashing with the latest CM7.1. After the flash, the phone will be stuck at the boot screen. I was wondering if you can get this fixed, that'll be great :)
 

aorth

Senior Member
Nov 10, 2010
1,121
1,997
Nairobi, Kenya
mjanja.ch
This kernel is meant for stock ROMs

Aorth, I tried flashing you kernal, and unfortunately there is one error when flashing with the latest CM7.1. After the flash, the phone will be stuck at the boot screen. I was wondering if you can get this fixed, that'll be great :)

Yeah, this kernel was really meant for Froyo stock ROMs. It won't work on CyanogenMod builds because the ramdisk's init scripts are not compatible.

My U8160 kernel repo has a kernel which works on CM7... but you'll have to compile it yourself ;)
 

proprg8

Senior Member
Sep 7, 2011
70
19
Good Job!

Hello aorth,

I'm now using the LEANdroidMOD 5 based on your kernel and I have to say the name NOMA suits it to a tee. It's my default ROM now when I'm not testing your or tilal6991's builds. Thanks and you have yourself a happy holiday season! :)
 

project2

Senior Member
Sep 27, 2011
86
20
Burg
hello,
will there be any update of your noma kernel? this is my fav because all roms out there eat my battery like mad, so i just use your kernel and i'm happy with it :)

greetings
 

acejoker68

Member
Dec 22, 2011
42
1
Parma
CM7 u8150 april 5th

IS this already built in to your CM7 last updated april 5th rom or is that a diffrent kernel? which one is better? would it be hard to install it on that rom? whats the advantages over the built in cm7 rom? Thanks sounds awsome anything to make that baby faster is great. Good work
 

eddyi

Senior Member
Apr 12, 2011
50
6
SU Binary Outdated notification

flasehd v83 on the stock 2.2.1 kenya 1 mutli touch rom all went good but whenever i restart the phone su binary shows the notifications bout su binary being outdated which i updated , i did it multiplie times but it comes up everytime the phone is rebooted , other than that su binary working ok ,

dont know how to fix it , other than that the phone is working so responsive , enjoying it

when i flashed the kernel , the phone was already rooted

cheeeeeeeeeeers
 

Top Liked Posts

  • There are no posts matching your filters.
  • 15
    Noma kernel for Huawei U8150

    I'm introducing my custom kernel for Huawei U8150 IDEOS phones. In Kenyan Swahili noma usually means "tight," as in: "That music is tight!" It can be used in other ways too, but I like this connotation the best. ;)

    Goals
    My aim is to learn about Linux kernel internals, practice software development using git, and to share with the community. In addition to that, I want to explore and test tweaks which lead to increased/optimized performance on this bargain phone (it's very popular in Kenya). Some of the areas of improvement I have in mind are:
    • CPU scheduling (UI responsiveness, reducing lag)
    • CPU frequency scaling governors (smartass? ondemandX? interactiveX?)
    • I/O scheduling and filesystems (flash disk performance, throughput, latency, maybe simpleio scheduler?)
    • Security (network, local)
    • Newer drivers (mainstream, community kernel sources)
    • Newer GCC compilers (CodeSourcery, Linaro)
    • Easy rooting
    • Integrate ClockWorkMod Recovery
    • Integrate busybox
    • Explore different compression algorithms (LZO, gzip, LZF, etc) for zImage...
    • Compcache (zram) (info, announcement)
    • SLOB memory allocator for better memory allocation? (info)

    Current features
    Code:
    - multi-touch gestures (on devices with [url=http://mjanja.co.ke/2011/08/does-your-huawei-u8150-support-multi-touch-gestures/]supported hardware[/url])
    - over/under clocking of CPU frequencies
    - Tiny RCU ([url=https://lwn.net/Articles/323929/]info[/url])
    - BFQ I/O scheduler ([url=http://algo.ing.unimo.it/people/paolo/disk_sched/]info[/url])
    - simpleio scheduler ([url=https://github.com/erasmux/hero-2.6.29-flykernel/wiki/Smartass]info[/url])
    - "ck" patch set, including the Brain **** CPU scheduler (BFS) ([url=http://www.kernel.org/pub/linux/kernel/people/ck/patches/2.6/2.6.32/2.6.32-ck2/]info[/url])
    - optimized memcopy/memmove ([url=https://github.com/alanorth/kernel_huawei_u8150/commit/871656cbba8ee70d0896ac5cae35a31c2e0873e3]info[/url])

    Downloads
    fastboot-flashable boot images:

    Change log
    Change logs are a pain in the ass to keep up to date, but you can see changes live in the git repository itself. See the commit history of the below branches if you're curious:

    Source code

    I respect the GPL (the license covering the Linux kernel), so all the up-to-date source code for this kernel is available on github. My kernel is, in turn, based on the publicly-avaiable Froyo kernel sources from Huawei. You're free to fork, modify, and re-release the code as your own, but you must provide the source code for your resulting work. Doing so ensures you honor the terms of the license, but you're also giving back to the community. Basically, don't be a ****.

    Credits

    I've written zero lines of C code for this kernel. My work is merely to search for interesting modifications to the Linux kernel and add them to a git repository. The real work has been put in by the following people:

    Let me know if I've left you out.

    Donations

    Hahaha! No seriously, save your money; I am gainfully employed and I just do this for fun (and lulz)! Instead, just hit "thanks" on this thread. Or, if you're ever in Nairobi you could always buy me a cup of coffee. ;)
    1
    v83 (20110903)

    Changes (from the git commit history):
    • sched: export nr_running symbol for use by smartassV2 CPU governor.
    • config: sync with latest config
    • sched_fair: Restore less extereme latency values (latency of 6ms)
    • sched: enable HRTICK
    • sched_fair: Enable HRTICK
    • cpufreq: add smartassV2 governor
    • Switch busybox, older version (1.18.4) but slimmer, more appropriate for our needs (from https://faramir.eriador.org/r/).
    • Minimum frequency to 122MHz at boot, as well as smartassV2 governor.
    • Optimized ARM RWSEM algorithm
    • Cleanup after installation of su stuff. We're on a ramdisk after all, we need to conserve memory.
    • Change location of root stuff so it isn't in the $PATH
    • Add Simple I/O Scheduler
    • Add V(R) i/o scheduler
    • Update to latest Linaro GCC 4.6 compiler.
    Two major changes are the addition of the simpleio IO scheduler and the smartassV2 CPU governor. The simpleio scheduler is based on/around the noop and deadline schedulers, designed specifically with non-rotating media in mind (flash disks, hello!). The smartassv2 CPU governor controls how your CPU switches between frequencies (from 122MHz at idle to 672MHz when in use). I haven't done any benchmarks, but these should improve responsiveness and battery life (in theory at least!).

    Other than that, the latest Linaro GCC 4.6 compiler, some small optimizations to ARM-specific functions, and ramdisk/boot cleanups. If you're curious about smartassV2 there's more info here, on erasmux's github page here.

    Download: noma_20110903v83_boot.img
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone