Linux-kernel mailing list archive 1999-36,: Re: POrting LInux???

# Re: POrting LInux???

Mr. James W. Laferriere (babydr@baby-dragons.com)
Wed, 8 Sep 1999 15:26:40 -0700 (PDT)

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: David Weinehall: "Clean up of the config-options"
- Previous message: Andre Hedrick: "Re: Re: config-menus"

Hello Mathias, Mitchell Blank Jr <mitch@execpc.com>
sent the below email out a while back with some references
and some suggestions . Hth, JimL

On Wed, 8 Sep 1999, Mathias Wiklander wrote:
> Hi I have promised a friend I could help hine
> porting Linux to an Motorola 68331 and I asking
> you how to start and whats to be done. What kernel
> I should begin with and so on.
+-----------------------------------------------------------------+
| James W. Laferriere | System Techniques | Give me VMS |
| Network Engineer | 25416 22nd So | Give me Linux |
| babydr@baby-dragons.com | DesMoines WA 98198 | only on AXP |
+-----------------------------------------------------------------+
On Thu, 8 Jul 1999, Mitchell Blank Jr wrote:
>
> Date: Thu, 8 Jul 1999 15:01:34 -0500
> From: Mitchell Blank Jr <mitch@execpc.com>
> To: James K Whiting <whiting@MIT.EDU>
> Cc: linux-kernel@vger.rutgers.edu
> Subject: Re: Porting Linux to a new architecture
>
> James K Whiting wrote:
> > My lab is designing control boards for some robots, and they would like me
> > to port Linux to run on them. Where can I find documentation on what needs
> > to be done to port Linux to a new architecture?
> >
> > We are going to be using Hitachi SuperH SH-4 based computers.
>
> First check out: http://linuxsh3.cjb.net/ These folks are organizing
> a port to the hitachi sh-3 (which I guess is similar(?)). They don't
> seem to be far yet, but they might have developed some insight into
> the problem.
>
> The first thing to do is determine how your hardware will load the
> kernel. If your existing bootstrap system can deal with an ELF executable
> then you're in business. Otherwise you have to decide if you're going
> to (1) make a new bootstrap, (2) make a two-stage loader, or (3)
> hack together a post-processor that turns the compiled kernel into
> something that your hardware will like. Make sure your bootloader
> can deal with initrd filesystems.
>
> You should make sure that your toolchain is in order. The GNU tools
> all support the Hitachi, IIRC, but make sure that they can produce
> something resembling linux-elf.
>
> Test your bootstrap and toolchain by making a tiny ELF executable
> that just does some simple hardware thing (like writing a string to
> a serial port).
>
> Now, the kernel. Make a new include/asm-* and arch/* directory.
> These aren't completely documented but there are plenty of examples - just
> look around. One thing you'll have to is determine how the userland
> will interface with the kernel - i.e. what a system call will look
> like, etc. Sometimes the hardware makes the choice real easy, sometimes
> there's a lot of flexibility. Anyway, choose carefully since it'll
> be hard to fix later.
>
> As for initial stuff to write - just get a console device up (usually
> a serial port is easiest). Don't worry about disk or network yet -
> you can boot off an initrd filesystem. (For an initrd filesystem, just
> make an "/sbin/init" that does a few simple system calls and loops)
> The other nice advantage of not doing disk or network is that you
> don't have to worry about getting DMA right initially.
>
> Once that is working, you can easily start work in multiple directions.
> The obvious one is filling out the list of device drivers. The other
> one is to start porting libc (which is a whole 'nother mailing list :-)
> Once you have libc working you can start compiling a full userland.
> Congratulations, you're done.
>
> -Mitch

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

- Next message: David Weinehall: "Clean up of the config-options"
- Previous message: Andre Hedrick: "Re: Re: config-menus"