How can I use fbcon as video device in SDL

Hi all,

I’m porting SDL to an arm-based linux platform.

There are no X11 or other video support, so I have to use fbcon (frame
buffer console).

The device /dev/fb0 work properly.

I built SDL use cross compile:

NM=arm-linux-nm LD=arm-linux-ld CC=arm-linux-gcc CXX=arm-linux-g++

RANLIB=arm-linux-ranlib AR=arm-linux-ar ./configure
–disable-video-qtopia --disable-video-dummy --enable-video-fbcon
–disable-video-dga --disable-arts --disable-esd --disable-alsa
–disable-cdrom --disable-video-x11 --disable-nasm
–target=arm-unknown-linux-gnu --host=arm-unknown-linux-gnu

make

make install

The build was successful.

And I built the sample code in \SDL-1.2.7\test:

arm-linux-gcc testwin.c -I/usr/local/include/SDL -L/usr/local/lib -lSDL
-pthread -o test.out

When I try to run test.out on my arm-linux platform, it shows:

Initialization of SDL failed: No available video device.

I have tried and set the environment variables:

export DISPLAY=“fbcon”

export SDL_VIDEODRIVER=“fbcon”

export SDL_VIDEODEVICE=“fbcon”

None of them can work.

Can anyone help me? Thank you very much.

The device /dev/fb0 work properly.

I built SDL use cross compile:

NM=arm-linux-nm LD=arm-linux-ld CC=arm-linux-gcc CXX=arm-linux-g++

RANLIB=arm-linux-ranlib AR=arm-linux-ar ./configure
–disable-video-qtopia --disable-video-dummy --enable-video-fbcon
–disable-video-dga --disable-arts --disable-esd --disable-alsa
–disable-cdrom --disable-video-x11 --disable-nasm
–target=arm-unknown-linux-gnu --host=arm-unknown-linux-gnu

Did you check the output of to see if the fbcon video driver was
actually enabled?

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment