4.9 Kernel

  • Thread starter Deleted member 2357893
  • Start date
Search This thread

krusic22

Senior Member
Jan 20, 2013
56
8
Ptuj
Interesting. This might bring development back to the phone. Also 4.8 and 4.9 have some amazing features and speed improvements.
 
D

Deleted member 2357893

Guest
Yes, it's impossible use 4.9 without patch related to panel, exc exc
 

moriel5

Senior Member
Jul 20, 2013
1,842
630
Google Nexus 4
Nexus 7
So what does exactly the "Nexus 5 support" on this kernel mean if you can't run Android on it without patching? Would it potentially help running Linux distros on our devices or?

There is support for the kernel, so yes, you could now run Arch, Debian, OpenWRT, or DD-WRT much more easily.
Android utilizes old libraries that are not compatible with new kernels (that's at least my understanding of the matter), so you would need to patch it to run a newer kernel, and that could only get you so far.
The newest kernel version that anyone had managed to boot Android with is the latest 4.4.x LTS release.
I wonder if someone could backport the necessary changes from 4.9 to the latest 4.4.x release though, that would already be something.
 
Last edited:
  • Like
Reactions: kamild_

kamild_

Senior Member
Thank you! I really like the concept of running *WRT on Nexus - I wonder how would functionality like network booting work like...
Could the mainline kernel also be used for other non-Android OSs like Ubuntu (Touch) or Sailfish OS?
 

moriel5

Senior Member
Jul 20, 2013
1,842
630
Google Nexus 4
Nexus 7
Thank you! I really like the concept of running *WRT on Nexus - I wonder how would functionality like network booting work like...
Could the mainline kernel also be used for other non-Android OSs like Ubuntu (Touch) or Sailfish OS?

I don't think so, as they rely on Android bits to work with the bootloader and recovery.
But perhaps there is a chance with the new OS that KDE are cooking, which is supposed to be completely independent of Android.
 

moriel5

Senior Member
Jul 20, 2013
1,842
630
Google Nexus 4
Nexus 7
The newest kernel version that anyone had managed to boot Android with is the latest 4.4.x LTS release.

Update: Apparently Android 6.0.x and up can now utilize kernel 4.9.x.
As there is a build of Android 7.1.x for the x86 platform (I have no idea whether it is an official build of Android-x86, nor do I know the precise Android version, though) with a 4.9.x kernel (again, I have no idea precisely which version).
My source is a newly thread opened in the Remix OS forum, in which the OP asks for the possibility of updating the kernel in Remix OS, and mentions that he/she managed to boot it (only in debug mode, though) with the aforementioned kernel.

The source: https://xdaforums.com/remix/remix-os/remix-3-0-207-kernel-t3546057
 
Last edited:

scholbert

Senior Member
Aug 1, 2007
1,347
821
Hey folks!

I'm playing around with one of my nexus 5 devices for a while now... right now i got Maru OS installed and it's nice :eek:
But anyway this is another story.

anyone managed to boot a hh from any kind of 4.9 compilation?
Yeah i did!

Used this kernel (which is 4.9.27):
https://git.linaro.org/landing-team...rnel-debian-qcom-dragonboard410c-17.04.tar.gz

... and used Linaro GCC 4.8-2014.04 toolchain (had to use the 32Bit version here).
Then:
make qcom_defconfig
make
make qcom-msm8974-lge-nexus5-hammerhead.dtb

Then later on:
cat arch/arm/boot/zImage arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dtb > arch/arm/boot/zImage-dtb


Then i took twrp-3.0.3-0-hammerhead.img and extracted it with abootimg.
Changed the cmdline parameter for console to console=ttyMSM0,115200,n8
Took the new kernel and rebuild the recovery image to be my test image (just quick'n'dirty)

Then via adb:
reboot bootloader

... and afterwards injected the boot image (e.g.):
fastboot boot hammerhead-kernel4.img

See the attached file for the output.
This log was taken with a serial console cable attached to the earphone plug.

Cheers,

scholbert
 

Attachments

  • nexus-kernel-4.9.27-bootup.txt
    11.9 KB · Views: 293

santi1993

Senior Member
Mar 24, 2012
789
135
Buenos Aires
Hey folks!

I'm playing around with one of my nexus 5 devices for a while now... right now i got Maru OS installed and it's nice :eek:
But anyway this is another story.


Yeah i did!

Used this kernel (which is 4.9.27):
https://git.linaro.org/landing-team...rnel-debian-qcom-dragonboard410c-17.04.tar.gz

... and used Linaro GCC 4.8-2014.04 toolchain (had to use the 32Bit version here).
Then:
make qcom_defconfig
make
make qcom-msm8974-lge-nexus5-hammerhead.dtb

Then later on:
cat arch/arm/boot/zImage arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dtb > arch/arm/boot/zImage-dtb


Then i took twrp-3.0.3-0-hammerhead.img and extracted it with abootimg.
Changed the cmdline parameter for console to console=ttyMSM0,115200,n8
Took the new kernel and rebuild the recovery image to be my test image (just quick'n'dirty)

Then via adb:
reboot bootloader

... and afterwards injected the boot image (e.g.):
fastboot boot hammerhead-kernel4.img

See the attached file for the output.
This log was taken with a serial console cable attached to the earphone plug.

Cheers,

scholbert

Linux version 4.9.27 (scholbert@debian8)

Wow, you are one of the coolest users on there! i doubt anyone could boot it up!
You rock! hope we can get a public release to test it out! :D
 

Icyphox

Senior Member
Apr 21, 2016
64
21
icyphox.sh
Hey folks!

I'm playing around with one of my nexus 5 devices for a while now... right now i got Maru OS installed and it's nice :eek:
But anyway this is another story.


Yeah i did!

Used this kernel (which is 4.9.27):
https://git.linaro.org/landing-team...rnel-debian-qcom-dragonboard410c-17.04.tar.gz

... and used Linaro GCC 4.8-2014.04 toolchain (had to use the 32Bit version here).
Then:
make qcom_defconfig
make
make qcom-msm8974-lge-nexus5-hammerhead.dtb

Then later on:
cat arch/arm/boot/zImage arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dtb > arch/arm/boot/zImage-dtb


Then i took twrp-3.0.3-0-hammerhead.img and extracted it with abootimg.
Changed the cmdline parameter for console to console=ttyMSM0,115200,n8
Took the new kernel and rebuild the recovery image to be my test image (just quick'n'dirty)

Then via adb:
reboot bootloader

... and afterwards injected the boot image (e.g.):
fastboot boot hammerhead-kernel4.img

See the attached file for the output.
This log was taken with a serial console cable attached to the earphone plug.

Cheers,

scholbert
Hey that's amazing. I've been working on this too. So where exactly did you enter the command line parameter for console? Can you list out that command?

Sent from my Nexus 5 using XDA Labs
 

scholbert

Senior Member
Aug 1, 2007
1,347
821
Linux version 4.9.27 (scholbert@debian8)

Wow, you are one of the coolest users on there! i doubt anyone could boot it up!
You rock! hope we can get a public release to test it out! :D

Thanks for appreciation, but what do you expect from "public release"?
As many other already posted here, this kernel is far away from the 3.4 Images for daily use.
So this is just for fun of course :angel:


Hey that's amazing. I've been working on this too. So where exactly did you enter the command line parameter for console? Can you list out that command?

Sent from my Nexus 5 using XDA Labs

Have a look at the tool abootimg.
You could use a bootimg.cfg fle and change the cmdline for your boot image individually.
E.g.:
Code:
bootsize = 0xe48800
pagesize = 0x800
kerneladdr = 0x8000
ramdiskaddr = 0x2900000
secondaddr = 0xf00000
tagsaddr = 0x2700000
name = 
cmdline = console=ttyMSM0,115200,n8 androidboot.hardware=hammerhead user_debug=31 maxcpus=2 msm_watchdog_v2.enable=1 androidboot.selinux=permissive
The other parameters are fixed values for hammerhead... and the bootsize value depends on the size needed for your image.
In this case it's just the default value used for TWRP.

Then use the tool like this:
abootimg --create hammerhead-kernel4.img -f bootimg.cfg -k zImage-dtb -r initrd.img

Best regards,

scholbert
 
Last edited:

Icyphox

Senior Member
Apr 21, 2016
64
21
icyphox.sh
Thanks for appreciation, but what do you expect from "public release"?
As many other already posted here, this kernel is far away from the 3.4 Images for daily use.
So this is just for fun of course :angel:




Have a look at the tool abootimg.
You could use a bootimg.cfg fle and change the cmdline for your boot image individually.
E.g.:

The other parameters are fixed values for hammerhead... and the bootsize value depends on the size needed for your image.
In this case it's just the default value used for TWRP.

Then use the tool like this:
abootimg --create hammerhead-kernel4.img -f bootimg.cfg -k zImage-dtb -r initrd.img

Best regards,

scholbert
Wonderful! The heads-up I needed was the bootimg.cfg. Thanks a bunch. Also, is your ROM usable with this kernel?

Sent from my Nexus 5 using XDA Labs
 

scholbert

Senior Member
Aug 1, 2007
1,347
821
Wonderful! The heads-up I needed was the bootimg.cfg. Thanks a bunch. Also, is your ROM usable with this kernel?

Sent from my Nexus 5 using XDA Labs

No far away from any use together with a ROM or even anything the TWRP image uses inside.
No graphics... no usb...
This is just a proof of concept, playing around with the dts files and kernel. Nothing more.
If someone would create a console based ramdisk with some tools included, you may dig a little deeper into the soc or check which parts are responsive or not.

Cheers,

scholbert
 

moriel5

Senior Member
Jul 20, 2013
1,842
630
Google Nexus 4
Nexus 7
It has been quite some time.

Does anyone think that using PostMarketOS's kernel as a stepping stone may help get at least kernel 4.4 to a daily-driver ready status?

Update: Perhaps it would also be a good idea to use the Nexus 7 (2013)'s sources to try porting the newer kernel there to the Nexus 4 (as they share the same SOC).
 
Last edited:

sreehax

Senior Member
May 27, 2017
52
10
United States
Hey folks!

I'm playing around with one of my nexus 5 devices for a while now... right now i got Maru OS installed and it's nice :eek:
But anyway this is another story.


Yeah i did!

Used this kernel (which is 4.9.27):
https://git.linaro.org/landing-team...rnel-debian-qcom-dragonboard410c-17.04.tar.gz

... and used Linaro GCC 4.8-2014.04 toolchain (had to use the 32Bit version here).
Then:
make qcom_defconfig
make
make qcom-msm8974-lge-nexus5-hammerhead.dtb

Then later on:
cat arch/arm/boot/zImage arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dtb > arch/arm/boot/zImage-dtb


Then i took twrp-3.0.3-0-hammerhead.img and extracted it with abootimg.
Changed the cmdline parameter for console to console=ttyMSM0,115200,n8
Took the new kernel and rebuild the recovery image to be my test image (just quick'n'dirty)

Then via adb:
reboot bootloader

... and afterwards injected the boot image (e.g.):
fastboot boot hammerhead-kernel4.img

See the attached file for the output.
This log was taken with a serial console cable attached to the earphone plug.

Cheers,

scholbert

From the logs, it looks like the reason the boot stops is because of init.rc errors. I might be able to help with that, but my nexus 5's battery is toast.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 6
    Hey folks!

    I'm playing around with one of my nexus 5 devices for a while now... right now i got Maru OS installed and it's nice :eek:
    But anyway this is another story.

    anyone managed to boot a hh from any kind of 4.9 compilation?
    Yeah i did!

    Used this kernel (which is 4.9.27):
    https://git.linaro.org/landing-team...rnel-debian-qcom-dragonboard410c-17.04.tar.gz

    ... and used Linaro GCC 4.8-2014.04 toolchain (had to use the 32Bit version here).
    Then:
    make qcom_defconfig
    make
    make qcom-msm8974-lge-nexus5-hammerhead.dtb

    Then later on:
    cat arch/arm/boot/zImage arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dtb > arch/arm/boot/zImage-dtb


    Then i took twrp-3.0.3-0-hammerhead.img and extracted it with abootimg.
    Changed the cmdline parameter for console to console=ttyMSM0,115200,n8
    Took the new kernel and rebuild the recovery image to be my test image (just quick'n'dirty)

    Then via adb:
    reboot bootloader

    ... and afterwards injected the boot image (e.g.):
    fastboot boot hammerhead-kernel4.img

    See the attached file for the output.
    This log was taken with a serial console cable attached to the earphone plug.

    Cheers,

    scholbert
    3
    D
    Deleted member 2357893
    4.9 was released and Nexus 5 it's support by mainline kernel

    http://www.phoronix.com/scan.php?page=news_item&px=Linux-4.9-ARM-Pull
    3
    Linux version 4.9.27 (scholbert@debian8)

    Wow, you are one of the coolest users on there! i doubt anyone could boot it up!
    You rock! hope we can get a public release to test it out! :D

    Thanks for appreciation, but what do you expect from "public release"?
    As many other already posted here, this kernel is far away from the 3.4 Images for daily use.
    So this is just for fun of course :angel:


    Hey that's amazing. I've been working on this too. So where exactly did you enter the command line parameter for console? Can you list out that command?

    Sent from my Nexus 5 using XDA Labs

    Have a look at the tool abootimg.
    You could use a bootimg.cfg fle and change the cmdline for your boot image individually.
    E.g.:
    Code:
    bootsize = 0xe48800
    pagesize = 0x800
    kerneladdr = 0x8000
    ramdiskaddr = 0x2900000
    secondaddr = 0xf00000
    tagsaddr = 0x2700000
    name = 
    cmdline = console=ttyMSM0,115200,n8 androidboot.hardware=hammerhead user_debug=31 maxcpus=2 msm_watchdog_v2.enable=1 androidboot.selinux=permissive
    The other parameters are fixed values for hammerhead... and the bootsize value depends on the size needed for your image.
    In this case it's just the default value used for TWRP.

    Then use the tool like this:
    abootimg --create hammerhead-kernel4.img -f bootimg.cfg -k zImage-dtb -r initrd.img

    Best regards,

    scholbert
    1
    So what does exactly the "Nexus 5 support" on this kernel mean if you can't run Android on it without patching? Would it potentially help running Linux distros on our devices or?

    There is support for the kernel, so yes, you could now run Arch, Debian, OpenWRT, or DD-WRT much more easily.
    Android utilizes old libraries that are not compatible with new kernels (that's at least my understanding of the matter), so you would need to patch it to run a newer kernel, and that could only get you so far.
    The newest kernel version that anyone had managed to boot Android with is the latest 4.4.x LTS release.
    I wonder if someone could backport the necessary changes from 4.9 to the latest 4.4.x release though, that would already be something.