Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,805,091 Members 52,979 Now Online
XDA Developers Android and Mobile Development Forum

gentoo on nexus 7

Tip us?
 
deadram
Old
(Last edited by stamatis; 27th August 2014 at 08:14 AM.) Reason: fixed links, added the image
#1  
Junior Member - OP
Thanks Meter 2
Posts: 6
Join Date: Aug 2014
Location: Ottawa

 
DONATE TO ME
Default gentoo on nexus 7

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.
The Following 2 Users Say Thank You to deadram For This Useful Post: [ Click to Expand ]
 
deadram
Old
#2  
Junior Member - OP
Thanks Meter 2
Posts: 6
Join Date: Aug 2014
Location: Ottawa

 
DONATE TO ME
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
 
dvijetrecine
Old
#3  
Member
Thanks Meter 5
Posts: 66
Join Date: Mar 2012
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: [ Click to Expand ]
 
deadram
Old
#4  
Junior Member - OP
Thanks Meter 2
Posts: 6
Join Date: Aug 2014
Location: Ottawa

 
DONATE TO ME
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 %)
 
crache
Old
#5  
crache's Avatar
Junior Member
Thanks Meter 1
Posts: 16
Join Date: Aug 2012
Location: Calais
Quote:
Originally Posted by deadram View Post
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.
 
deadram
Old
#6  
Junior Member - OP
Thanks Meter 2
Posts: 6
Join Date: Aug 2014
Location: Ottawa

 
DONATE TO ME
Quote:
Originally Posted by crache View Post
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.
 
deadram
Old
#7  
Junior Member - OP
Thanks Meter 2
Posts: 6
Join Date: Aug 2014
Location: Ottawa

 
DONATE TO ME
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.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes