Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,811,145 Members 44,862 Now Online
XDA Developers Android and Mobile Development Forum

[WEBTOP] GenTop2-20120509 (Beta) - Next Generation Gentoo Webtop Replacement

Tip us?
 
Gendol
Old
(Last edited by Gendol; 11th May 2012 at 08:11 AM.) Reason: update
#1  
Junior Member - OP
Thanks Meter 81
Posts: 16
Join Date: Apr 2012
Talking [WEBTOP] GenTop2-20120509 (Beta) - Next Generation Gentoo Webtop Replacement

Introduction

What is GenTop2?

GenTop2 is a full-fledged Gentoo Linux able to replace the original Motorola Webtop. It is faster, fully-customizable and gives you the power of a complete Linux system on a mobile phone. It is a peek into the future of mobile computing!

Thanks goes to kholk, who did the original GenTop, otherwise I would have long given up.

Why use Gentoo Linux as WebTop?
  • Programs are fully optimized for the ARMv7a CPU contained in the Atrix.
  • Thus the whole system is faster and more responsive.
  • No shackles put around the WebTop by Motorola.
  • You can install any program (which compiles on ARM).
  • All software (except X11) is fully up-to-date.
  • You remember old times with desktop computers having far slower CPUs and less RAM than your phone and you wonder what you can do with this pocket computer.

Why NOT use Gentoo Linux as WebTop?
  • Gentoo is huge because it must install all development files.
  • The system and all programs must be compiled on the phone. How crazy is that?
  • Firefox could not be built. But, there is a smaller replacement.
  • Why bother using a phone, when you already have a notebook?

Working and Installed Applications
  • X11 via WebTop or HDMI (with hdmi-hack)
  • Xfce4 with thunar file manager
  • midori web browser with Flash player
  • claws-mail client
  • audacious
  • evince (pdf viewer)
  • ssh daemon
  • rxvt terminal
  • aiw Android In-A-Window!
  • Sound output via Android media system.
All are very light-weight Linux applications perfect for a small system.

Not Working:
  • webtop-panel (system status bar on top)
  • non-flash video playback ?

Installable as binary packages:
  • firefox (renamed to Aurora due to trademark stuff), approx 30 MB.
  • thunderbird (renamed to Earlybird due to trademark stuff), approx 44 MB.
  • libreoffice, approx 250 MB.
  • abiword, pidgin, emacs, texlive,
  • and many more, drop a note for more wishes here. However KDE is just too large.

Installation Instructions

Prerequisites:
  • Motorola Atrix
  • BACKUP. This will break your device!
  • Okay hopefully it won't. A full restore will of course overwrite the webtop.
  • root privileges.
  • unlocking is not necessary.
  • adb and Linux knowledge.
  • webtop2sd is not supported (!)
  • CM7 is NOT supported

GenTop2 Space Requirements, Disk Speeds and a Note About WebTop2SD

Gentoo is very large because packages contain all development files. This cannot easily be changed, therefore one must work around the space limitation of the /osh partition in some way.

I did some "disk" performance measurements using bonnie++ (see [1] for full info). Here the through-put results in short: /data (ext3) 20,800 KB/s read and 6,200 KB/s write, /sdcard (fat32) 21,500 KB/s read and 8,000 KB/s write, /sdcard-ext (ext3) 12,300 KB/s read and 4,200 KB/s write, /sdcard/loopback.img (ext3) 16,150 KB/s read and 4,400 KB/s write.

One way to go would be to require webtop2sd, however, GenTop2 does not support webtop2sd because the read/write speed of the internal sdcard is much faster than on the external sdcard. Thus I tried to install as much on the /osh partition as possible and move directories onto other partitions as necessary, leaving symlinks behind. WebTop2SD also requires dpkg for some reason, which Gentoo does not have.

Therefore, it's pretty unavoidable that you do some space management yourself.

I have decided to utilize the /preinstall partition for /var. I'm not fully sure that this partition is unused on every Atrix released, but I guess in most cases it contains only provider specific bloatware that people don't want anyhow. On my Atrix it contained some car racing game, which I find hilarious to play on a mobile phone.

Anyway, the /preinstall partition is 300 MB and perfect for /var if reformatted to support many small files. The /var/db/pkg/ directory contains lots and lots of small files describing the installed packages. See the installation instruction for the mkfs line.

I also decided to require some extra ext3 partition for further program, data and portage files. It is needed anyhow to install further programs, which is what most people want to do. The /data partition would be the obvious choice and for that reason the first GenTop2 put files in /data/osh/. However, /home/ is also on /data by default and it gets pretty annoying when your home directory is full.

The only alternative to /data is either a partition on an external sd-card or a loopback mounted file-partition on /sdcard/, both are not as fast as /data (/cache cannot be used as it must be wipeable). So there really isn't much choice left except for external storage.

The main GenTop2 tarball puts 630 MB in /osh (leaving 145 MB free) and 178 MB in /preinstall (with 150 MB free), which must be mkfs formatted.

The portage GenTop2 tarball puts 1460 MB into /mnt/gentoo/ of which 475 MB are data files from /osh/usr/ and 810 MB are the portage tree.

Steps to install GenTop2:

There are some complications involved when using faux123's kernel, because it only contains ext4 filesystem modules and explicit mounting of ext3 will fail. The ext4 module will however mount ext3 filesystem without problems.

use adb shell and get root:
Code:
$ su
# cd /osh
# mv etc etcx
# reboot
Reboot. The above will disable the webtop.

Download http://kristallsturm.de/GenTop2/GenTop2-20120509.tar.gz (275MB) and put it onto /sdcard via USB or adb push.

use adb shell to overwrite the existing WebTop:
Code:
(first we delete /osh)
# cd /
# ls bin
bin: No such file or directory
(this tests whether the old webtop is disabled)
# rm -r osh/*
# ls osh
(should be empty)

(next we disable and reformat /preinstall)
# mount -o remount,rw /dev/block/mmcblk0p12 /system
# mv /system/bin/load_pia.sh /system/bin/load_pia.sh.disabled
# umount /preinstall
(depending on your ROM this might fail. ignore this problem if the following format works)
# mke2fs -m 0 -i 2048 -j /dev/block/mmcblk0p17
# mount -t ext3 /dev/block/mmcblk0p17 /preinstall
(for faux kernel: replace ext3 -> ext4 in above line)

(now we unpack the main tarball)
# df
(/osh and /preinstall should be almost empty)
# cd /
# tar xvzf /sdcard/GenTop2-20120509.tar.gz
# sync
(begin extra for faux kernel: we change ext3 -> ext4)
# sed -i s/ext3/ext4/ /osh/ubuntu.sh
(end extra for faux kernel)
# sync
# reboot
Once rebooted you will get an X11 login on the HDMI connection or you can access the phone via ssh.

Account Passwords:
root / atrix
adas / atrix

To make GenTop2 more useful and to compile/install further packages you currently must have an external sd-card (or someone must devise a method to use a loopback device).

I have partitioned my external sdcard using a desktop computer into the following two partitions:

/dev/block/mmcblk1p1 (remainder)
/dev/block/mmcblk1p2 (4.0 GB, formatted ext3)

Advanced: (Actually most of this stuff is advanced.) You can also use the new GenTop to partition the external sd-card. Open a terminal, and use something along the lines of:
Code:
# fdisk /dev/block/mmcblk1
(partition it, see further description of fdisk on the net)
# mkfs.ext3 -m0 /dev/block/mmcblk1p2
The boot-up script /osh/ubuntu.sh will mount /dev/block/mmcblk1p2 to /mnt/gentoo. This place is referenced by /usr/portage, /var/tmp and /preinstall/usr and will enable emerge if you install the second GenTop2-portage-20120509.tar.bz2 tarball.

Download http://kristallsturm.de/GenTop2/GenT...ortage.tar.bz2 (124MB) to /sdcard/ using any method.

Use adb shell or a terminal on the desktop
Code:
$ su
# cd /
# tar xvjf /sdcard/GenTop2-20120509-portage.tar.bz2
Note: If you trust your network connection, you can also download and unpack simultaneously (without saving) it using:
Code:
$ su
# cd /
# wget -O - http://kristallsturm.de/GenTop2/GenTop2-20120509-portage.tar.bz2 | tar xvj
Installing further software

How do I install applications in Gentoo?
- Read http://www.gentoo.org/doc/en/handboo...?part=2&chap=1
- Read http://www.gentoo.org/doc/en/handboo...x86.xml?part=3

I have set up a portage overlay "atrix-overlay" which unmasks many packages and includes some custom patches required for compilation on arm. It is included in the main tarball and automatically synced alongside "emerge --sync". Most updates will now be performed via this overlay.

See https://github.com/gendol/atrix-overlay for details.

Furthermore, for large binary packages like firefox, thunderbird and libreoffice I have set up a binary package repository with the same USE flags as the atrix-overlay. These are built using cross-compilation on my desktop computer.

