Re: Porting Kernel / Drivers to BeagleBoard
"Jim Burnes" <[email protected]> Tue, 2 Dec 2008 16:23:19 -0700
| Newsgroups | gmane.os.openbeos.kernel.devel |
|---|---|
| Message-ID | <[email protected]> |
--===============5835093252753076389== Content-Type: multipart/alternative; boundary="----=_Part_97579_9019584.1228260199814" ------=_Part_97579_9019584.1228260199814 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Tue, Dec 2, 2008 at 12:28 PM, Ithamar R. Adema <[email protected]> wrote: > Hi Jim, > > Jim Burnes wrote: > > It should be able to run a cross-compiled kernel and Haiku OS. > True ;) > > This would be a significant amount of work, but maybe not impossible. > This is definitely also true ;) > > 1. You would have to port the kernel. I've done some ARM assembler. > Actually, the amount of required assembly should be minimal. Actually > knowing the ARM architecture (or learning it) inside out is more essential. Good point. Knowing the memory access / protection structure, ARM-specific instructions that might support low-level kernel services, interrupt structure, timing, boot behavior, power saving etc. > > > 2. You would have to create keyboard / video / disk and perhaps USB > > drivers. > Initially, I'd go for a simple console over the UART on the board, > connected via NULL modem cable to your PC.... Much much easier. That's what I thought too, but not being totally familiar with BeOS in console-only mode I wasn't sure how far I could take it. > > > What other issues would you look at? Probably some sort of custom > > boot loader? > You could look into actually using u-boot for this. I presume (haven't > checked) that there's a u-boot version available for this board, and > this could be used to actually bootstrap the Haiku kernel by writing a > small u-boot app. u-boot is already in ROM/FLASH out-of-the-box. I'll study the u-boot architecture. I imagine it has some critical information about initial device layout and discovery. > > In addition to reading the kernel sources, is there a hackers, porting > > or architectural guide to the kernel? > I don't think there is (if it is, I'd love to hear about it though :P) > but a good place to start looking is the architecture specific > implementations, here: > > http://dev.haiku-os.org/browser/haiku/trunk/src/system/kernel/arch > > Francois' m68k port might be a good start for a minimal implementation > of an arch, but I'm sure he'll chime in with some feedback too ;) > Good idea. That's mostly what I've been studying so far. > > One thing we're going to run into is support for multiple ARM cores, > multiple System-on-chips containing these cores, and then support for > the boards built using these System-on-Chips. It might be good to have a > discussion on this setup before actually starting too much of the port, > since I know Francois was looking at the FreeRunner as ARM target, and > I've got a whole load of Evaluation Boards here containing all kinds of > different ARM architectures that I would like to boot Haiku on. > According to Axel, you're trying to keep platform specific dependencies in /src/system/boot/platform and CPU architecture differences in .../system/kernel/arch. >From most-specific to least-specific I think the organization goes something like: OS->platform->CPU->variant Which leads to: beos->pc->x86->64 linux->amiga->68k->32 amigados->amiga->powerpc->32 windowsXP->pc->x86->32 and finally haiku->beagle->ARM->v8 Where the platform is a combination of bus definition, minimal devices and perhaps boot process. That's just a guess though. Maybe it's too arbitrary. I'll do some more studying and see if I can't come up with an architecture definition for the beagle that directly addresses Haiku requirements. jim ------=_Part_97579_9019584.1228260199814 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Tue, Dec 2, 2008 at 12:28 PM, Ithamar R. Adema <span dir="ltr"><<a href="mailto:[email protected]">[email protected]</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> Hi Jim,<br> <div class="Ih2E3d"><br> Jim Burnes wrote:<br></div><div class="Ih2E3d">> It should be able to run a cross-compiled kernel and Haiku OS.<br> </div>True ;)<br> <div class="Ih2E3d">> This would be a significant amount of work, but maybe not impossible.<br> </div>This is definitely also true ;)<br> <div class="Ih2E3d">> 1. You would have to port the kernel. I've done some ARM assembler.<br> </div>Actually, the amount of required assembly should be minimal. Actually<br> knowing the ARM architecture (or learning it) inside out is more essential.</blockquote><div><br>Good point. Knowing the memory access / protection structure, ARM-specific instructions that might support low-level kernel services, interrupt structure, timing, boot behavior, power saving etc.<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br> <div class="Ih2E3d">> 2. You would have to create keyboard / video / disk and perhaps USB<br> > drivers.<br> </div>Initially, I'd go for a simple console over the UART on the board,<br> connected via NULL modem cable to your PC.... Much much easier.</blockquote><div><br>That's what I thought too, but not being totally familiar with BeOS in console-only mode I wasn't sure how far I could take it.<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br> <div class="Ih2E3d">> What other issues would you look at? Probably some sort of custom<br> > boot loader?<br> </div>You could look into actually using u-boot for this. I presume (haven't<br> checked) that there's a u-boot version available for this board, and<br> this could be used to actually bootstrap the Haiku kernel by writing a<br> small u-boot app.</blockquote><div><br>u-boot is already in ROM/FLASH out-of-the-box. I'll study the u-boot architecture. I imagine it has some critical information about initial device layout and discovery.<br><br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br> <div class="Ih2E3d">> In addition to reading the kernel sources, is there a hackers, porting<br> > or architectural guide to the kernel?<br> </div>I don't think there is (if it is, I'd love to hear about it though :P)<br> but a good place to start looking is the architecture specific<br> implementations, here:<br> <br> <a href="http://dev.haiku-os.org/browser/haiku/trunk/src/system/kernel/arch" target="_blank">http://dev.haiku-os.org/browser/haiku/trunk/src/system/kernel/arch</a><br> <br> Francois' m68k port might be a good start for a minimal implementation<br> of an arch, but I'm sure he'll chime in with some feedback too ;)<br> </blockquote><div><br>Good idea. That's mostly what I've been studying so far.<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <br> One thing we're going to run into is support for multiple ARM cores,<br> multiple System-on-chips containing these cores, and then support for<br> the boards built using these System-on-Chips. It might be good to have a<br> discussion on this setup before actually starting too much of the port,<br> since I know Francois was looking at the FreeRunner as ARM target, and<br> I've got a whole load of Evaluation Boards here containing all kinds of<br> different ARM architectures that I would like to boot Haiku on.<br> </blockquote><br>According to Axel, you're trying to keep platform specific dependencies in /src/system/boot/platform and CPU architecture differences in .../system/kernel/arch.<br><br>From most-specific to least-specific I think the organization goes something like: OS->platform->CPU->variant<br> <br>Which leads to:<br><br>beos->pc->x86->64<br>linux->amiga->68k->32<br>amigados->amiga->powerpc->32<br>windowsXP->pc->x86->32<br><br>and finally<br><br>haiku->beagle->ARM->v8<br> <br>Where the platform is a combination of bus definition, minimal devices and perhaps boot process.<br><br>That's just a guess though. Maybe it's too arbitrary.<br><br>I'll do some more studying and see if I can't come up with an architecture definition for the beagle that directly addresses Haiku requirements.<br> <br>jim<br><br><br><br><br></div><br> ------=_Part_97579_9019584.1228260199814-- --===============5835093252753076389== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ --===============5835093252753076389== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Open-beos-kernel-devel mailing list Open-beos-kernel-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/open-beos-kernel-devel --===============5835093252753076389==--