Related
Update 2010-02-26 Added examples for linking either dynamically or statically (see page 2)
I decided to try and set up a kitchen using the closest thing to a native kernel dev environment that I could set up.
At this point I have:
- cross-compiled the HTC Desire (kernel) sources using the Android 1.6 NDK
- figured out the repo/git stuff to pull the Android sources corresponding to a given Android release point
- cross-compiled the entire Cupcake release to an ARM target using the NDK tools
- built a dynamically linked "hello, world" executable using the NDK arm-eabi-* tools and verified it works on the phone.
Yah, I know - not much yet, but it's a start for a newb.
I have some notes documenting the Ubuntu setup process in case anyone wants it - but it is full of links (URLs), so I can't post anything with links as a new user.
If a mod can "verify" my account, I'll post it up. I promise, I'll be good.
bftb0
OK, I guess I need to make a couple of posts before I can embed links.
I'll post it without the URL protocol prefix (it's gonna look fugly), and then come back and edit it once the restriction is removed. I hope someone finds it useful.
Android kernel dev is not officially supported on Windows; closest match to Google Dev environment seems to be -> Ubuntu 8.04 LTS + JDK 5 (32 bit, not x64).
I realize that this is nothing close to the "kitchens" that the WinMo folks have been using, but figured that (as a newb) I would just end up confusing myself trying to figure out which of those tools could be useful for Android, in addition to needing the native binary cross-compilation tools anyway.
(Note: I briefly tried to set this up in a Ubuntu VMware Player VM, but ran into limitations of available Ubuntu 8.04 LTS player machine file size limits (as well as problems hosting a VM bigger than about 10 Gb on a USB drive - insufficient space on my primary drive)
If anyone wants to follow in my footsteps, here is a thumbnail sketch of useful links. I'll admit, this is not for the faint of heart - you need Linux/Unix skills to work through the kinks.
1) (ubuntu.com/getubuntu/downloadmirrors#mirrors) Ubuntu Download Mirrors list - Find a server near you
2) Download ubuntu-8.04.4-alternate-i386.iso and burn it to 700 Mb CD-R
3) Install Ubuntu 8.04 LTS Desktop Version (gulp!)
4) Use the Ubuntu graphical package manager (System -> Administration -> Synaptic Package Manager) and install the packages (git, flex, bison, etc) mentioned in the "Ubuntu Linux (32-bit x86)" section in this (source.android.com/download)Android Source setup page
5) Note that JDK6 does not work correctly; rather than going to Sun/Oracle for JDK5, install the sun-java5-{bin,jdk,jre,doc,demo} packages (1.5.0-22-0ubuntu) using the Ubuntu package installer mentioned above. Note if you install the docs package, you will also need to go to Sun/Oracle and get jdk-1_5_0-doc.zip towards the end of the package install, and drop it into /tmp for the package manager to finish.
6) Go to the (developer.android.com/sdk/index.html) Android SDK Download page and get android-sdk_r04-linux_86.tgz
7) Unpack ( gunzip -c and...tgz | tar xf - ) to desired location, add tools dir to PATH
Optional Steps (For Java App Devs)
o-8) (eclipse.org/downloads/ Eclipse IDE Download page - chose 'Eclipse Classic 3.5.1 (162 MB)' for Linux, 32 bit (eclipse-SDK-3.5.1-linux-gtk.tar.gz)
o-9) Install by unpacking ( gunzip -c ecli....tar.gz | tar xf - ) to desired location, add eclipse folder to PATH
o-10) Run eclipse, and follow the (developer.android.com/sdk/eclipse-adt.html) Installing and Updating ADT instructions for adding Android functionality to Eclipse 3.5 (Galileo)
o-11) From within Eclipse, launch Window -> Android SDK and AVD Manager, and install all available & compatible Android SDK Tools (all versions). (You might need to use http instead of https... YMMV) Note that this is the same functionality as simply running the command "android" from the command prompt if the Android SDK (steps 6,7) tools directory is in your PATH
12) Familiarize yourself with the command line tool "adb" tool in the SDK; in particular, since Ubuntu needs root privs to access the USB hardware, the best way to start the adb server on your PC is to
Code:
$ sudo /bin/bash
- set up root's environment so the SDK "tools" directory is in root's PATH
- plug your phone into the USB cable
- On the Eris, set the options:
Settings -> Applications -> Development -> USB Debugging (on)
Settings -> Applications -> Development -> Stay awake (on)
Code:
# adb devices
This last command only lists the available USB-connected (real) devices and any emulators you have running, but as a side effect it starts up the adb server on the Ubuntu machine running as root. Thereafter, you can use adb (or ddms) as an unprivileged user.
13) Have a peek at the SDK "ddms" monitor. A variety of things can be done from here, the least of which is screen shots (Select device, then Device-> Screen capture)... and some more twisty things too.
14) Download the (developer.android.com/sdk/ndk/1.6_r1/index.html) Android 1.6 NDK r1 (Native Development Kit) - android-ndk-1.6_r1-linux-x86.zip, and unzip into your desired location. Add the ARM cross-compiler tools to your path (see example below).
15) At this point you might be using something like this to set up your path wherever you please (.profile or elsewhere, according to how you want to manage your environment)
Code:
_INSLOC='/opt/android/'
_JAVAPATH='/usr/lib/jvm/java-1.5.0-sun/bin'
_BASEPATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
_ANDTOOLS="${_INSLOC}"'/android-sdk-linux_86/tools'
_ECLPSPATH="${_INSLOC}"'/eclipse-3.5.1'
_ARMXCOMPILE="${_INSLOC}"'/android-ndk-1.5_r1/build/prebuilt/linux-x86/arm-eabi-4.2.1/bin'
PATH="${_JAVAPATH}"':'"${_BASEPATH}"':'"${_ANDTOOLS}"':'"${_ECLPSPATH}"':'"${_ARMXCOMPILE}"
export PATH
16) Download the (member.america.htc.com/download/RomCode/Source_and_Binaries/desirec-be918f7b.tgz) HTC Desire Kernel Source Code and unpack to a location of your choice.
17) Test your enviroment by building the HTC Kernel code:
$ cd v2_6_27/kernel_msm7k; make
I can't remember if I needed to stuff anything into the environment here (e.g. 'CC' definitions, etc.) - but I know that I didn't need to modify any Makefiles. I think the make system will find all the "arm-eabi-*" executables if they are in your path. You will know soon enough.
18) Try to compile a "Hello, world!" program for the phone. Before you get too far along in this (e.g. "where is crt0.o?"), (honeypod.blogspot.com/2007/12/dynamically-linked-hello-world-for.html) read this blog post - steps 3 and 4 only.
You might find a Makefile similar to this useful:
Code:
AR = arm-eabi-ar
AS = arm-eabi-as
CC = arm-eabi-gcc
CXX = arm-eabi-c++
LD = arm-eabi-ld
NDK_KIT = /opt/android/android-ndk-1.5_r1
PLATF_KIT = build/platforms/android-1.5
ARM_INC = $(NDK_KIT)/$(PLATF_KIT)/arch-arm/usr/include
ARM_LIB = $(NDK_KIT)/$(PLATF_KIT)/arch-arm/usr/lib
PLATF_INC = $(NDK_KIT)/$(PLATF_KIT)/common/include
OBJS = hello.o start.o
EXES = hello
hello: hello.o start.o
$(LD) \
--entry=_start \
--dynamic-linker /system/bin/linker -nostdlib \
-rpath /system/lib -rpath $(ARM_LIB) \
-L $(ARM_LIB) -lc -o hello hello.o start.o
hello.o: hello.c
$(CC) -I $(ARM_INC) -I $(PLATF_INC) -c hello.c
start.o: start.c
$(CC) -I $(ARM_INC) -I $(PLATF_INC) -c start.c
clean:
rm -f $(OBJS) $(EXES)
and then
Code:
$ make hello 2>&1 | tee make_hello-log.txt
if all goes well, push to the phone
Code:
$ adb push hello /sqlite_stmt_journals/hello
and then use a shell on the phone to watch the lights gerblinken:
Code:
PC-path$ adb shell
$ cd /sqlite_stmt_journals
$ ./hello
Hello, world!
$ exit
PC-path$
19) Now, download the Android stock kernel sources:
- Make sure you have "git" and "repo" installed; see the (source.android.com/download) Android "Get source" page, starting from "Installing Repo".
- Make a clean directory to initialize "repo" in, and download the code:
Code:
$ mkdir ~/mydroid
$ cd ~/mydroid
$ repo init -u git://android.git.kernel.org/platform/manifest.git -b cupcake
$ repo sync
The sync step above will download the entire source tree corresponding to the Cupcake release (90 minutes on my link).
20) Build the sources
Code:
$ cd ~/mydroid
$ make 2>&1 | tee make_Android-log.txt
On my old PC, this step took about two hours.
Well, that's a little start; everything that comes after this is heavy lifting, I suppose.
bftb0
Thank you for that.
I forgot to add a disk space usage report to this; here it is:
O/S ( /, /boot, /var, /tmp) ~ 4 Gb **
Android SDK, all versions: 1.3 Gb
Android "Cupcake" full sources + full build: 5.5 Gb (2.5 Gb sources, 3.0 Gb build tree)
Android NDK ~0.05 Gb
Eclipse 3.5.1: 0.21 Gb
HTC Desire Kernel Sources + build ~ 0.77 Gb
All up, thats about 12 Gb minimum needed for a full environment. Obviously, you would want some headroom above that.
Note that if you only want to build native binaries, and not the full Android source tree (or develop Java applications), this could be done handily in a virtual machine which is less than 10 Gb in size - for Windows users, there are VMware "Player" versions of Ubuntu 8.0.4 available for that. That eliminates the need for a separate machine, or a dual-boot PC - and the worries of messing up trying to create a dual-boot machine.
All that is really needed for that is the Desktop OS and the NDK. Adding a single version of the SDK so you have 'adb' and 'ddms' available to you would be helpful, but not absolutely necessary if you are using a Windows host machine with those tools already present.
bftb0
** beware that Ubuntu uses a lot of space on /var if you put it in a separate partition - 600+ Mb in my configuration.
bftb0 said:
I forgot to add a disk space usage report to this; here it is:
O/S ( /, /boot, /var, /tmp) ~ 4 Gb **
Android SDK, all versions: 1.3 Gb
Android "Cupcake" full sources + full build: 5.5 Gb (2.5 Gb sources, 3.0 Gb build tree)
Android NDK ~0.05 Gb
Eclipse 3.5.1: 0.21 Gb
HTC Desire Kernel Sources + build ~ 0.77 Gb
All up, thats about 12 Gb minimum needed for a full environment. Obviously, you would want some headroom above that.
Note that if you only want to build native binaries, and not the full Android source tree (or develop Java applications), this could be done handily in a virtual machine which is less than 10 Gb in size - for Windows users, there are VMware "Player" versions of Ubuntu 8.0.4 available for that. That eliminates the need for a separate machine, or a dual-boot PC - and the worries of messing up trying to create a dual-boot machine.
All that is really needed for that is the Desktop OS and the NDK. Adding a single version of the SDK so you have 'adb' and 'ddms' available to you would be helpful, but not absolutely necessary if you are using a Windows host machine with those tools already present.
bftb0
** beware that Ubuntu uses a lot of space on /var if you put it in a separate partition - 600+ Mb in my configuration.
Click to expand...
Click to collapse
great very descriptive thread
Hey bftb0
thanks for posting this guide. I am trying to just play around with someone of the exploit binaries on my eris (from the tattoo/hero rooting threads) , so these guidelines are coming in handy. However for some reason whenever I try and do anything over adb i get this error:
Code:
error: insufficient permissions for device
I cant use adb shell at all, even trying to push to the sdcard gives permissions denied. In the adb devices output the phone is coming up as "?????? no permissions", Did I miss a step ?
My setup so far: Ubuntu 9.10 i386,
Hey bftb0
thanks for posting this guide. I am trying to just play around with someone of the exploit binaries on my eris (from the tattoo/hero rooting threads) , so these guidelines are coming in handy. However for some reason whenever I try and do anything over adb i get this error:
Code:
error: insufficient permissions for device
I cant use adb shell at all, even trying to push to the sdcard gives permissions denied. In the adb devices output the phone is coming up as "?????? no permissions", Did I miss a step ?
My setup so far: Ubuntu 9.10 i386, android-sdk_r04-linux_86, droid eris with most recent OTA
someguy, you have to go to developer.android.com/guide/developing/device.html and install the linux driver (as root) and restart your system.
@someguy
Type "adb kill-server" followed by "sudo adb". You need to run adb as root in unix for it to work.
zifnab06, that was it, I must have not run the first command as root which caused the server to be run without su.
What exactly does this do?
bigcj55 said:
What exactly does this do?
Click to expand...
Click to collapse
Because of the lineage between Linux and Android, the primary platform for compilation of the kernel and other ARM instruction-set binaries ("native" code) has been on Linux. It appears (at the moment...reading between the lines) that Google engineers are using Ubuntu 8.04 LTS as their choice of Linux platform for maintaining Android kernel & utilities code... so, in principle, it is the "best supported" platform for doing "native" development work, if for no other reason than it's what Google has been using. (Not because it is somehow a "better" O/S, but rather because you are likely to run into fewer quirks, and have more resources on the internet who might have experienced the same difficulties that you run into.)
For instance, the folks that have been building kernel exploit programs have been using the Google "NDK". They are not writing/compiling those in Java - they are writing or compiling programs written in "C", and compiling them into native (ARM) object code.
I provided notes from my own installation for anyone considering "dipping their toe" into building Android kernels or native binaries using Linux as a host O/S - most forum readers are not going to be interested in doing that.
Note that Google now releases an NDK for Windows, Linux, and Mac OS/X. The strange thing about doing development on Windows using Cygwin is that if you have sufficient skills to do so - and are capable of resolving problems that inevitably crop up - then you probably already have sufficient skills to be using Unix/Linux in the first place. Sort of depends on your past experience, though. I'd be willing to bet that Devs with a history of doing WinMo development probably would prefer to climb the Android development learning curve by trying their hand with the Windows/Cygwin NDK because of their familiarity with other Windows-based development tools (IDEs, hex editors, assemblers, GUI generators, etc).
That reminds me though - I need to update this thread with something else.
Cheers
bftb0
Static OR Dynamic Linking of Native Binaries
I was a little unsatisfied with the "hack" used in the above examples to circumvent the need to launch programs without linking to C runtime initialization using that strange code shown above, i.e.
Code:
start() { exit( main() ); }
Moreover, for purposes of debugging applications running on the phone (using "gdbserver"), it simply seems easier to link statically - it allows you to step into the syscall library routines and actually see the assembler implementations wrapped around "STI" interrupts.
So, I spent some time experimenting, and came up with a Makefile that allows me to easily toggle between building an ARM executable linked statically or dynamically. Moreover, it lets "argc" and "argv" work they way they are supposed to, and also allows main() to do a return().
Here's an example Makefile, for a program "hello.c". Make sure you read the notes which follow it.
Code:
#
# FIX THESE (to match your installation)
# Top of the Android Source/build tree (retrieved w/ repo)
ANDSRCROOT := /home/user/android/repo-root
# link dynamically against the libraries shipped on the phone!
# e.g.: $cd /opt/android/Eris_libs/ruu1_16_605_1 ; adb pull /system/lib/
PHONELIBS := /opt/android/Eris_libs/ruu1_16_605_1/lib
# Choose one or the other; static is easiest for debugging use
LINKMODE := dynamic
#LINKMODE := static
# tools
CROSS_COMPILE := arm-eabi-
CC := $(CROSS_COMPILE)gcc
LD := $(CROSS_COMPILE)ld
AR := $(CROSS_COMPILE)ar
CXX := $(CROSS_COMPILE)c++
OBJDUMP := $(CROSS_COMPILE)objdump
RANLIB := $(CROSS_COMPILE)ranlib
READELF := $(CROSS_COMPILE)readelf
# Note STATLIBROOT is relative to the Android Source root (ANDSRCROOT)
STATLIBROOT := out/target/product/generic/obj/STATIC_LIBRARIES
INCLUDE := -I $(ANDSRCROOT)/bionic/libc/include \
-I $(ANDSRCROOT)/bionic/libc/arch-arm/include \
-I $(ANDSRCROOT)/bionic/libc/kernel/common \
-I $(ANDSRCROOT)/bionic/libc/kernel/arch-arm
ifeq ($(LINKMODE),dynamic)
LIBDIRS := -L $(PHONELIBS)
else
LIBDIRS := -L $(ANDSRCROOT)/prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/lib/gcc/arm-eabi/4.2.1 \
-L $(ANDSRCROOT)/$(STATLIBROOT)/libc_intermediates \
-L $(ANDSRCROOT)/$(STATLIBROOT)/libc_common_intermediates
endif
ifeq ($(LINKMODE),dynamic)
CRTBEG := $(ANDSRCROOT)/out/target/product/generic/obj/lib/crtbegin_dynamic.o
LDFLAGS := -rpath /system/lib -rpath-link /system/lib --dynamic-linker /system/bin/linker
EXTLIBS := -lc -ldl
else
CRTBEG := $(ANDSRCROOT)/out/target/product/generic/obj/lib/crtbegin_static.o
LDFLAGS := -static
EXTLIBS := -lc -lgcc -lc_common
endif
CRTEND := $(ANDSRCROOT)/out/target/product/generic/obj/lib/crtend_android.o
CFLAGS := -g -Wall
%.o: %.c
$(CC) -c $(INCLUDE) \
$(CFLAGS) $< -o [email protected]
%.s: %.c
$(CC) -S -c $(INCLUDE) \
$(CFLAGS) $< -o [email protected]
all: hello
hello: hello.o
$(LD) $(LDFLAGS) \
-o [email protected] --entry=_start -nostdlib \
$(CRTBEG) \
$^ \
$(CRTEND) \
$(LIBDIRS) $(EXTLIBS)
This makefile has certain assumptions built into it:
(1) Static Linkage
If you are going to link statically, you will need to have already built the entire Android source tree - the Android NDK does not provide any static libraries (In the OP I provided instructions on how to do this download and build the Android "Cupcake" release.)
(2) Dynamic Linking
If you want to compile code which is "as close to the phone as possible" then there is really only one way to do that: compile against the headers that HTC used, and perform linking against the dynamic libraries that you literally pull off the phone ("adb pull /system/lib").
There's only one problem with this strategy: HTC did not release their copy of the bionic (or other library) source code, so you are forced to punt... the second-best choice is to use headers from the Android (Cupcake) source tree. So... you will notice that for both the dynamic-link or static-link cases in the above makefile, the $(INCLUDE) paths used during compilation come from the Android source tree.
bftb0
PS I guess there is a mechanism to configure the top-level "make" of the Android source tree for not only a target type (defaults to "arm"), but also a "machine" dependency. I didn't research that, as I have only built user-space code. I'm doubt there should be any differences at the syscall interface API - excepting perhaps things like ptrace() which have a machine dependency (register structures, etc).
bftb0 said:
Because of the lineage between Linux and Android, the primary platform for compilation of the kernel and other ARM instruction-set binaries ("native" code) has been on Linux. It appears (at the moment...reading between the lines) that Google engineers are using Ubuntu 8.04 LTS as their choice of Linux platform for maintaining Android kernel & utilities code... so, in principle, it is the "best supported" platform for doing "native" development work, if for no other reason than it's what Google has been using. (Not because it is somehow a "better" O/S, but rather because you are likely to run into fewer quirks, and have more resources on the internet who might have experienced the same difficulties that you run into.)
For instance, the folks that have been building kernel exploit programs have been using the Google "NDK". They are not writing/compiling those in Java - they are writing or compiling programs written in "C", and compiling them into native (ARM) object code.
I provided notes from my own installation for anyone considering "dipping their toe" into building Android kernels or native binaries using Linux as a host O/S - most forum readers are not going to be interested in doing that.
Note that Google now releases an NDK for Windows, Linux, and Mac OS/X. The strange thing about doing development on Windows using Cygwin is that if you have sufficient skills to do so - and are capable of resolving problems that inevitably crop up - then you probably already have sufficient skills to be using Unix/Linux in the first place. Sort of depends on your past experience, though. I'd be willing to bet that Devs with a history of doing WinMo development probably would prefer to climb the Android development learning curve by trying their hand with the Windows/Cygwin NDK because of their familiarity with other Windows-based development tools (IDEs, hex editors, assemblers, GUI generators, etc).
That reminds me though - I need to update this thread with something else.
Cheers
bftb0
Click to expand...
Click to collapse
Wow, i was a little off in this case. I was under the assumption y'all were somehow going to compile ubuntu to run on the eris. :O
[UPDATE]
BusyBox 1.19.2
Bash 4.2
Midnight Commander 4.8
TMUX 1.5 - That's right, full terminal multiplexer..
Vim 7.3
Terminal IDE ASCII Soft keyboard first round bug fixes complete.
It's the addition of TMUX and MC that really excites..
--------------------------
Well,
As the only people I know who might even be interested in this, I would like to announce the release of Terminal IDE v1.0.
A complete Java / Android Development Environment that runs on the device itself, with a nice telnetd / sshd feature.
For Android. Of course... Eat this you IPhone Hounds..
Woo HOO!!
The application is available on Android Market.
https://market.android.com/details?id=com.spartacusrex.spartacuside
As what I can only describe as 'dark days' finally draw to an end, I am very pleased with this first draft.
PLEASE give it a go, log in over telnet for a smoother ride, and let me know how it goes..
DO THE TUTORIAL! Does it work ?!
I have released the whole project GPLv2! Yeah, Who Knew!?
http://code.google.com/p/terminal-ide/
BOOOOOM!
Spartacus
a link to the app in the market would be usefull.
Interesting. Was just wondering about coding on my tablet.
Pretty freakin sweet
Thanks for putting this out!
Awesome
The full keyboard alone makes it worth downloading, but the IDE as well - wow!
this is best bro.
I randomly found this last night while looking for a decent mobile IDE for my tablet. I was looking for a simple text editor with syntax highlighting and you've taken that extra step to include other tools for ssh, telnet and compilers. Much appreciated.
One question, how do you start the ssh server? sshd doesn't seem to do it. I would like to scp files to my device from my desktop in order to work on my commute.
Thanks
The sshd app is actually called Dropbear.
You also have Dropbearkey.
You use Dropbearkey to generate the sshd certificates you need.
I really need to add a tutorial on setting the sshd keys up
For now Google has a couple of articles on it.
For file transfers you also have busybox FTP but I admit not terribley secure..
Allthough SSH is provided, and I wonder whether an SSH pipe can be created..?
And lastly you can just copy the files over to your sdcard via USB..
Will look into it & add tutorials asap.
Ok. So I now have SSHD working..
But there is a slight issue.. basically when you log in you have to start bash manually.. unless you have the file /etc/shell with the correct shell to use.. Which requires a rooted phone.
Since Terminal IDE is for non-ROOT users, I will have to recompile the code to allow a shell to be specified on the command line.. Soon..
FOR NOW - This is how to connect to the phone via SSH (There are other ways using public keys but this is one way)
So - Once in Terminal IDE
2) You need to create a couple of server ssh keys
Start in $HOME
Code:
cd ~
Create folder
Code:
mkdir .ssh
Give it some secure permissions
Code:
chmod 700 .ssh
Get in there
Code:
cd .ssh
Now create the keys
Code:
dropbearkey -t dss -f dropbear_dss_host_key
dropbearkey -t rsa -f dropbear_rsa_host_key
ok - That's almost it. Just need to start dropbear with the correct parameters now. [Probably want to keep this in a script]
Back HOME
Code:
cd ~
You need to know the UID of your app, which is different per phone - use 'id'
Code:
id
That will tell you your user ID / Group ID. Let's say its 10058.
Now to start DropBear
Code:
dropbear -A -N username -U 10058 -G 10058 -C password -d ~/.ssh/dropbear_dss_host_key -r ~/.ssh/dropbear_rsa_host_key -F -E -p 8090 -P PidFile
This will start it running in the foreground with password set to 'password' on port 8090.
Then you can connect, like telnet, and simply use 'password' for the password.
Now for the issue. It will start a simple shell session in / with no ENVIRONMENT variables or anything..
I'll fix it permanently in a future release, but for now it can be fixed with these 2 commands.
cd into your home dir - Check this is correct on your device
Code:
cd /data/data/com.spartacusrex.spartacuside/files
And start bash with an init file Terminal IDE auto-magically creates..
Code:
./system/bin/bash --init-file ./.init
Everything should now be setup as usual.
Good luck..
Very awesome and thank you sir. Works like a charm.
One thing to clarify for those "braving" this (not that it's all that insane to try)... the '-N' is setting the username (in the case of the example, setting it to 'username').
Also, it gives a permission denied for scp, I'm assuming since it doesn't init/run the shell. Should be fine since FTP is included. Haven't tried this option yet. Not too worried about security at the moment, since I'll only run it on a private network.
May I make a (maybe) small feature request? Is it possible to include a "keep screen awake" option in the options menu? I have my Xoom config'd to turn off the wifi when the screen is off for power saving (can go ~4 days on 1 charge), so it will kill my connections if I let this happen. I know not everyone has this config set, but it'd be a nice option.
NOW, if I wasn't lazy, I could probably add this myself and build since I've dl'd the source. But, lazy and working on a few projects already.
Again, much thanks.
And as if by magic..
Funnily enough I was having the exact same issue last night while using wget to transfer a big file to my device..
NEW VERSION UPLOADED v1.13
Now has 3 non-exclusive lock types available in the options :
- CPU Lock
- SCREEN Lock
- WIFI Lock
Set them as you wish...
Saw that this morning when I was on the bus (Thursday morning here in Hong Kong). Very awesome and much appreciated.
As well, thanks for open-sourcing it. +1 for you sir!
Very cool stuff
Thanks for creating this.
Great app! However I can't compile .java files. I always get an error that it can't unzip a file in /android.policy.jar. Any idea?
Sent from my GT-I9100 using XDA App
Do you think its possible to also support compiling C sources directly in your phone
I've been searching for this ever since I got an android.
THANK YOU.
Says that it's incompatible with my OG Droid. Any idea why?
shpen said:
Says that it's incompatible with my OG Droid. Any idea why?
Click to expand...
Click to collapse
Most likely seems to be due to the ROM you are using and/or the market version
can u post the build.prop here?
/system/build.prop
also, try going back to market 2.x, 3.x market(s) do loads of checks
Does anybody know why I can't compile java files? I always get the following error:
Error reading /system/framework/android_policy.jar cannot read zip file.
Any ideas? Could anyone upload there android_policy.jar because that might cause the error.
Sent from my GT-I9100 using XDA App
Hi Schindler33.
Can I ask, have you followed the tutorials, say the first helloworld example TO THE LETTER?
Does the helloworld example work?
The parameters have to be correct, and as always exact, and the BOOTCLASSPATH variable must be set.
If so, is it a custom ROM?
Does that policy jar file exist and is it readable by non root users?
As much info as possible good..
Hi,
I start this thread to speak about natively running Debian Squeeze on LG Optimus GT540.
I have put somme script to bootstrap complete installation on sdcard on :
poivron.org/~jimpulse/swift
Please read README first.
Kernel is 2.6.29 from lge source with minors modifications :
* lge source don't compile properly ( this is not what is distribute as binnary ?GPL violation? ).
* Framebuffer console on startup.
* Software refreshing enable.
* Race condition on mddi register function when using software refresher
* Inkernel command line.
* ext3fs
Kernel debian packages are in swift/kernel
the boot image is in swift/boot and is reconstruct at end of bootstrap.
Lxde environement with matchbox-window-manager and matchbox-keyboard is working fine for me.
Slim is used as display manager in autologin mode.
Freesmartphone is installed but not configured (TODO)
Wifi (4325) is working but module is not loaded on startup. The firmware is from lge source distribution but is the same as on binary distribution.
Bluetooth (?4325?) is not working. (blueman need dpkg --configure at first startup). (TODO)
Enjoy.
--
jim
i got: You don't have permission to access /~jimpulse/swift/README on this server.
You don't have permission to access /~jimpulse/swift/README on this server.
Says when i try to open README file
Sory, I"m noob !
Now, It's working.
I didnt understand how it's booting. What should i do. Just flash boot.img to recovery then boot from it? Is it enough or what should i do can you write it step by step?
Hi,
You must install debian on first partition of your sdcard.
The partition must be ext2 or ext3 formated (preferably ext3).
The script 'bootstrap.sh' is make for that, you have to be root to use it.
the card must be mounted with suid,dev,exec .
you must have installed somme packages on your host, read README file.
--
jim
hi there,
so its something like a dual boot ?
something like this http://forum.xda-developers.com/showthread.php?t=1408824.
Hi,
It is not dualboot by itself.
It is just a scritp to install Debian Squeeze armel on sdcard and build a boot image.
More explanation :
!!! Please, dont run the script if your dont understand what it do !!!
You have to edit the script to match your preference :
ROOT=<the target directory where to install to>
ROOTDEV=<Name of the device were your phone will look to find root filesystem>
This script is tested only on Ubuntu oneiric but should work on other debian-like distros.
You can format your sdcard like this : sudo mkfs.ext3 -L swift /dev/XXX
where XXX is the device file corresponding to the partition you want to format. You can figure out that by looking at kernel message after inserting the sdcard : dmesg
Eject and reinsert the card to mount the new filesystem.
Remount the filesystem with apropriate options : sudo mount -o remount,exec,suid,dev /media/swift (or wherether your filesystem is mounted).
So, change ROOT= variable as ROOT=/media/swift (or whatether ...)
and ROOTDEV=/dev/mmcblk0p1 (for the first partition of the sdcard)
Then run in the swift/ directory : sudo ./bootstrap.sh
If all is right, it take aprox 4 hours on my [email protected] to download and install everything.
After installation, you have choice to flash the boot rom (eg : sudo fastboot flash recovery /media/swift/boot/boot.img-2.6.29-swift) or to use it as chroot environnement from android.
jimpulse said:
Hi,
It is not dualboot by itself.
It is just a scritp to install Debian Squeeze armel on sdcard and build a boot image.
More explanation :
!!! Please, dont run the script if your dont understand what it do !!!
You have to edit the script to match your preference :
ROOT=<the target directory where to install to>
ROOTDEV=<Name of the device were your phone will look to find root filesystem>
This script is tested only on Ubuntu oneiric but should work on other debian-like distros.
You can format your sdcard like this : sudo mkfs.ext3 -L swift /dev/XXX
where XXX is the device file corresponding to the partition you want to format. You can figure out that by looking at kernel message after inserting the sdcard : dmesg
Eject and reinsert the card to mount the new filesystem.
Remount the filesystem with apropriate options : sudo mount -o remount,exec,suid,dev /media/swift (or wherether your filesystem is mounted).
So, change ROOT= variable as ROOT=/media/swift (or whatether ...)
and ROOTDEV=/dev/mmcblk0p1 (for the first partition of the sdcard)
Then run in the swift/ directory : sudo ./bootstrap.sh
If all is right, it take aprox 4 hours on my [email protected] to download and install everything.
After installation, you have choice to flash the boot rom (eg : sudo fastboot flash recovery /media/swift/boot/boot.img-2.6.29-swift) or to use it as chroot environnement from android.
Click to expand...
Click to collapse
I have done it for one time but it didn't boot So im gonna do it again tomorrow. I dont have time today
I'm always having problem with the script. Now im starting again. I hope it will done this time... And can you use a .35 kernel for this?
Hi,
I'm planning to include .35 kernel, but I dont know which one to use. I've start a thread to ask people there preferences. Kernel need minor modification to have frame buffer console working.
If you have probleme with the script, post last few line of output and I will try to help.
--
jim
I have the mismatch size problem with the one of xorg-bla-bla packages By the way Mikegapinski's kernel is good to work i think.
Edit:
And does this make a problem?
pre-installing dpkg
warning, in file '/var/lib/dpkg/status' near line 3 package 'dpkg':
missing description
warning, in file '/var/lib/dpkg/status' near line 3 package 'dpkg':
missing maintainer
Click to expand...
Click to collapse
These two warning are not a problem, these are only because dpkg/status is not complete before installing dpkg. It's a bootstrap edge effect (dpkg need dpkg to be installed).
If the script don't run until the end, you should have a phase number given at end of output. You can skip already ran phase by passing a phase number as parameter to the script.
The xserver-xorg-core problem is about dependencies against all video driver. So I mangle the control file to remove these dependencies. Perhaps this can fail if debian repo version has changed.
jimpulse said:
These two warning are not a problem, these are only because dpkg/status is not complete before installing dpkg. It's a bootstrap edge effect (dpkg need dpkg to be installed).
If the script don't run until the end, you should have a phase number given at end of output. You can skip already ran phase by passing a phase number as parameter to the script.
The xserver-xorg-core problem is about dependencies against all video driver. So I mangle the control file to remove these dependencies. Perhaps this can fail if debian repo version has changed.
Click to expand...
Click to collapse
Now i have bootedup but how can iload the wifi module now?
Hi,
The default password for root is root .
There is no sudo preinstalled so use su.
Firmware and nvram settings are in /etc/wl as for android names rte.bin and nvram.txt .
You have to pass parameters at load time :
modprobe wireless firmware_path=/etc/wl/rtecdc.bin nvram_path=/etc/wl/nvram.txt
or put this in /etc/modprobe.d/wireless.conf :
alias wlan0 wireless
options wireless firmware_path=/etc/wl/rtecdc.bin nvram_path=/etc/wl/nvram.txt
Wicd is not working correctly so you have to configure by hand
(iwconfig and ifconfig) or edit /etc/network/interfaces. (view debian administration guide for that).
I will update the script tomorrow to add a configuration file for modprobe and an alias to wlan0.
--
Jim
jimpulse said:
Hi,
The default password for root is root .
There is no sudo preinstalled so use su.
Firmware and nvram settings are in /etc/wl as for android names rte.bin and nvram.txt .
You have to pass parameters at load time :
modprobe wireless firmware_path=/etc/wl/rtecdc.bin nvram_path=/etc/wl/nvram.txt
or put this in /etc/modprobe.d/wireless.conf :
alias wlan0 wireless
options wireless firmware_path=/etc/wl/rtecdc.bin nvram_path=/etc/wl/nvram.txt
Wicd is not working correctly so you have to configure by hand
(iwconfig and ifconfig) or edit /etc/network/interfaces. (view debian administration guide for that).
I will update the script tomorrow to add a configuration file for modprobe and an alias to wlan0.
--
Jim
Click to expand...
Click to collapse
Thanks for these and how can i access the command line from my computer?
Hi,
Sorry, but I've forget to put openssh on package list. I'he also froget to add debian repo to sources.list .
Edit /etc/apt/sources.list with nano or vi and add a line with :
deb http://ftp.debian.org/debian/ squeeze main
then run apt-get update
You have to use the lxde terminal to configure wireless and install openssh-server (apt-get install openssh-server).
After that, you will be able to connect with ssh (ssh [email protected]<IP ADDRESS>) from your computer.
adbd is not working and need some tweak to work with debian.
--
Jim
Hi,
I've update bootstrap.sh :
* openssh-server and openssh-client are installed per default
* sources.list is now created durring bootstrap with same repo that the bootstrap process used.
* modprobe is configured to pass correct parameters to wireless module. There is also ans alias wlan0 ponting to wireless.
* network/interfaces is update to have the loopback interface configured at boottime. The configuration for wlan0 must be tweak for your network (essid, dhcp or static ...) .
Now, I'm working on 2.6.35 from wingrime and hope to publish it next week.
--
Jim
So, how is it going?
Sent from my GT540 using Tapatalk
jasper580 said:
So, how is it going?
Sent from my GT540 using Tapatalk
Click to expand...
Click to collapse
Yeah i wonder it too. I is so good to have debian on my phone. It'll be more usable with a touchscreen gui. It doesn't lag more. I think you should change the keyboard to a bigger. And we should can rotate screen. At least with running a sh file from terminal By the way you're great! I think this is gonna be awesome for our phones...
[size=+1]Introduction[/size]
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.
[size=+1]Installation Instructions[/size]
Prerequisites:
Motorola Atrix
[size=+2][highlight]BACKUP.[/highlight] This will break your device![/size]
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.
[size=+1]Steps to install GenTop2:[/size]
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/GenTop2-20120509-portage.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
[size=+1]Installing further software[/size]
How do I install applications in Gentoo?
- Read http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1
- Read http://www.gentoo.org/doc/en/handbook/handbook-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.
[size=+1]Miscellaneous Questions[/size]
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
[size=+1]Reinstalling the old WebTop[/size]
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
[size=+1]Downloads[/size]
http://kristallsturm.de/GenTop2/GenTop2-20120509.tar.gz (275MB main tarball)
http://kristallsturm.de/GenTop2/GenTop2-20120509-filelist.txt (Filelist of tarball for your reference)
http://kristallsturm.de/GenTop2/GenTop2-20120509-portage.tar.bz2 (124MB portage tree for /mnt/gentoo/, see above)
http://kristallsturm.de/GenTop2/GenTop2-20120509-portage-filelist.txt (Filelist of tarball for your reference)
Old Downloads
http://kristallsturm.de/GenTop2/GenTop2-20120428.tar.gz (369MB main tarball)
http://kristallsturm.de/GenTop2/GenTop2-20120428-filelist.txt (Filelist of tarball for your reference)
http://kristallsturm.de/GenTop2/GenTop2-20120428-portage.tar.bz2 (44MB portage tree for /mnt/gentoo/, see above)
http://kristallsturm.de/GenTop2/GenTop2-20120424.tar.gz (364MB main tarball)
http://kristallsturm.de/GenTop2/GenTop2-20120424-filelist.txt (Filelist of tarball for your reference)
http://kristallsturm.de/GenTop2/GenTop2-20120424-portage.tar.bz2 (44MB portage tree for /mnt/gentoo/, see above)
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
It is a good job. I try this. Thank you.
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.
exwannabe said:
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.
Click to expand...
Click to collapse
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.
exwannabe said:
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.
Click to expand...
Click to collapse
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
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
Really nice, installing it right now!
Does flash work on Midori?
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
Can't get Midori working .. Got network (via ping), but no web browsing
EDIT: Solved by disabling proxy settings inside Midori
i haven't run gentoo in over 10 years but this is tempting!!!!!
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?
snik38 said:
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?
Click to expand...
Click to collapse
1) use ADB and first post
2) Gentoo Portage - it's command line but very easy
Hmm, anyone using this with webtop over HDMI? I get the login screen, but the webtop touchpad thingie doesn't come up so it's impossible for me to log in.
nalorite said:
Hmm, anyone using this with webtop over HDMI? I get the login screen, but the webtop touchpad thingie doesn't come up so it's impossible for me to log in.
Click to expand...
Click to collapse
you need to use a hd dock, lapdock or a modded powered usb hub with mouse + kb
Vazay said:
1) use ADB and first post
2) Gentoo Portage - it's command line but very easy
Click to expand...
Click to collapse
1) After the reboot i used
adb shell
# tar xvzf /sdcard/GenTop2-portage-20120424.tar.bz2
but it gave me an error, am i using the correct command or i should use something else?
Yes. The touchpad thingy is also an open end. I have no idea why it doesnt come up. The GenTop2 tries to do everything in the same way as the original one, but for some reason that doesnt appear.
I guess the touchpad is some Android program part of DockService or PortalApp, which drive the Webtop switch. But I havent debugged how to activate it.
@snik38
To extract a .tar.bz2 you use tar xvjf ...
Gendol
three items one that caused some grief, but other than that this has lots of cool potential!
I have a stock rom with root.
1. resolution was pretty screwed up. I did try to adjust the resolution, but it was locked into one setting.
2. flash isnt installed on the browser so many websites where disabled.
3. I could not get AIW to start.
I see you answered #1 in a previous post. But I think all three of those items are minimum requirements to replace webtop. BTW great job again! Its seemed much faster than the webtop app.
2. Try to copy the flashplugin from original webtop(not sure if it works with midori)
3. aiw works fine try to reboot the phone
Took me a while to get this all running, but it's great now it is. Have this over Nottachtrix 1.3.1. Everything installed and works fine!
Cheers!
When my phone turns on and gets to the preparing sd, it takes forever. Does this happen to anyone else?
anyone tried to emerge chrome/chromium?
This will not be worked on any longer thanks to Huawei's incompetence. I'm glad my main phone isn't by them. I leave my 0.2 diff attached (which did make my phone faster FWIW - and has fsync() control. Not of use to me, but people who use a modified libsqlite would like it...). Feel free to apply it and see if you can somehow fix dhd.ko loading.
Hi,
Not one for names, so this shall be known as "OC kernel" This is built from the ICS U8800pro source that Huawei put out.
Install at your own risk; I take no responsibilty for any damage that may occur through the usage of this kernel.
Features:
ADB as root
Overclocking enabled (thanks to genokolar)
Undervolting interface added (from genokolar, who took it from a SE kernel modder somewhere) - I think SetXperia can use it
SIO I/O scheduler added
SmartassV2 cpufreq scheduler (AnDyX mod) - although I think ondemand does a bit better IMO
sysfs entry to turn off keypad lights (I wrote an applet for this some time back, I'll dig it out later)
Logcat is always enabled now as the ServiceMenu toggle doesn't work anymore
Minimum display backlight is set to 15, but I think Android needs a framework change to use it. You could try RootDim
Kernel actually builds (and Bluetooth works)
ZRAM (+ swap) support. ZRAM is optimized for Android (taken from Siyah kernel). I'll write up the instructions on enabling this later
CIFS as module
Extras:
Change schedulers and phone speed:
Use a tool like No Frills CPU or SetCPU.
Turn off button lights:
Install the ButtonLight widget and add it to your main screen. I've published the source before in another thread; seek it out if you're after its (bad) code.
It's buggy the first few times you run it, but works fine after that.
Dim screen to 14:
The minimum backlight level is now set to 15. RootDim from the Play Store lets you set it to that.
Mount Windows shares:
Grab CifsMounter and point it to the cifs.ko in /system/lib/modules. You may also need to insmod nls_utf8.ko and md4.ko.
Enable ZRAM (taken from Siyah kernel):
(Note I've not used ZRAM so I have nothing to say on its stability, good or bad)
Grab a BusyBox binary from somewhere
Run the following commands:
Code:
echo 90 > /proc/sys/vm/swappiness #You must set the swappiness high to ensure that the compressed RAM is accessed first!
echo $SIZE > /sys/devices/virtual/block/zram0/disksize #Set size to whatever you wish. 100MB is 104857600 = 100 * 1024 * 1024
busybox mkswap /dev/block/zram0
busybox swapon /dev/block/zram0
Dump the lines in install-recovery.sh if you want to be ZRAMMed every time you boot the phone (although in that case, make sure you have
Code:
busybox swapoff /dev/block/zram0 > /dev/null 2>&1 #Use > /dev/null 2>&1 for every busybox command in install-recovery.sh as it will discard any messages outputted
echo 1 > /sys/devices/virtual/block/zram0/reset
before the lines above)
Install:
Flash the attached ZIP in CWM recovery. You should backup your original boot.img and /system/lib/modules first
Source:
Take http://www.huaweidevice.com/worldwi...=toDownloadFile&flay=software&softid=NDY3NTU= and apply attached diff
at last..xaaxxaa!!but why with modules too???whats their use?
pikachukaki said:
at last..xaaxxaa!!but why with modules too???whats their use?
Click to expand...
Click to collapse
'cause I add a new module - cifs (used by CifsMounter if you want to mount Windows shares) - and because the modules that are originally in /system/lib/modules need to be replaced so that they can load with this kernel (I don't know what those modules do, but I'd rather play it safe)
qwerty12 said:
'cause I add a new module - cifs (used by CifsMounter if you want to mount Windows shares) - and because the modules that are originally in /system/lib/modules need to be replaced so that they can load with this kernel (I don't know what those modules do, but I'd rather play it safe)
Click to expand...
Click to collapse
Boot normally change io to sio and smartassv2...1500mhz lets check..good work..i envy you and i want your guide on compiling...xaaxax im off to bed!!
fps is locked!!xaaxax
pikachukaki said:
Boot normally change io to sio and smartassv2...1500mhz lets check..good work..i envy you and i want your guide on compiling...xaaxax im off to bed!!
fps is locked!!xaaxax
Click to expand...
Click to collapse
I'll write it up sometime - but bear in mind I'm not an expert at this
Regarding FPS: do the install-recovery.sh trick
Only thing I modify in initramfs is the ro.secure setting so that ADB can be ran as root
qwerty12 said:
I'll write it up sometime - but bear in mind I'm not an expert at this
Regarding FPS: do the install-recovery.sh trick
Only thing I modify in initramfs is the ro.secure setting so that ADB can be ran as root
Click to expand...
Click to collapse
You did a great job i couldnt even compile the kernel without changes!!you did great!!
the difference is obvious !!
Sent from my U8800Pro using xda premium
Pika When U add This Kernet To ur ROM?
As expected from qwerty12!
Great job!
I'll also request a guide on how to build the kernel like pika asked.
Hope you continue to improve the kernel! A thanks is simply not enough to thank you for your work, but thanks again
husen4u said:
Pika When U add This Kernet To ur ROM?
Click to expand...
Click to collapse
I wont!just d/w it and flash it!simple!
Sent from my U8800Pro using xda premium
Now what you suggest oc ics or kalo gb?
Sent from my U8800pro using xda app-developers app
husen4u said:
Now what you suggest oc ics or kalo gb?
Sent from my U8800pro using xda app-developers app
Click to expand...
Click to collapse
From now on i wont ever go back to GB ever again! if our luck changes and someone release cm9 i will forget what gb is!! there are some small bugs but the rom is usable for everyday!!
Moihack said:
As expected from qwerty12!
Great job!
Click to expand...
Click to collapse
Thank you
I'll also request a guide on how to build the kernel like pika asked.
Click to expand...
Click to collapse
Certainly, sir.
Hope you continue to improve the kernel! A thanks is simply not enough to thank you for your work, but thanks again
Click to expand...
Click to collapse
Unfortunately I won't be working on this anymore unless Huawei get back to my request for the source to the the dhd.ko module (which they may not have to comply with because the license for the module states "Unless you and Broadcom execute a separate written software license agreement governing use of this software" so the U8800pro version may not be under GPL). I made (well, found on the Internet) more optimizations but the Wi-Fi refuses to turn on because the dhd.ko module refuses to load. Only way I can get something working is to build the source that Huawei give or attempt to force other versions of the bcm source to load, but it's unlikely that would work.
--
Anyway, a small guide.
I used an x86_64 laptop running (X)ubuntu 12.04.1 to follow these steps. This page was a great resource.
Prerequisites:
A computer running GNU/Linux (a Mac should work in theory - the same toolchain we use is built for it, too, but I have no idea how OS X works)
git installed (apt-get install --no-install-recommends git-core is enough under Ubuntu)
sudo apt-get install flex bison gperf build-essential libncurses5-dev zlib1g-dev ia32-libs lib32z1-dev lib32ncurses5-dev gcc-multilib g++-multilib abootimg
Getting ADB working
One of the best things to do is getting ADB set up, as you then have easy communication with the device. It's not essential but you'll just end up wasting time transferring files through other, longer means.
Grab the Linux platform tools ZIP from here: http://www.hariadi.org/android/manually-download-of-android-sdk-tools-and-sdk-platform-tools/. Extract the adb binary from the zip file, preferably to somewhere in your $PATH. chmod 755 it. chown, if necessary.
Next, open http://aur.archlinux.org/packages/an/android-udev/android-udev.tar.gz and, doing all this as root (sudo in Terminal etc.), place 51-android.rules in /lib/udev/rules.d/ (not the best place - but it works), chmod 644 it and chown root:root it.
Next, execute /usr/sbin/groupadd adbusers, followed by gpasswd -a USERNAME adbusers, USERNAME being the user you normally log on with.
Restart (while you can force Linux to see the new group through the, well, newgrp command udev will not "see" the new rule, despite how much you try with udevadm).
That should be ADB set up (give it a test, remembering to enable USB debugging mode on the phone first!).
On to preparing your workarea.
--
Create a new folder in your home folder and cd to it. This folder will house the prebuilt folder of toolchains and other stuff, and the kernel source in a folder of its own.
In this folder, execute git clone --depth 1 https://android.googlesource.com/platform/prebuilt.git and move onto the next step, since the download takes a while. That command grabs the prebuilt toolchain from Google using Git, but doesn't obtain a deep history for each file to make the download quicker.
Open http://www.huaweidevice.com/worldwi...=toDownloadFile&flay=software&softid=NDY3NTU= and save the source to your Downloads directory. After git has finished running, still in the folder with the "prebuilt" folder, execute tar jxf ~/Downloads/HUAWEI_U8800pro<tab - as in actually press tab> and you should have a kernel folder alongside the prebuilt one.
Building the kernel
cd to this new kernel folder.
First things first: make sure that Bluetooth is properly enabled by editing the Makefile. Find the line #ifeq ($(ENABLE_BTLA_VER30),true) and comment out every line in that section except for KBUILD_CFLAGS += -DHUAWEI_BT_BTLA_VER30 so you end up with this:
Code:
#/* < DTS2012020604357 zhangyun 20120206 begin */
# Add Huawei Marco for different BT chip
#ifeq ($(ENABLE_BTLA_VER30),true)
KBUILD_CFLAGS += -DHUAWEI_BT_BTLA_VER30
#endif
#ifeq ($(ENABLE_BLUEZ_VER30),true)
#KBUILD_CFLAGS += -DHUAWEI_BT_BLUEZ_VER30
#endif
#/* DTS2012020604357 zhangyun 20120206 end > */
Commenting out the offending code leaves you with a kernel that builds but a Bluetooth module that won't start up - the same also applies if you try to build with the other define.
You can also make things easier for yourself by replacing the following
Code:
ARCH ?= $(SUBARCH)
CROSS_COMPILE ?= $(CONFIG_CROSS_COMPILE:"%"=%)
with
Code:
ARCH ?= arm
CROSS_COMPILE ?= ../prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
else you will have to put "ARCH=arm CROSS_COMPILE=../prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-" after "make" each time. Remember this as I'll be assuming that you went for the option to edit the Makefile. I also assume that the prebuilt folder is above the kernel one. Adjust CROSS_COMPILE if necessary.
The ARCH variable is self-explanatory, but the CROSS_COMPILE variable (and the toolchain that it's pointing to) need to be set because the standard GNU development tools that apt installs don't produce output that an ARM processor can understand. So you cross-compile: the tools are for the X86 architecture but produce ARM output. 4.4.3 is chosen because the stock kernel is compiled with GCC 4.4.3 (if you run "adb shell cat /proc/version" you'll see). The arm-eabi-4.4.3 folder is chosen over arm-linux-androideabi-4.4.x because it specifies that magic "3" (I know, bad way to decide but it works), and over i686-android-linux-4.4.3 because we don't want to produce code for the PC.
Get the current configuration in use by the stock kernel (as that's a good point to start from - a known working configuration): http://wiki.cyanogenmod.com/wiki/Building_Kernel_from_source#Configure_the_Build
I'd also recommend placing a copy of .config as arch/arm/configs/<your funky name here> so that if .config gets deleted (make clean etc.) you can run make <the name you gave to the file in arch/arm/configs> and have .config come back again.
(cp arch/arm/configs/<the name you gave to the file> .config if you didn't modify the Makefile to specify the ARM arch.)
Run make oldconfig (not always necessary - generally it's invoked if you've applied a patch that introduces a new config option and the option then needs to go into your .config. Run make menuconfig afterwards and customize away.
When you're done, run make -jX - X as in the number of cores you have + 1. So, in my case, with a quad-core processor and HyperThreading enabled on all of them, "make -j9" works for me. If the compile went OK, you'll be left with a message saying that arch/arm/boot/zImage is ready. If not, run "make" without the -jX argument and make should stop where the error occurs. Have fun fixing the error!
Assuming that you have a new, shiny zImage, it's now time to put it into your boot.img.
Updating your boot.img:
Google have tools for this purpose but I've never used them so I don't know how they work. abootimg works fine for this, however.
Pull the current boot.img off your phone: adb pull /.cust_backup/image/boot.img.. I'd recommend creating a backup somewhere.
Create a new directory to store the boot.img in on your computer and run abootimg -x boot.img (if you had fun enabling every option in the kernel, you'll see why I'm telling you to use the -x option first rather than directly use the -u option). Now run abootimg -u boot.img -k <path to your newly built zImage>.
If this succeeds, yay! If not and you're told it's too big for the boot image, then don't worry. Take the size it's saying that the zImage is and convert that number into hex. Edit bootimg.cfg and change the value of the bootsize setting into the number you just converted into hex. We'll now repack again, but this time running abootimg -u boot.img -f bootimg.cfg -k <path to your newly built zImage>. This should work.
Sending the boot.img to the phone
If your ADB is already running as root, you can do the following to upload the new bootimg:
Code:
adb shell mount -o remount,rw /.cust_backup
adb push boot.img /.cust_backup/image/
adb reboot
If not, just reboot into pink screen mode and copy and paste.
Check System Settings and the version number should've changed. Congratulations!
Extras
Installing the modules:
OK, so you decided to build parts of the kernel as a module and you want to actually, y'know, have the modules present on the device. After building the kernel, execute:
make INSTALL_MOD_STRIP=1 modules_install INSTALL_MOD_PATH=<any folder name here>
If you look in that folder, you'll find the modules neatly wrapped up in folders, along with other text files. These text files are useless on a stock ROM because there's no modprobe - you need BusyBox for that. And since we don't want to have them seperated in folders (this is how the stock kernel does it), the files would be wrong, anyway. If you want to use modprobe and have BusyBox installed, you can run depmod on the phone after transferring the modules.
To get the modules into one folder make the directory "modules" in a folder higher-up to where the modules are stored, and then run for i in `find . | grep ko`; do mv "$i" ../modules/; done to move them into that folder.
At this point, I'd just recommend using my OC_Kernel.zip and replacing the modules in that. Or you can adb push them over to the /system/lib/modules folder (after issuing an "adb remount" - assuming that ADB is running as root in the first place).
Making ADB run as root:
As root on your computer, (we want to preserve permissions) use abootimg to split the boot image and extract the contents of the initrd:
abootimg -x boot.img && mkdir newramdisk && cd newramdisk && zcat ../initrd.img | cpio -i --no-absolute-filenames (--no-absolute-filenames is important! I trashed a Ubuntu install by leaving it out - the initrd contains ARM binaries of core Linux programs and if the initrd.img contains an absolute path of "/" then these files will get placed in /)
Make any changes you desire to the initrd. To have adb run as root, just edit /default.prop and set ro.secure to 0. Make sure that the editor you used didn't leave any backup files.
When you're done, run find . -print | cpio -o -H newc | gzip -n -9 > ../initrd.img and this will put the modified initrd folder back into initrd.img.
After that run cd .. ; abootimg -u boot.img -r initrd.img to actually put the initrd.img back into the boot.img.
If you run into a space error, you can do one of three things:
if you only made a single change (like enabling ADB), check to see that there is no backup file (default.prop~) littered about
you can remove the lengthy comments and copyright notices from the files to make space
you can use the trick we used earlier with abootimg to increase the size number in bootimg.cfg for the initrd
Overclocking:
Just look at the acpuclock C file (and possibly relevant cpufreq changes - but I can't remember) in my "OC kernel" diff. Make sure that the option in the kernel config is selected to limit the speeds to the U8800pro's native 1GHz, otherwise the phone will boot at 2GHz!
Rebuilding the Wi-Fi module:
I hope to be able to write this one since it's apparently needed in some cases, but it depends on if Huawei come through
any idea about this error?
drivers/mfd/pmic8058.c:327: error: rtc_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:327: error: rtc_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:241: error: othc0_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:241: error: othc0_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:250: error: othc1_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:250: error: othc1_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:261: error: othc2_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:261: error: othc2_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:183: error: misc_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:183: error: misc_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:210: error: thermal_alarm_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:210: error: thermal_alarm_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:270: error: batt_alarm_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:270: error: batt_alarm_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:152: error: pm8058_charger_resources causes a section type conflict
drivers/mfd/pmic8058.c:152: error: pm8058_charger_resources causes a section type conflict
matteof93 said:
any idea about this error?
drivers/mfd/pmic8058.c:327: error: rtc_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:327: error: rtc_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:241: error: othc0_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:241: error: othc0_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:250: error: othc1_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:250: error: othc1_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:261: error: othc2_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:261: error: othc2_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:183: error: misc_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:183: error: misc_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:210: error: thermal_alarm_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:210: error: thermal_alarm_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:270: error: batt_alarm_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:270: error: batt_alarm_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:152: error: pm8058_charger_resources causes a section type conflict
drivers/mfd/pmic8058.c:152: error: pm8058_charger_resources causes a section type conflict
Click to expand...
Click to collapse
Honestly, I have no idea. What toolchain are you using and where was your .config obtained from? Even when the Bluetooth thing was giving me errors, I never once saw that
same toolchain you have used. i have tried with ubuntu 12.04 x64 and ubuntu 10.04 x86 but same problem.....i have obtained my config from my phone using adb command
matteof93 said:
same toolchain you have used. i have tried with ubuntu 12.04 x64 and ubuntu 10.04 x86 but same problem.....i have obtained my config from my phone using adb command
Click to expand...
Click to collapse
I don't know why the same toolchain works on my laptop but not yours :\
Someone with a similar problem (same?) solved it by using an older toolchain: http://forum.xda-developers.com/showpost.php?p=27294383&postcount=7157
thanks thanks thanks.....i saw that post this morning but i did not noticed the post with the solution
UPDATE: NOW KERNEL COMPILED CORRECTLY....this means that tomorrow i know what to do
ZRAM (+ swap) support. ZRAM is optimized for Android (taken from Siyah kernel). I'll write up the instructions on enabling this later
qwerty your owning us some instructions!!xaaxxa
pikachukaki said:
qwerty your owning us some instructions!!xaaxxa
Click to expand...
Click to collapse
Done, check the first post
I also won't be working on this. My email (which does clearly state what I want, even if it's long-winded):
Dear Sir/Madam,
I recently built a kernel for my U8800pro from your sources and it
works fine, except that the Wi-Fi will not start because the dhd.ko
module that comes with the B928 firmware refuses to load into my
modified kernel. After looking around, the bcm4329 source is what I
need to build (usually distributed outside of the kernel); however, it
seems that the U8800pro uses a customized version. After looking at
the strings of the dhd.ko on the B928 firmware, I have seen many
strings that are present in that dhd.ko binary do not appear in:
* bcm_4.218.248.6_7x25_wifi_driver.tar from the Huawei Device website,
despite it having the same version number
* the bcm4329 source in the Qualcomm CodeAurora Git repository
* the bcm4329 source on the NyVIDIA Tegra Git repository
Furthermore, the strings also do not appear in the ICS kernel nor the
Gingerbread one. I can only conclude that Huawei have their own
specialized version of the bcm4329 4.218.248.6 source for the U8800pro
that is distributed outside the kernel. I understand that Qualcomm
allow the option to let the vendor arrange to have the code
distributed under a different license provided that the vendor makes
an agreement beforehand with Qualcomm. Otherwise it becomes GPLed by
default. If Huawei chose to make an agreement, then I have no right to
ask. However, I believe it is still licensed under the GPL for two
reasons:
* Running modinfo on the dhd.ko from the B928 firmware says this:
"license: GPL v2
* Both bcm_4.218.248.6_7x25_wifi_driver.tar.gz and
[S7][SoftWare]S7_Broadcom_BCM4329_4.218.205.0_Open_Source are under
the GPL
I would like to request the source code, please, of the bcm4329
4.218.248.6 source that is modified for the U8800pro if the code is
under the GPL
Best regards
Click to expand...
Click to collapse
was met with the following generic response:
Dear Customer,
Thank you for contacting Huawei device.
This is our website link http://www.huaweidevice.com/worldwide/searchResult.
do?method=execute&searchString=U8800pro where you can download the secure
code for U8800pro to you.
Once again thank you for contacting Huawei device.
Best Regards.
Huawei Device Customer Care Team.
Click to expand...
Click to collapse
Since my U8800pro is not my main phone anymore, I do not have the energy to fight. Nor do I want to work on Huawei's kernel, where you have to be careful about what you change or the Wi-Fi module won't load (and Huawei won't give you the source - which they should do since I'm sure it's under GPL). matteof93 will most likely produce something better or when everyone starts producing their own kernels and make enough improvements to be hit with the same issue as I, they'll start to get more emails and listen
@qwerty at the last command it said that device is busy...also is there any way that you can make it for init.d so it will be easier??thx!!