See http://kristallsturm.de/GenTop2/packages/

To force installation from binary packages use emerge -G <package>. See the list of "Installable as binary packages" above.

Miscellaneous Questions

Why no thumb instructions?
- I did a speed test of cryptography functions and thumb instructions were approximately 10% slower than usual ARM code.

Where was GenTop2 compiled?
- Most of the system was fully compiled on my own Atrix. Larger binary packages are compiled on my desktop using cross-compiling.

Why is X11 not up-to-date?
- The only xorg driver I could get working is the one on the original Webtop, and that requires an older version of X11.

Why is udevd not running?
- If you look at logcat there are lots of the following messages, some of which are due to udevd. Disabling udevd reduces (but does not eliminate) these messages and probably also some unnecessary background process that draws battery.
NetlinkEvent: NetlinkEvent::FindParam(): Parameter 'UDEV_LOG' not found
NetlinkListener: ignoring non-kernel netlink multicast message
NetlinkListener: ignoring non-kernel netlink multicast message

Reinstalling the old WebTop

Some people on the forums struggled to reinstall the old webtop for some reason. It shouldn't be that difficult and I created a tarball of the original Webtop WT-1.2.0-133_38. These instructions were not tested by me:

Download http://kristallsturm.de/GenTop2/WT-1.2.0-133_38.tar.gz to /sdcard/ using any method.

Use adb shell or a terminal to disable mounting of webtop:
Code:
$ su
# cd /osh
# mv etc etcx
# reboot
Use adb shell to unpack original tarball into /osh:
Code:
# cd /
# ls bin
bin: No such file or directory
(this tests whether the webtop is disabled)
# rm -r osh/*
# ls osh
(empty)
# cd /
# /sdcard/WT-1.2.0-133_38.tar.gz
# sync
# reboot
Downloads

Old Downloads

Changelog

From 20120428 to 20120509:
  • Added atrix-overlay for pulling in updates using layman.
  • Reorganized /etc/portage/ to symlink into atrix-overlay files.
  • Removed mplayer from default install.
  • Added xarchiver, leafpad and some customization for the terminal.
  • Reorganized directory structure to use /preinstall.

From 20120424 to 20120428:
  • Readded resolutions to xorg.conf like in original webtop. Nevertheless you can switch using Xfce's settings dialogs.
  • Installed Flash: copied libflashplayer.so and emerges nss nspr.
  • Readded lots of the original .desktop files and corresponding icons. These launch Android apps.

[1] http://kristallsturm.de/GenTop2/docs/atrix-bonnie.html
Attached Thumbnails
Click image for larger version

Name:	gentop2-desktop.jpg
Views:	8710
Size:	245.5 KB
ID:	1023122   Click image for larger version

Name:	gentop2-apps.jpg
Views:	8719
Size:	247.4 KB
ID:	1023123  
The Following 60 Users Say Thank You to Gendol For This Useful Post: [ Click to Expand ]
 
ufukcoskun
Old
#2  
Member
Thanks Meter 28
Posts: 95
Join Date: Feb 2011
Location: Istanbul
It is a good job. I try this. Thank you.
 
exwannabe
Old
#3  
Member
Thanks Meter 28
Posts: 88
Join Date: Apr 2011
This is a very agressive aproach. /osh dose have some Moto magic sauce in it. How well can you drive the screnn with a stock X system? Most of the cutesy features from WT I can live w/o, but the "phone"app really is usefull. Seams like this would be worth the effort to figure out.

If I was using a less "pure" setup (spinning up X and the phone app in Motos osh) then bringimng up the desktop in Gentoo, how would that compare to oither the same concept with other distros?

Please post on. I think this is the first time somebidy has run a non /osh X. Would love to see if it really can be done.
 
Gendol
Old
#4  
Junior Member - OP
Thanks Meter 81
Posts: 16
Join Date: Apr 2012
Quote:
Originally Posted by exwannabe View Post
This is a very agressive aproach. /osh dose have some Moto magic sauce in it. How well can you drive the screnn with a stock X system? Most of the cutesy features from WT I can live w/o, but the "phone"app really is usefull. Seams like this would be worth the effort to figure out.
Thanks for pointing that out. Yes, the approach is radical, but not as aggressive as you may think. All the "magic sauce" in /osh lives in /osr/usr/local/ and all of that is retained. The only problem is that some dynamic link libraries are missing, but most of these problems can be fixed.

They actually had to be fixed because the GenTop2 does need to send some magic signals to Moto's PortalApp/DockService to work correctly. This is done using the /usr/local/bin/rmtest tool via the "fbcp" instance of dbus.

Other than /osh/usr/local/, /osh is really just Debian.

With the phone app, you mean the green phone button? I just tested that, it can be added. The phone button is nothing but a .desktop mime file, which calls one of the magic apps /usr/local/bin/androidlauncher. And it popups up in the aiw display.

I even tested the HD Media Center laucher and that too worked without problems. That really should be included in the next GenTop2 tarball.

Quote:
Originally Posted by exwannabe View Post
If I was using a less "pure" setup (spinning up X and the phone app in Motos osh) then bringimng up the desktop in Gentoo, how would that compare to oither the same concept with other distros?

Please post on. I think this is the first time somebidy has run a non /osh X. Would love to see if it really can be done.
I guess I don't understand what you mean with a non /osh X. GenTop2 does run X11 and you really need to replace the system libaries to get a well-working Gentoo.

Greetings,
Gendol
 
crnkoj
Old
(Last edited by crnkoj; 25th April 2012 at 05:08 PM.)
#5  
Senior Member
Thanks Meter 363
Posts: 1,557
Join Date: Feb 2011
Great job! Does this work with cm rom's aswell or only with blur based ones? As another fact, we could use distcc or crosscompile distcc to compile most of the stuff, actually even a crosscompile binhost would be doable for several packages. One more thing, we could probably use an .img file on the internal sdcard partition, that would be ext3/4 formatted instead of using the external sdcard (but probably its better and safer to sue the external card, due to the flash wear)

edit: so i tried it on my atrix with nottachtrix rom installed, it starts fine and seems to work rather well, i only saw two to me rather annoying bugs:
1. somehow the X server thinks that my tv (1080p lg) has a virtual size of 1366x768 and will not allow to use the 1920x1080 resolutions that are in the TV's EDID and that the system puts into the xorg.conf file aswell as it shows in the Xorg.0.log
2. the atrix's screen stays on all the time in the "normal mode" and if one uses the mouse on the gentop its moving and functioning on the atrix's screen aswell (ie you can launch apps by accident with the mouse in android)
I do not know if these are issues with nottachtrix or something else, but for me on the "normal webtop" 1080p worked on this same TV.
here the xorg log: http://dl.dropbox.com/u/24268926/Xorg.0.log
The Following User Says Thank You to crnkoj For This Useful Post: [ Click to Expand ]
 
markinhosmrk
Old
#6  
Junior Member
Thanks Meter 1
Posts: 3
Join Date: Apr 2012
Really nice, installing it right now!

Does flash work on Midori?
 
Gendol
Old
#7  
Junior Member - OP
Thanks Meter 81
Posts: 16
Join Date: Apr 2012
I don't know about CM7, you'll have to try to replace the Linux system like moto does it.

The X11 screen size defaults to WebTop resolution 1366x768, but you can change that to 1920x1080 by editing /etc/X11/xorg.conf. The first thing to try is to comment out all Modelines and let EDID detection do the work. But for that a monitor must be present, so you need to Zap (Ctrl+Alt+Bckspace) your X, and that brings up the dual input problem.

I also use nottach's ROM. The dual input problem happens when something in motorola's magic communication goes wrong. I have not been able to figure out how in particular moto disables input on the touchscreen. For me it works most of the time. I also have all the Modelines in xorg.conf enabled, because they fit my monitor.

I didnt really focus on Flash, yet. But as it works on the original Webtop, you should just be able to copy the plugin files.

Gendol
 
Vazay
Old
(Last edited by Vazay; 26th April 2012 at 05:01 PM.)
#8  
Senior Member
Thanks Meter 65
Posts: 214
Join Date: Sep 2011
Can't get Midori working .. Got network (via ping), but no web browsing

EDIT: Solved by disabling proxy settings inside Midori
 
iolinux333
Old
#9  
Senior Member
Thanks Meter 41
Posts: 399
Join Date: Apr 2008
i haven't run gentoo in over 10 years but this is tempting!!!!!
 
snik38
Old
#10  
Junior Member
Thanks Meter 0
Posts: 23
Join Date: Dec 2010
Hello! I am a bit newbie in linux and i have 2 questions
1) Could someon please tell me how to install GenTop2-portage-20120424.tar.bz2 tarball?
2) Is there any way to install synaptic so i can install other linux apps?

Tags
webtop
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes