Forums Added for the Oppo R5, Oppo N3, and Xiaomi Redmi Note

Just yesterday, Oppo unveiled a pair of rather unique smartphones, the Oppo … more

How to Play Music From Android Wear – XDA TV

Yesterday, we showed you how to do some advanced things with your Moto 360 quite easily … more

Google Updates Play Games, Wallet, Docs, Sheets, Slides, Drive, Google+, and Camera

While we haven’t really had much in the way of … more

Google Execs Talk to Ars About Android 5.0 Lollipop

Android 5.0 Lollipop is right around the corner, and it’s expected to hit AOSP … more
Post Reply

gentoo on nexus 7

OP deadram

23rd August 2014, 07:16 AM   |  #1  
OP Junior Member
Flag Ottawa
Thanks Meter: 2
 
7 posts
Join Date:Joined: Aug 2014
Donate to Me
More
Figured this should go in the "Nexus 7 Original Development" but I can't post there :P

http://imgur.com/XjIDruA for picture


My directions are on the gentoo forums, in the install section at https://forums.gentoo.org/viewtopic-p-7604764.html

Don't attempt this if you don't know how to install gentoo, build tools from AOSP, or unbrick your device!

I don't have any ROMs for a gentoo install, at the moment, but I will probably eventually provide a way to flash an image or two, with a stage3 + wifi + dhcpcd + sshd added to the default rc runlevel. Please keep in mind, if you didn't read the source and compile it yourself, you don't know what's in the binary.
Last edited by stamatis; 27th August 2014 at 08:14 AM. Reason: fixed links, added the image
The Following 2 Users Say Thank You to deadram For This Useful Post: [ View ]
24th August 2014, 08:40 AM   |  #2  
OP Junior Member
Flag Ottawa
Thanks Meter: 2
 
7 posts
Join Date:Joined: Aug 2014
Donate to Me
More
So it looks like I'm getting closer. From what I can tell, ubuntu is booting into the system (or root) partition, with an initramfs image that creates a chroot. They "pause" the loading of the Android OS, and boot into the chroot environment.

I've found abootimg though, and I'm thinking a properly grep'ed and hacked AOSP kernel can have most of the 'forced' directories and option changed, or set in the boot command line. I'm going to try kernel builds in my gentoo chroot, from the ubuntu install on the nexus 7. I'll have to at least get boot backups working in "TWRP 2.7 - Nexus 7" but that should be easy with cat, dd, and a system+userdata partition to reliably mount.

I'm aiming to get a kernel that boots into mmcblk0p9 (or userdata) without an initramfs, or any playing around with the system partition. I'd like to eventually use the recovery boot as a boot into a 'gentoo minimal cd' image, stored on the system partition.

Anywho, 8 more posts away from adding links and images
24th August 2014, 09:52 AM   |  #3  
Member
Thanks Meter: 5
 
67 posts
Join Date:Joined: Mar 2012
More
well, i can't help, but i can cheer for you to succeed
The Following 2 Users Say Thank You to dvijetrecine For This Useful Post: [ View ]
26th August 2014, 09:23 PM   |  #4  
OP Junior Member
Flag Ottawa
Thanks Meter: 2
 
7 posts
Join Date:Joined: Aug 2014
Donate to Me
More
Well, looks like I got wifi, battery status, usb keyboard, backlight control, getty term, cpu gov, and most everything that works in ubuntu working.

Haven't built Xorg yet, but I'm sure that'll work too, and haven't tested bluetooth yet, but I'm sure it'll work too.

Directions are on the gentoo install forum board, if you have trouble following them, just ask me for help

I'll be configuring and building gentoo for the next week or so, but maybe in a month, I'll set-up some flash-able images. I'm using the ubuntu kernel for now (derived from the AOSP kernel, as far as I can tell), but I'll probably try a few more build of the gentoo kernel.

By the by, doing "emerge -1 system" with MAKEOPTS="-j5" and it's eating my battery, about 1% every 5 minutes, plugged into ac charger, so just be carefully when building gentoo, and watch your battery status ("cat /sys/devices/platform/tegra-i2c.4/i2c-4/4-0055/power_supply/battery/capacity" to view current battery %)
27th August 2014, 12:49 PM   |  #5  
crache's Avatar
Junior Member
Calais
Thanks Meter: 1
 
16 posts
Join Date:Joined: Aug 2012
More
Thumbs up
Quote:
Originally Posted by deadram

By the by, doing "emerge -1 system" with MAKEOPTS="-j5" and it's eating my battery, about 1% every 5 minutes, plugged into ac charger, so just be carefully when building gentoo, and watch your battery status ("cat /sys/devices/platform/tegra-i2c.4/i2c-4/4-0055/power_supply/battery/capacity" to view current battery %)

It might be best to cross compile from another device. I'm thinking that a lot of write activity will wear out the internal storage faster?
You could then host portage from said device and access packages over the network.

Is libhybris part of your plan?

What about booting "toram" from a squashfs filesystem stored on "sdcard". This could allow coexistence with the default filesystem as well as increased performance.
28th August 2014, 01:26 AM   |  #6  
OP Junior Member
Flag Ottawa
Thanks Meter: 2
 
7 posts
Join Date:Joined: Aug 2014
Donate to Me
More
Quote:
Originally Posted by crache

It might be best to cross compile from another device.

It would be a little faster, but more time consuming to set-up. That would be outside the scope of this tiny pseudo tutorial anyways

Quote:

I'm thinking that a lot of write activity will wear out the internal storage faster?

True, but I'd guess that's a 10 to 20 year process. Most phones are ssd, and last about that long... some laptops come with ssd drives, they wouldn't if they didn't last ~some~ amount of time. Besides - if cell phones are any indication of the future - I'll have cracked the screen by then, or dropped it in the toilet :P

Quote:

Is libhybris part of your plan?

Nope, my plan is to have only gentoo on my tiny box. I may eventually look into setting up android in a chroot, if you google it, someone has done that before, on a different device. If i remember correctly, it booted Debian, then set-up the android chroot, and passed graphics control off to android.

Quote:

What about booting "toram" from a squashfs filesystem stored on "sdcard". This could allow coexistence with the default filesystem as well as increased performance.

Well, if you wanted that, you could set it up that way. I'm looking to get Xorg up and running, lighttpd, firefox, and wine (for ie), and set-up a portable web development tablet. I'm turning this toy into a computer

That said, when i get around to making the "install CD" or image file, it'll probably be a 650-400MB image file, compatible with multiboot, and it'll be up to you to figure out the finer details. That is the idea behind gentoo anyways, to fine tune your system to how you want, and not how someone else thinks is best.

----

As an aside, after playing with cpufreq for a while, and wifi, I have a feeling my battery problem has more to do with the screen being powered. Apparently there isn't a way to turn off the power to the GPU and LCD from VT, without a working Xorg server. At least none that I can find.
5th September 2014, 04:47 AM   |  #7  
OP Junior Member
Flag Ottawa
Thanks Meter: 2
 
7 posts
Join Date:Joined: Aug 2014
Donate to Me
More
Well I got a few more things working. Check the gentoo forum link at the top for more info. By the by, posting from my nexus 7 gentoo install using xorg and firefox 31.0.
28th September 2014, 11:35 PM   |  #8  
OP Junior Member
Flag Ottawa
Thanks Meter: 2
 
7 posts
Join Date:Joined: Aug 2014
Donate to Me
More
Looks like I've got the kernel thinned out, and a few more things on the go. Check the gentoo forum link for the details.

Should have an install image within a couple months. Next steps are hacking the kernel drivers a bit, and then building a website for my wife (That's how I tricked her into letting me buy this thing in the first place, but don't let her know that! XD), and then figuring out the install image.

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Nexus 7 General by ThreadRank