Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


automatic setup of large floppy disk image
Jack Lange [Tue, 22 Jul 2008 05:31:11 +0000 (05:31 +0000)]
palacios/build/Makefile
palacios/scripts/numsecs_per_track [new file with mode: 0755]
palacios/src/geekos/defs.asm

index 79f3d7d..0512886 100644 (file)
@@ -1,6 +1,6 @@
 # Makefile for GeekOS kernel, userspace, and tools
 # Copyright (c) 2004,2005 David H. Hovemeyer <daveho@cs.umd.edu>
-# $Revision: 1.48 $
+# $Revision: 1.49 $
 
 # This is free software.  You are permitted to use,
 # redistribute, and modify it as specified in the file "COPYING".
@@ -82,7 +82,7 @@ endif
 #
 # and make world will build an empty boot package
 #
-XED=0
+XED=1
 
 ifeq ($(DEBUG),1)
   JRLDEBUG= -DSERIAL_PRINT_DEBUG=1 -DSERIAL_PRINT_DEBUG_LEVEL=10 -DSERIAL_PRINT=1 -DVMM_DEBUG=1 -DVMM_INFO=1 -DVMM_TRACE=1 $(DEBUG_SECTIONS)
@@ -265,8 +265,8 @@ ZEROFILE := $(PERL) $(PROJECT_ROOT)/scripts/zerofile
 NUMSECS := $(PERL) $(PROJECT_ROOT)/scripts/numsecs
 
 
-#Round a value up to a certain factor (hex values)
-ROUND_UP_HEX := $(PERL) $(PROJECT_ROOT)/scripts/round_up_hex.pl
+FD_SECTORS_PER_TRACK := $(PERL) $(PROJECT_ROOT)/scripts/numsecs_per_track
+
 
 # ----------------------------------------------------------------------
 # Definitions -
@@ -398,6 +398,7 @@ geekos/fd_boot.bin : geekos/setup.bin geekos/kernel.bin $(PROJECT_ROOT)/src/geek
                -I$(PROJECT_ROOT)/src/geekos/ \
                -DNUM_SETUP_SECTORS=`$(NUMSECS) geekos/setup.bin` \
                -DNUM_KERN_SECTORS=`$(NUMSECS) geekos/kernel.bin` \
+               -DSECTORS_PER_TRACK=`$(FD_SECTORS_PER_TRACK) geekos/kernel.bin geekos/setup.bin` \
                $(PROJECT_ROOT)/src/geekos/fd_boot.asm \
                -o $@
 
diff --git a/palacios/scripts/numsecs_per_track b/palacios/scripts/numsecs_per_track
new file mode 100755 (executable)
index 0000000..b875a89
--- /dev/null
@@ -0,0 +1,30 @@
+#! /usr/bin/perl
+
+# Find the number of 512-byte sectors needed to store
+# given file.
+
+# $Revision: 1.1 $
+
+use strict qw(refs vars);
+
+my $sectors = 0;
+my $filename = "";
+
+foreach $filename (@ARGV) {
+
+  my $size = (-s $filename );
+  die "Couldn't get size of $filename: $!" if ( !defined $size );
+
+  my $result = int($size / 512);
+  my $remainder = $size % 512;
+  $result++ if ( $remainder > 0 );
+
+  $sectors += $result;
+}
+
+if ($sectors <= 2879) {
+  print "18\n";
+} else {
+  print "36\n";
+}
+
index 25dc811..6c5ce15 100644 (file)
@@ -1,6 +1,6 @@
 ; Definitions for use in GeekOS boot code
 ; Copyright (c) 2001, David H. Hovemeyer <daveho@cs.umd.edu>
-; $Revision: 1.7 $
+; $Revision: 1.8 $
 
 ; This is free software.  You are permitted to use,
 ; redistribute, and modify it as specified in the file "COPYING".
@@ -54,7 +54,7 @@ VIDSEG equ 0xb800
 
 ; The following information is correct for a 1.44M floppy.
 ; Yes, I'm hard coding this.
-SECTORS_PER_TRACK equ 18
+;SECTORS_PER_TRACK equ 18      
 HEADS equ 2
 CYLINDERS equ 80