cancel
Showing results for 
Search instead for 
Did you mean: 

boot STPC Elite

mvirique
Associate II
Posted on June 16, 2003 at 06:01

boot STPC Elite

3 REPLIES 3
mvirique
Associate II
Posted on May 15, 2003 at 08:24

Hello,

I used the stpckit development to build a bootloader.

With the four partitions disk describes in the documentation, I can boot linux (I worked on a Evaluation STPC Elite board without VGA).

But, now I want to boot a disk with debian and LILO. It is composed of a linux swap partition (/dev/hda1) and a linux partition (/dev/hda2).

I think that after the execution of the primary loader, I must load the first sector of the hard disk (the MBR) in RAM then jump to the address in RAM.

If it is right, how can I do it with the stpckit? (I search for a long time!)

Thanks in advance.

Cyber
thierry239955_st
Associate II
Posted on May 26, 2003 at 10:52

Hmm... it is not that easy.

LILO (and even the MBR itself) use the software interrupt (int 10h, int 13h etc...) previously installed by the system BIOS and extension BIOS to access the different part of the hardware. This software interrupt are not installed by the primary loader which is a very basic version of BIOS.

If you succeed to load the MBR, you also have to re-write and install by yourself part of this software interrupt before to jump to the MBR code.

I suggest you go back to your first solution to use the secondary loader from the STPC Development Kit.

The secondary loader from ST have been designed for chip integrating the graphics like STPC Consumer-II and STPC Elite. It is the source of your problem.

First, the loader won't initialize any external graphics card. I hope your system is headless or you will have to initialize the graphics by yourself by adding code in the loader (the best is to call the VGA BIOS of your card). Anyway, if you would like to use graphics, I suggest you switch to an STPC Atlas!

The second point is the system hang when calling the REGHOST_Init function which access some graphics registers without to check if the chip really support graphics.

You should suppress all the line between this comment:

/* Enable access to VGA controller I/O */

and this one:

/* Map moveable IO and memory range */

in the REGHOST_Init function of the src/libreg/host/host.c file.

You can test your modification first under DOS or Linux by compiling a simple none graphic example (sample/tools/detect for example) or by writing a small example with just this inside:

void ST_MainFunction(void)

{

OSAL_Init();

REGHOST_Init(REGHOST_LIB_ALL);

}

This example should hang before the modification and pass when REGHOST_Init is fixed.

Farfalla

mvirique
Associate II
Posted on June 16, 2003 at 06:01

Thank you for your explanations.

I found some information in the source of linux. But, I haven't yet succeed to load the MBR.

I'm probably going to follow your advice.

Cyber