From 4bf14b52ba6acabad88917d1b4b3df363e6b27cb363d55b141d813dcf37f4165 Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Wed, 26 Aug 2009 13:13:42 +0000 Subject: [PATCH] Accepting request 18635 from system:install:head Copy from system:install:head/syslinux based on submit request 18635 from user snwint OBS-URL: https://build.opensuse.org/request/show/18635 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/syslinux?expand=0&rev=17 --- README.gfxboot | 17 ++++-- syslinux-3.82-gfxboot.diff | 103 +++++++++++++++++++++++++++++++++++++ syslinux.changes | 6 +++ syslinux.spec | 2 +- 4 files changed, 124 insertions(+), 4 deletions(-) diff --git a/README.gfxboot b/README.gfxboot index 0a2f33d..3e9feae 100644 --- a/README.gfxboot +++ b/README.gfxboot @@ -4,11 +4,22 @@ gfxboot bootlogo before in isolinux.cfg or syslinux.cfg, change this to -ui gfxboot.com bootlogo +ui gfxboot bootlogo and add /usr/share/syslinux/gfxboot.com to your boot directory (the one where the config file is). -This also means that gfxboot now works with other syslinux variants like -pxelinux or extlinux, too. +You can also use + +ui gfxboot bootlogo message + +and remove the + +display message + +line. The 'message' file will be shown when you leave the gfxboot module (or +it couldn't be started). + +This also means that gfxboot now works with other syslinux variants like +pxelinux or extlinux. diff --git a/syslinux-3.82-gfxboot.diff b/syslinux-3.82-gfxboot.diff index bb706af..b393189 100644 --- a/syslinux-3.82-gfxboot.diff +++ b/syslinux-3.82-gfxboot.diff @@ -2632,3 +2632,106 @@ index 0000000..b7a3dc6 + +#endif /* _LIBIO_H */ + +diff --git a/modules/gfxboot.c b/modules/gfxboot.c +index 6b0d300..c7c69fe 100644 +--- a/modules/gfxboot.c ++++ b/modules/gfxboot.c +@@ -153,6 +153,7 @@ void gfx_infobox32(int type, uint32_t str1, uint32_t str2); + void gfx_infobox(int type, char *str1, char *str2); + + void boot(void); ++void show_message(char *file); + + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +@@ -202,8 +203,8 @@ int main(int argc, char **argv) + gfx_config.boot_drive = 0; + } + +- if(argc != 2) { +- printf("Usage: gfxboot.com \n"); ++ if(argc < 2) { ++ printf("Usage: gfxboot.com bootlogo_file [message_file]\n"); + return 0; + } + +@@ -237,6 +238,10 @@ int main(int argc, char **argv) + boot(); + } + ++ if(argc > 2) { ++ show_message(argv[2]); ++ } ++ + return 0; + } + +@@ -896,3 +901,17 @@ void syslinux_hook(x86regs_t *r) + } + + ++// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ++void show_message(char *file) ++{ ++ int c; ++ ++ if(open(file) == -1) return; ++ ++ while((c = getc()) != EOF) { ++ if(c < ' ' && c != '\n' && c != '\t') continue; ++ printf("%c", c); ++ } ++} ++ ++ +diff --git a/modules/libio.asm b/modules/libio.asm +index 57bcde3..1b31219 100644 +--- a/modules/libio.asm ++++ b/modules/libio.asm +@@ -59,7 +59,7 @@ _start: + rep stosb + + ; parse args +- mov bx,80h ++ mov ebx,80h + movzx si,byte [bx] + mov byte [si+81h],0dh ; just make sure + xor ecx,ecx +diff --git a/modules/gfxboot.c b/modules/gfxboot.c +index c7c69fe..9c9682b 100644 +--- a/modules/gfxboot.c ++++ b/modules/gfxboot.c +@@ -205,16 +205,22 @@ int main(int argc, char **argv) + + if(argc < 2) { + printf("Usage: gfxboot.com bootlogo_file [message_file]\n"); ++ if(argc > 2) show_message(argv[2]); ++ + return 0; + } + + if(read_config_file()) { + printf("Error reading config file\n"); ++ if(argc > 2) show_message(argv[2]); ++ + return 0; + } + + if(gfx_init(argv[1])) { + printf("Error setting up gfxboot\n"); ++ if(argc > 2) show_message(argv[2]); ++ + return 0; + } + +@@ -238,9 +244,7 @@ int main(int argc, char **argv) + boot(); + } + +- if(argc > 2) { +- show_message(argv[2]); +- } ++ if(argc > 2) show_message(argv[2]); + + return 0; + } diff --git a/syslinux.changes b/syslinux.changes index 96bbef2..518b950 100644 --- a/syslinux.changes +++ b/syslinux.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Aug 25 15:53:39 CEST 2009 - snwint@suse.de + +- fix argv setup (bnc #530255) +- now accepts two args: bootlogo and a (text)message file + ------------------------------------------------------------------- Fri Aug 7 13:47:54 CEST 2009 - snwint@suse.de diff --git a/syslinux.spec b/syslinux.spec index 32b5da6..7b80dd6 100644 --- a/syslinux.spec +++ b/syslinux.spec @@ -27,7 +27,7 @@ Requires: mtools AutoReqProv: on Summary: Boot Loader for Linux Version: 3.82 -Release: 5 +Release: 6 Source: %{name}-%{version}.tar.bz2 Source1: isolinux-config Source2: README.gfxboot