Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,812,209 Members 36,819 Now Online
XDA Developers Android and Mobile Development Forum

[Dev] Native linux on Iconia

Tip us?
 
sp3dev
Old
(Last edited by sp3dev; 15th August 2012 at 07:15 PM.)
#1  
Senior Member - OP
Thanks Meter 675
Posts: 554
Join Date: Jul 2006
Location: Kaluga/Moscow
Default [Dev] Native linux on Iconia

So, let's get linux installed natively on our Iconia.

As some of you I have been working on porting Iconia to chromeos 2.6.38 kernel (to get rid of Acer crappy moron-written drivers (well.. nothing personal, but most code written for commercial embedded devices is a pile of crap and you have to rewrite everything to update kernel or integrate upstream))

For now, I have hardcoded the kernel command line in the boot config to boot off /dev/mmcblk1p2 (that is, you must create ext4 (this is also hardcoded.. uhh)) second primary partition on your sd card with the root fs). For now, until all hardware is working fine and userland is ready, let's boot off micro sd. We don't have nvflash yet so let's leave repartitioning internal storage aside.

Flash the kernel image instead of boot.img to LNX or instead of recovery to SOS. And make sure to write your UID in a secure place before messing with the device - this is the only way to flash your device if you have checksum errors (you should contact sc2k in that case). Okay, even if you eff up here, there is still a way to get UID from a brick so take it easy. But if you do screw it, be prepared to work hard and use some command-line tools.

You should be able to use any armel rootfs. For X11, use fbdev driver and evdev for touchscreen.

For the proprietary NVIDIA accellerated drivers for X11, OpenGL ES and OpenMAX, download the nvidia-tegra package from AC100 PPA https://launchpad.net/~ac100/+archive/ppa (probably you have to manually download using this link http://ppa.launchpad.net/ac100/ppa/u...son6_armel.deb as the package didn't show in aptitude for me after adding to sources.list.. or i was doing sth wrong) or the tarball from nvidia. A newer package of tegra drivers is available at https://launchpad.net/ubuntu/+source...-drivers-tegra. You may just add an alternative to mesa EGL/GLES library path via update-alternatives to always use nvidia libs.

precompiled kernel image [15 August 2012]
http://www.mediafire.com/?p32l949n2s7la43

xorg.conf
http://pastebin.com/0a6T6c18

Here is some video
http://www.youtube.com/watch?v=NlGHZ5VTAr8

And now - we need developers, developers, developers.
The git is https://github.com/astarasikov/iconia-gnu-kernel

The main branch is chromeos-2.6.38 that is more stable. The 3.0 branch is unstable (network traffic causes virtual memory trashing).

For now, the following stuff works
-Panel/framebuffer/backlight
-Touchscreen
-Internal eMMC
-microSD slot
-usb gadget
-usb host
-gpio keys/buttons [rotation switch acts as wifi/bluetooth power blocker. iirc, left position disables wireless, right - enables]
-charger
-battery
-shutdown
-LEDs
-bcm4329 wifi (don't forget to copy bcm4329-fullmac-4.bin to /lib/firmware/brcm and nvram.txt from android's /system/etc to the same dir as bcm4329-fullmac-4.txt) [causes lockups with 3.0 kernel]
-nct1008 temperature sensor for cpu throttling
-sound. external speakers and headphones.
-bcm4329 bluetooth. accessible at 115200 on /dev/ttyHS2. Look at http://htc-linux.org/wiki/index.php?.../Leo/Bluetooth to get it running at higher speeds with proprietary firmware patches (hcd files from android)
-suspend. Although will probably drain a bit more power than android because mmc power is not disabled (due to a race condition in kernel. and because we have rootfs on micro sd). Two glitches are: sometimes, the device freezes for several seconds after suspend (will test later if playing with wifi clock fixes it) and fonts get corrupted after suspend if using proprietary nvidia X11 driver. [suspend works in 2.6.38 only]
-kxtf9 accelerometer
-mpu3050 gyroscope
-ak8975 magnetometer

The following stuff is broken or not implemented at all
-hdmi video. May be working but no one has tested. hdmi audio is not implemented.
-light sensor
-video cameras, focus, torch.
-gps. To turn on the chip, it should be enough to enable gpio 203 via sysfs. Unfortunately it uses the proprietary MEIF protocol which can probably be obtained from Nokia under NDA. And I don't feel like disassembling the whole megabyte of the gps daemon
-3G. I don't have the modem in my iconia. So I don't care. But should be easy to add.

And one notice for those who want to join in. I don't care if hardware works properly. I want 'beautiful' code. That is, please, when you make patches to add functionality, do not follow the path of corporate coders and do not invent custom interfaces and sysfs hacks. Use rfkill for bt/3g power control, for example. And don't be selfish - please share your patches and userland stuff.

TODO:
[s]-fix framebuffer issues (no console till X boots, X fonts and window decorations get corrupted after suspend with proprietary drivers)[/s] it kinda works.
-video camera
-port meego or build the list of good software in ubuntu for handling sensors, virtual keyboard etc

I'm not currently working on the project and don't have the device anymore. Feel free to PM me if you need help with some tegra hackery
Apple Macbook Pro Retina 2012, Sony Xperia Z
Me on github
Me on gitorious
uboot for Samsung Galaxy S2 Samsung Galaxy Nexus
GIT d- s a-- c++ UL P--- !J--- L++++ E--- W- N O? K? w--- o ?V PS+ PE Y+ PGP++ t+ ?5 X++ R* !tv b++ DI++ D++ G++ e* h+
BTC 14KZnQkZR2GLnme7pYGs68MQVJHWwHGt3B
The Following 51 Users Say Thank You to sp3dev For This Useful Post: [ Click to Expand ]
 
thor2002ro
Old
#2  
thor2002ro's Avatar
Senior Member
Thanks Meter 518
Posts: 717
Join Date: Oct 2007
Location: 127.0.0.1

 
DONATE TO ME
good job...
_________________________
Dropbox! So useful for sharing files among multiple computers and ANDROID Phone get 2.30GB storage -> LINK

Samsung Galaxy Note - [glow=red]Drowned[/glow]

Samsung Galaxy Note 2(EMMC FRIED THX SAMSUNG FOR THE GREAT EMMC FW.... ALSO NOTE TO SELF KERNEL FW PATCH ... USELESS!!!)
FW: Tegraowners JB ROM
Kernel: thor-kernel

Acer ICONIA A500 TAB WIFI Only
FW: Tegraowners 4.4.4 ROM
Recovery: touch recovery 2.0b1

Asus Google Nexus 7 Wifi
FW: Tegraowners JB-MR2 ROM
The Following 2 Users Say Thank You to thor2002ro For This Useful Post: [ Click to Expand ]
 
roggin
Old
#3  
Junior Member
Thanks Meter 43
Posts: 21
Join Date: Sep 2009

 
DONATE TO ME
Hi sp3dev,

Cooooool, you rock

Thanks
The Following User Says Thank You to roggin For This Useful Post: [ Click to Expand ]
 
tholmewood
Old
#4  
Member
Thanks Meter 4
Posts: 36
Join Date: Mar 2008
FANTASTIC WORK!!!!

Guys... I'm not so clued up on the bootloader here, but is dual boot possible with this setup?


"so I guess I need to switch distro to try out this cool stuff"

What distro are you considering switching to?
 
sp3dev
Old
#5  
Senior Member - OP
Thanks Meter 675
Posts: 554
Join Date: Jul 2006
Location: Kaluga/Moscow
Quote:
Originally Posted by tholmewood View Post
FANTASTIC WORK!!!!

Guys... I'm not so clued up on the bootloader here, but is dual boot possible with this setup?


"so I guess I need to switch distro to try out this cool stuff"

What distro are you considering switching to?
Yes, dual boot is possible - the android is in internal memory, our stuff is on micro sd card. It should be possible to even dual boot from internal memory, but not right now

I am switching to ubuntu because it has a lot of packages prebuilt
Apple Macbook Pro Retina 2012, Sony Xperia Z
Me on github
Me on gitorious
uboot for Samsung Galaxy S2 Samsung Galaxy Nexus
GIT d- s a-- c++ UL P--- !J--- L++++ E--- W- N O? K? w--- o ?V PS+ PE Y+ PGP++ t+ ?5 X++ R* !tv b++ DI++ D++ G++ e* h+
BTC 14KZnQkZR2GLnme7pYGs68MQVJHWwHGt3B
The Following 4 Users Say Thank You to sp3dev For This Useful Post: [ Click to Expand ]
 
tholmewood
Old
#6  
Member
Thanks Meter 4
Posts: 36
Join Date: Mar 2008
Quote:
Originally Posted by sp3dev View Post
Yes, dual boot is possible - the android is in internal memory, our stuff is on micro sd card. It should be possible to even dual boot from internal memory, but not right now

I am switching to ubuntu because it has a lot of packages prebuilt
Man I cant wait to get Netbook Remix dual booting on this badboy... Living the dream I tell ya...

Thanks again :)
 
M..N
Old
#7  
Senior Member
Thanks Meter 94
Posts: 1,176
Join Date: Jul 2009
Would booting a distro from say the usb work?

Sent from my HTC HD2 using XDA Premium App
Phone : Nexus 4 16GB
Tablet : Nexus 7 32GB-Acer A500 16GB

Previous Devices - T-Mobile G1, HTC HD2, HTC Desire HD, HTC Sensation, Samsung Galaxy S3 16GB White
The Following User Says Thank You to M..N For This Useful Post: [ Click to Expand ]
 
sp3dev
Old
#8  
Senior Member - OP
Thanks Meter 675
Posts: 554
Join Date: Jul 2006
Location: Kaluga/Moscow
Quote:
Originally Posted by M..N View Post
Would booting a distro from say the usb work?

Sent from my HTC HD2 using XDA Premium App
I see no reason why not. But you'd have to hardcode the uuid of the boot partition in kernel command line or build a ram disk. Anyway having to use a heavy and power consuming external storage sounds like an extremely stupid and useless idea
Apple Macbook Pro Retina 2012, Sony Xperia Z
Me on github
Me on gitorious
uboot for Samsung Galaxy S2 Samsung Galaxy Nexus
GIT d- s a-- c++ UL P--- !J--- L++++ E--- W- N O? K? w--- o ?V PS+ PE Y+ PGP++ t+ ?5 X++ R* !tv b++ DI++ D++ G++ e* h+
BTC 14KZnQkZR2GLnme7pYGs68MQVJHWwHGt3B
The Following User Says Thank You to sp3dev For This Useful Post: [ Click to Expand ]
 
digitalyz
Old
#9  
Member
Thanks Meter 2
Posts: 36
Join Date: Jan 2010
what about Gentoo?
 
gh123man
Old
(Last edited by gh123man; 8th July 2011 at 06:24 PM.) Reason: spelling.
#10  
gh123man's Avatar
Senior Member
Thanks Meter 314
Posts: 368
Join Date: Jan 2010
Location: Rochester NY -school (Kendall park NJ - home)
This is great! i would love a dual boot. and ubuntu! i just got done reading that the asus got this and was like. i want it now. now we almost have it :P keep up the great work!

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes