]> git.ozlabs.org Git - yaboot.git/commitdiff
Commit yaboot 1.3.5-pre2
authorEthan Benson <erbenson@alaska.net>
Wed, 27 Mar 2002 13:22:23 +0000 (13:22 +0000)
committerEthan Benson <erbenson@alaska.net>
Wed, 27 Mar 2002 13:22:23 +0000 (13:22 +0000)
Commit yaboot 1.3.5-pre2.
git-archimport-id: erbenson@alaska.net--public/yaboot--devel--1.3--patch-10

ChangeLog
Makefile
changelog
man.patch
man/yaboot.conf.5
second/fs_ext2.c
second/prom.c
second/yaboot.c
ybin/ybin

index 2abf395b48f1bb8de265b7c66855d4669494c397..61bd5149ba05e5fbcae6d66601334e73650321a6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,20 @@
 # tag: automatic-ChangeLog--erbenson@alaska.net--public/yaboot--devel--1.3
 #
 
+2002-03-27 13:22:23 GMT        Ethan Benson <erbenson@alaska.net>      patch-10
+
+    Summary:
+      Commit yaboot 1.3.5-pre2
+    Revision:
+      yaboot--devel--1.3--patch-10
+
+    Commit yaboot 1.3.5-pre2.
+
+    modified files:
+     ChangeLog Makefile changelog man.patch man/yaboot.conf.5
+     second/fs_ext2.c second/prom.c second/yaboot.c ybin/ybin
+
+
 2002-03-26 15:11:26 GMT        Ethan Benson <erbenson@alaska.net>      patch-9
 
     Summary:
index 62dc58a5e3049754b0d58fa1c0d8ae96ad0a6462..b8b02c77a7b0fc98923ad68d3941b280b27d8b66 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@
 
 include Config
 
-VERSION = 1.3.5pre1
+VERSION = 1.3.5pre2
 # Debug mode (spam/verbose)
 DEBUG = 0
 # make install vars
@@ -144,6 +144,7 @@ clean:
        find . -name '#*' | xargs rm -f
        find . -name '.#*' | xargs rm -f
        find . -name '*~' | xargs rm -f
