patch-1.3.73 linux/arch/i386/boot/tools/build.c
Next file: linux/arch/i386/kernel/entry.S
Previous file: linux/arch/i386/boot/setup.S
Back to the patch index
Back to the overall index
- Lines: 43
- Date:
Sat Mar 9 13:31:43 1996
- Orig file:
v1.3.72/linux/arch/i386/boot/tools/build.c
- Orig date:
Wed Aug 2 13:20:58 1995
diff -u --recursive --new-file v1.3.72/linux/arch/i386/boot/tools/build.c linux/arch/i386/boot/tools/build.c
@@ -18,6 +18,7 @@
/*
* Changes by tytso to allow root device specification
+ * High loaded stuff by Hans Lermen & Werner Almesberger, Feb. 1996
*/
#include <stdio.h> /* fprintf */
@@ -39,7 +40,11 @@
static int GCC_HEADER = sizeof(struct exec);
#endif
+#ifdef __BIG_KERNEL__
+#define SYS_SIZE 0xffff
+#else
#define SYS_SIZE DEF_SYSSIZE
+#endif
#define DEFAULT_MAJOR_ROOT 0
#define DEFAULT_MINOR_ROOT 0
@@ -172,8 +177,22 @@
if (((long *) buf)[7] != 0)
die("Illegal symbol table in 'setup'");
for (i=0 ; (c=read(id,buf,sizeof buf))>0 ; i+=c )
+#ifdef __BIG_KERNEL__
+ {
+ if (!i) {
+ if (*((long *)(&buf[2])) != 0x53726448 )
+ die("Wrong magic in loader header of 'setup'");
+ if (*((int *)(&buf[6])) < 0x200 )
+ die("Wrong version of loader header of 'setup'");
+ buf[0x11] = 1; /* LOADED_HIGH */
+ *((long *)(&buf[0x14])) = 0x100000; /* code32_start */
+ }
+#endif
if (write(1,buf,c)!=c)
die("Write call failed");
+#ifdef __BIG_KERNEL__
+ }
+#endif
if (c != 0)
die("read-error on 'setup'");
close (id);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this