diff options
author | Robert de Bath <rdebath@poboxes.com> | 2001-05-21 14:51:52 +0200 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2013-10-23 23:47:38 +0200 |
commit | dc528617dc33dfaccb5285f327eac98ed56786b6 (patch) | |
tree | ddc21e12ef005e69d5eb8c3e5a4624421a4dbc3d | |
parent | 6d269edda0f49741484c1da6c71d24c031abc9ce (diff) | |
download | dev86-dc528617dc33dfaccb5285f327eac98ed56786b6.tar.gz |
Import Dev86src-0.15.6.tar.gzv0.15.6
-rw-r--r-- | Changes | 14 | ||||
-rw-r--r-- | Libc_version | 2 | ||||
-rw-r--r-- | Makefile | 49 | ||||
-rw-r--r-- | Mk_dist | 157 | ||||
-rw-r--r-- | bin86/Makefile | 3 | ||||
-rw-r--r-- | bootblocks/Makefile | 9 | ||||
-rw-r--r-- | bootblocks/li86.s | 3 | ||||
-rw-r--r-- | elksemu/Kernel_patch | 2 | ||||
-rw-r--r-- | libc/Makefile | 2 | ||||
-rw-r--r-- | libc/bios/Makefile | 2 | ||||
-rw-r--r-- | libc/bios/bios.c | 15 | ||||
-rw-r--r-- | libc/bios/fileops.c | 16 |
12 files changed, 199 insertions, 75 deletions
@@ -3,11 +3,23 @@ For version 0.16.0. > Seperated the multi-pass optimisation from the jump extension. We now have the -j back to it's old meaning and -O added to help shorten instructions. -> Fix for nested conditionals. +> Fix for nested conditionals in the assembler. > Fix for listing to unusual locations; assembler tried to list non-existant lines. +> Removed lots of warning from the ar86 code. (__STDC__ flags too) + +> Stop trying to strip scripts on install. + +> Remove non-working versions of malloc and stdio from libc directories. + +> Lots of changes in the 'bootblocks' example code. + +> Updated 'make distribution' to be all in the distribution. + +> bin86 Makefile adjusted so that the as86 script isn't installed with -s. + For version 0.15.0. > Added support for archives to nm86/objdump86 and size86. diff --git a/Libc_version b/Libc_version index 1282fff..c619394 100644 --- a/Libc_version +++ b/Libc_version @@ -1 +1 @@ -0.15.5 +0.15.6 @@ -70,50 +70,5 @@ Uninstall: @# TO HERE distribution: - @[ `id -u` -eq 0 ] || fakeroot -- $(MAKE) do_dist - @[ `id -u` -ne 0 ] || $(MAKE) do_dist - -do_dist: - @rm -f /tmp/linux-86 || true - @[ ! -f Copy_dist ] || sh Copy_dist - mkdir -p -m 0777 /tmp/Dist - [ -d /tmp/linux-86 ] || ln -s `pwd` /tmp/linux-86 - cd /tmp &&\ - $(MAKE) -C linux-86 realclean &&\ - $(MAKE) -C linux-86/libc Libc_version &&\ - VER=`cat linux-86/Libc_version` &&\ - tar cf Dist/Dev86src-$$VER.tar linux-86/* - gzip -f9 /tmp/Dist/Dev86src-*.tar & - - cd /tmp &&\ - VER=`cat linux-86/Libc_version` &&\ - ln -s linux-86/as as86 &&\ - cp -p linux-86/man/as86.1 as86/as86.1 &&\ - cp -p linux-86/COPYING as86/COPYING &&\ - tar cf Dist/as86-$$VER.tar `find as86/* -prune -type f` &&\ - rm as86/as86.1 as86 - gzip -f9 /tmp/Dist/as86-*.tar & - - cd /tmp/linux-86 &&\ - VER=`cat Libc_version` &&\ - make -C bin86 grab &&\ - tar cf /tmp/Dist/bin86-$$VER.tar bin86 &&\ - make -C bin86 ungrab - gzip -f9 /tmp/Dist/bin86-*.tar & - - cd /tmp &&\ - VER=`cat linux-86/Libc_version` &&\ - $(MAKE) -C /tmp/linux-86 install \ - ARFLAGS=q DIST=/tmp/linux-86-dist ELKSSRC=/dev/null &&\ - $(MAKE) -C /tmp/linux-86 other &&\ - tar cf /tmp/Dist/Dev86bin-$$VER.tar -C /tmp/linux-86-dist . &&\ - rm -f /tmp/Dist/Dev86clb-$$VER.zip Bcc &&\ - ln -s /tmp/linux-86 Bcc &&\ - zip -9rpk /tmp/Dist/Dev86clb-$$VER.zip \ - Bcc/lib/crt0.o Bcc/lib/libc.a Bcc/lib/libbsd.a \ - Bcc/lib/libdos.a Bcc/lib/libc_f.a Bcc/lib/libc_s.a \ - Bcc/lib/i386/crt0.o Bcc/lib/i386/libc.a &&\ - rm Bcc - - gzip -v9f /tmp/Dist/Dev86bin-*.tar - @rm /tmp/linux-86 || true + @[ `id -u` -eq 0 ] || fakeroot -- sh ./Mk_dist + @[ `id -u` -ne 0 ] || sh ./Mk_dist @@ -0,0 +1,157 @@ +#!/bin/sh - +# +# This script builds _and checks_ all the distribution files from my source +# directory. It's very selective because I've got a lot of historical and +# other 'junk' in the same directory. (85Mb!) +# + +trap "exit 1" 1 2 3 15 + +DIR="`pwd`" +TMPDIR=/tmp/Linux-86 +TMPSRC=linux86 +ARCDIR="$DIR"/dev86arc + +SRCDIRS='bcc unproto as ar ld copt man elksemu dis88 tests libbsd bin86' +DISTFILES='Libc_version Makefile README COPYING MAGIC Changes Contributors + mkcompile mkcompile2 later.c GNUmakefile libcompat + ifdef.c makefile.in Mk_dist' + +TMPDIST=$TMPDIR/$TMPSRC +rm -rf ${TMPDIR} +mkdir -p ${TMPDIST} + +#----------------------------------------------------------------------- + +echo Checking version + +make -s -C libc Libc_version +make -s -C bin86 ungrab +VER=`cat Libc_version` + +echo Copying most program files. +cp -a $DISTFILES $SRCDIRS ${TMPDIST} + +#----------------------------------------------------------------------- + +echo Copying libc. + +LIBC_FILES='Makefile Make.defs crt0.c + README COPYING KERNEL + New_subdir Pre_main Config_sh Config.dflt' + +mkdir ${TMPDIST}/libc + +( + cd libc + LIBC_DIRS="`for i in */Makefile */Config; do dirname $i; done | sort -u`" + cp -a $LIBC_FILES include $LIBC_DIRS ${TMPDIST}/libc/. +) + +#----------------------------------------------------------------------- + +echo Copying bootblocks and doselks. +make -s -C bootblocks distribution +make -s -C doselks distribution + +mkdir ${TMPDIST}/bootblocks +( cd ${TMPDIST}/bootblocks ; tar xzf /tmp/bootblocks.tar.gz ) + +mkdir ${TMPDIST}/doselks +( cd ${TMPDIST}/doselks ; tar xzf /tmp/doselks.tar.gz ) + +[ "`id -un`" = "root" ] && { + chown -R root:root ${TMPDIST} + chmod -R og=u-w ${TMPDIST} +} + +rm -f /tmp/bootblocks.tar.gz /tmp/doselks.tar.gz /tmp/libc-8086-$VER.tar.gz + +echo Extracting previous version +mkdir ${TMPDIST}.tmp +( cd ${TMPDIST}.tmp + tar xzf `ls -tr $ARCDIR/Dev86src*.0.tar.gz | tail -1` + mv * ${TMPDIST}.old +) +rmdir ${TMPDIST}.tmp + +# ARCDIR=${TMPDIR}/arc ; mkdir -p ${ARCDIR} +cd ${TMPDIST} +echo COPY COMPLETE -- Switched to ${TMPDIST}, ARCDIR now $ARCDIR +echo + +#----------------------------------------------------------------------- +# +# + +echo 'Ensuring clean tree' + +cd ${TMPDIST} + make -s clean realclean + mv as/obj1 ${TMPDIST}-obj1 + EXCL="`find . -name '*.o' -o -name '*.obj' \ + -o -name '*.lib' -o -name '*.bak' \ + -o -name '*~' -o -name '*.exe' \ + -o -name '*.orig' -o -name '*.rej' \ + `" + mv ${TMPDIST}-obj1 as/obj1 + rm -f $EXCL + rm -f `find . -type l` + +echo Generating patch against previous .0 version. + +cd ${TMPDIR} + +mv ${TMPSRC}.old/bootblocks boot.old +mv ${TMPSRC}/bootblocks boot + +diff -Nurd ${TMPSRC}.old ${TMPSRC} > ${ARCDIR}/Dev86src-$VER.patch + +mv boot.old ${TMPSRC}.old/bootblocks +mv boot ${TMPSRC}/bootblocks + +diff -Nurd ${TMPSRC}.old/bootblocks ${TMPSRC}/bootblocks >> ${ARCDIR}/Dev86src-$VER.patch + +gzip -f9 ${ARCDIR}/Dev86src-$VER.patch + +echo Creating full source archive. +ln -s ${TMPSRC} dev86-$VER +tar cf ${ARCDIR}/Dev86src-$VER.tar dev86-$VER/* +gzip -f9 ${ARCDIR}/Dev86src-$VER.tar + +echo Creating as86 source archive. +ln -s ${TMPSRC}/as as86-$VER +cp -p ${TMPSRC}/man/as86.1 as86-$VER/as86.1 +cp -p ${TMPSRC}/COPYING as86-$VER/COPYING +tar cf ${ARCDIR}/as86-$VER.tar `find as86-$VER/* -prune -type f` +gzip -f9 ${ARCDIR}/as86-*.tar + +echo Creating bin86 source archive. +make -s -C ${TMPSRC}/bin86 grab +ln -s ${TMPSRC}/bin86 bin86-$VER +tar chf ${ARCDIR}/bin86-$VER.tar bin86-$VER +make -s -C ${TMPSRC}/bin86 ungrab +gzip -f9 ${ARCDIR}/bin86-*.tar + +################################################################### + +echo Compile up the binaries. + +cd ${TMPDIR} || exit 1 +mkdir -p ${TMPDIST}.ins +make -C ${TMPDIST} install ARFLAGS=q DIST=${TMPDIST}.ins ELKSSRC=/dev/null || + exit +make -C ${TMPDIST} other || exit +tar cf ${ARCDIR}/Dev86bin-$VER.tar -C ${TMPDIST}.ins . +rm -f ${ARCDIR}/Dev86clb-$VER.zip Bcc +ln -s ${TMPDIST} Bcc + +zip -9rpk ${ARCDIR}/Dev86clb-$VER.zip \ + Bcc/lib/crt0.o Bcc/lib/libc.a Bcc/lib/libbsd.a \ + Bcc/lib/libdos.a Bcc/lib/libc_f.a Bcc/lib/libc_s.a \ + Bcc/lib/i386/crt0.o Bcc/lib/i386/libc.a || exit +rm Bcc + +gzip -9f ${ARCDIR}/Dev86bin-$VER.tar || exit + +echo Process completed. diff --git a/bin86/Makefile b/bin86/Makefile index 615d915..4c8dd82 100644 --- a/bin86/Makefile +++ b/bin86/Makefile @@ -9,6 +9,7 @@ LIBDIR=$(PREFIX)/lib MANDIR=$(PREFIX)/man/man1 SUF=86 +INSTALL_OPT=-m 755 INSTALL_OPTS=-m 755 -s MAN_OPTS =-m 644 @@ -26,7 +27,7 @@ all: install: all install $(INSTALL_OPTS) as/as86 $(BINDIR)/as$(SUF) - install $(INSTALL_OPTS) as/as86_encap $(BINDIR)/as$(SUF)_encap + install $(INSTALL_OPT) as/as86_encap $(BINDIR)/as$(SUF)_encap install $(INSTALL_OPTS) ld/ld86 $(BINDIR)/ld$(SUF) install $(INSTALL_OPTS) ld/objdump86 $(BINDIR)/objdump$(SUF) install $(MAN_OPTS) man/*.1 $(MANDIR) diff --git a/bootblocks/Makefile b/bootblocks/Makefile index 7378819..f54305d 100644 --- a/bootblocks/Makefile +++ b/bootblocks/Makefile @@ -12,15 +12,17 @@ MONDEFS= # LST=-l $*.lst # CLST=-A-l -A$*.lst -default: makeboot makeboot.com monitor.out minix_elks.bin +default: makeboot makeboot.com monitor.out minix_elks.bin lsys.com -all: default tgz bin minix_elks.bin +all: bootbin bootsys default tgz + +bootsys: bootfile.sys boottar.sys bootminix.sys CSRC=minix.c SSRC=sysboot.s tarboot.s skip.s com_bcc.s tich.s mbr.s msdos.s noboot.s encap: $(SSRC:s=v) $(CSRC:c=v) minixhd.v msdos16.v -bin: $(SSRC:s=bin) $(CSRC:c=bin) minixhd.bin msdos16.bin +bootbin: $(SSRC:s=bin) $(CSRC:c=bin) minixhd.bin msdos16.bin minix_elks.bin MOBJ=monitor.o commands.o i86_funcs.o relocate.o help.o bzimage.o \ trk_buf.o min_buf.o unix.o fs.o fs_tar.o fs_min.o fs_dos.o cprintf.o @@ -94,6 +96,7 @@ version.h: sed 's/\(.*\)/#define VERSION "\1"/' > version.h clean realclean: + rm -f bootfile.sys boottar.sys bootminix.sys rm -f monitor makeboot bootblocks.tar.gz rm -f minix.s minixhd.s minix_elks.s version.h msdos16.s rm -f *.com *.o *.bin *.out *.lst *.sym *.v *.tmp diff --git a/bootblocks/li86.s b/bootblocks/li86.s index 0c391ff..cabbc15 100644 --- a/bootblocks/li86.s +++ b/bootblocks/li86.s @@ -3,7 +3,8 @@ ! This is a skeleton for creating an impure Linux-8086 executable without ! using the linker. The .text and .data areas are correctly positioned. ! -! This file needs to be compiled using the 3 pass mode (-j) +! This file needs to be compiled using the 3 pass mode (-O) +! eg: as86 -O li86.s -s li86.sym -b li86.bin ! !---------------------------------------------------------------------------- .text diff --git a/elksemu/Kernel_patch b/elksemu/Kernel_patch index 9752353..20b6add 100644 --- a/elksemu/Kernel_patch +++ b/elksemu/Kernel_patch @@ -3,7 +3,7 @@ on a Linux-i386 (1.2.13) system. It requires V0.0.2 or better of elksemu in the file "/lib/elksemu". If you are using kernel 1.3.* or later try the module: binfmt_elks.o -If you are using 2.0.36, 2.1.43 or 2.2.* and later use binfmt_misc. +If you are using 2.0.36, 2.1.43 or 2.2.0 and later use binfmt_misc. --- orig-13/fs/exec.c Sun Sep 24 13:22:37 1995 +++ linux/fs/exec.c Sun Feb 11 20:11:47 1996 diff --git a/libc/Makefile b/libc/Makefile index 408d92c..bf9754e 100644 --- a/libc/Makefile +++ b/libc/Makefile @@ -11,7 +11,7 @@ endif VERMAJOR=0 VERMINOR=15 -VERPATCH=5 +VERPATCH=6 VER=$(VERMAJOR).$(VERMINOR).$(VERPATCH) CC=bcc diff --git a/libc/bios/Makefile b/libc/bios/Makefile index 8436846..116776e 100644 --- a/libc/bios/Makefile +++ b/libc/bios/Makefile @@ -5,7 +5,7 @@ ifeq ($(LIB_OS),BIOS) ASRC=bios.c AOBJ=bios_start.o bios_isatty.o bios_nofiles.o \ - bios_open.o bios_read.o bios_write.o bios_lseek.o bios_close.o + bios_read.o bios_write.o bios_lseek.o bios_close.o BSRC=bios_vid.c BOBJ=bios_putc.o bios_getc.o bios_khit.o bios_rdline.o diff --git a/libc/bios/bios.c b/libc/bios/bios.c index 2290472..402f689 100644 --- a/libc/bios/bios.c +++ b/libc/bios/bios.c @@ -211,21 +211,6 @@ int fd; /****************************************************************************/ -#ifdef L_bios_open -extern int __fileops(); - -open(name, flags, mode) -char * name; -int flags, mode; -{ - __files = __fileops; - return (*__files)(CMD_OPEN, flags, name, mode); -} - -#endif - -/****************************************************************************/ - #endif #endif #endif diff --git a/libc/bios/fileops.c b/libc/bios/fileops.c index 5c71a37..9c2daf5 100644 --- a/libc/bios/fileops.c +++ b/libc/bios/fileops.c @@ -11,9 +11,19 @@ static int op_close(); static int op_read(); static int op_write(); static long op_lseek(); +static int fileops(); int -__fileops(cmd, fd, buf, len) +open(name, flags, mode) +char * name; +int flags, mode; +{ + __files = fileops; + return (*__files)(CMD_OPEN, flags, name, mode); +} + +static int +fileops(cmd, fd, buf, len) int cmd, fd, len; char * buf; { @@ -48,7 +58,7 @@ char * buf; int amount_left_in_buffer; int amount_to_copy; - if (fd >= MAX_OPEN_FILES || _iob[fd].block_read == 0) + if (fd < 0 || fd >= MAX_OPEN_FILES || _iob[fd].block_read == 0) { errno = EBADF; return -1; @@ -147,7 +157,7 @@ static int op_close(fd) int fd; { - if (fd >= MAX_OPEN_FILES || _iob[0].flags == 0) + if (fd < 0 || fd >= MAX_OPEN_FILES || _iob[0].flags == 0) { errno = EBADF; return -1; |