+       find . -name '*.swp' | xargs rm -f
        -gunzip man/*.gz
        rm -rf man.deb
        chmod 755 ybin/ybin ybin/ofpath ybin/yabootconfig
index e4946fa45d06117fa7f9025a71f7a4a919f55d77..7ddea3a97886706cc0ab698f83d2ce8d36504ab1 100644 (file)
--- a/changelog
+++ b/changelog
@@ -1,11 +1,12 @@
-2001-10-24  Ethan Benson  <erbenson@alaska.net>
+2001-10-25  Ethan Benson  <erbenson@alaska.net>
 
-       * Version 1.3.5pre1
+       * Version 1.3.5pre2
 
        * yaboot:
          - XFS fixes for large partitions (Brendan O'Dea)
          - Upgrade libext2fs to 1.25, this adds full ext3 support to yaboot.
          - Reiserfs fixes (Jeff Mahoney)
+         - Implement the message= configuration option (see yaboot.conf man page).
 
 2001-10-13  Ethan Benson  <erbenson@alaska.net>
 
index 24557e9b47da9187de7be896c79d9eff11464138..707668a9c236dd0fb64d9c76597b6756b0a7e198 100644 (file)
--- a/man.patch
+++ b/man.patch
@@ -1,6 +1,6 @@
-diff -urN -X CVS man/mkofboot.8 man.deb/mkofboot.8
+diff -urN -x CVS man/mkofboot.8 man.deb/mkofboot.8
 --- man/mkofboot.8     Thu May 24 04:32:54 2001
-+++ man.deb/mkofboot.8 Tue Sep 25 05:38:42 2001
++++ man.deb/mkofboot.8 Thu Oct 25 05:06:35 2001
 @@ -94,7 +94,7 @@
  .TP
  .BR \-i ,\  \-\-install\ \fIboot-file
@@ -30,9 +30,9 @@ diff -urN -X CVS man/mkofboot.8 man.deb/mkofboot.8
  \fBmkofboot\fR) it is thus critical that it not be writable by anyone
  but root.  It is also critical that \fI/etc/yaboot.conf\fR not be
  writable by anyone but root since a different \fIofboot\fR script could be
-diff -urN -X CVS man/yaboot.conf.5 man.deb/yaboot.conf.5
---- man/yaboot.conf.5  Tue Sep 25 05:20:03 2001
-+++ man.deb/yaboot.conf.5      Tue Sep 25 05:38:42 2001
+diff -urN -x CVS man/yaboot.conf.5 man.deb/yaboot.conf.5
+--- man/yaboot.conf.5  Thu Oct 25 05:06:22 2001
++++ man.deb/yaboot.conf.5      Thu Oct 25 05:06:35 2001
 @@ -136,7 +136,7 @@
    boot=/dev/hda2
    device=hd:
@@ -51,7 +51,7 @@ diff -urN -X CVS man/yaboot.conf.5 man.deb/yaboot.conf.5
  loader for yaboot.  It is capable of presenting a dual boot menu for
  GNU/Linux, MacOS and MacOSX.  If dual booting is not required or
  configured it will simply load yaboot directly.  You must specify this
-@@ -301,7 +301,7 @@
+@@ -305,7 +305,7 @@
  When you define this option you will be presented with a simple menu at
  bootup allowing you to hit L to boot GNU/Linux or B to boot BSD (along
  with other choices if configured).  This will only work if you are
@@ -60,7 +60,7 @@ diff -urN -X CVS man/yaboot.conf.5 man.deb/yaboot.conf.5
  set to a unix device node (ie \fI/dev/hda11\fR) then ybin will use the
  \fBofpath\fR(8) utility to determine the OpenFirmware device path.
  .TP
-@@ -310,7 +310,7 @@
+@@ -314,7 +314,7 @@
  partition.  When you define this option you will be presented with a
  simple menu at bootup allowing you to hit L to boot GNU/Linux or M to
  boot MacOS (along with other choices if configured).  This will only
@@ -69,7 +69,7 @@ diff -urN -X CVS man/yaboot.conf.5 man.deb/yaboot.conf.5
  script.  When this is set to a unix device node (ie \fI/dev/hda11\fR)
  then ybin will use the \fBofpath\fR(8) utility to determine the
  OpenFirmware device path.
-@@ -320,7 +320,7 @@
+@@ -324,7 +324,7 @@
  When you define this option you will be presented with a simple menu
  at bootup allowing you to hit L to boot GNU/Linux or X to boot MacOSX
  (along with other choices if configured).  This will only work if you
@@ -78,7 +78,7 @@ diff -urN -X CVS man/yaboot.conf.5 man.deb/yaboot.conf.5
  this is set to a unix device node (ie \fI/dev/hda11\fR) then ybin will
  use the \fBofpath\fR(8) utility to determine the OpenFirmware device
  path.
-@@ -341,7 +341,7 @@
+@@ -345,7 +345,7 @@
  When you define this option you will be presented with a simple menu
  at bootup allowing you to hit L to boot GNU/Linux or D to boot Darwin
  (along with other choices if configured).  This will only work if you
@@ -87,7 +87,7 @@ diff -urN -X CVS man/yaboot.conf.5 man.deb/yaboot.conf.5
  this is set to a unix device node (ie \fI/dev/hda11\fR) then ybin will
  use the \fBofpath\fR(8) utility to determine the OpenFirmware device
  path.
-@@ -589,8 +589,8 @@
+@@ -593,8 +593,8 @@
  root=/dev/hda3
  partition=3
  timeout=20
@@ -98,9 +98,9 @@ diff -urN -X CVS man/yaboot.conf.5 man.deb/yaboot.conf.5
  fgcolor=black
  bgcolor=green
  default=Linux
-diff -urN -X CVS man/ybin.8 man.deb/ybin.8
+diff -urN -x CVS man/ybin.8 man.deb/ybin.8
 --- man/ybin.8 Thu May 24 04:33:16 2001
-+++ man.deb/ybin.8     Tue Sep 25 05:38:42 2001
++++ man.deb/ybin.8     Thu Oct 25 05:06:35 2001
 @@ -109,7 +109,7 @@
  .TP
  .BR \-i ,\  \-\-install\ \fIboot-file
index f42ff422bcbb8199511d0f4ecb4d7a8427e772a6..b1371bf8cfbb3bcafbbae397b7176004f3a5af82 100644 (file)
@@ -6,7 +6,7 @@
 .\" This program is distributed according to the Gnu General Public License.
 .\" See the file COPYING in the ybin source distribution.
 .\"
-.TH YABOOT.CONF 5 "25 September 2001" "GNU/Linux PowerPC" "File Formats"
+.TH YABOOT.CONF 5 "25 October 2001" "GNU/Linux PowerPC" "File Formats"
 .SH NAME
 .B yaboot.conf
 \- Configuration file format used by
@@ -247,8 +247,12 @@ darwin.  This is only relevant if you have \fIbsd=\fR, \fImacos=\fR,
 \fImacosx=\fR, or \fIdarwin=\fR options defined.
 .TP
 .BI "message=" message_filename
-Specifies a file containing a message that is displayed before the boot
-prompt. [CURRENTLY UNIMPLEMENTED]
+Specifies a file containing a message that is displayed before the
+boot prompt.  You may specify either a plain pathname, in which case
+the default device and partition will be derived from the
+\fIdevice=\fR and \fIpartition=\fR lines in the global section of
+\fByaboot.conf\fR, or you can specify a full OpenFirmware device
+path.  Note: only the first 2000 bytes of this file will be read.
 .TP
 .BI "password=" password
 Protect booting by a password. The password is given in either
index b2ef127fa8abd95086c4a4410db887136efa0d3e..5aa9585af046d6cb6f208340c3debbaf959c9cc3 100644 (file)
@@ -134,12 +134,10 @@ ext2_open(        struct boot_file_t*     file,
      DEBUG_OPEN;
 
      if (opened) {
-         prom_printf("ext2_open() : fs busy\n");
          DEBUG_LEAVE(FILE_ERR_FSBUSY);
          return FILE_ERR_FSBUSY;
      }
      if (file->device_kind != FILE_DEVICE_BLOCK) {
-         prom_printf("Can't open ext2 filesystem on non-block device\n");
          DEBUG_LEAVE(FILE_ERR_BADDEV);
          return FILE_ERR_BADDEV;
      }
index 037c7380a3ecff5af548e55a21348fed7e3edf02..c89182ca83b5b98f31368d9bb750fb37089b9572 100644 (file)
@@ -414,7 +414,7 @@ prom_puts (prom_handle file, char *s)
 void
 prom_vfprintf (prom_handle file, char *fmt, va_list ap)
 {
-     static char printf_buf[1536];
+     static char printf_buf[2048];
      vsprintf (printf_buf, fmt, ap);
      prom_puts (file, printf_buf);
 }
@@ -422,7 +422,7 @@ prom_vfprintf (prom_handle file, char *fmt, va_list ap)
 void
 prom_vprintf (char *fmt, va_list ap)
 {
-     static char printf_buf[1536];
+     static char printf_buf[2048];
      vsprintf (printf_buf, fmt, ap);
      prom_puts (prom_stdout, printf_buf);
 }
index 68440aa1481294b92562b623c33e221df563a851..b52b927b262fc35900d63b490af6e431bfd16975 100644 (file)
@@ -255,6 +255,66 @@ check_color_text_ui(char *color)
 }      
 #endif /* CONFIG_COLOR_TEXT */
 
