summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert de Bath <rdebath@poboxes.com>2000-07-09 08:19:22 +0200
committerLubomir Rintel <lkundrak@v3.sk>2013-10-23 23:45:14 +0200
commit65da95772de1633acd1bfcc7f579067bac3249af (patch)
treec1d87c195186c7e4882c30a81d1b7512c6efb793
parent3401185106fb312c6a7bba3d9e90d44b6df0043b (diff)
downloaddev86-65da95772de1633acd1bfcc7f579067bac3249af.tar.gz
Import Dev86src-0.15.1.tar.gzv0.15.1
-rw-r--r--Contributors2
-rw-r--r--Libc_version2
-rw-r--r--Makefile5
-rw-r--r--as/genlist.c2
-rw-r--r--bootblocks/Makefile18
-rw-r--r--bootblocks/bzimage.c16
-rw-r--r--bootblocks/cprintf.c8
-rw-r--r--bootblocks/fs_dos.c40
-rw-r--r--bootblocks/min_buf.c2
-rw-r--r--libc/Makefile2
-rw-r--r--libc/bios/cprintf.c8
-rw-r--r--makefile.in6
-rw-r--r--man/index.btbin8192 -> 0 bytes
13 files changed, 87 insertions, 24 deletions
diff --git a/Contributors b/Contributors
index 6fd51bc..0a821aa 100644
--- a/Contributors
+++ b/Contributors
@@ -31,5 +31,5 @@ Dick Porter <dick@cymru.net>
Dale Schumacher <dal@syntel.UUCP>
Wietse Venema <wietse@wzv.win.tue.nl>
Joel Weber II <nemo@koa.iolani.honolulu.hi.us>
-Claudio Matsuoka <claudio@pos.inf.ufpr.br>
+Claudio Matsuoka <claudio@helllabs.org>
Andrew Chittenden <achitten@madge.com>
diff --git a/Libc_version b/Libc_version
index a551051..e815b86 100644
--- a/Libc_version
+++ b/Libc_version
@@ -1 +1 @@
-0.15.0
+0.15.1
diff --git a/Makefile b/Makefile
index f870366..2ca204d 100644
--- a/Makefile
+++ b/Makefile
@@ -23,8 +23,7 @@ all: make.fil
$(TARGETS): make.fil
PATH="`pwd`/bin:$$PATH" $(MAKE) -f make.fil TOPDIR=`pwd` $@
-$(TARGETS): phony
-phony:
+$(TARGETS):
ld: ld86
as: as86
@@ -54,7 +53,7 @@ ifdef: ifdef.o
ifdef.o: ifdef.c
$(CC) $(CFLAGS) $(IFDEFFLAGS) -c ifdef.c
-Uninstall: phony
+Uninstall:
@# CHECK FROM HERE
@make -n Uninstall
@echo 'Are you really sure... have you checked this... ^C to interrupt'
diff --git a/as/genlist.c b/as/genlist.c
index 399a71e..b0db41c 100644
--- a/as/genlist.c
+++ b/as/genlist.c
@@ -169,7 +169,7 @@ error_pt errnum;
PUBLIC void listline()
{
- if (!listpre)
+ if (!listpre && lineptr != 0)
{
if (errcount || (list.current && (!macflag || mcount != 0)) ||
(macflag && maclist.current) || list_force )
diff --git a/bootblocks/Makefile b/bootblocks/Makefile
index 96dfadf..068613c 100644
--- a/bootblocks/Makefile
+++ b/bootblocks/Makefile
@@ -4,7 +4,7 @@ HOSTCCFLAGS=-O
BCC=bcc
CC=$(BCC)
-CFLAGS=-ansi -Ms -Oi -O -s $(MONDEFS)
+CFLAGS=-ansi -Ms -Oi -O -s
# CFLAGS=-ansi -Ms
ASFLAGS=-0 -w
MINIXDEFS=-DDOTS
@@ -37,14 +37,26 @@ EXTRAS=minix.h elf_info.c elf_info.h standalone.c li86.s \
install:
monitor.out: $(MOBJ)
- $(CC) $(CFLAGS) -H0x10000 $(MOBJ) -o monitor.out -M > monitor.sym
+ $(CC) $(CFLAGS) $(MONDEFS) -H0x10000 $(MOBJ) -o monitor.out -M > monitor.sym
$(MOBJ): $(MINC) version.h
fs_min.o: minix.h
+bootfile.sys: $(MSRC) $(MINC)
+ @rm -f $(MOBJ)
+ make 'CFLAGS=$(CFLAGS) -DDOSFLOPPY -i-' 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
+ mv monitor.out boottar.sys
+ @rm -f $(MOBJ)
+
monitor: $(MSRC) $(MINC)
@rm -f $(MOBJ)
- make 'CFLAGS=-ansi -H0x8000 $(MONDEFS)' monitor.out
+ make 'CFLAGS=-ansi -H0x8000' monitor.out
mv monitor.out monitor
@rm -f $(MOBJ)
diff --git a/bootblocks/bzimage.c b/bootblocks/bzimage.c
index 7711f41..fac9017 100644
--- a/bootblocks/bzimage.c
+++ b/bootblocks/bzimage.c
@@ -3,6 +3,7 @@
* friends use.
*/
+#define __MINI_MALLOC__
#include "monitor.h"
int auto_flag = 1;
@@ -105,6 +106,10 @@ char * command_line;
}
if( main_mem_top < 3072 )
printf("RTFM warning: Linux needs at least 4MB of memory.\n");
+
+ len = (len+1023)/1024+1; /* Where to load the RD image (Mb) */
+ if (len<6) len=6; /* Default to 6Mb mark */
+ initrd_start = len * 4096; /* 256 bytes pages. */
#endif
low_sects = buffer[497] + 1; /* setup sects + boot sector */
@@ -551,6 +556,15 @@ static char * image_str = "BOOT_IMAGE=";
if( strncasecmp(s+4, "ask", 3) == 0 )
vga_mode = -3;
else
+ if( strncasecmp(s+4, "ext", 3) == 0 )
+ vga_mode = -2;
+ else
+ if( strncasecmp(s+4, "nor", 3) == 0 )
+ vga_mode = -1;
+ else
+ if( strncasecmp(s+4, "cur", 3) == 0 )
+ vga_mode = 0x0f04;
+ else
{
s+=4; getnum(&s, &vga_mode);
}
@@ -662,6 +676,8 @@ unsigned int k_top;
rd_start = address - rd_len*4;
rd_start &= -16; /* Page boundry */
+ if (initrd_start && initrd_start<rd_start)
+ rd_start = initrd_start;
address = rd_start;
printf("Loading %s at 0x%x00\n", fname, rd_start);
diff --git a/bootblocks/cprintf.c b/bootblocks/cprintf.c
index de622fc..e6c0ea7 100644
--- a/bootblocks/cprintf.c
+++ b/bootblocks/cprintf.c
@@ -68,14 +68,18 @@ cprintf(char * fmt, ...)
switch(c)
{
- case 'x': base=16; if(0) {
- case 'o': base= 8; } if(0) {
+ case 'x': base=16; type |= 4; if(0) {
+ case 'o': base= 8; type |= 4; } if(0) {
+ case 'u': base=10; type |= 4; } if(0) {
case 'd': base=10; }
switch(type)
{
case 0: val=va_arg(ap, short); break;
case 1: val=va_arg(ap, int); break;
case 2: val=va_arg(ap, long); break;
+ case 4: val=va_arg(ap, unsigned short); break;
+ case 5: val=va_arg(ap, unsigned int); break;
+ case 6: val=va_arg(ap, unsigned long); break;
default:val=0; break;
}
cp = __numout(val,base);
diff --git a/bootblocks/fs_dos.c b/bootblocks/fs_dos.c
index 0ad6af6..b99fb4c 100644
--- a/bootblocks/fs_dos.c
+++ b/bootblocks/fs_dos.c
@@ -1,8 +1,8 @@
#include "monitor.h"
-#ifdef MINI_BUF
-#define BUFFER_FAT
+#ifdef BUFFER_FAT
+#define read_fat_sector read_sector
#endif
#define DOS_SECT(P) get_uint(P,0x0B)
@@ -34,6 +34,12 @@ static Tsect dos_clust0, dos_spc;
static int dos_fatpos, dos_fatlen, dos_fattype;
static int last_serial = 0;
+#ifndef BUFFER_FAT
+static char * read_fat_sector();
+static int sector_no = 0;
+static char sector_buf[512];
+#endif
+
#ifdef BUFFER_FAT
static char * fat_buf = 0;
int use_fatbuf = 0;
@@ -281,12 +287,12 @@ char * buffer;
else
#endif
{
- ptr = read_sector(dos_fatpos+(val/512));
+ ptr = read_fat_sector(dos_fatpos+(val/512));
if( ptr == 0 ) return -1;
if( val%512 == 511 )
{
val2 = (ptr[511]&0xFF);
- ptr = read_sector(dos_fatpos+(val/512)+1);
+ ptr = read_fat_sector(dos_fatpos+(val/512)+1);
if( ptr == 0 ) return -1;
val2 |= (ptr[0]<<8);
}
@@ -302,7 +308,7 @@ char * buffer;
}
else
{
- ptr = read_sector(dos_fatpos+(cur_file.cur_cluster/256));
+ ptr = read_fat_sector(dos_fatpos+(cur_file.cur_cluster/256));
if( ptr == 0 ) return -1;
cur_file.cur_cluster = get_uint(ptr, (cur_file.cur_cluster%256*2));
}
@@ -319,6 +325,10 @@ static int read_bootblock()
char * sptr;
int rv, media_byte = 0;
+#ifndef BUFFER_FAT
+ sector_no = 0;
+#endif
+
sptr = read_sector(1);
if( sptr == 0 ) return -1;
media_byte = *(unsigned char*)sptr;
@@ -360,3 +370,23 @@ static int read_bootblock()
return 0;
}
+
+#ifndef BUFFER_FAT
+static char *
+read_fat_sector(sector)
+int sector;
+{
+ char * p;
+ if( sector == sector_no ) return sector_buf;
+ p = read_sector(sector);
+ if(p)
+ {
+ memcpy(sector_buf, p, 512);
+ sector_no = sector;
+ return sector_buf;
+ }
+ else
+ return 0;
+}
+#endif
+
diff --git a/bootblocks/min_buf.c b/bootblocks/min_buf.c
index ff58d55..75d2043 100644
--- a/bootblocks/min_buf.c
+++ b/bootblocks/min_buf.c
@@ -14,7 +14,7 @@ int bad_track = -1;
static int track_no = -1;
static int buf_len = 0;
-static char buffer[MAXTRK*512];
+static char buffer[MAXTRK*512]; /* WARNING: This must be DMAable */
void reset_disk()
{
diff --git a/libc/Makefile b/libc/Makefile
index da891d3..d7a451c 100644
--- a/libc/Makefile
+++ b/libc/Makefile
@@ -11,7 +11,7 @@ endif
VERMAJOR=0
VERMINOR=15
-VERPATCH=0
+VERPATCH=1
VER=$(VERMAJOR).$(VERMINOR).$(VERPATCH)
CC=bcc
diff --git a/libc/bios/cprintf.c b/libc/bios/cprintf.c
index 5f8beaa..cd5f62b 100644
--- a/libc/bios/cprintf.c
+++ b/libc/bios/cprintf.c
@@ -55,8 +55,9 @@ cprintf(char * fmt, va_list ap)
switch(c)
{
- case 'x': base=16; if(0) {
- case 'o': base= 8; } if(0) {
+ case 'x': base=16; type|=4; if(0) {
+ case 'o': base= 8; type|=4; } if(0) {
+ case 'u': base=10; type|=4; } if(0) {
case 'd': base=10; }
val=0;
switch(type)
@@ -64,6 +65,9 @@ cprintf(char * fmt, va_list ap)
case 0: val=va_arg(ap, short); break;
case 1: val=va_arg(ap, int); break;
case 2: val=va_arg(ap, long); break;
+ case 4: val=va_arg(ap, unsigned short); break;
+ case 5: val=va_arg(ap, unsigned int); break;
+ case 6: val=va_arg(ap, unsigned long); break;
}
cp = __numout(val,base);
if(0) {
diff --git a/makefile.in b/makefile.in
index d7440b1..f53e6ef 100644
--- a/makefile.in
+++ b/makefile.in
@@ -126,8 +126,6 @@ bindir: $(MAKEX)
@ln -s ../kinclude/arch include/arch 2>/dev/null || true
#endif
-phony:
-
bcc: bindir
$(MAKEC) bcc $(MAKEARG) BCCARCH='$(BCCARCH)' bcc ncc bcc-cc1
cp -p bcc/bcc bin/Bcc
@@ -319,14 +317,14 @@ makec:
##############################################################################
-install-other: phony
+install-other:
@for i in $(OTHERS) ; do \
$(MAKEC) $$i BCC=ncc DIST=$(DIST) PREFIX=$(PREFIX) install || exit 1 ; \
done
other: $(OTHERS)
-$(OTHERS): phony
+$(OTHERS):
$(MAKEC) $@ BCC=ncc
clean:
diff --git a/man/index.bt b/man/index.bt
deleted file mode 100644
index e295941..0000000
--- a/man/index.bt
+++ /dev/null
Binary files differ