GP2X Gnu Arm For Gp2x And New Firmware Development


delrina

Still Fresh
Joined
Jan 3, 2007
Messages
13
Hi,

I bought GP2X just for my embedded Linux study. I want to learn how to port Linux Kernel 2.6.x to GP2X hardware.

I wonder is there any existing project like this. I want to join and learn from members of this project.

Thanks,

DC,
 
They provide enough to build a new kernel - the only stuff they don't give is the driver for the proprietary hardware inside the GP2X and porting a new kernel won't help you with that (you won't be able to use any of the media features etc. provided by it).
 
the only stuff they don't give is the driver for the proprietary hardware inside the GP2X and porting a new kernel won't help you with that..
I thought that the Magiceye's SDK took care of the hardware stuff like the drivers etc.?
 
Last edited by a moderator:
There's no need to run 2.6 kernel on GP2X ..
There's at least one big reason to switch to kernel 2.6: getting "official" support for it, where official means the ARM Linux developers (Russell King et al). ARM Linux is not part of the mainline 2.4 kernel tree, while it is in 2.6.

They provide enough to build a new kernel - the only stuff they don't give is the driver for the proprietary hardware inside the GP2X and porting a new kernel won't help you with that (you won't be able to use any of the media features etc. provided by it).
That's not true: what GPH provides is enough to rebuild the kernel. However we don't have the source for the *applications* that use some parts of the hardware.
 
Last edited by a moderator:
According to ELDK (Embedded Linux Dev. Kit) people 2.6 is bigger and slower than 2.4. We already suffer from lack of memory in some cases I don't think having a bigger slower OS is generally a forward step. Of course after saying that the module organization for 2.6 for wireless support is MUCH better than 2.4.

URL: http://www.denx.de/wiki/Know/Linux24vs26?s...4&up=0
Using the 2.6 kernel on embedded systems implicates the following disadvantages: * Slow to build: 2.6 takes 30...40% longer to compile * Big memory footprint in flash: the 2.6 compressed kernel image is 30...40% bigger * Big memory footprint in RAM: the 2.6 kernel needs 30...40% more RAM; the available RAM size for applications is 700kB smaller * Slow to boot: 2.6 takes 5...15% longer to boot into multi-user mode * Slow to run: context switches up to 96% slower, local communication latencies up to 80% slower, file system latencies up to 76% slower, local communication bandwidth less than 50% in some cases.There may be a few cases where the use of Linux kernel version 2.6 makes sense even for embedded systems (typically on "bigger" systems with more powerful processors), but if memory footprint or system performance are important you probably want to stick with a 2.4 kernel for now.-- WolfgangDenk - 24 Apr 2005

So you just need to pick your battles ....
 
We do need a better firmware, though. The boot scripts and menu suck, and I',m sure theres more suck in there as well. I also wonder if ucLinux on the 940 would be of any use (easier multi-processor code?).
 
Since Linux Kernel 2.6 is bigger and slower than Linux Kernel 2.4. Is it possible to remove some unneccessary parts such as wireless support in Linux Kernel 2.6 make it even smaller.

Sorry I am very new to Linux Kernel.

Another question, for an embedded multimedia system, there are still some other OS such as:
uCos II and eCos. Is there anybody experience with these OS please share your opinion.

Almost last question is there any truly open source embedded development board which is popular and cheap as GP2X. I found one GP2X rival here http://www.embeddedarm.com/epc/ts7300-spec-h.htm



Thanks,
DC,
 
Since Linux Kernel 2.6 is bigger and slower than Linux Kernel 2.4. Is it possible to remove some unneccessary parts such as wireless support in Linux Kernel 2.6 make it even smaller.

Sorry I am very new to Linux Kernel.

Another question, for an embedded multimedia system, there are still some other OS such as:
uCos II and eCos. Is there anybody experience with these OS please share your opinion.

Almost last question is there any truly open source embedded development board which is popular and cheap as GP2X. I found one GP2X rival here http://www.embeddedarm.com/epc/ts7300-spec-h.htm



Thanks,
DC,

year but if you remove all these things, you can just stay with kernel 2.4 ^_^ Perhaps the better idea would to take netBSD ARM and port it to out GP2X... The BSD kernels are much cleaner than the linux kernels :)
 
Last edited by a moderator:
Hi,

I bought GP2X just for my embedded Linux study. I want to learn how to port Linux Kernel 2.6.x to GP2X hardware.

I wonder is there any existing project like this. I want to join and learn from members of this project.

Thanks,

DC,

I've already ported linux 2.6 on a different architetture (lart: http://www.lartmaker.nl/) and it's not too complicated. What you need is a good knowledge of C, and of unix tools. And a lot of patience,and a bit of luck :)

The problem with gp2x, is that source of some driver are not available (ie SD card reader!). And a kernel 2.6.x without them are pretty useless.

Take a look to my web page to have some example of what i done: http://web.tiscali.it/lartweb/.
 
Last edited by a moderator:
I bet it wouldn't be terribly hard to reverse engineer the SD driver (I've done hardware reverse engineering via BIOS disassembly on an x86 calculator), but that leaves the project open to potential legal issues.
 
I bet it wouldn't be terribly hard to reverse engineer the SD driver (I've done hardware reverse engineering via BIOS disassembly on an x86 calculator), but that leaves the project open to potential legal issues.
As far as I'm aware reverse engineering is frowned upon, but not exactly classed as illegal.
Most hardware support in Linux has come about through reverse engineering & I've never known of a legal case against it yet.

Could be worth looking into a little more :)
 
Last edited by a moderator:
The important safeguard to take when you reverse engineer something is to have a different person write the alternative implementation (working entirely from specs) than the one who reverse engineered the working sample. This won't get you around patented things though, and therein can lie the problem.
 
The problem with gp2x, is that source of some driver are not available (ie SD card reader!).
Are you sure ?
I quickly tried to build modules from the GPH kernel sources, here is what I found :

Fimware 2.1.1:
Code:
  5476 Mar 16  2006 lib/modules/2.4.25/kernel/arch/arm/mach-mmsp2/mmsp2_usbh.o
354940 Mar  6  2006 lib/modules/2.4.25/kernel/drivers/char/dualcpu.o
  6848 Mar 16  2006 lib/modules/2.4.25/kernel/drivers/input/evdev.o
  7836 Mar 16  2006 lib/modules/2.4.25/kernel/drivers/input/input.o
  8936 Mar 16  2006 lib/modules/2.4.25/kernel/drivers/input/joydev.o
  4080 Mar 16  2006 lib/modules/2.4.25/kernel/drivers/input/keybdev.o
  8884 Mar 16  2006 lib/modules/2.4.25/kernel/drivers/input/mousedev.o
 97710 Apr 27  2006 lib/modules/2.4.25/kernel/drivers/scsi/scsi_mod.o
 17681 Apr 27  2006 lib/modules/2.4.25/kernel/drivers/scsi/sd_mod.o
 36377 Apr 21  2006 lib/modules/2.4.25/kernel/drivers/usb/gadget/g_ether.o
 34543 Sep 19 09:06 lib/modules/2.4.25/kernel/drivers/usb/gadget/g_file_storage.o
 34136 Sep 19 09:06 lib/modules/2.4.25/kernel/drivers/usb/gadget/net2272.o
 33249 Feb  9  2006 lib/modules/2.4.25/kernel/drivers/usb/hid.o
 2712 Mar 16  2006 lib/modules/2.4.25/kernel/drivers/usb/host/usb-ohci-mmsp2.o
 25304 Mar 16  2006 lib/modules/2.4.25/kernel/drivers/usb/host/usb-ohci.o
 36269 Apr 27  2006 lib/modules/2.4.25/kernel/drivers/usb/storage/usb-storage.o
102270 Apr  3  2006 lib/modules/2.4.25/kernel/drivers/usb/usbcore.o

My build:
Code:
  5368 Jan 25 22:40 lib/modules/2.4.25/kernel/arch/arm/mach-mmsp2/mmsp2_usbh.o
354976 Jan 25 22:40 lib/modules/2.4.25/kernel/drivers/char/dualcpu.o
  6848 Jan 25 22:40 lib/modules/2.4.25/kernel/drivers/input/evdev.o
  7836 Jan 25 22:40 lib/modules/2.4.25/kernel/drivers/input/input.o
  8936 Jan 25 22:40 lib/modules/2.4.25/kernel/drivers/input/joydev.o
  4080 Jan 25 22:40 lib/modules/2.4.25/kernel/drivers/input/keybdev.o
  8884 Jan 25 22:40 lib/modules/2.4.25/kernel/drivers/input/mousedev.o
 97791 Jan 25 22:40 lib/modules/2.4.25/kernel/drivers/scsi/scsi_mod.o
 17681 Jan 25 22:40 lib/modules/2.4.25/kernel/drivers/scsi/sd_mod.o
 36377 Jan 25 22:40 lib/modules/2.4.25/kernel/drivers/usb/gadget/g_ether.o
 34543 Jan 25 22:40 lib/modules/2.4.25/kernel/drivers/usb/gadget/g_file_storage.o
 34136 Jan 25 22:40 lib/modules/2.4.25/kernel/drivers/usb/gadget/net2272.o
 16944 Jan 25 22:40 lib/modules/2.4.25/kernel/drivers/usb/hid.o
 2784 Jan 25 22:40 lib/modules/2.4.25/kernel/drivers/usb/host/usb-ohci-mmsp2.o
 25304 Jan 25 22:40 lib/modules/2.4.25/kernel/drivers/usb/host/usb-ohci.o
 36269 Jan 25 22:40 lib/modules/2.4.25/kernel/drivers/usb/storage/usb-storage.o
102166 Jan 25 23:26 lib/modules/2.4.25/kernel/drivers/usb/usbcore.o

What I built in a few minutes *from sources* looks close enough, don't you think? :)

So is there something I miss ?

EDIT: got usbcore.o closer

Basically I was able to build a kernel that fully matches what is delivered in 2.1.1 and I am sure I can also patch source modules to achieve the same thing.
There is some basic trial and error because the sources are not exactly what GPH used to build the release, but this certainly is not requiring reverse-engineering.
 
Last edited by a moderator:
And which of those modules is the SD driver? I believe it's built into the kernel (not a module), so you'd have to compare a kernel you built with GPH's using the same settings and compiler.
 
And which of those modules is the SD driver? I believe it's built into the kernel (not a module), so you'd have to compare a kernel you built with GPH's using the same settings and compiler.
I have done it and what I compile out of SVN matches (except for a few strings that are dates) after slightly patching some files.
So again where is that closed source SD driver? :)
 
Last edited by a moderator:
Dear BradN and Laurent,

Could you please document your works in a file and post here so every one can follow with minimum of trial and error. I am quite busy for my final exams. I will start looking into kernel source of GP2X very soon.

Many thanks,

DChang,
 
Back
Top