+
+void print_message_file(char *filename)
+{
+     char *msg = NULL; 
+     char *p, *endp;
+     char *defdev = boot.dev;
+     int defpart = boot.part;
+     char msgpath[1024];
+     int opened = 0;
+     int result = 0;
+     int n;
+     struct boot_file_t file;
+     struct boot_fspec_t msgfile;
+
+     defdev = cfg_get_strg(0, "device");
+     if (!defdev)
+         defdev = boot.dev;
+     p = cfg_get_strg(0, "partition");
+         if (p) {
+              n = simple_strtol(p, &endp, 10);
+              if (endp != p && *endp == 0)
+                   defpart = n;               
+         }
+
+     strncpy(msgpath, filename, sizeof(msgpath));
+     if (!parse_device_path(msgpath, defdev, defpart, "/etc/yaboot.msg", &msgfile)) {
+         prom_printf("%s: Unable to parse\n", msgpath);
+         goto done;
+     }
+
+     result = open_file(&msgfile, &file);
+     if (result != FILE_ERR_OK) {
+         prom_printf("%s:%d,", msgfile.dev, msgfile.part);
+         prom_perror(result, msgfile.file);
+         goto done;
+     } else
+         opened = 1;
+
+     msg = malloc(2001);
+     if (!msg)
+         goto done;
+     else
+         memset(msg, 0, sizeof(*msg));
+
+     if (file.fs->read(&file, 2000, msg) <= 0)
+         goto done;
+     else
+         prom_printf("%s", msg);
+
+done:
+     if (opened)
+         file.fs->close(&file);
+     if (msg)
+         free(msg);
+     if (p)
+         free(p);
+     if (endp)
+         free(endp);
+}
+
 /* Currently, the config file must be at the root of the filesystem.
  * todo: recognize the full path to myself and use it to load the
  * config file. Handle the "\\" (blessed system folder)
@@ -359,11 +419,10 @@ load_config_file(char *device, char* path, int partition)
      p = cfg_get_strg(0, "init-message");
      if (p)
          prom_printf("%s\n", p);
-#if 0
+
      p = cfg_get_strg(0, "message");
      if (p)
          print_message_file(p);
-#endif         
 
      result = 1;
     
@@ -653,7 +712,7 @@ int get_params(struct boot_param_t* params)
               "press <return> to boot it.\n\n"
               "To boot any other label simply type its name and press <return>.\n\n"
               "To boot a kernel image which is not defined in the yaboot configuration \n"
-              "file, enter the kernel image name as [device:][partno],/path, where \n"
+              "file, enter the kernel image name as [[device:][partno],]/path, where \n"
               "\"device:\" is the OpenFirmware device path to the disk the image \n"
               "resides on, and \"partno\" is the partition number the image resides on.\n"
               "Note that the comma (,) is only required if you specify an OpenFirmware\n"
index 0a018561508a266c7a398af1209a91d05a230345..7a0ea803ec3e73078c4b1977abbb2fc54ba52f6a 100755 (executable)
--- a/ybin/ybin
+++ b/ybin/ybin
@@ -28,7 +28,7 @@ if [ -n "$PATH_PREFIX" ] ; then
 fi
 PRG="${0##*/}"
 SIGINT="$PRG: Interrupt caught ... exiting"
-VERSION=1.3.5pre1
+VERSION=1.3.5pre2
 DEBUG=0
 VERBOSE=0
 TMP="${TMPDIR:-/tmp}"