Beginning outline of Linux installer
authorhpa <hpa>
Tue, 3 Feb 1998 15:26:55 +0000 (15:26 +0000)
committerhpa <hpa>
Tue, 3 Feb 1998 15:26:55 +0000 (15:26 +0000)
Makefile
ldlinux.asm
syslinux.pl.in [new file with mode: 0644]

index 7ed8f22..7dc8e0f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -17,7 +17,7 @@
 
 NASM   = nasm
 
-all:   bootsect.bin ldlinux.sys syslinux.com
+all:   bootsect.bin ldlinux.sys syslinux.com syslinux
 
 ldlinux.bin: ldlinux.asm
        $(NASM) -f bin -dHEX_TIME="`perl now.pl`" -l ldlinux.lst -o ldlinux.bin ldlinux.asm
@@ -34,6 +34,13 @@ syslinux.com: syslinux.asm bootsect.bin ldlinux.sys
        $(NASM) -f bin -l syslinux.lst -o syslinux.com syslinux.asm
        ls -l syslinux.com
 
+syslinux: syslinux.pl.in bootsect.bin ldlinux.sys
+       @if [ ! -x `which perl` ]; then \
+               echo 'ERROR: cannot find perl'; exit 1 ; fi
+       echo '#!' `which perl` > syslinux
+       cat syslinux.pl.in bootsect.bin ldlinux.sys >> syslinux
+       chmod a+x syslinux
+
 clean:
        rm -f *.bin *.lst *.sys
 
index c628056..87aab00 100644 (file)
@@ -129,7 +129,7 @@ vk_size:    equ $
 ;
 vk_seg          equ 8000h              ; This is where we stick'em
 xfer_buf_seg   equ 7000h               ; Bounce buffer for I/O to high mem
-
+fat_seg                equ 1000h               ; 128K area for FAT (2x64K)
 
 ;
 ; For our convenience: define macros for jump-over-unconditinal jumps
diff --git a/syslinux.pl.in b/syslinux.pl.in
new file mode 100644 (file)
index 0000000..2e11f21
--- /dev/null
@@ -0,0 +1,29 @@
+# Hey, Emacs, this is -*- perl -*-
+## -----------------------------------------------------------------------
+##   
+##   Copyright 1998 H. Peter Anvin - All Rights Reserved
+##
+##   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, Inc., 675 Mass Ave, Cambridge MA 02139,
+##   USA; either version 2 of the License, or (at your option) any later
+##   version; incorporated herein by reference.
+##
+## -----------------------------------------------------------------------
+#
+# SYSLINUX install script for use in a Linux environment
+#
+
+#
+# 1. Find out a location where we can mount the device
+#
+
+if ( getuid() == 0 ) {
+    $tmp = 0;
+    while ( -e "/tmp/mnt.$$.$tmp" ) { $tmp++; }
+    $mntdir = "/tmp/mnt.$$.$tmp";
+    mkdir($mntdir, 0700);
+} else {
+    # Search fstab for device
+}
+