Launching X11 Environment From Sd Card


dftruf

Still Fresh
Joined
Aug 9, 2006
Messages
61
Hey,

Is there any project for wiz which provide a fully functional X11 environment from SD card?
640x480 X11 screen can be split to 4 switchable pieces (adapting to 320x240 screen), which can be switch by some buttons, for example L + directions, and there would be need for some keyboard emulation.
At least mouse can be emulated by touchscreen.
 
dfTruF said:
Is there any project for wiz which provide a fully functional X11 environment from SD card?
640x480 X11 screen can be split to 4 switchable pieces (adapting to 320x240 screen), which can be switch by some buttons, for example L + directions, and there would be need for some keyboard emulation.
At least mouse can be emulated by touchscreen.

What exactly do you mean by 'from SD card' ? Do you want to start X11 from the GPH-Wiz-Menu or do you want to boot into an X11-capable system from SD ?
 
Last edited by a moderator:
hiben said:
What exactly do you mean by 'from SD card' ? Do you want to start X11 from the GPH-Wiz-Menu or do you want to boot into an X11-capable system from SD ?


I don't know details of X11 structure in linux, but I think that simplest way it would be to boot X11-capable system from SD.

Is there any such project?
 
Last edited by a moderator:
X11 is a WINDOWING SYSTEM. It already runs on the wiz as far as I'm aware because it's mandatory for the GUI. X11 by itself as a GUI is ugly and very basic, I don't know why you would want to use something like that on a wiz. You could try QTopia which provides somewhat of a window-like gui.
 
Mr.TwisT said:
X11 is a WINDOWING SYSTEM. It already runs on the wiz as far as I'm aware because it's mandatory for the GUI. X11 by itself as a GUI is ugly and very basic, I don't know why you would want to use something like that on a wiz. You could try QTopia which provides somewhat of a window-like gui.
The GUI on the Wiz is running more or less directly on the framebuffer. I think it is using the SDL API (which does not need X11 either). There is no (need for) X11 on the device as far as GPH is concerned. Having X11 running on the Wiz opens up the possibility of many ports. You still need a suitable window-manager and some sort of desktop environment. KDE and Gnome are out of question on this device unless you have strong masochistic tendencies...

I'm currently planning to have a second system on SD to boot into with an X.org X11 (maybe also one of the embedded X11 servers) running on the framebuffer. I'll go for fluxbox as WM because it is fast and has only a few dependencies. The first thing to port of course is xclock... :)

BTW: what is a 'window-like gui' ? Do you mean WIMP ?
 
Last edited by a moderator:
hiben said:
I'm currently planning to have a second system on SD to boot into with an X.org X11 (maybe also one of the embedded X11 servers) running on the framebuffer. I'll go for fluxbox as WM because it is fast and has only a few dependencies. The first thing to port of course is xclock... :)


Do you have your project available somewhere, or info, experience how to do this?
 
Last edited by a moderator:
Generally, to boot minimal linux with X (to ram), from sd card, requires compiling four things:

1) kernel
2) shell
3) X11
4) bootloader

Right?
 
dfTruF said:
Generally, to boot minimal linux with X (to ram), from sd card, requires compiling four things:

1) kernel
2) shell
3) X11
4) bootloader

Right?

Sadly you need much more... compiling a kernel and a bootloader is relatively simple but a simple shell is not enough to support X.
You need a lot of software just to have a basic system that can pull up the X server (which itself consists of a lot of packages).

I'm currently investigating getting emdebian (embedded debian) on the Wiz. I have it running in an emulator using the same CPU (but totally other hardware) but there is X on a framebuffer.

It should work once I reformat an SDHC card to ext2 and copy the files (and modify a lot...). I tried the last days to get the emdebian installer running from the bootloader on the Wiz itself but I just can't figure out how to make the wiz load a ramdisk...
But I've seen a framebuffer console running on the Wiz a few minutes ago so I'm very motivated to get this working.

I don't think anyone ported a whole X server for the Wiz before but I did not do an extensive search.
By the way: the embedded debian will be totally incompatible with the Wiz software but I plan on implementing a multiboot bootloader. Might be a bit of a hack but should be possible.
 
