cancel
Showing results for 
Search instead for 
Did you mean: 

using frmaebuffer with stpc loader

gal
Associate II
Posted on May 21, 2003 at 07:43

using frmaebuffer with stpc loader

7 REPLIES 7
gal
Associate II
Posted on May 11, 2003 at 10:51

Hello,

I am using stpc atlas evaluation bord.

the bios is stpc loader and I load linux.

How can I configure the framebuffer using linux and stpc loader?

I know that if I am using lilo I need to add

vga=791 if I want to use 1024x768.

what I need to to if I am using the stpc loader?

Thank in advance.

thierry239955_st
Associate II
Posted on May 12, 2003 at 06:36

Yahel,

There is a way to configure this in parameters you provide to the kernel, the LDRLNXLOAD_SET_PARAM_... macros in the case of the ST loader.

If you are using the standard VESA frame buffer device driver, you need to initialize the screen by yourself before to start the kernel (HWCRTC_InitGraphicMode function) then provide the right parameters to the kernel. Anyway, I'm not sure this can work. I think VESA driver can't work without a VESA BIOS.

If you are using the STPC frame buffer device provided by ST, I think you could use either the kernel parameters like describe above or the kernel command line parameters through the LDRLNXLOAD_SET_PARAM_COMMANDLINE macro. The contend of the command line is describe in the driver documentation. It correspond to what you write in the append=''...'' command of LILO.

Thierry

fabrice
Associate II
Posted on May 12, 2003 at 08:13

Hello Yahel,

as said by Farfalla, the STPC frame buffer driver is selected in the append line of the lilo.conf file.

example:

append=''video=stpc:xres:800,yres:600,depth:16,refresh:60,ypan''

This example is provided in the GDK kit released on Internet, but the documentation does not mention how to do...

fab
gal
Associate II
Posted on May 12, 2003 at 13:23

Hello,

Is the kernel included in the STPC development kit suport framebuffer?

I tried to add the stpc framebuffer to the kernel as describe in the

''STPC Linux Device Compilation'' pdf file.

this pdf file has errors (the file fbcon in not included in the main disractory).

Do you have an update pdf file?

How can I add the stpc framebuffer source code to the linux kernel source code and compile it?

Thank in advance.
thierry239955_st
Associate II
Posted on May 13, 2003 at 15:07

You are right, it's look like the pdf document haven't been updated and is still refering to older version of kernel (2.2.x).

For a kernel version 2.4.x, you can follow this procedure:

There are three files to update in the /usr/src/linux/drivers/video directory:

In Makefile, you have to add this lines:

subdir-$(CONFIG_FB_STPC) += gdk

ifeq ($(CONFIG_FB_STPC),y)

obj-y += gdk/stpcfb.o

endif

(at the same location as other card, you have the same lines for the matrox card, the riva card etc... - you can just copy and replace MATROX by STPC)

In fbmem.c file, you have to add these lines:

extern int stpcfb_init(void);

extern int stpcfb_setup(char*);

and also these:

#ifdef CONFIG_FB_STPC

{ ''stpc'', stpcfb_init, stpcfb_setup },

#endif

at two another location. One more time, you can take example on another card like the matrox one to understand where to place these lines.

In Config.in file, you have to replace this:

if [ ''$ARCH'' = ''i386'' ]; then

bool ' VESA VGA graphics console' CONFIG_FB_VESA

tristate ' VGA 16-color graphics console' CONFIG_FB_VGA16

tristate ' Hercules mono graphics console (EXPERIMENTAL)' CONFIG_FB_HGA

define_bool CONFIG_VIDEO_SELECT y

fi

by

if [ ''$ARCH'' = ''i386'' ]; then

bool ' VESA VGA graphics console' CONFIG_FB_VESA

bool ' STPC frame buffer support' CONFIG_FB_STPC

tristate ' VGA 16-color graphics console' CONFIG_FB_VGA16

tristate ' Hercules mono graphics console (EXPERIMENTAL)' CONFIG_FB_HGA

define_bool CONFIG_VIDEO_SELECT y

fi

(just add the line concerning STPC)

You also have to modify the main kernel Makefile at this location:

/usr/src/linux/Makefile

You replace this line

DRIVERS-$(CONFIG_VT) += drivers/video/video.o

by

DRIVERS-$(CONFIG_VT) += drivers/video/video.o drivers/video/gdk/gdk.a

Then, just uncompress the tgz you got from ST and copy the whole contend of the fbdev/gdk directory in the /usr/src/linux/drivers/video

In the pdf, it is written the stpcfb.c file have to be located in the /usr/src/linux/drivers/video/ directory. It is not the case. Just keep it in the gdk directory.

After all this modifications, you can do the 'make config', 'make menuconfig' or 'make xconfig' to add the options describe in the pdf.

Don't forgot to do a 'make dep' after your modifications and you can do your kernel compilation.

Farfalla

gal
Associate II
Posted on May 18, 2003 at 13:01

Hello,

first I want to thank you for your answer.

I did what you told me to do but when I compile the new kernel

(make bzImage) I got error on the file stpcfb.o .

it didn't say what is the error.

How can I see where is the error ?

Is there any log file with the errors of the compilation?

thanks in advance.
gal
Associate II
Posted on May 21, 2003 at 07:43

Hello,

I solve the last problem. The problem was because you use the malloc.h header file. This file is deprecated so I change the malloc.h file to use slab.h

I compile new kernel with stpc framebuffer.

Then I change the stpc loader (BIOS).

The framebuffer didn't start.

What do you advice me to do?

Thanks in advance.