Jump to content

Changing the kernel command line on 2X?


Guest wvdschel

Recommended Posts

Guest wvdschel

Can anyone tell me how to change the command line passed to the kernel for the LG 2X?

It doesn't seem to be included in boot.img files like with other phones. I'd love to change mine to allocate less memory for the GPU and more for the GPU (I think I don't need 128MB for the GPU, a lot of Tegra devices have it set to 64MB).

Link to comment
Share on other sites

Guest Qwertymon

I never really thought of that, is that why my vega has 299ram free compared tothe 210 free on my o2x? all my 3d games work perfect on my vega, Id be very intrested to know if this is true/willwork

Link to comment
Share on other sites

Guest wvdschel
I never really thought of that, is that why my vega has 299ram free compared tothe 210 free on my o2x? all my 3d games work perfect on my vega, Id be very intrested to know if this is true/willwork

I'm not sure what the configuration of a Vega is, but if that one comes with stock Android, then it's probably just the bloatware that comes with the 2X that is using up your memory. Changing the kernel command line would give you more memory. I don't know how to change this on a Tegra device, so I can't say how much 3D speed would be affected, if at all.

Edited by wvdschel
Link to comment
Share on other sites

Guest mirsadm

Hi Paul,

That was my post on XDA :mellow:. Was worth a shot - I was going to try it myself. Slightly offtopic, what kernel sources are you using for the kernel that's bundled with Fr15? The Eterrnety kernel on XDA is using a different wifi driver which doesn't reboot the phone when it is switched on/off constantly. It would be nice to merge that into yours because it is much more stable at the moment.

Link to comment
Share on other sites

Guest wvdschel
I made the change linked above and it didn't seem to make any difference to the RAM available.

P

Is it not possible to just change the kernel command line?

To give less memory to the GPU by changing the kernel, you need to modify drivers/video/tegra/nvmap.c and change nvmap_heap_arg(), which parses the nvmap= parameter from the kernel command line. The problem is, to use the freed memory for with the general purpose CPU, you need to change the way mem= is parsed, and from what I can tell, this is read from multiple places all over the kernel, and it looks like a bad idea to change this.

But if it's the only way, I'd be willing to try it out to get a chunk of extra memory.

Link to comment
Share on other sites

Guest wvdschel

Scratch my last message, I've found a cleaner way to do this, without changing the bootloader. I'm going to try modifying the EternityProject kernel tonight and see if it works :unsure:

Link to comment
Share on other sites

Guest d-droid
Scratch my last message, I've found a cleaner way to do this, without changing the bootloader. I'm going to try modifying the EternityProject kernel tonight and see if it works :unsure:

Very interesting idea, please report back!

Link to comment
Share on other sites

Guest b3ndech0
Scratch my last message, I've found a cleaner way to do this, without changing the bootloader. I'm going to try modifying the EternityProject kernel tonight and see if it works :unsure:

any results? :)

Link to comment
Share on other sites

Guest wvdschel

Ok, so I've modified the kernel and built it, but I can't figure out how to get it onto my device. I've got mkbootimg from the Android source, but (1) I don't know how to create an initrd for it and (2) I don't know which format of kernel to use with mkbootimg. I've tried arch/arm/boot/Image, but when I use that one, it won't boot.

If anyone has any experience with this part, any pointers would be greatly appreciated.

Edited by wvdschel
Link to comment
Share on other sites

Guest d-droid
Ok, so I've modified the kernel and built it, but I can't figure out how to get it onto my device. I've got mkbootimg from the Android source, but (1) I don't know how to create an initrd for it and (2) I don't know which format of kernel to use with mkbootimg. I've tried arch/arm/boot/Image, but when I use that one, it won't boot.

If anyone has any experience with this part, any pointers would be greatly appreciated.

Perhaps these links can be of help:

http://android-dls.com/wiki/index.php?titl...ack_Boot_Images

http://wiki.cyanogenmod.com/index.php?titl...nel_from_source

Link to comment
Share on other sites

  • 2 weeks later...
Guest wvdschel
I'd already read the first one, but it didn't do me much good. The second one seems promising though, I'll try it out when I find the time. Thanks!

Apparently, someone beat me to it. So, no point in me trying this anymore.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.