Beng's boot fix

This commit is contained in:
Erik van der Kouwe 2010-06-24 12:20:01 +00:00
parent 33c9d427fd
commit e8d30bba65
3 changed files with 17 additions and 40 deletions

View file

@ -4,8 +4,8 @@
CC:=${CC:C/^gcc/cc/} CC:=${CC:C/^gcc/cc/}
COMPILER_TYPE:=ack COMPILER_TYPE:=ack
PROGS= bootblock cdbootblock boot masterboot \ PROGS= bootblock cdbootblock bootexec boot masterboot \
jumpboot installboot edparams dosboot mkfile jumpboot installboot edparams
SRCS.bootblock= bootblock.s SRCS.bootblock= bootblock.s
CPPFLAGS.bootblock.s= ${I86CPPFLAGS} CPPFLAGS.bootblock.s= ${I86CPPFLAGS}
@ -19,20 +19,19 @@ LDFLAGS.cdbootblock= ${I86LDFLAGS}
BINDIR.cdbootblock= /usr/mdec BINDIR.cdbootblock= /usr/mdec
MAN.cdbootblock= MAN.cdbootblock=
SRCS.boot= boothead.s boot.c bootimage.c rawfs86.c SRCS.bootexec= boothead.s boot.c bootimage.c rawfs86.c
CPPFLAGS.boothead.s= ${I86CPPFLAGS} CPPFLAGS.boothead.s= ${I86CPPFLAGS}
CPPFLAGS.boot.c= ${I86CPPFLAGS} CPPFLAGS.boot.c= ${I86CPPFLAGS}
CPPFLAGS.bootimage.c= ${I86CPPFLAGS} CPPFLAGS.bootimage.c= ${I86CPPFLAGS}
CPPFLAGS.rawfs86.c= ${I86CPPFLAGS} CPPFLAGS.rawfs86.c= ${I86CPPFLAGS}
LDFLAGS.boot= ${I86LDFLAGS} LDFLAGS.bootexec= ${I86LDFLAGS}
DPADD.boot= ${LIBSYS} DPADD.bootexec= ${LIBSYS}
LDADD.boot= -lsys LDADD.bootexec= -lsys
BINDIR.boot= /usr/mdec BINDIR.bootexec= /usr/mdec
MAN.boot= MAN.bootexec=
all: .PHONY bootsize BINDIR.boot= /usr/mdec
bootsize: boot MAN.boot=
${INSTALL} -S 22kb boot
SRCS.masterboot= masterboot.s SRCS.masterboot= masterboot.s
CPPFLAGS.masterboot.s= ${I86CPPFLAGS} CPPFLAGS.masterboot.s= ${I86CPPFLAGS}
@ -55,35 +54,18 @@ CPPFLAGS.edparams.c= -DUNIX
BINDIR.edparams= /usr/bin BINDIR.edparams= /usr/bin
MAN.edparams= MAN.edparams=
SRCS.dosboot= doshead.s dosboot.o bootimage.o rawfs86.o
CPPFLAGS.dosboot.c= -DDOS $(I86CPPFLAGS)
LDADD.dosboot= ${I86LDFLAGS} -lsys
BINDIR.dosboot= /usr/mdec
CPPFLAGS.doshead.s= -mi386
MAN.dosboot=
SRCS.mkfile= mkfhead.s mkfile.c
CPPFLAGS.mkfile.s= ${I86CPPFLAGS}
LDADD.mkfile= ${I86LDFLAGS} -lsys
BINDIR.mkfile= /usr/mdec
MAN.mkfile=
rawfs86.c: rawfs.c rawfs86.c: rawfs.c
ln -f rawfs.c rawfs86.c ln -f rawfs.c rawfs86.c
edparams.c: boot.c edparams.c: boot.c
ln -f boot.c edparams.c ln -f boot.c edparams.c
dosboot.c: boot.c
ln -f boot.c dosboot.c
cdbootblock.s: bootblock.s cdbootblock.s: bootblock.s
ln -f bootblock.s cdbootblock.s ln -f bootblock.s cdbootblock.s
mkfile.com: mkfile boot: bootexec
install -S 22kb bootexec
boot.com: dosboot cp bootexec boot
./a.out2com dosboot boot.com
CPPFLAGS= -I${MINIXSRCDIR} CPPFLAGS= -I${MINIXSRCDIR}
AFLAGS= -I${MINIXSRCDIR} AFLAGS= -I${MINIXSRCDIR}
@ -92,6 +74,6 @@ I86LDFLAGS= -mi86 -Was-ncc -.o -com
STRIPFLAG= -s STRIPFLAG= -s
CLEANFILES+= rawfs86.c edparams.c cdbootblock.s dosboot.c CLEANFILES+= rawfs86.c edparams.c cdbootblock.s
.include <minix.prog.mk> .include <minix.prog.mk>

View file

@ -1472,11 +1472,6 @@ static void ctty(char *line)
printf("No serial line support under DOS\n"); printf("No serial line support under DOS\n");
} }
reset()
{
printf("No reset support under DOS\n");
}
#endif /* DOS */ #endif /* DOS */
#endif /* BIOS */ #endif /* BIOS */

View file

@ -634,19 +634,19 @@ _dev_boundary:
xor ax, ax xor ax, ax
ret ret
! int biosreadsectors(u32_t bufaddr, u32_t sector, u8_t count) ! int readsectors(u32_t bufaddr, u32_t sector, u8_t count)
! int writesectors(u32_t bufaddr, u32_t sector, u8_t count) ! int writesectors(u32_t bufaddr, u32_t sector, u8_t count)
! Read/write several sectors from/to the Minix virtual disk. Count ! Read/write several sectors from/to the Minix virtual disk. Count
! must fit in a byte. The external variable vfd is the file handle. ! must fit in a byte. The external variable vfd is the file handle.
! Returns 0 for success, otherwise the DOS error code. ! Returns 0 for success, otherwise the DOS error code.
! !
.define _biosreadsectors, _writesectors .define _readsectors, _writesectors
_writesectors: _writesectors:
push bp push bp
mov bp, sp mov bp, sp
movb 13(bp), 0x40 ! Code for a file write movb 13(bp), 0x40 ! Code for a file write
jmp rwsec jmp rwsec
_biosreadsectors: _readsectors:
push bp push bp
mov bp, sp mov bp, sp
movb 13(bp), 0x3F ! Code for a file read movb 13(bp), 0x3F ! Code for a file read