Last edited by a moderator:
I wonder how GPH team has used booting mechanism on wiz for launching firmware updater from sd card. This is nice idea for booting emdebian.
 
dfTruF said:
I wonder how GPH team has used booting mechanism on wiz for launching firmware updater from sd card. This is nice idea for booting emdebian.

I think my previous post was a bit misleading. The updating process is actually open source (or leaked, whatever). You can create a custom bootloader and
you can also load kernel images from the SD card and boot them (or even burn them permanently to NAND). What is not working (for me, currently) is to also load a ramdisk/initrd for a Kernel. This is needed for the Debian installer.

But I just found a bigger problem that might make this whole project impossible:
While the bootloader has no problem with the MMC/SD cards the device does not show up when booting. Only when 'irqbattery' (intuitive name...) is started by the login process the MMC device is initialized... This program is from GPH and seems to do some magic (to many parts of the system)...

I'm determined to fix this since this prevents me also from using an SD card as a root file system for a kernel...

*edit*
Fixed it. They castrated their own MMC/SD driver and exported the correct function as a GPL-symbol... the irony...
I still need to test if it really works but mounting was possible.
 
Last edited by a moderator:
hiben said:
*edit*
Fixed it. They castrated their own MMC/SD driver and exported the correct function as a GPL-symbol... the irony...
I still need to test if it really works but mounting was possible.


Maybe GPH had some problems with this open source license, so they tried to modify driver.

With regard to kernel image and all filesystem destination, I think that the best way it would be to put all this to ram, with possibility to mount/unmount sd card.
 
Last edited by a moderator:
Good news everyone...

I just managed to boot from SD card but currently its only a modified image of the original firmware. But from here I can start playing Debian-Borg an assimilate the system until it is an installer... :)

Note to self: never - NEVER - run the gp2x menu when the SD card is in use... (it does some evil hacking and locks the system because it fails accessing the card or something...)

dfTruF said:
With regard to kernel image and all filesystem destination, I think that the best way it would be to put all this to ram, with possibility to mount/unmount sd card.

Well.. there is only 64M of ram, 42M accessible (rest for graphics). There is not enough space to hold everything in RAM.

But when I get debian working I could still put it on the NAND thus eliminating the SD card problem.
 
Last edited by a moderator:
Just a little update:
I finally understood how to get the kernel to use a ramdisk image. There is some other problem right now and it does not load the debian installer but at least the kernel found the ramdisk and wanted to use it.
It did not work before because in my previous attempts I created ramdisks that overwrote parts of the kernel when written to memory... setting load/entry to 0x800000 seems to be safe if anyone wants to try.

*edit*
I currently singing the portal song in my head (triumph and so on):
The debian installer did show up after all!
It complains about the low amount of memory but is willing to continue. I'll use a swap partition on SD (ugh...) then...

This gets interesting... :)
 
hiben said:
It complains about the low amount of memory but is willing to continue. I'll use a swap partition on SD (ugh...)


It won't be too slow with swap?
 
Last edited by a moderator:
dfTruF said:
It won't be too slow with swap?

Well, of course swap space on mmc is slower than the ram but linux is quite good at memory management. The alternative is not being able to run programs so I take slow in any case.
This problem might resolve later; the installer needs a file system in memory - thats not needed in the real system.

*edit*
while writing this debian was booting... takes some time.

It seems to work but currently it uses the framebuffer as console and not the serial port (so no input possible). I think I killed my external USB hub - it just does not want to work - I hope I did not kill the host... :-/ (there was some cabling issue...)
So I can't use my USB keyboard on the wiz right now...
 
Last edited by a moderator:
Update:
I was now able to boot a pre-made debian system [1][2] from sd using a Wiz-Kernel. This system (small) has no framebuffer support but is definitely functional. Next step is to test the variant with gnome... I prepare for painfully slow system responses... :)

Here is a teaser image (custom console logo plus debians attempt to use the fb-console): http://www.informatik.uni-bremen.de/~hiben/wiz_debian.jpg

