--- mkisofs/mkisofs.c.jj	Mon Jan 10 02:26:07 2000
+++ mkisofs/mkisofs.c	Fri Jan 28 10:34:38 2000
@@ -102,6 +102,7 @@ int boot_info_table = 0;
 int use_sparcboot = 0;
 int use_genboot = 0;
 int use_RockRidge = 0;
+int use_siloboot = 0;
 int use_Joliet = 0;
 int verbose = 1;
 int gui = 0;
@@ -123,6 +124,9 @@ char * system_id = SYSTEM_ID_DEFAULT;
 char * boot_catalog = BOOT_CATALOG_DEFAULT;
 char * boot_image = BOOT_IMAGE_DEFAULT;
 char * genboot_image = BOOT_IMAGE_DEFAULT;
+char * silo_boot_image = SILO_BOOT_IMAGE_DEFAULT;
+char * silo_bootblock = SILO_BOOTBLOCK_DEFAULT;
+char * silo_conf_file = SILO_CONF_FILE_DEFAULT;
 int volume_set_size = 1;
 int volume_sequence_number = 1;
 
@@ -228,6 +232,7 @@ struct ld_option
 #define OPTION_J_LIST			181
 #define OPTION_X_LIST			182
 #define OPTION_NO_RR			183
+#define OPTION_SILOBOOT			184
 
 static const struct ld_option ld_options[] =
 {
@@ -319,6 +324,12 @@ static const struct ld_option ld_options
       'r', NULL, "Generate rationalized Rock Ridge directory information", ONE_DASH },
   { {"rock", no_argument, NULL, 'R'},
       'R', NULL, "Generate Rock Ridge directory information", ONE_DASH },
+  { {"silo-conf-file", required_argument, NULL, 's'},
+      's', "FILE", "Set name of SILO configuration file on the CD", ONE_DASH },
+  { {"silo-bootblock", required_argument, NULL, 'S'},
+      'S', "FILE", "Set SILO first stage bootblock image name", ONE_DASH },
+  { {"silo-boot", required_argument, NULL, OPTION_SILOBOOT },
+      '\0', "FILE", "Set SILO second stage boot image name" , ONE_DASH },
   { {"split-output", no_argument, NULL, OPTION_SPLIT_OUTPUT},
       '\0', NULL, "Split output into files of approx. 1GB size", ONE_DASH },
   { {"sysid", required_argument, NULL, OPTION_SYSID},
@@ -890,6 +901,34 @@ int FDECL2(main, int, argc, char **, arg
 #endif
 	}
 	break;
+      case OPTION_SILOBOOT:
+	use_siloboot++;
+	silo_boot_image = optarg;  /* pathname of the boot image on cd */
+	if (silo_boot_image == NULL) {
+	        fprintf(stderr,"Required boot image pathname missing\n");
+		exit(1);
+	}
+	break;
+      case 'S':
+	use_siloboot++;
+	silo_bootblock = optarg;  /* pathname of the boot image on cd */
+	if (silo_bootblock == NULL) {
+	        fprintf(stderr,"Required bootblock pathname missing\n");
+		exit(1);
+	}
+	break;
+      case 's':
+	use_siloboot++;
+	silo_conf_file = optarg;  /* pathname of the boot image on cd */
+	if (silo_conf_file == NULL) {
+	        fprintf(stderr,"Required SILO config file pathname missing\n");
+		exit(1);
+	}
+	if (*silo_conf_file != '/') {
+	        fprintf(stderr,"SILO config file pathname must start with /\n");
+		exit(1);
+	}
+	break;
       case OPTION_ABSTRACT:
 	abstract = optarg;
 	if(strlen(abstract) > 37) {
@@ -1654,7 +1693,9 @@ parse_input_files:
    * Start to set up the linked list that we use to track the
    * contents of the disc.
    */
-  if (use_sparcboot)
+  if (use_siloboot)
+	outputlist_insert(&silo_desc);
+  else if (use_sparcboot)
 	outputlist_insert(&sunlabel_desc);
   if (use_genboot)
 	outputlist_insert(&genboot_desc);
--- mkisofs/README.eltorito.jj	Sun Feb 23 16:44:59 1997
+++ mkisofs/README.eltorito	Fri Jan 28 10:34:38 2000
@@ -60,7 +60,7 @@ We will have the boot catalog go in the 
 "boot.catalog". The command to create the iso9660 fs in the file
 bootcd.iso is then
 
-mkisofs -b boot/boot.imh -c boot/boot.catalog -o bootcd.iso .
+mkisofs -b boot/boot.img -c boot/boot.catalog -o bootcd.iso .
 
 The -b option specifies the boot image to be used (note the path is
 relative to the root of the iso9660 disc), and the -c option is
--- mkisofs/defaults.h.jj	Thu Nov 25 10:44:05 1999
+++ mkisofs/defaults.h	Fri Jan 28 10:34:38 2000
@@ -17,6 +17,9 @@
 #define  VOLUME_ID_DEFAULT 	"CDROM"
 #define  BOOT_CATALOG_DEFAULT   "boot.catalog"
 #define  BOOT_IMAGE_DEFAULT     NULL
+#define  SILO_BOOT_IMAGE_DEFAULT "boot/second.b"
+#define  SILO_BOOTBLOCK_DEFAULT	"boot/cd.b"
+#define  SILO_CONF_FILE_DEFAULT	"/etc/silo.conf"
 #ifdef __QNX__
 #define  SYSTEM_ID_DEFAULT 	"QNX"
 #endif
--- mkisofs/silo.c.jj	Fri Jan 28 10:34:38 2000
+++ mkisofs/silo.c	Fri Jan 28 10:34:38 2000
@@ -0,0 +1,255 @@
+/*
+ * Program silo.c - Handle SILO bootable iso9660 CD-ROMs.
+ * 
+
+   Copyright (C) 1999 Jakub Jelinek <jakub@redhat.com>.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.   */
+
+
+static char rcsid[] ="$Id: mkisofs-1.12b6-silo.patch,v 1.2 2001/06/16 03:48:06 bencollins Exp $";
+
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <stdlib.h>
+
+#include "config.h"
+#include "mkisofs.h"
+#include "iso9660.h"
+
+/* used by Win32 for opening binary file - not used by Unix */
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif /* O_BINARY */
+
+struct sun_disklabel {
+    char	info[128];	/* Informative text string */
+    char	spare0[14];
+    struct sun_info {
+	char	spare1;
+	char	id;
+	char	spare2;
+	char	flags;
+    } infos[8];
+    char	spare1[246];	/* Boot information etc. */
+    char	rspeed[2];      /* 722 - Disk rotational speed */
+    char	pcylcount[2];   /* 722 - Physical cylinder count */
+    char	sparecyl[2];    /* 722 - extra sects per cylinder */
+    char	spare2[4];	/* More magic... */
+    char	ilfact[2];      /* 722 - Interleave factor */
+    char	ncyl[2];        /* 722 - Data cylinder count */
+    char	nacyl[2];       /* 722 - Alt. cylinder count */
+    char	ntrks[2];       /* 722 - Tracks per cylinder */
+    char	nsect[2];       /* 722 - Sectors per track */
+    char	spare3[4];	/* Even more magic... */
+    struct sun_partition {
+        char start_cylinder[4];	/* 732 */
+	char num_sectors[4];	/* 732 */
+    } partitions[8];
+    char	magic[2];       /* 722 - Magic number */
+    char	csum[2];        /* 722 - Label xor'd checksum */
+    struct bootblock_header {
+	char	magic[4];	/* 732 */
+	char	aout[20];
+	char	siloid[8];
+	char	insn[16];
+	char	extent[4];	/* 732 */
+	char	size[4];	/* 732 */
+	char	text[2048-512-56];
+    } bootblock;
+};
+
+static struct {
+    char id;
+    char conf_part;
+    char part;
+    char pad;
+    char conf_file[256];
+} silo_info;
+
+static int FDECL1(silo_size, int, starting_extent)
+{
+    last_extent += 16;
+    return 0;
+}
+
+static int FDECL3(silo_filter, char *, buffer, int, size, int, offset)
+{
+    if (offset < 0x808 + sizeof(silo_info)
+	&& offset + size > 0x808)
+    {
+	int i;
+	if (offset < 0x808)
+	{
+	    offset = 0x808 - offset;
+	    size -= offset;
+	    buffer += offset;
+	    offset = 0;
+	}
+	else
+	    offset -= 0x808;
+	i = sizeof(silo_info) - offset;
+	if (i > size) i = size;
+	memcpy (buffer, ((char *)&silo_info) + offset, i);
+    }
+    return 0;
+}
+
+static int FDECL1(silo_write, FILE *, outfile)
+{
+    struct directory_entry      * de;
+    struct directory_entry      * de2;
+    struct deferred_write	* dwpnt;
+    int bootblock, i, should_write;
+    struct sun_disklabel	silo_bb;
+    
+    memset (&silo_bb, 0, sizeof (silo_bb));
+    
+    if (*silo_bootblock == '/') silo_bootblock++;
+    if (*silo_boot_image == '/') silo_boot_image++;
+
+    /*
+     * search from root of iso fs to find boot catalog 
+     */
+    de2 = search_tree_file(root, silo_bootblock);
+    if (!de2) 
+    {
+	fprintf(stderr,"Uh oh, I cant find the SILO bootblock!\n");
+	exit(1);
+    }
+
+    /*
+     * now read it from disk
+     */
+    bootblock = open(de2->whole_name, O_RDWR | O_BINARY);
+    if (bootblock == -1) 
+    {
+	fprintf(stderr,"Error opening SILO bootblock for reading.\n");
+	perror("");
+	exit(1);
+    }
+    
+    if (read (bootblock, (char *)&silo_bb.bootblock, 1024) != 1024)
+    {
+	fprintf(stderr,"Error reading SILO bootblock.\n");
+	perror("");
+	exit(1);
+    }
+
+    close (bootblock);
+
+    if (get_732 (silo_bb.bootblock.magic) != 0x01030107
+	|| strncmp (silo_bb.bootblock.siloid, "SILO", 4)
+	|| silo_bb.bootblock.siloid[5] != '.'
+	|| silo_bb.bootblock.siloid[4] < '0'
+	|| silo_bb.bootblock.siloid[4] > '9'
+	|| silo_bb.bootblock.siloid[6] < '0'
+	|| silo_bb.bootblock.siloid[6] > '9'
+	|| silo_bb.bootblock.siloid[7] < '0'
+	|| silo_bb.bootblock.siloid[7] > '9')
+    {
+	fprintf(stderr,"Error: the file %s is not a valid SILO bootblock.\n", silo_bootblock);
+	perror("");
+	exit(1);
+    }
+    
+    /* Check version number. Only SILO 0.87 and up is valid. */
+    if (silo_bb.bootblock.siloid[4] == '0'
+	&& (silo_bb.bootblock.siloid[6] < '8'
+	    || (silo_bb.bootblock.siloid[6] == '8'
+		&& silo_bb.bootblock.siloid[7] <= '6')))
+    {
+	fprintf(stderr,"Error: SILO bootblock is too old. Must be at least 0.8.7.\n");
+	perror("");
+	exit(1);
+    }
+
+    /*
+     * search from root of iso fs to find boot catalog 
+     */
+    de = search_tree_file(root, silo_boot_image);
+    if (!de) 
+    {
+	fprintf(stderr,"Uh oh, I cant find the SILO boot image!\n");
+	exit(1);
+    }
+
+    /*
+     * need to filter second.b, so that we can seed
+     * silo.conf location and other stuff.
+     * We could write it into the de->whole_name file,
+     * but I prefer filtering it like this because
+     * then the tree can be e.g. read only NFS mounted.
+     */
+    for (dwpnt = dw_head; dwpnt; dwpnt = dwpnt->next)
+    {
+	if (!dwpnt->name) continue;
+	if (!strcmp (dwpnt->name, de->whole_name))
+	    dwpnt->filter = silo_filter;
+    }
+
+    set_732 (silo_bb.bootblock.extent, de->starting_block);
+    set_732 (silo_bb.bootblock.size, de->size);
+
+    strcpy (silo_bb.info, "SPARC bootable CD-ROM: ");
+    strcat (silo_bb.info, volume_id);
+
+    should_write = (last_extent - session_start) << 2;
+
+    /* Now some magic */
+    silo_bb.spare0[3] = 1;
+    silo_bb.spare0[13] = 8;
+    for (i = 0; i < 8; i++) {
+	silo_bb.infos[i].id = 0x83;
+	silo_bb.infos[i].flags = 0x18;
+    }
+    set_732 (silo_bb.spare1 + 14, 0x600ddeee);
+    set_722 (silo_bb.rspeed, 0x15e);
+    set_722 (silo_bb.pcylcount, (should_write + 639) / 640);
+    set_722 (silo_bb.ilfact, 1);
+    set_722 (silo_bb.ncyl, (should_write + 639) / 640);
+    set_722 (silo_bb.ntrks, 1);
+    set_722 (silo_bb.nsect, 640);
+    set_732 (silo_bb.partitions[0].num_sectors, should_write);
+    set_722 (silo_bb.magic, 0xdabe);
+    for (i = 0; i < 510; i+=2) {
+	silo_bb.csum[0] ^= silo_bb.info[i];
+	silo_bb.csum[1] ^= silo_bb.info[i+1];
+    }
+
+    xfwrite(&silo_bb, 1, sizeof(silo_bb), outfile);
+    memset (&silo_bb, 0, sizeof(silo_bb));
+
+    for(i=1; i<16; i++)
+    {
+	xfwrite(&silo_bb, 1, sizeof(silo_bb), outfile);
+    }
+
+    memset (&silo_info, 0, sizeof(silo_info));
+    silo_info.id = 'L';
+    silo_info.conf_part = 1;
+    strncpy (silo_info.conf_file, silo_conf_file, 256);
+    silo_info.conf_file[259] = '\0';
+
+    last_extent_written += 16;
+    
+    return 0;
+}
+
+struct output_fragment silo_desc  = {NULL, silo_size, NULL,     silo_write};
--- mkisofs/write.c.jj	Fri Jan  7 18:58:12 2000
+++ mkisofs/write.c	Fri Jan 28 10:43:33 2000
@@ -194,16 +194,7 @@ void FDECL4(xfwrite, void *, buffer, int
      }
 }
 
-struct deferred_write
-{
-  struct deferred_write * next;
-  char			* table;
-  unsigned int		  extent;
-  unsigned int		  size;
-  char			* name;
-};
-
-static struct deferred_write * dw_head = NULL, * dw_tail = NULL;
+struct deferred_write * dw_head = NULL, * dw_tail = NULL;
 
 unsigned int last_extent_written  =0;
 static int path_table_index;
@@ -261,29 +252,31 @@ static int FDECL1(assign_directory_addre
      return 0;
 }
 
-static void FDECL3(write_one_file, char *, filename, 
-		   unsigned int, size, FILE *, outfile)
+static void FDECL2(write_one_file, struct deferred_write *, dwpnt,
+		   FILE *, outfile)
 {
      char		  buffer[SECTOR_SIZE * NSECT];
      FILE		* infile;
      int		  remain;
      int		  use;
+     int		  offset;
 
 
-     if ((infile = fopen(filename, "rb")) == NULL) 
+     if ((infile = fopen(dwpnt->name, "rb")) == NULL) 
      {
 #ifdef	USE_LIBSCHILY
-	  comerr("cannot open '%s'\n", filename);
+	  comerr("cannot open '%s'\n", dwpnt->name);
 #else
 #if defined(sun) || defined(_AUX_SOURCE)
-	  fprintf(stderr, "cannot open %s: (%d)\n", filename, errno);
+	  fprintf(stderr, "cannot open %s: (%d)\n", dwpnt->name, errno);
 #else
-	  fprintf(stderr, "cannot open %s: %s\n", filename, strerror(errno));
+	  fprintf(stderr, "cannot open %s: %s\n", dwpnt->name, strerror(errno));
 #endif
 	  exit(1);
 #endif
      }
-     remain = size;
+     remain = dwpnt->size;
+     offset = 0;
 
      while(remain > 0)
      {
@@ -293,13 +286,16 @@ static void FDECL3(write_one_file, char 
 	  if (fread(buffer, 1, use, infile) == 0) 
 	  {
 #ifdef	USE_LIBSCHILY
-		comerr("cannot read from %s\n",filename); 
+		comerr("cannot read from %s\n",dwpnt->name); 
 #else
-		fprintf(stderr,"cannot read from %s\n",filename); 
+		fprintf(stderr,"cannot read from %s\n",dwpnt->name); 
 		exit(1);
 #endif
 	  }
+	  if (dwpnt->filter)
+		(* dwpnt->filter)(buffer, use, offset);
 	  xfwrite(buffer, 1, use, outfile);
+	  offset += use;
 	  last_extent_written += use/SECTOR_SIZE;
 #if 0
 	  if((last_extent_written % 1000) < use/SECTOR_SIZE) 
@@ -345,9 +341,9 @@ static void FDECL1(write_files, FILE *, 
 	  {
 
 #ifdef VMS
-	       vms_write_one_file(dwpnt->name, dwpnt->size, outfile);
+	       vms_write_one_file(dwpnt, outfile);
 #else
-	       write_one_file(dwpnt->name, dwpnt->size, outfile);
+	       write_one_file(dwpnt, outfile);
 #endif
 	       free(dwpnt->name);
 	       dwpnt->name = NULL;
@@ -745,6 +741,7 @@ static void FDECL1(assign_file_addresses
 		    dwpnt->next = NULL;
 		    dwpnt->size = s_entry->size;
 		    dwpnt->extent = last_extent;
+		    dwpnt->filter = NULL;
 		    set_733((char *) s_entry->isorec.extent, last_extent);
 		    s_entry->starting_block = last_extent;
 		    add_hash(s_entry);
--- mkisofs/mkisofs.h.jj	Mon Jan 10 00:25:44 2000
+++ mkisofs/mkisofs.h	Fri Jan 28 10:34:38 2000
@@ -156,7 +156,21 @@ struct file_hash{
   unsigned int starting_block;
   unsigned int size;
 };
-  
+
+struct deferred_write{
+  struct deferred_write * next;
+  char			* table;
+  unsigned int		  extent;
+  unsigned int		  size;
+  char			* name;
+#ifdef __STDC__
+  int			(*filter)(char *, int, int);
+#else
+  int			(*filter)();
+#endif
+};
+
+extern struct deferred_write * dw_head, * dw_tail;
 
 /*
  * This structure is used to control the output of fragments to the cdrom
@@ -197,6 +211,7 @@ extern struct output_fragment * out_list
 extern struct output_fragment * out_tail;
 
 extern struct output_fragment padblock_desc;
+extern struct output_fragment silo_desc;
 extern struct output_fragment voldesc_desc;
 extern struct output_fragment joliet_desc;
 extern struct output_fragment torito_desc;
@@ -441,6 +456,9 @@ extern char * volume_id;
 extern char * boot_catalog;
 extern char * boot_image;
 extern char * genboot_image;
+extern char * silo_boot_image;
+extern char * silo_bootblock;
+extern char * silo_conf_file;
 extern int volume_set_size;
 extern int volume_sequence_number;
 
--- mkisofs/Makefile.in.jj	Sat Dec 18 01:11:43 1999
+++ mkisofs/Makefile.in	Fri Jan 28 10:34:39 2000
@@ -32,7 +32,7 @@ CFLAGS=@CFLAGS@ -I. -Iinclude -DVANILLA_
 LDFLAGS=@LDFLAGS@
 OBJS=mkisofs.o tree.o write.o hash.o rock.o multi.o \
 		joliet.o match.o name.o fnmatch.o eltorito.o \
-		getopt.o getopt1.o
+		silo.o getopt.o getopt1.o
 
 World: mkisofs
 
@@ -86,6 +86,9 @@ mkisofs.o: mkisofs.c iso9660.h mkisofs.h
 
 eltorito.o: eltorito.c iso9660.h mkisofs.h config.h Makefile
 	$(CC) -c $(CFLAGS) $(srcdir)/eltorito.c
+
+silo.o: silo.c iso9660.h mkisofs.h config.h Makefile
+	$(CC) -c $(CFLAGS) $(srcdir)/silo.c
 
 getopt.o: getopt.c exclude.h config.h Makefile
 	$(CC) -c $(CFLAGS) $(srcdir)/getopt.c
--- mkisofs/mkisofs.8.jj	Fri Jan 14 02:26:40 2000
+++ mkisofs/mkisofs.8	Fri Jan 28 10:34:39 2000
@@ -72,6 +72,18 @@ mkisofs \- create a iso9660 filesystem w
 .I boot_catalog
 ]
 [
+.B \-silo-boot
+.I silo_boot_image
+]
+[
+.B \-s
+.I silo_conf_file
+]
+[
+.B \-S
+.I silo_bootblock
+]
+[
 .B \-copyright 
 .I FILE
 ]
@@ -167,7 +179,6 @@ mkisofs \- create a iso9660 filesystem w
 .B \-sysid
 .I ID
 ]
-[
 .B \-T
 ]
 [
@@ -722,6 +733,37 @@ This parameter can also be set in the fi
 .B \&.mkisofsrc
 with SYSI=system_id.
 If specified in both places, the command line version is used.
+.TP
+.BI \-silo-boot " silo_boot_image
+Specifies the path and filename of the SILO second stage boot image to be
+used when making a "SILO" bootable CD. The pathname must be relative to the
+source path specified to
+.B mkisofs.
+This option is required to make a SILO bootable CD.
+The boot image must come from SILO 0.8.7 and higher. The usual location for
+it is
+.I boot/second.b.
+Note that you can make a CD bootable by "El Torito" and "SILO" at the same
+time (El Torito will be used on ix86 and SILO on SPARC and UltraSPARC boxes).
+.TP
+.BI \-s " silo_conf_file
+Specifies the path and filename of the SILO configuration file to be
+used when making a "SILO" bootable CD. The pathname must be relative to the
+source path specified to
+.B mkisofs
+and start with a slash.
+The default is
+.I /etc/silo.conf
+See SILO documentation for the syntax of this file.
+.TP
+.BI \-S " silo_bootblock
+Specifies the path and filename of the SILO first stage boot image to be
+used when making a "SILO" bootable CD. The pathname must be relative to the
+source path specified to
+.B mkisofs.
+The default is
+.I boot/cd.b
+The boot image must come from SILO 0.8.7 and higher.
 .TP
 .B \-T
 Generate a file TRANS.TBL in each directory on the CDROM, which can be used
--- mkisofs/vms.c.jj	Sun Feb 23 17:06:20 1997
+++ mkisofs/vms.c	Fri Jan 28 10:34:39 2000
@@ -241,16 +241,17 @@ static close_file(struct RAB * prab){
 #define NSECT 16
 extern unsigned int last_extent_written;
 
-int vms_write_one_file(char * filename, int size, FILE * outfile){
+int vms_write_one_file(struct deferred_write * dwpnt, FILE * outfile){
 	int status, i;
 	char buffer[SECTOR_SIZE * NSECT];
 	int count;
 	int use;
 	int remain;
+	int offset = 0;
 
-	open_file(filename);
+	open_file(dwpnt->name);
 
-	remain = size;
+	remain = dwpnt->size;
 	
 	while(remain > 0){
 	  use =  (remain >  SECTOR_SIZE * NSECT - 1 ? NSECT*SECTOR_SIZE : remain);
@@ -259,10 +260,13 @@ int vms_write_one_file(char * filename, 
 	  rab->rab$l_ubf = buffer;
 	  rab->rab$w_usz = sizeof(buffer);
 	  status = sys$read(rab);
+	  if (dwpnt->filter)
+		(* dwpnt->filter)(buffer, use, offset);
 	  fwrite(buffer, 1, use, outfile);
 	  last_extent_written += use/SECTOR_SIZE;
 	  if((last_extent_written % 1000) < use/SECTOR_SIZE) fprintf(stderr,"%d..", last_extent_written);
 	  remain -= use;
+	  offset += use;
 	};
 	
 	close_file(rab);
--- mkisofs/README.silo.jj	Fri Jan 28 10:34:39 2000
+++ mkisofs/README.silo	Fri Jan 28 10:34:39 2000
@@ -0,0 +1,70 @@
+		HOW TO MAKE A SPARC LINUX BOOTABLE CDROM
+
+SILO may be used to create a bootable CDROM for sparc. At the moment it will
+support booting on sun4c, sun4m, sun4d and sun4u machines only, but sun4
+support may come soon.
+SILO is available from ftp://ultra.linux.cz/pub/silo/
+
+INTRO
+=====
+
+A CDROM is booted on SPARC by issuing following commands in the PROM
+(depending on PROM version - v0 is PROM with major versions 0, found
+on sun4c only, v2 is PROM with major versions 2 or 3, found on some newer
+sun4c and all sun4m and sun4d machines) and the same applies to P1275 PROMs
+found in the 64bit UltraSPARC machines:
+
+v0:
+
+b sd(0,6,0)
+
+v2:
+
+boot cdrom
+
+(cdrom is actually alias to /iommu/sbus/espdma/esp/sd@0,6:d or something
+similar)
+
+As Solaris has different kernels for each architecture, the PROM boots by
+default from different "partitions" on the CD depending on the architecture
+of the machine (that's e.g. the :d in the cdrom alias on v2 PROM). That
+partition table is stored in the first 512 bytes of the CD (with exactly the
+same format as partition tables on SPARC disks), so you can use SPARCLinux
+fdisk program to look into that partition table. SILO has other means of
+supporting multiple kernel images, SPARCLinux bootable CDROMs have a
+partition table with only one partition which covers the whole iso9660 image
+of the CD. Other partitions are set up, so that they start at offset 0 (like
+the first one) and have size of 0, ie. are disabled. The only value PROM
+looks at is starting offset, so that it will boot on all machines correctly.
+In the boot process PROM finds start of the boot partition (in SILO case it
+is always 0) and loads 7680 bytes from offset 512 in that partition.
+Fortunately iso9660 has first 32KB reserved for OS use, so that the
+partition table and bootblock can be safely stored there. As SILO is longer
+in size than those 32KB (eventhough it is compressed), it puts its first
+stage loader in there and puts its second stage loader somewhere in the
+iso9660 filesystem.
+
+SILO 0.8.7 and up will no longer create bootable CDs using /sbin/silo, you
+should mkisofs.
+
+You should first prepare the tree you'd like to have on the CD. The only
+requirement is that you put boot/* files from SILO distribution into /boot
+in the tree and edit appropriate /etc/silo.conf in the tree.
+As SILO 0.8.7 and up understands the ISO9660 filesystem and the RockRidge
+extensions, unlike with older SILOs you should type normal path in
+silo.conf. Once the image is prepared, just do
+
+mkisofs -----your-normal-mkisofs-options-here---- -s /etc/silo.conf DIRECTORY_TREE
+
+and you're done.
+If you put the first stage and second stage loaders and/or silo.conf file to
+nonstandard paths, you have to use other options.
+E.g. if first stage (boot/cd.b from the SILO package) will be
+/images/cdrom.boot on the CD, second stage (boot/second.b) /images/second.stage and
+if you put your config file into /config/conf.silo, then you will type
+
+-S images/cdrom.boot -silo-boot images/second.stage -s /config/conf.silo
+
+(note when you use starting slash and when you don't).
+
+If you have any problems with SILO bootable CD making, mail jakub@redhat.com.
--- mkisofs/Makefile.jj	Sun Dec 12 18:28:09 1999
+++ mkisofs/Makefile	Fri Jan 28 10:44:26 2000
@@ -15,7 +15,7 @@ CPPOPTS	+=	-DHAVE_CONFIG_H -DUSE_LIBSCHI
 		-I../cdrecord
 CFILES=		mkisofs.c tree.c write.c hash.c rock.c multi.c \
 		joliet.c match.c name.c fnmatch.c eltorito.c boot.c \
-		getopt.c getopt1.c \
+		silo.c getopt.c getopt1.c \
 		scsi.c \
 		scsi_cdr.c cd_misc.c \
 		modes.c

