Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[Dev] Native linux on Iconia

OP sp3dev

7th July 2011, 05:50 PM   |  #1  
OP Senior Member
Flag Kaluga/Moscow
Thanks Meter: 676
 
554 posts
Join Date:Joined: Jul 2006
More
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
Last edited by sp3dev; 15th August 2012 at 08:15 PM.
The Following 51 Users Say Thank You to sp3dev For This Useful Post: [ View ]
7th July 2011, 06:02 PM   |  #2  
thor2002ro's Avatar
Senior Member
127.0.0.1
Thanks Meter: 518
 
717 posts
Join Date:Joined: Oct 2007
Donate to Me
More
good job...
The Following 2 Users Say Thank You to thor2002ro For This Useful Post: [ View ]
7th July 2011, 08:02 PM   |  #3  
Junior Member
Thanks Meter: 43
 
21 posts
Join Date:Joined: Sep 2009
Donate to Me
Hi sp3dev,

Cooooool, you rock

Thanks
The Following User Says Thank You to roggin For This Useful Post: [ View ]
8th July 2011, 01:07 PM   |  #4  
Member
Thanks Meter: 4
 
36 posts
Join Date:Joined: 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?
8th July 2011, 02:46 PM   |  #5  
OP Senior Member
Flag Kaluga/Moscow
Thanks Meter: 676
 
554 posts
Join Date:Joined: Jul 2006
More
Quote:
Originally Posted by tholmewood

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
The Following 4 Users Say Thank You to sp3dev For This Useful Post: [ View ]
8th July 2011, 03:38 PM   |  #6  
Member
Thanks Meter: 4
 
36 posts
Join Date:Joined: Mar 2008
Quote:
Originally Posted by sp3dev

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 :)
8th July 2011, 03:58 PM   |  #7  
Senior Member
Thanks Meter: 94
 
1,176 posts
Join Date:Joined: Jul 2009
Would booting a distro from say the usb work?

Sent from my HTC HD2 using XDA Premium App
The Following User Says Thank You to M..N For This Useful Post: [ View ]
8th July 2011, 06:02 PM   |  #8  
OP Senior Member
Flag Kaluga/Moscow
Thanks Meter: 676
 
554 posts
Join Date:Joined: Jul 2006
More
Quote:
Originally Posted by M..N

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
The Following User Says Thank You to sp3dev For This Useful Post: [ View ]
8th July 2011, 06:34 PM   |  #9  
Member
Thanks Meter: 2
 
36 posts
Join Date:Joined: Jan 2010
what about Gentoo?
8th July 2011, 07:23 PM   |  #10  
gh123man's Avatar
Senior Member
Flag Rochester NY -school (Kendall park NJ - home)
Thanks Meter: 314
 
368 posts
Join Date:Joined: Jan 2010
More
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!
Last edited by gh123man; 8th July 2011 at 07:24 PM. Reason: spelling.

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

Advanced Search
Display Modes