When first testing your NFB driver, direct the X server to use your local copy of the driver with the following command sequence:
$ cd <driver development directory> $ NFBDRIVERS=`pwd` $ export NFBDRIVERSThis sets the NFBDRIVERS environment variable to the name of the working directory for your driver.
NFB driver testing should be run either from the serial console terminal or a remote terminal. When running the X server remotely, use the -force option:
$ /usr/bin/X11/X -forceThe error messages from the X server are routed by by ErrorF(D3nfb) print statements to the /tmp/xlogfile file. If you are using ErrorF( ) statements to debug your code, check this file for those outputs.
You should route any stderr messages to a file and run the X server in the background:
$ /usr/bin/X11/X -force 2> x.errs &In most cases, the X server does not generate stderr messages. The one exception is if an NFB driver uses fprintf(stederr...) statements for error handling; this is not recommended.
To make local X clients connect with the X server, set your DISPLAY:
$ DISPLAY=localhost:0 $ export DISPLAY $ xlogo &When the X server has successfully operated an NFB video driver, and a video card has been found and configured, the ODM class NFB_GRAFDEV is set to indicate what has been configured. You can query that class with the scripts in the /usr/ddk/src/native/nfb/tools directory: