memtest86 for FreeBSD boot?

'Romain Kang' romain at kzsu.stanford.edu
Sat Feb 21 14:37:36 PST 2004


My hardware didn't seem to like the simple .lds change -- the console
display filled with a fascinating array of characters and colors.
I wound up starting with ldscript.i386 as my template instead (see
below).  Seems to work...

Thanks,
Romain Kang                             Disclaimer: I speak for myself alone,
romain at kzsu.stanford.edu                except when indicated otherwise.

--- /usr/src/sys/conf/ldscript.i386	Thu Sep 20 02:29:23 2001
+++ ldscript.i386	Sat Feb 21 14:36:08 2004
@@ -1,12 +1,20 @@
 /* $FreeBSD: src/sys/conf/ldscript.i386,v 1.4.2.1 2001/09/20 09:29:23 peter Exp $ */
 OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
 OUTPUT_ARCH(i386)
-ENTRY(btext)
+ENTRY(_start)
 SEARCH_DIR(/usr/lib);
 SECTIONS
 {
   /* Read-only sections, merged into text segment: */
-  . = kernbase + 0x00100000 + SIZEOF_HEADERS;
+  . = 0xc0100000 + SIZEOF_HEADERS;
+        .bootsect : { *(.bootsect) }
+        .setup : { *(.setup) }
+        .memtest : { 
+                _start = . ;
+                *(.data) 
+                _end = . ;
+        }
+        _syssize = (_end - _start + 15) >> 4;
   .interp     : { *(.interp) 	}
   .hash          : { *(.hash)		}
   .dynsym        : { *(.dynsym)		}


More information about the freebsd-hackers mailing list