Linux ON droid not IN android question????

Search This thread

darkreaper476

Senior Member
Jun 24, 2010
75
10
Ok, this goes out to any and all DEVs out there. We all know by now that we (some people not me) can run linux within android using the loop mounts, vnc viewer, etc... Now how about REPLACING android with a linux distro like debian or maybe even what these guys use http://openpandora.org/ ..... its linux based and has an arm CPU.. Any way I'm talking about flashing over android wiping the internal sorage and installing linux on it or even using the boot loader to flash over android???, of course this is getting rid of any 3g connection and phone usage. I understand that, I am talking about giving our RETIRED droid 1s a use. I wanna see my D1 run a linux distro in full hardware mode NO MORE ANDROID. now dont get me wrong I love android as much as the next guy, but why now flash something else to it??? ;)

Another link I found, this is for windows mobile but hey, similar idea. :D

http://wing-linux.sourceforge.net/trac/wiki/FAQ

P.S. I AM NOT A DEV JUST AN IDIOT WITH AN IDEA!! my ignorance is NOT bliss and I would love to know if this is even possible. I'm willing to help ANY WAY I CAN. lol

THANKS!!!
 
  • Like
Reactions: leonelsr and BPB21

Eiertschik

Senior Member
Mar 28, 2011
399
67
Google Nexus 4
Google Nexus 5
I don't think it's possible. Because of the locked bootloader we're forced to use Motorola's bug-ridden Kernel and as Android's Kernel is a heavily modified Linux Kernel it most likely won't run an ordinary Linux distro.

But I'm no expert either :D
 

darkreaper476

Senior Member
Jun 24, 2010
75
10
Thanks for the replies. Again the USA Droid 1 is nit locked or at least has been completely unlokcked. I've read a million "run debian on android" posts... I don't need to know German to see that the post above is the same thing. Like I said before I have NO INTEREST IN RUNNING LINUX ON ANDROID. I want TO REPLACE android completely with Linux to make a device like the openpandora handheld from my first link.

Any one up to the challenge????

Thanks again!
 

DrGit

Senior Member
Jan 19, 2010
151
210
I've been running Debian on my Droid booting from the SD card for a while, more recently trying Arch Linux after realizing that anything optimized for ARMv7, VFPv3, NEON, or Thumb-2 (I'm not sure which unfortunately) won't boot because of a page fault or something. Ubuntu, MeeGo, and Angstrom just kernel panic and don't give any useful information even at the highest debugging level. I'm back to using an ARMv5te Arch Linux build (http://archlinuxarm.org) although I could just as well use Debian. I really wish Ubuntu worked for multitouch.

Well, I got the touchscreen calibrated! I forgot that my screen rotation hack only rotated the framebuffer :p It's stuck in portrait for now. I decided to use mtev (MeeGo's multitouch X11 input driver) after being fed up with evdev's aversion to being rotated, but now that I'm back to the stock portrait rotation evdev should work fine.

If you want instructions, either PM me or wait until I post a full guide and/or my patched kernel tree. It's not super difficult, but it's a lot of command line use and compiling.

What works:
*CPU and SD card (obviously :p)
*Touchscreen (single touch/portrait only for now)

What needs work:
*Keyboard mapping is wrong, the number keys and symbols don't work. I need to figure out how Android handles Alt. I had to patch the GPIO keyboard driver because the keyboard worked in the console but not in X11, which expects EV_SYN.
*Sound is OSS only, but there is no mixer device, so aumix is useless and there's no volume control or sound output.
*I haven't tried the SGX driver, so I can't comment on hardware acceleration yet.
*Battery charging relies on battd, which is a proprietary Android binary from Motorola. It might run on Debian with "ls -s / /system" and the creation of the socket it expects (init.sholes.rc I believe), but I'm not getting my hopes up.

Untested:
*WiFi (needs firmware, but should work)
*Bluetooth
*Calls/data
*Sensors (although the accelerometer and compass seem to be recognized by evdev)

I'll upload my kernel, either as patches or on GitHub (or binaries if there's enough demand) once I get around to fixing the keyboard issue. Fingers crossed that I don't get carried away cleaning up the kernel, or worse yet, give up...
 
Last edited:
  • Like
Reactions: briankb

darkreaper476

Senior Member
Jun 24, 2010
75
10
This is incredible news! I'm so glad to hear it. Of course you are running in hardware mode? Not through android? If so I'm super exited about this! I love arch Linux, I run it on all my computers and I understand it more than any other distro I've tried. I would love to give it a shot, though I'm not that great at compiling I think it will be worth it. :)

As I said before I am in no way a dev or even a Linux pro, but I can get by and if theres any way I can help this project become "complete" I'm willing to learn what ever is necessary to do so.

Also were u able to get an x server running? Possibly a DE? That would be crazy awesome.

Thanks a million, looking foreword to work with you and make this happen!
 
Last edited:

DrGit

Senior Member
Jan 19, 2010
151
210
For anyone who's interested, I put together a quick package containing my kernel patches, configuration notes, and an automated kernel build script.

It's pretty self-explanatory aside from the installation of the root filesystem, which I leave up to your imagination :p

As I've probably repeated several times now, I've run Debian and Arch Linux natively on my Droid with my patched kernel (no chroot or VNC "hack"). With enough determination, it's possible to run practically anything on it - personally, I'm determined to get Ubuntu on it.
 

Attachments

  • droid_linux.zip
    48.1 KB · Views: 350
  • Like
Reactions: BPB21

darkreaper476

Senior Member
Jun 24, 2010
75
10
WOOT... insta-fail for me LOL you have it set up to work in specific directories? I thought i placed everything right but I guess not.. I got an error on the first line of output lol

Welcome to gTan64\'s lazy Droid kernel compiler\!
build.sh: line 5: [: missing `]'
build.sh: line 5: -z: command not found
build.sh: line 5: -z: command not found
Entering $WORK
Applying patches
build.sh: line 16: /*.patch: No such file or directory
mv: cannot stat `/arch/arm/boot/compressed': No such file or directory
cp: cannot stat `/compressed': No such file or directory
Setting up build
cp: cannot stat `/GNUmakefile': No such file or directory
cp: cannot stat `/sholes_config': No such file or directory
FIXME! No numeral or symbol input until someone finds a third-level
modifier key to use instead of AltGr for the keyboard.
cp $MISC/defkeymap.map $K_SRC/drivers/char
Building kernel!
make: *** No targets specified and no makefile found. Stop.
Kernel build done!

You have done something amazing, I'm just to stupid to figure it out my self. XD

I can understand why you would want ubuntu with all its pre-setup glory and support for nearly all hardware but dont you think its a little heavy for this hardware? lol I doubt you would try to use the Unity UI but I doubt that alone would even fit in ram LOL you could just use the ubuntu packages and drivers with debian maybe?

THANKS AGAIN!!!!
 

DrGit

Senior Member
Jan 19, 2010
151
210
That's what happens when I don't test my own scripts :p
I was thinking too much about making it easy. Just try applying my patches to your tree manually.
Code:
cd kernel_src
patch -p1 <../patches/first.diff
patch -p1 <../patches/next.diff #and so on...
#Obviously, substitute the paths of the actual patches ;)
#Finally, copy sholes_config to .config and invoke 'make'.
It's actually much simpler than my script makes it, and you don't need my convoluted folder setup.
 

darkreaper476

Senior Member
Jun 24, 2010
75
10
UM lol I cant find any patch files? are they in the ZIP? or do I have to obtain them elsewhere?

I can tell this is gonna be a hell of a project LOL

THANKS!!!:D
 

DrGit

Senior Member
Jan 19, 2010
151
210
"Duh" moment - I used the .diff file extension instead of .patch :eek:
I'm such a scatterbrain... Remind me not to release anything before testing :p

EDIT: Strike that, reverse it. They're .patch files.
 
Last edited:

darkreaper476

Senior Member
Jun 24, 2010
75
10
I AM BLIND lol I found them... BUT.. when I try to patch. terminal just seems to lock up... I press enter, the curser moves to the next line but it doesnt do anything. lol how long should 1 patch take?? its been about 10 minutes and I leave it be for now

EDIT:
LOL i forgot the "<" in the command OOPS but I'm not seeing any .config file or folder in the source to copy the sholes_config too. yes I have show hidden files on.. PS unfortatly usinf Fedora 15 gnome 2...... (on server so I can work on this anywhere through vnc :p)

THANKS
 
Last edited:

DrGit

Senior Member
Jan 19, 2010
151
210
When I said "copy sholes_config to .config", that's literally what I meant. .config is the Linux kernel build configuration file, not a folder.
'cp /path/to/sholes_config .config' from your kernel tree should do it.

Oh, I forgot to mention that you need an ARM cross-compiler/toolchain. I use the gcc-arm-linux-gnueabi package in Ubuntu, but I don't know what the Arch equivalent is off the top of my head.

The "GNUmakefile" is just a convenience, it exports "ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-" before calling the actual makefile. If you don't have an ARM cross compiler in your path, it won't build at all. If you do, modify CROSS_COMPILE to point to it - on some systems it's called arm-unknown-linux-gnueabi, etc. etc.

Let me know if you get anywhere before it errors out.
 

darkreaper476

Senior Member
Jun 24, 2010
75
10
OK I put the config file in the kernel_src :) but unfortainatly I'm using Fedora 15 XP I installed arm-gp2x-linux-gcc which is the fedora arm gcc I guess... lol so wha would I edit in the .config to make it point to arm-gp2x-linux-gcc. Its not my first attempt to compile an android kernel but I've never been succesfull LOLOL

thanks
 

DrGit

Senior Member
Jan 19, 2010
151
210
I'm pretty sure that toolchain won't work - the GP2X was ARMv5 IIRC, so unless it's a newer build of GCC (4.3 or higher) and you're absolutely sure it supports the ARM EABI and the ability to generate ARMv7 instructions (which is unlikely if it's pre-4.1), I would recommend a newer toolchain.

CodeSourcery makes a pretty solid one: https://sourcery.mentor.com/sgpp/lite/arm/portal/release1803
If you end up using it, you can change the second line in GNUmakefile to "CROSS_COMPILE=arm-none-linux-gnueabi-". Don't worry about changing .config.
 

darkreaper476

Senior Member
Jun 24, 2010
75
10
Well I DLed the linux/GNU installer and it gave me "arm-2011.03-41-arm-none-linux-gnueabi.bin" LOL

so I was thinking would it just be easier to just use my lappy with crunchbang (debian based) so I can follow ur instructions with deb / apt-get LOL fedora is a ***** and it dont have what I need... I cant find an arm v7 cross compiler for it

thanks
 

DrGit

Senior Member
Jan 19, 2010
151
210
.bin files are the Linux equivalent of Windows EXE installers. Run it like this:
Code:
#cd /path/to/installer.bin
./installer.bin
#substitute the actual name, of course.

It needs root permissions if you want to install it to /usr/local (sudo ./installer.bin or su -c 'sh installer.bin'). You can also install it to /usr, but that will make it more tedious to uninstall later. If you decide to install it in your home folder - say ~/toolchain - you don't need root permissions, but you will need to add ~/toolchain/bin to your path:
Code:
export PATH=$PATH:$HOME/toolchain/bin

To be honest, I prefer Ubuntu to Fedora/OpenSUSE/$RPM_distro, so if you have access to a Debian or Ubuntu system, using that would make my life easier :p
 

darkreaper476

Senior Member
Jun 24, 2010
75
10
Omg duh... the "non_Linux" part of the name true me off lol i'll start doing this on my laptop it's deb based crunchbang. I prefer anything over rpm distros too but it was a quick painless install on my server XP thanks ill try this when I get home :)

Sent from my DROIDX using XDA App
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    Ok, this goes out to any and all DEVs out there. We all know by now that we (some people not me) can run linux within android using the loop mounts, vnc viewer, etc... Now how about REPLACING android with a linux distro like debian or maybe even what these guys use http://openpandora.org/ ..... its linux based and has an arm CPU.. Any way I'm talking about flashing over android wiping the internal sorage and installing linux on it or even using the boot loader to flash over android???, of course this is getting rid of any 3g connection and phone usage. I understand that, I am talking about giving our RETIRED droid 1s a use. I wanna see my D1 run a linux distro in full hardware mode NO MORE ANDROID. now dont get me wrong I love android as much as the next guy, but why now flash something else to it??? ;)

    Another link I found, this is for windows mobile but hey, similar idea. :D

    http://wing-linux.sourceforge.net/trac/wiki/FAQ

    P.S. I AM NOT A DEV JUST AN IDIOT WITH AN IDEA!! my ignorance is NOT bliss and I would love to know if this is even possible. I'm willing to help ANY WAY I CAN. lol

    THANKS!!!
    1
    I've been running Debian on my Droid booting from the SD card for a while, more recently trying Arch Linux after realizing that anything optimized for ARMv7, VFPv3, NEON, or Thumb-2 (I'm not sure which unfortunately) won't boot because of a page fault or something. Ubuntu, MeeGo, and Angstrom just kernel panic and don't give any useful information even at the highest debugging level. I'm back to using an ARMv5te Arch Linux build (http://archlinuxarm.org) although I could just as well use Debian. I really wish Ubuntu worked for multitouch.

    Well, I got the touchscreen calibrated! I forgot that my screen rotation hack only rotated the framebuffer :p It's stuck in portrait for now. I decided to use mtev (MeeGo's multitouch X11 input driver) after being fed up with evdev's aversion to being rotated, but now that I'm back to the stock portrait rotation evdev should work fine.

    If you want instructions, either PM me or wait until I post a full guide and/or my patched kernel tree. It's not super difficult, but it's a lot of command line use and compiling.

    What works:
    *CPU and SD card (obviously :p)
    *Touchscreen (single touch/portrait only for now)

    What needs work:
    *Keyboard mapping is wrong, the number keys and symbols don't work. I need to figure out how Android handles Alt. I had to patch the GPIO keyboard driver because the keyboard worked in the console but not in X11, which expects EV_SYN.
    *Sound is OSS only, but there is no mixer device, so aumix is useless and there's no volume control or sound output.
    *I haven't tried the SGX driver, so I can't comment on hardware acceleration yet.
    *Battery charging relies on battd, which is a proprietary Android binary from Motorola. It might run on Debian with "ls -s / /system" and the creation of the socket it expects (init.sholes.rc I believe), but I'm not getting my hopes up.

    Untested:
    *WiFi (needs firmware, but should work)
    *Bluetooth
    *Calls/data
    *Sensors (although the accelerometer and compass seem to be recognized by evdev)

    I'll upload my kernel, either as patches or on GitHub (or binaries if there's enough demand) once I get around to fixing the keyboard issue. Fingers crossed that I don't get carried away cleaning up the kernel, or worse yet, give up...
    1
    For anyone who's interested, I put together a quick package containing my kernel patches, configuration notes, and an automated kernel build script.

    It's pretty self-explanatory aside from the installation of the root filesystem, which I leave up to your imagination :p

    As I've probably repeated several times now, I've run Debian and Arch Linux natively on my Droid with my patched kernel (no chroot or VNC "hack"). With enough determination, it's possible to run practically anything on it - personally, I'm determined to get Ubuntu on it.