Porting linux to i386 but non-pc platform

Porting linux to i386 but non-pc platform

Post by Robert Po » Thu, 12 Feb 2004 04:33:34



Hello,

I'm trying to port linux to an i386 board.
The problem is that this board is not a PC, so not all pc-devices are
available. Most of them are, like the serial ports and the interrupt
controller, but someting like the real-time-clock is not available.
And also the timers are running from another frequency and there is no bios.

I have managed to load the kernel, do the uncompressing and starting the
kernel.
At this moment I'm stuck in init/main.c

I'm sure I will manage to go to the code step by step but it's time
consuming.
So I'm wondering if there is some document available which describes
what to change to adopt linux to my hardware.

Regards, Robert

 
 
 

Porting linux to i386 but non-pc platform

Post by Roger Larsso » Thu, 12 Feb 2004 04:59:20



> Hello,

> I'm trying to port linux to an i386 board.
> The problem is that this board is not a PC, so not all pc-devices are
> available. Most of them are, like the serial ports and the interrupt
> controller, but someting like the real-time-clock is not available.
> And also the timers are running from another frequency and there is no
> bios.

> I have managed to load the kernel, do the uncompressing and starting the
> kernel.
> At this moment I'm stuck in init/main.c

Have you compiled for x386? I.e. not Pentium something...

/RogerL

--
Roger Larsson
Skellefte?
Sweden

 
 
 

Porting linux to i386 but non-pc platform

Post by Robert Po » Fri, 13 Feb 2004 04:24:38




>>Hello,

>>I'm trying to port linux to an i386 board.
>>The problem is that this board is not a PC, so not all pc-devices are
>>available. Most of them are, like the serial ports and the interrupt
>>controller, but someting like the real-time-clock is not available.
>>And also the timers are running from another frequency and there is no
>>bios.

>>I have managed to load the kernel, do the uncompressing and starting the
>>kernel.
>>At this moment I'm stuck in init/main.c

> Have you compiled for x386? I.e. not Pentium something...

> /RogerL

Thankyou for the response.

I have made it working, linux is booting correctly now.
(Yes, it was compiled for 386)
Now it complains about not having a root filesystem, which is correct
as I didn't supply one.
I have to make something in ROM, I have to figure out how to do this.

Robert

 
 
 

Porting linux to i386 but non-pc platform

Post by Michael Schnel » Sat, 14 Feb 2004 17:45:33


Quote:> I have to make something in ROM, I have to figure out how to do this.

You will need to do it in RAM. The Kernel provides a method to create a
root file system in RAM (RAMFS) and populate it from a compressed image
it finds in the BOOT ROM.

-Michael

 
 
 

Porting linux to i386 but non-pc platform

Post by Michael Schnel » Sat, 14 Feb 2004 17:48:05


BTW. I would take a look at ELinOS. Same might help you to create you
"Distribution".

-Michael

 
 
 

Porting linux to i386 but non-pc platform

Post by Robert Po » Tue, 17 Feb 2004 01:26:35



> BTW. I would take a look at ELinOS. Same might help you to create you
> "Distribution".

> -Michael

Thanks, I will take a look.

Everything is working now, it will mount the root file system from
another linux PC using NFS, everything works great.
But I will still have to make a system which is working stand alone
and gets the filesystem from ROM.

Robert

 
 
 

Porting linux to i386 but non-pc platform

Post by Michael Schnel » Tue, 17 Feb 2004 17:55:02


Robert Pot schrieb:


> > BTW. I would take a look at ELinOS. Same might help you to create you
> > "Distribution".

> > -Michael
> Thanks, I will take a look.

> Everything is working now, it will mount the root file system from
> another linux PC using NFS, everything works great.
> But I will still have to make a system which is working stand alone
> and gets the filesystem from ROM.

> Robert

ELinOs has "ROLO" for this. Maybe it needs to be tweaked to support your
architecture.

-Michael