1: http://www.aurel32.net/info/debian_arm_qemu.php
2: http://people.debian.org/~aurel32/qemu/armel/
 
hiben said:
Update:
I was now able to boot a pre-made debian system [1][2] from sd using a Wiz-Kernel. This system (small) has no framebuffer support but is definitely functional. Next step is to test the variant with gnome... I prepare for painfully slow system responses... :)


Good work, but where is the how-to play with it? How to emulate keyboard?

Don't even think about gnome on such machine. The biggest success will be X windows with flux.
 
Last edited by a moderator:
dfTruF said:
Hey,

Is there any project for wiz which provide a fully functional X11 environment from SD card?
640x480 X11 screen can be split to 4 switchable pieces (adapting to 320x240 screen), which can be switch by some buttons, for example L + directions, and there would be need for some keyboard emulation.
At least mouse can be emulated by touchscreen.

I'm curious too. Orkie ported plain X11 (x.org?) back then for GP2x F100 but its a fuss to compile it for Wiz. However on a 2nd thought: haven't tried to run the original binary :eek:
I abandoned that idea later then in favor of checking eighter Wayland (x11 replacement) or integrated X11 within Qt (Qt directly can use a FB)

hiben said:
Good news everyone...

I just managed to boot from SD card but currently its only a modified image of the original firmware. But from here I can start playing Debian-Borg an assimilate the system until it is an installer... :)

Note to self: never - NEVER - run the gp2x menu when the SD card is in use... (it does some evil hacking and locks the system because it fails accessing the card or something...)

dfTruF said:
With regard to kernel image and all filesystem destination, I think that the best way it would be to put all this to ram, with possibility to mount/unmount sd card.

Well.. there is only 64M of ram, 42M accessible (rest for graphics). There is not enough space to hold everything in RAM.

But when I get debian working I could still put it on the NAND thus eliminating the SD card problem.

Would love to hear how far Debian can run up. Btw using the freshly released V6 already? Regarding WindowManager/GUI System i strongly discourage both Gnome/KDE. They are resource wasters. Given the specs i suggest Fluxbox or maybe LXDE. Heck i had really trouble running XFCE4 on an older 256MB notebook of mine. Guess its no joke that Gnome recommends 512+ megs.
 
Last edited by a moderator:
dfTruF said:
hiben said:
Update:
...


Good work, but where is the how-to play with it? How to emulate keyboard?

Don't even think about gnome on such machine. The biggest success will be X windows with flux.

About the playing: the keys are still there and I'm thinking of either remapping them to standard keyboard keys or to joystick events. GPH seems to use a modified SDL but I never checked on that.
There are some good virtual keyboards for X that might be suitable even on the small display. I'm personally aiming for connecting a real mini-usb keyboard to the device through its usb host (and also mouse + external storage and so on). This path might not be for everyone... :)

I must confess that I'm more interested in getting it to work than to actually use it...

There are also some other options like hacking the framebuffer-driver and the touchpad driver to create a designated keyboard area on the screen... much work and I am not sure if it is worth effort.... btw. I'm working in the field of wearable computing to I might come up with some crazy input scheme... ;-)

WM:
As I said in one of my first posts I'm definitely going for fluxbox (it's my desktop choice anyway). But I have this 'lenny' image with gnome so I might just check how it works...

StarG said:
Would love to hear how far Debian can run up. Btw using the freshly released V6 already? Regarding WindowManager/GUI System i strongly discourage both Gnome/KDE. They are resource wasters. Given the specs i suggest Fluxbox or maybe LXDE. Heck i had really trouble running XFCE4 on an older 256MB notebook of mine. Guess its no joke that Gnome recommends 512+ megs.

I'm currently working with an image of 'lenny' from a VM image and try to upgrade/downgrade/migrate it to a 'grip' system from embedian.org. There is as usual some trouble right now. Maybe I'll go for a full install... Just bought an 8GB SDHC card... should be large enough for V6.
But I'll be honest: When possible I'll take the easy path...

It's good to hear more voices for fluxbox. Supports my first choice.
 
Last edited by a moderator:
Back
Top