[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-arm
Subject:    Re: Porting linux to a Palm device
From:       Michael Opdenacker <michael () free-electrons ! com>
Date:       2004-10-27 1:01:20
Message-ID: 417EF360.5030509 () free-electrons ! com
[Download RAW message or body]

Hello Romain,

Thank you very much for your message and your kind introduction.

I'm copying the linux-arm mailing list as a short thread on this topic 
happened last month. This discussion will be archived and hopefully, we 
will get useful feedback from others.

> Now why am I mailing you : I've just bought a new *Palm Tungsten E*. 
> It's a nice device, and quite cheap actually. After toying a bit with 
> it and building a toolchain for it, I immediatly searched for any 
> effort toward porting linux on it. Bad news : _nothing_ has been 
> started :( I then remembered of your paper about porting Linux to a 
> new PDA. After all, why not do it myself ??? I have plenty of time, 
> and I'd _really_ like to do it. However, I'm afraid I don't know 
> enough about recent computer hardware to be able to do so.

That's a great idea! I'm sure it can succeed if the project is led by 
enthusiastic and patient people.

> Whatsoever, I cannot just compile a kernel and see what happens : 
> there is no boot loader for PalmOS (well, at least as far as I know). 
> IIRC, there was one for older Palm devices, but previous PalmOS 
> featured a 68k processor, whereas this one embeds an ARM (which is 
> _way_ faster than the 68k), and that runs and emulation layer to 
> support former Palm apps. Consequently I don't think it'll be 
> compatible. Well, my main problem is that I lack a good source of 
> relevant information.
> So here is a short list of questions I'd be very glad you answer :
> -> What should I read to be able to code a bootloader ? Does a 
> bootloader do that : 1/ Erase most of the RAM but the linux image 2/ 
> Point the "Program counter" to the start of the linux image ? Or is 
> the process much more complex ?

I don't think the bootloader needs to clear the RAM. Actually, you could 
start by implementing a bootloader for the PalmOS version you are using. 
It would load the Linux kernel image in RAM and execute it in kernel 
mode, so that the execution never returns to PalmOS. We are using a 
similar approach for Linux development on PocketPC PDAs. See the 
http://handhelds.org/moin/moin.cgi/HaRET for details.

If you like to program, it should be a nice experience for you and this 
would be useful to port other PalmOS devices to Linux.

Once your kernel boots, you can develop more drivers, in particular for 
the internal flash ships. Then, you can consider replacing the original 
Palm bootloader by a more standard one, like U-boot or RedBoot, which 
are known to adapt to many platforms, ARM in particular.

You can read a few details about bootloaders on my 
http://free-electrons.com/doc/embedded_linux_kernel_and_drivers/img61.html 
pages (Caution: this page may have a new URL when I insert new pages to 
this presentation... I filed a enhancement request to OpenOffice to name 
the URL according to the slide name instead of the page number).

> -> I haven't opened my Palm yet (gotta find the tool for it before), 
> but once I'll have done it : 1/ Do you think most chips will work with 
> a simple compilation (if there is already a driver for 'em) ?

You really need to open your device to figure this out.

> -> Oh, yeah, by the way : _what_the_hell_is_a_MMU (except a "Memory 
> Managment Unit") ??? You see, I really lack some knowledge in 
> low-level domain. Do you know where I could find valuable informations 
> ? I'm really willing to learn :D

Here's another presentation that you may find useful: 
http://free-electrons.com/articles/uclinux
If you don't have an MMU, you won't have virtual memory, which adds 
strong constraints to loading applications. You have to use uClinux 
then, which addresses these extra constraints.

I hope this helps!

Don't hesitate to come back to us for more questions. Other contributors 
are most welcome too!

    Cheers,

    Michael.

-- 
Michael Opdenacker
http://free-electrons.com


-------------------------------------------------------------------
Subscription options: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
FAQ/Etiquette:       http://www.arm.linux.org.uk/armlinux/mailinglists.php
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic