many patches have been applied

2000-04-03 Thread OKUJI Yoshinori

  I have received many patches for the previous week and applied most
of them. I didn't necessarily apply them as they were and haven't
tested it very well, so be careful if you test the current.

  I think I applied all the trivial patches, but I might forget some
patches. Let me know, if any. Next, I'll apply the ReiserFS patch by
Jochen and update the network drivers to Etherboot 4.4.5.

Okuji




OpenBSD loader

2000-04-03 Thread Ian Cass

Grub will load release version 2.6, which was the latest release, but it
will not boot latest current version of the kernel. BSD complains that the
boot loader is too old.

--
Ian Cass
Knowledge Matters Ltd
www.knowledge.com




Re: OpenBSD loader

2000-04-03 Thread Pavel Roskin

Hello, Ian!

 Grub will load release version 2.6, which was the latest release, but it
 will not boot latest current version of the kernel. BSD complains that the
 boot loader is too old.

I remember me fixing OpenBSD support in GRUB. It required a lot of time. I
had to install OpenBSD, learn its basics, download and compile the code. I
spent much time debugging the code. And now I'm told that the latest and
greatest version of OpenBSD doesn't work with GRUB. Now I see how
uneffective my efforts have been.

The same applies to FreeBSD. I almost expect similar problems with NetBSD
some day.

One of NetBSD guys told me that it's in his opinion not a good idea to
combine the bootloader and boot selector. I tend to agree provided that
the bootloaders _have_ to be OS-specific. But I don't think so.

The Multiboot protocol gives us the chance to avoid the nightmare of
having different bootloaders. Besides, every bootloader tends to be a poor
CLI boot selector in the same time.

In short you have 3 options:
1) Adopt the Multiboot protocol
2) Elaborate a patch for OpenBSD. It should be cleanly designed and should
maintain compatability with older version and other OS'es (notably
NetBSD) even if they refuse to put identifiers into their kernels.
3) Live in the world of separated bootloaders and bootselectors, where you
cannot choose between two kernels in a menu.

Regards,
Pavel Roskin




Caldera patches

2000-04-03 Thread Tim Riker

I'm not the one that did these, but since you asked... ;-)

The source RPM is available on:

ftp://ftp.caldera.com/pub/eDesktop/Packages/SRPMS/grub-0.5.94-5.src.rpm

and the relevant patches from that are attached.

initrd1G - places the initrd below 1G so large mem machines will boot.
nomeminfo - tries to help some broken BIOSes with mem detection
splash - graphical menu (splash) screen, CD ioctl, etc.

--
Tim Riker - http://rikers.org/ - short SIGs! g
All I need to know I could have learned in Kindergarten
... if I'd just been paying attention.

--- grub-0.5.94/stage2/boot.c.orig	Thu Feb 10 10:25:16 2000
+++ grub-0.5.94/stage2/boot.c	Thu Feb 10 14:49:49 2000
@@ -544,7 +544,7 @@
   return 0;
 }
 
-  moveto = ((mbi.mem_upper + 0x400) * 0x400 - len)  0xf000;
+  moveto = ((mbi.mem_upper + 0x400) * 0x400 - len)  0x3000;
   memmove ((void *) RAW_ADDR (moveto), (void *) cur_addr, len);
 
   if (cls_hook_seg)


--- grub-0.5.94/stage2/boot.c	Thu Feb 10 18:12:26 2000
+++ grub-0.5.94.new/stage2/boot.c	Thu Feb 10 16:05:52 2000
@@ -261,17 +261,26 @@
 	  /* copy command-line plus memory hack to staging area */
 	  {
 	char *src = arg;
-	char *dest = (char *) (CL_MY_LOCATION + 4);
-
-	memmove ((char *) CL_MY_LOCATION, "mem=", 4);
-
-	*((unsigned short *) CL_OFFSET) = CL_MY_LOCATION - CL_BASE_ADDR;
-	*((unsigned short *) CL_MAGIC_ADDR) = CL_MAGIC;
-
-	dest = convert_to_ascii (dest, 'u', (mbi.mem_upper + 0x400));
-	*(dest++) = 'K';
-	*(dest++) = ' ';
+	char *dest = (char *) (CL_MY_LOCATION);
 
+	*((unsigned short *) CL_OFFSET) = CL_MY_LOCATION - CL_BASE_ADDR;
+	*((unsigned short *) CL_MAGIC_ADDR) = CL_MAGIC;
+
+	/* Help Linux to find memory only if more than 64MB are present.
+	 * Up to that amount it is fairly capable to find by itself, 
+	 * and at least newer Phoenix BIOSes are known to put a
+	 * 10k hole just before 64MB, but report a proper total.
+	 */
+	if (mbi.mem_upper  65535) /* might subtract 1MB lower mem here */
+	  {
+		memmove ((char *) CL_MY_LOCATION, "mem=", 4);
+		dest = (char *) (CL_MY_LOCATION + 4);
+
+		dest = convert_to_ascii (dest, 'u', (mbi.mem_upper + 0x400));
+		*(dest++) = 'K';
+		*(dest++) = ' ';
+	  }
+	
 	while (*src  *src != ' ')
 	  src++;
 


diff -ur grub-0.5.94.orig/grub/asmstub.c grub-0.5.94/grub/asmstub.c
--- grub-0.5.94.orig/grub/asmstub.c	Wed Jan 19 12:58:36 2000
+++ grub-0.5.94/grub/asmstub.c	Wed Jan 19 15:38:06 2000
@@ -43,6 +43,8 @@
 #ifdef __linux__
 # include sys/ioctl.h		/* ioctl */
 # include linux/hdreg.h	/* HDIO_GETGEO */
+# include linux/cdrom.h	/* CDROM_GET_CAPABILITY to identify CDs */
+# define SOME_CDROM_IOCTL	CDROM_GET_CAPABILITY
 # if __GLIBC__  2
 /* Maybe libc doesn't have large file support.  */
 #  include linux/unistd.h	/* _llseek */
@@ -56,6 +58,8 @@
 #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
 # include sys/ioctl.h		/* ioctl */
 # include sys/disklabel.h
+# include sys/cdio.h		/* CDIOCCLRDEBUG to identify CDs */
+# define SOME_CDROM_IOCTL	CDIOCCLRDEBUG
 #endif /* __FreeBSD__ || __NetBSD__ || __OpenBSD__ */
 
 #ifdef HAVE_OPENDISK
@@ -83,6 +87,9 @@
 unsigned long boot_drive = 0;
 char version_string[] = VERSION;
 char config_file[128] = "/boot/grub/menu.lst"; /* FIXME: arbitrary */
+char splashscreen_file[128];
+
+unsigned short cls_hook_seg;
 
 /* Emulation requirements. */
 char *grub_scratch_mem = 0;
@@ -538,6 +545,11 @@
   fclose (fp);
   return 0;
 }
+
+  /* Make sure CD-ROMs don't get assigned a BIOS disk number 
+ before SCSI disks ! */
+  if (ioctl(fileno(fp), SOME_CDROM_IOCTL, 0) = 0)
+return 0;
 
   fclose (fp);
   return 1;
diff -ur grub-0.5.94.orig/stage2/asm.S grub-0.5.94/stage2/asm.S
--- grub-0.5.94.orig/stage2/asm.S	Wed Jan 19 12:58:36 2000
+++ grub-0.5.94/stage2/asm.S	Wed Jan 19 15:38:06 2000
@@ -1345,7 +1345,7 @@
 
 	movb	%bl, %al
 	movb	$0xe, %ah
-	movw	$1, %bx
+	movw	$0x8f, %bx	/* invert all planes */
 	int	$0x10
 
 	DATA32	call	EXT_C(real_to_prot)
@@ -1688,24 +1688,45 @@
 
 
 ENTRY(cls)
-	push	%ebp
-	push	%eax
-	push	%ebx/* save EBX */
+	pusha
 
 	call	EXT_C(prot_to_real)
 	.code16
 
+	movw	EXT_C(cls_hook_seg), %ax
+	cmpw	$0, %ax
+	je	cls_self
+
+	
+	mov	%ds,%ax
+	push	%ax
+	
+	mov	%es,%ax
+	push	%ax
+
+	lcall	(cls_hook)
+	
+	pop	%ax
+	mov	%ax,%es
+	
+	pop	%ax
+	mov	%ax,%ds
+
+	jmp	cls_ret
+
+cls_self:
+
 	movb	$0xf, %ah
 	int	$0x10			/* Get Current Video mode */
 xorb	%ah, %ah
+	movw	$0x0003, %ax		/* hardcode 80x25 color XXX */
 int	$0x10   /* Set Video mode (clears screen) */
 
+cls_ret:
 	DATA32	call	EXT_C(real_to_prot)
 	.code32
 
-	pop	%ebx
-	pop	%eax
-	pop	%ebp
+	popa
 	ret
 
 	
@@ -1861,10 +1882,19 @@
 	call	EXT_C(prot_to_real)
 	.code16
 
+	movw	EXT_C(cls_hook_seg),%ax
+	cmpw	$0, %ax
+	je	sa_text
+
+	movb	$0xDB, %al
+	movw	$0x8f, %bx	/* invert all planes */
+	jmp	sa_common
+sa_text:
 	movb	$0x8, %ah
 	int	$0x10
-	movb	$0x9, %ah
 	

Grub Booter

2000-04-03 Thread Tommy Scheunemann

Hi !
Is it possible to hide/unhide Dos-Partitions with GNU-Grub ?

May the Source be with you.