[Kernel] Moggy v13 - for 4G Stock ROM users

Search This thread

bedalus

Senior Member
Jan 2, 2015
331
1,071
Chester
Lollipop kernel: this post Moto G 4G peregrine only

Mog shot
funny_cat_selfies_free_wallpaper.jpg


Stock ROM (UK ONLY!)
Tesco GB 4.4.4 ROM mirror here May be useful to UK users who want to flash back and re-download the OTAs

Stock 5.1 Kernel zip
Thank user J0kker then download in the post below his

Final KitKat zip: this post
 
Last edited:

OldYellowBricks

Senior Member
Aug 31, 2012
630
256
bout 2 sound like an jerk...but...can you build one for the falcon too?

thanks sooo much
 
Last edited by a moderator:

CJMom

Senior Member
Aug 29, 2014
59
8
Sorry for asking but what are the actual changes from the stock kernel?
 

bedalus

Senior Member
Jan 2, 2015
331
1,071
Chester
what are the actual changes from the stock kernel?

So far the only changes are using an up-to-date linaro toolchain, removal of some debug logging, and switching the IO scheduler to cfq.

I saw there was no option for peregrine users so I thought I'd make one. At the moment the repo is very clean. It would make a good jumping off point if any other devs want to fork it and add fun stuff. I personally prefer to keep it simple.
 

knizmi

Senior Member
Jul 17, 2013
344
251
Mladá Boleslav
Oh, and you probably forgot to strip your wlan.ko, it has well over 30 MB ;) I am surprised it even loads on peregrine.

---------- Post added at 10:11 PM ---------- Previous post was at 10:06 PM ----------

I'll happily talk you through it. How far are you through?

Everything is allright - the kernel boots and everything works fine, the only problem was that I couldn't get wlan.ko to load. I didn't know about the whitelist thing, though. You can imagine my face when I looked at dmesg.

I should have some more time in an hour or so, if don't get it running by morning, I will PM you. Thanks for the offer.
 
Last edited:
  • Like
Reactions: bedalus

knizmi

Senior Member
Jul 17, 2013
344
251
Mladá Boleslav
OK, I've done it by adding
Code:
chmod 0666 module_hashes
echo ee04251847ff70190bfec61b19802c19afe29a16 >> module_hashes
chmod 0400 module_hashes
to your repack-ramdisk.sh. Seems a little dirty, but works :)
The other modules will have the same problem I believe. Unless I want to add their SHA hashes the same way, what is the correct way to bypass/update that whitelist? You don't mess with that file anywhere in your build or install scripts. Gonna try deleting it, but you don't do that either...
 
Last edited:

bedalus

Senior Member
Jan 2, 2015
331
1,071
Chester
OK, I've done it by adding
Code:
chmod 0666 module_hashes
echo ee04251847ff70190bfec61b19802c19afe29a16 >> module_hashes
chmod 0400 module_hashes
to your repack-ramdisk.sh. Seems a little dirty, but works :)
The other modules will have the same problem I believe. Unless I want to add their SHA hashes the same way, what is the correct way to bypass/update that whitelist? You don't mess with that file anywhere in your build or install scripts. Gonna try deleting it, but you don't do that either...

I've seen your new falcon thread congratulations on making it work. Thanks for the credit.

To circumvent the whitelist, you need to disable it in the kernel config: see here

You're right about the module stripping. I tried doing it in the build script, but it was the wrong approach. This commit works. Thanks for reminding me! I've updated the download link. The zip is now less than 8MB, much better.
 
Last edited:

beeeto

Senior Member
May 18, 2013
398
1,713
Chile
Love to see new stuff in our beloved 4G.

Downloading and testing it right now. Thank you.
 
Last edited:
  • Like
Reactions: bedalus

CJMom

Senior Member
Aug 29, 2014
59
8
I want to try this too.
I just need to flash it from recovery?
deleting caches is needed?
If I want to go back to stock kernel just flash boot.img from my stock firmware using mfastboot?

Thanks!
 

bedalus

Senior Member
Jan 2, 2015
331
1,071
Chester
I just need to flash it from recovery?
deleting caches is needed?
If I want to go back to stock kernel just flash boot.img from my stock firmware using mfastboot?

Yep, the zip is flashable in CWM or TWRP. Deleting caches is not needed.

To return to stock, like you say...
Code:
mfastboot flash boot boot.img

But the stock boot.img does not contain copies the kernel modules. If you intend to go back to stock, you'll need to back up the entire folder /system/lib/modules from a stock install before flashing my kernel.

Stock peregrine boot.img: http://d-h.st/yF6
 
Last edited:
  • Like
Reactions: Bazilli and beeeto

knizmi

Senior Member
Jul 17, 2013
344
251
Mladá Boleslav
To circumvent the whitelist, you need to disable it in the kernel config: see here

Lol, how easy. Didn´t see that, thank you.

To return to stock, like you say...
Code:
mfastboot flash boot boot.img

Actually, I'm not sure if the stock boot.img copies the kernel modules or not. If you intend to go back to stock, it would be a good idea to back up the entire folder /system/lib/modules from a stock install before flashing my kernel.

Stock peregrine boot.img: http://d-h.st/yF6

To return to stock you need both boot.img and modules. Flashing boot.img only will disable your wifi.
 

bedalus

Senior Member
Jan 2, 2015
331
1,071
Chester
testing version 3: http://d-h.st/1Sn

- Got the download to just over 5MB by switching to XZ compression
- f2fs cherry-picks from torvalds git up to kernel v3.18

I consider f2fs the newest piece of the kernel, and the filesystem is always a bottleneck for system performance, being slow compared to everything else. It makes sense to apply as many improvements in this regard as possible.

The cherry-picks may have affected stability. It's always hard to tell with such a huge amount of code revision. I've seen one new bug where if there is an unexpected shutdown, this causes a kernel oops on the subsequent reboot right after the filesystem recovery. Then the following reboot works normally. No damage the to filesystem, just a null pointer dereference.
 
  • Like
Reactions: knizmi and beeeto

Top Liked Posts

  • There are no posts matching your filters.
  • 19
    Lollipop kernel: this post Moto G 4G peregrine only

    Mog shot
    funny_cat_selfies_free_wallpaper.jpg


    Stock ROM (UK ONLY!)
    Tesco GB 4.4.4 ROM mirror here May be useful to UK users who want to flash back and re-download the OTAs

    Stock 5.1 Kernel zip
    Thank user J0kker then download in the post below his

    Final KitKat zip: this post
    12
    https://github.com/MotorolaMobilityLLC/kernel-msm/releases/tag/MMI-LPB23.13-35

    One of the devs at motorola remembered that I'd asked for the kernel source, and emailed me directly as soon as it was uploaded. I was rather impressed by that gesture!

    I'm off to work now, but I will aim to get a kernel out for stock as soon as I get some free time.

    Mention @beeeto @Somcom3X @TheFixItMan @Kayant

    It's only been up a few hours so it might not have been spotted yet.
    10
    version 8: http://d-h.st/8Wso

    Changelog
    - optimised square root algorithm
    - SLUB allocator optimised
    - file system access time logging disabled by default
    - small increase to max bus speed
    - - made this speed default at interactive boost frequency
    - disabled unused cpu driver code
    - several ion and binder updates from upstream
    - falcon has an mr3 branch, but these updates missed peregrine, so import them
    - - includes further gpu driver updates

    Mog Shot
    cat-flying.jpg
    10
    In my desperation to get hold of the kernel source, I reached out to several of the motorola devs (emails are available in github). One of them was kind enough to get back to me, stating I'd gone through the wrong channel, but agreed to see that the code gets pushed. Hopefully that means within a few days!
    9
    When there's a flashable stock rom I'll produce a L kernel