[Nottingham] Preventing console starting on embedded arm-linux setup

Ant Allen antony.allen at nottingham.ac.uk
Mon Apr 5 17:39:26 BST 2004


On Thursday 01 Apr 2004 11:31 pm, Ant Allen wrote:
> Still got tux and a flashing cursor ;-(

I now have a pretty tidy solution to this.  At the start of my main function I 
have this:

// Set console to graphics mode
if((cfd=open("/dev/tty0", O_RDWR))<0){
  fprintf(stderr, "Error - cannot open tty0\n");
  return -1;
}
else{
  ioctl(cfd, KDSETMODE, KD_GRAPHICS);
}

This runs the console in graphics mode which removes the flashing cursor and 
prevents console based power management of the display.  The constants are 
included from linux/dk.d

Tux is then removed when I initialise the fb screen memory simply by clearing 
the screen to black.

Thanks to all for the help.

Ant





More information about the Nottingham mailing list