NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
port-i386/49856: add vesa as keyword to boot.cfg(5)
>Number: 49856
>Category: port-i386
>Synopsis: please add "vesa" as keyword to boot.cfg(5)
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: port-i386-maintainer
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sat Apr 25 15:50:00 +0000 2015
>Originator: dieter roelants
>Release: NetBSD 7.99.12
>Organization:
>Environment:
System: NetBSD simult.amelgem.be 7.99.12 NetBSD 7.99.12 (SIMULT) #108: Sat Apr 25 12:33:11 CEST 2015 dieter%simult.amelgem.be@localhost:/build/obj.amd64.current/sys/arch/amd64/compile/SIMULT amd64
Architecture: x86_64
Machine: amd64
>Description:
If one wants to configure vesa parameters via boot.cfg, it
currently has to be done for each menu entry separately.
This makes entries long and the file less readable.
>How-To-Repeat:
Put vesa=<some_mode> in /boot.cfg
>Fix:
I hope the following patch is acceptable. I don't know if vesa can
make sense for other ports than x86, so the change to bootcfg.h
may be out of place? Also note that man page patch will only apply
after sorting the rndseed description to where it belongs (see the
PR with a number close to this one).
Index: sys/arch/i386/stand/lib/bootmenu.c
===================================================================
RCS file: /cvsroot/src/sys/arch/i386/stand/lib/bootmenu.c,v
retrieving revision 1.14
diff -p -u -r1.14 bootmenu.c
--- sys/arch/i386/stand/lib/bootmenu.c 10 Aug 2014 07:40:49 -0000 1.14
+++ sys/arch/i386/stand/lib/bootmenu.c 11 Apr 2015 16:27:24 -0000
@@ -39,6 +39,7 @@
#include <libi386.h>
#include <bootmenu.h>
+#include <vbe.h>
static void docommandchoice(int);
@@ -51,8 +52,8 @@ extern const char bootprog_name[], bootp
/*
* XXX
- * if module_add, userconf_add are strictly mi they can be folded back
- * into sys/lib/libsa/bootcfg.c:perform_bootcfg().
+ * If module_add, userconf_add, command_vesa are strictly mi, they
+ * can be folded back into sys/lib/libsa/bootcfg.c:perform_bootcfg().
*/
static void
do_bootcfg_command(const char *cmd, char *arg)
@@ -61,6 +62,8 @@ do_bootcfg_command(const char *cmd, char
module_add(arg);
else if (strcmp(cmd, BOOTCFG_CMD_USERCONF) == 0)
userconf_add(arg);
+ else if (strcmp(cmd, BOOTCFG_CMD_VESA) == 0)
+ command_vesa(arg);
}
void
Index: sys/lib/libsa/bootcfg.h
===================================================================
RCS file: /cvsroot/src/sys/lib/libsa/bootcfg.h,v
retrieving revision 1.1
diff -p -u -r1.1 bootcfg.h
--- sys/lib/libsa/bootcfg.h 28 Jun 2014 09:16:18 -0000 1.1
+++ sys/lib/libsa/bootcfg.h 11 Apr 2015 16:27:24 -0000
@@ -35,6 +35,7 @@
#define BOOTCFG_CMD_LOAD "load"
#define BOOTCFG_CMD_USERCONF "userconf"
+#define BOOTCFG_CMD_VESA "vesa"
typedef void (*bootcfg_command)(const char *cmd, char *arg);
--- share/man/man5/boot.cfg.5.orig 2015-04-25 12:43:09.000000000 +0200
+++ share/man/man5/boot.cfg.5 2015-04-25 12:43:14.000000000 +0200
@@ -25,7 +25,7 @@
.\" INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd November 28, 2011
+.Dd April 25, 2015
.Dt BOOT.CFG 5
.Os
.Sh NAME
@@ -160,6 +160,20 @@
Passes a
.Xr userconf 4
command to the kernel at boot time.
+.It Sy vesa
+The values
+.Ar enabled , on
+put the display into the default mode, and
+.Ar disabled , off
+returns the display into standard vga mode.
+Other values, in the form of
+.Ar 0x100 , 800x600 , 800x600x32 .
+initialise the video card to the specified resolution and bit depth.
+Supported modes can be obtained by issuing the command
+.Ic vesa list
+on the
+.Xr boot 8
+prompt.
.El
.Sh EXAMPLES
Here is an example
Home |
Main Index |
Thread Index |
Old Index