• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
  • Fill out your device list and let everyone know which phones you have!    Edit Your Device Inventory

LINUX BOOTS at OPAL! Thanks to linwizard project!

Search This thread

cijoml

Senior Member
Apr 8, 2004
115
0
Hi there,
I got Linux to boot at OPAL via linwizard project. Here are steps needed to get it work.

1) download image from:
http://tinderbox.x86.dev.gentoo.org/embedded/linwizard/gizard-20080602.tar.bz2
2) copy content of file to the microSD card
3) edit default txt and replace init=/linuxrc with init=/bin/sh
4) run haret and let it boot.

After a while you'll get to shell. No graphics.
Now you can attach microusb cable and connect it with your linux laptop (I recommend ubuntu)
and you will get usb0 interfece to start up.

Which IP to use to connect with OPAL I still must investigate.
 

cijoml

Senior Member
Apr 8, 2004
115
0
Well ip connectivity now works:
ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>

Notas:/# ifconfig usb0 up 192.168.2.200 netmask 255.255.255.0
Listik:/usr/src/linux-2.6.27/Documentation# ping 192.168.2.202
PING 192.168.2.202 (192.168.2.202) 56(84) bytes of data.
64 bytes from 192.168.2.202: icmp_seq=1 ttl=64 time=2.95 ms
64 bytes from 192.168.2.202: icmp_seq=2 ttl=64 time=1.72 ms

And how to do it:
prolong "set CMDLINE" line with
ip=192.168.2.202:192.168.2.200:192.168.2.200:eek:pal:usb0

But in this image there doesn't seem to be any telnet/ssh server running. I will try cook image with ssh server support later
 

MusikMonk

Senior Member
Aug 6, 2008
637
314
32
Paris
Hey,
I'm a new Opal user and I'm interested in getting *nix running on my device. I still haven't had the chance to mess around with this stuff but I'm excited to see this thread.
I was looking into the possibility of running Android on the Opal and it seems the closest thing is this thread bout running it on the Herald (it uses the same processor as the Opal).
I don't any experience in Linux porting so I thought I'd share this, in case anyone else is interested. And at the same time, I'll try to see if I can get something working based on what has been/is being done for other devices.

Sorry for the long post.
 

msigeek

Member
Jul 13, 2009
8
0
Hey Folks,

Any progress on getting Android on Opal? I am eagerly waiting to load one.
Kindly let me know, if this version of Linux when loaded, gives the UI.

Cheers'
Vijay

Hi there
I got Linux to boot at OPAL via linwizard project. Here are steps needed to get it work.

1) download image from:
http://tinderbox.x86.dev.gentoo.org/embedded/linwizard/gizard-20080602.tar.bz2
2) copy content of file to the microSD card
3) edit default txt and replace init=/linuxrc with init=/bin/sh
4) run haret and let it boot.

After a while you'll get to shell. No graphics.
Now you can attach microusb cable and connect it with your linux laptop (I recommend ubuntu)
and you will get usb0 interfece to start up.

Which IP to use to connect with OPAL I still must investigate.
 

MusikMonk

Senior Member
Aug 6, 2008
637
314
32
Paris
Android can boot on Opal

I have some good news, Android can boot on the Opal. This is just a proof of concept as it's missing tons of drivers and is completely useless.
Touchscreen and all keys except for the volume control (and obviously the reset button) are not working. So you basically can't do anything when you run it.

What I tried is the same as what's written in this thread about running Android on Gene. They're using the build made for the Herald/Wing (just as I was proposing in my last post) with customized initramfs and kernel.
You'll find all the necessary details in that thread. However, there's a newer build than the one mentioned there it's wing-linux-0.4pre2.cab. And the suitable kernel for that build is supposed to be the pre2 posted in this post but it didn't work on my Opal so I tried the older Gene kernel and it worked. The main difference between the two is bluetooth support, and that's obviously is of no use for us.

This doesn't effect the Windows rom, nor does it requires any special partitioning. Still it's best to have everything backed up before launching it, just in case.

This is the official site for the wing/herald build:
http://wing-linux.sf.net/

This thread on their forums about the Gene port will probably be of use to us:
http://sourceforge.net/apps/phpbb/wing-linux/viewtopic.php?f=4&t=4

I'm reading about the next steps but as I said before, I don't have any previous experience or knowledge about this type of things. If someone can give me hand, I would be more than grateful. At any rate, once I have better understanding of the concept I'll contact the people behind the Wing and the Gene ports.


P.S: If you do try to run this, keep in mind that this will take lots of time, specially for the first launch. And when you get an error saying something like "android sh: can't access tty" just ignore it and keep waiting. After a while you'll have a flashing "android" on the screen, and after some more waiting you'll reach the main screen.
 

kshaurya

Member
Jul 17, 2009
48
0
Delhi
A Lil' help :)

I'm going through the Gene port thread here and on the Wing-linux sourceforge forums but I'm still a bit overwhelmed.
I would appreciate any help as I'm completely new to porting. I have some programming and linux knowledge but never attempted this type of things.

So am I.

Hmmm...
Right. Lets do it the way I did it.

1. Get the touchscreen working. Through HaRET, you must have got the GPIO interrupt whenever you pressed the touchscreen. You must have got two numbers corresponding to each press - a smaller number and a bigger number. The smaller number is the GPIO, and the larger number is, well, lets say a special GPIO value for the same pin.

Now checkout the Gene branch through git.

Goto /wing-linux/kernel/arch/arm/mach-omap1/board-htcherald.c

Scroll down to a block of code where you'll see the touchscreen code. Enter the smaller number in the .dav_gpio statement, and the IRQ number in the OMAP_GPIO_IRQ() statement below.

2. Follow the Kernel build instructions on the development section of the wing-linux wiki (the two make commands)

Copy the zImage into the linux folder on your SD card

Boot into wing-linux. The touchscreen should start working.

3. Now, hopefully, after the touchscreen's working, You would essentially just require two more buttons - the home button and the back button for minimum functionality. Everything else can be worked on by the touchscreen.

Then follow the instructions on the wing-linux forum (Page 2) to get the KEY(row,col) values of the keys on your handset. Hopefully you should get atleast a couple. Note down the corresponding keys and their KEY(r,c) values output.

4. Fire up board-htcherald.c again and goto the place where you have the KEY(r,c,KEY_blah) thing and replace the codes as per your obtained KEY(r,c,KEY_blah) values (The Home button is the one commented as Left Button)

5. That's all I can help you with as of now. I'm also figuring out a stable way of getting the DPad and the center select key to work, but It'll take some time.
 

MusikMonk

Senior Member
Aug 6, 2008
637
314
32
Paris
Thanks kshaurya!
(This guy right here is the one who fixed the kernel for Gene, I asked him for some pointers).

I don't want to take my device apart just yet (I usually do my best not take to dismantle anything that I haven't owned for at least 3 months unless absolutely necessary) and I couldn't find a place that states what touchscreen it uses. I'm just hoping that it's the same a tsc2046 as well. [Is there anyone without a warranty and/or willing to check for us?]

I'm gonna double check the values I got from the touchscreen as for some reason I seem to have to IRQ values, probably forgot to get rid of some spamming irq. And, at the same time, I'm currently setting up a VM as a building environment, my main boot is Intrepid 64 and there's no 'psyco' package for 64 machines.


If anyone else have some experience and wants to try this, refer to: http://www.handhelds.org/moin/moin.cgi/HaRET_20Documentation (using haret to get the GPIO and IRQ values needed).
And to:
http://sourceforge.net/apps/trac/wing-linux/wiki/Development (acquiring the source code from Wing Linux and how to build it).




And a quick question for anyone that tried booting Android on the Opal, what screen did you get when Android finally finished booting?
 

kshaurya

Member
Jul 17, 2009
48
0
Delhi
I don't want to take my device apart just yet
Huh? where did that come from? Wing Linux will not touch your WM.

I seem to have to IRQ values
Do you mean two? Well, that's exactly what you should get. Even if it's just one, enter that value in the code.

my main boot is Intrepid 64 and there's no 'psyco' package for 64 machines
Oh no. dont tell me that you are building the entire thing. all you need to do is build the KERNEL! Please! Don't go into building the whole thing from scratch. Use the make ARCH ARM commands given on that page.
 

MusikMonk

Senior Member
Aug 6, 2008
637
314
32
Paris
Huh? where did that come from? Wing Linux will not touch your WM.

I mean to check the screen, in case it turned out to be different that what you have.

Do you mean two? Well, that's exactly what you should get. Even if it's just one, enter that value in the code.

Yeah, stupid typo. :eek:
I noticed now that one of them appears when I keep the screen 'touched' for a bit longer.


Oh no. dont tell me that you are building the entire thing. all you need to do is build the KERNEL! Please! Don't go into building the whole thing from scratch. Use the make ARCH ARM commands given on that page.

I'm not gonna build the complete thing. Seems like I got too exited and failed to notice that building the kernel only requires a cross-compile toolchain, te rest is for compiling the whole thing.

I'm not THIS stupid usually . Honestly! :p


Thanks again!
 
Last edited:

MusikMonk

Senior Member
Aug 6, 2008
637
314
32
Paris
Weird.
I've only changed the two touchscreen values and built the kenrel. It finished without any error but now it won't boot.
It gets stuck, even before the space allocation part, with this error: "sh: can't access tty; job control turned off". And then it displays a prompt.

I'll try modifying an older build, I'm pulling them from the repos at the moment.
After all, the pre2 kernel from Gene didn't boot on my device (although it got stuck later on).
 

kshaurya

Member
Jul 17, 2009
48
0
Delhi
Try doing a clean install - Remove the linux folder and try again.
Also, make sure that you're not forgetting to checkout the Gene branch.

Code:
git checkout Gene

Is your default.txt modified? And have you downloaded the modified initramfs.cpio?
check in the Gene forums for that.
 
Last edited:

MusikMonk

Senior Member
Aug 6, 2008
637
314
32
Paris
Already tried the clean install, no dice. The default.txt is untouched and I'm using the modified intramfs. What happened this time is different from what happens using the original one, it's not asking me to specify the partition size but instead it's waiting for a command. I could probably ssh via usb but I have no clue how that might help.
And I've already checked out the Gene branch from the beginning.

I've tried compiling the kernel for pre1 (after changing the screen values) from SVN and it did boot (both using the cabs for pre1 and pre2) but no touch screen yet. All in all, I'm guessing that there's too much hardware difference here.

And the button for lowering volumes didn't work either, it seems like whatever you changed for getting it to work on Gene is the same as what we need here, but I'll think about that later.

I only have two ideas left:
- Trying to go back to a more stable build (with lesser features and lesser possibilities for errors). Maybe 0.3.
- Trying to create some kind of hybrid kernel using this alongside the HTC Vogue build as it probably has closer hardware to the Opal (obviously, I'm talking about everything beside the MSM7500 400MHz processor that it has). I'm hoping it won't get to this cause I'm definitely under qualified for that at the time being.
 

kshaurya

Member
Jul 17, 2009
48
0
Delhi
What happened this time is different from what happens using the original one, it's not asking me to specify the partition size but instead it's waiting for a command.
Could you post a screenshot?

I've tried compiling the kernel for pre1 (after changing the screen values)
I'm assuming you mean the touchscreen values? Try interchanging and see.

Trying to go back to a more stable build
I wouldn't recommend that. Defeats the whole purpose.

Why don't you try getting in touch with darkstar?
 

MusikMonk

Senior Member
Aug 6, 2008
637
314
32
Paris
Could you post a screenshot?

A friend borrowed my digital camera, I tried my laptop's webcam but the text it too blurry. Couldn't fix it using gimp either. So here's exactly what's showing on the screen:
Code:
mdir: Cannot creat directory `/mnt' : File exists
modprbe: could not parse modules.dep
initramfs: Creating device nodes:
initramfs: Loading /initrd.d/10-initfs.sh module
initramfs: Loading /initrd.d/30-wingboot.sh module

Selected:
ROOT_DEVICE=/dev/
CMDLINE=debug quiet psplash=false loglevel=7 init=/sbin/init console=tty0 video=omapfb:accel fbcon=rotate:3 4 root=/dev/
initramfs: Loading /initrd.d/80-loopboot.sh module
initramfs: Loading /initrd.d/85-blockboot.sh module
booting from: /dev/
mount: Mounting /dev/ on /mnt failed: Invalid argument
Unable to mount rootfs device

sh: can't access tty; job control turned off
/ $

And after the prompt, on the same line, there's a flashing '_' waiting for input.
Using the original zImage (from the pre2 cab) it's right around here that the screen clears and the Wing Linux installation script kicks in.


I'm assuming you mean the touchscreen values? Try interchanging and see.

Will try that next.

I wouldn't recommend that. Defeats the whole purpose.

I meant it as just a temporary test to till the cause of the incompatibility is figured out. With less things that could go wrong, it'll be easier to locate the ones that are going wrong.

Why don't you try getting in touch with darkstar?

You're right. I should post a thread on the project's forums asking for his help.