This patch enables the use of "-display" parameter to specify the framebuffer device to use (other than the default /dev/fb0) when using fb driver. James diff -ur links-2.8-old/default.c links-2.8/default.c --- links-2.8-old/default.c 2013-08-26 06:08:07.000000000 +0700 +++ links-2.8/default.c 2014-02-21 14:01:39.322843605 +0700 @@ -1468,7 +1468,7 @@ " For Xwindow it is size of a window in format WIDTHxHEIGHT.\n" "\n" " -display \n" -" Set Xwindow display.\n" +" Set Xwindow display. For fb driver, specify which framebuffer (/dev/fbX) to use.\n" "\n" " -force-html\n" " Treat files with unknown type as html rather than text.\n" diff -ur links-2.8-old/framebuf.c links-2.8/framebuf.c --- links-2.8-old/framebuf.c 2013-09-02 00:13:47.000000000 +0700 +++ links-2.8/framebuf.c 2014-02-21 14:06:49.049487640 +0700 @@ -122,6 +122,7 @@ static void fb_draw_bitmap(struct graphics_device *dev,struct bitmap* hndl, int x, int y); static unsigned char *fb_driver_param; +static unsigned char *fb_fbdev; /* /dev/fbXXX fbdev to use */ extern struct graphics_driver fb_driver; static int have_cmap; static volatile int fb_active; @@ -1162,7 +1163,7 @@ /* don't check error */ } -static unsigned char *fb_init_driver(unsigned char *param, unsigned char *ignore) +static unsigned char *fb_init_driver(unsigned char *param, unsigned char *fbdev) { unsigned char *e; struct stat st; @@ -1245,12 +1246,16 @@ return e; } - EINTRLOOP(fb_handle, open("/dev/fb0", O_RDWR)); + /* james: choose which fbdev to use */ + fb_fbdev="/dev/fb0"; + if(fbdev != NULL && fbdev[0]) + fb_fbdev=stracpy(fbdev); + EINTRLOOP(fb_handle, open(fb_fbdev, O_RDWR)); if (fb_handle==-1) { fb_switch_shutdown(); if(fb_driver_param) { mem_free(fb_driver_param); fb_driver_param=NULL; } fb_show_cursor(); - return stracpy(cast_uchar "Cannot open /dev/fb0.\n"); + return stracpy(cast_uchar "Cannot open framebuffer device.\n"); } EINTRLOOP(rs, ioctl(fb_handle, FBIOGET_VSCREENINFO, &vi)); diff -ur links-2.8-old/links.1 links-2.8/links.1 --- links-2.8-old/links.1 2012-09-20 04:51:05.000000000 +0700 +++ links-2.8/links.1 2014-02-21 14:01:11.052845282 +0700 @@ -64,7 +64,7 @@ .TP \f3-display \f2\f1 -Set Xwindow display. +Set Xwindow display. For fb driver, specify which framebuffer (/dev/fbX) to use. .TP \f3-force-html\f1