summaryrefslogtreecommitdiff
path: root/bootblocks
diff options
context:
space:
mode:
authorRobert de Bath <rdebath@poboxes.com>2003-01-29 21:07:56 +0100
committerLubomir Rintel <lkundrak@v3.sk>2013-10-23 23:48:48 +0200
commitded00c0d1c0dc38e63b2c48ff8cbb12c1b60c70f (patch)
treed453e3353975e51525ef0a9b08e751ebc5ff9c29 /bootblocks
parentb5790e52270b149e92531a8eb0cd521ff2854dff (diff)
downloaddev86-ded00c0d1c0dc38e63b2c48ff8cbb12c1b60c70f.tar.gz
Import Dev86src-0.16.11.tar.gzv0.16.11
Diffstat (limited to 'bootblocks')
-rw-r--r--bootblocks/Makefile10
-rw-r--r--bootblocks/bzimage.c16
-rw-r--r--bootblocks/monitor.c2
-rw-r--r--bootblocks/monitor.h2
-rw-r--r--bootblocks/relocate.c6
5 files changed, 16 insertions, 20 deletions
diff --git a/bootblocks/Makefile b/bootblocks/Makefile
index d7ec4fa..9a97468 100644
--- a/bootblocks/Makefile
+++ b/bootblocks/Makefile
@@ -7,7 +7,7 @@ AS86=as86
DEFS=
CC=$(BCC)
CFLAGS=-ansi -Ms -Oi -O -s $(DEFS)
-# CFLAGS=-ansi -Ms
+# CFLAGS=-ansi -Ms -s $(DEFS)
ASFLAGS=-0 -w
MINIXDEFS=-DDOTS
# LST=-l $*.lst
@@ -49,25 +49,25 @@ fs_min.o: minix.h
bootfile.sys: $(MSRC) $(MINC)
@rm -f $(MOBJ)
- make 'CFLAGS=$(CFLAGS) -DDOSFLOPPY -i -d' monitor.out
+ make 'CFLAGS=$(CFLAGS) -i -DDOSFLOPPY -d' monitor.out
mv monitor.out bootfile.sys
@rm -f $(MOBJ)
boottar.sys: $(MSRC) $(MINC) tarboot.bin
@rm -f $(MOBJ)
- make 'CFLAGS=$(CFLAGS) -DTARFLOPPY -i' monitor.out
+ make 'CFLAGS=$(CFLAGS) -i -DTARFLOPPY' monitor.out
mv monitor.out boottar.sys
@rm -f $(MOBJ)
bootminix.sys: $(MSRC) $(MINC) minix.bin
@rm -f $(MOBJ)
- make 'CFLAGS=$(CFLAGS) -DMINFLOPPY -i' monitor.out
+ make 'CFLAGS=$(CFLAGS) -i -DMINFLOPPY' monitor.out
mv monitor.out bootminix.sys
@rm -f $(MOBJ)
monitor.sys: $(MSRC) $(MINC)
@rm -f $(MOBJ)
- make 'CFLAGS=$(CFLAGS) -DNOMONITOR -i' monitor.out
+ make 'CFLAGS=$(CFLAGS) -DNOMONITOR' monitor.out
mv monitor.out monitor.sys
@rm -f $(MOBJ)
diff --git a/bootblocks/bzimage.c b/bootblocks/bzimage.c
index d9d92bc..9221bb4 100644
--- a/bootblocks/bzimage.c
+++ b/bootblocks/bzimage.c
@@ -487,8 +487,6 @@ static char * image_str = "BOOT_IMAGE=";
char * free_cmd = 0, * cmd = 0;
char * free_inp = 0;
- image_name = strdup(image);
-
if( linux_command_line ) free(linux_command_line);
linux_command_line = 0;
@@ -650,20 +648,16 @@ unsigned int k_top;
if( main_mem_top >= 15360 ) address = 0xFFFF;
else address = 0x1000 + main_mem_top*4;
- if( *initrd_name == '+' )
+ if( *fname == '+' ) fname++;
+
+ while( open_file(fname) < 0 )
{
char buf[2];
- fname++;
close_file();
- printf("Insert root disk and press return:"); fflush(stdout);
+ printf("Cannot open %s, insert next disk and press return:", fname);
+ fflush(stdout);
if( read(0, buf, 2) <=0 ) return -1;
}
-
- if( open_file(fname) < 0 )
- {
- printf("Cannot open %s\n", fname);
- return -1;
- }
file_len = file_length();
rd_len = (file_len+1023)/1024;
diff --git a/bootblocks/monitor.c b/bootblocks/monitor.c
index acdd168..8c79c1c 100644
--- a/bootblocks/monitor.c
+++ b/bootblocks/monitor.c
@@ -158,7 +158,7 @@ void init_prog()
printf("\n");
#endif
- printf("There is %u bytes available", offt-sbrk(0));
+ printf("There is %u bytes available", &offt-sbrk(0));
printf(", %dk of boot memory", boot_mem_top/64);
if( main_mem_top )
{
diff --git a/bootblocks/monitor.h b/bootblocks/monitor.h
index 4e499f0..e229d48 100644
--- a/bootblocks/monitor.h
+++ b/bootblocks/monitor.h
@@ -48,7 +48,7 @@ extern union REGS __argr;
#endif
#ifdef SINGLEFS
-/* #define NOCOMMAND */
+#define NOCOMMAND
#define NOMONITOR
#endif
diff --git a/bootblocks/relocate.c b/bootblocks/relocate.c
index 2e31ea8..f409a4e 100644
--- a/bootblocks/relocate.c
+++ b/bootblocks/relocate.c
@@ -32,8 +32,10 @@ unsigned newseg;
memseg = __get_cs();
codelen = __get_ds()-memseg;
__set_es(memseg-2);
- memlen = __deek_es( 24 );
- memlen >>=4;
+ if (__deek_es(0) == 0x0301 ) {
+ memlen = __deek_es( 24 );
+ memlen >>=4;
+ }
if( memlen == 0 ) memlen = 0x1000;
memlen += codelen;
__set_es(es);