summaryrefslogtreecommitdiffstats
path: root/sys/boot/i386
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2002-09-17 01:49:00 +0000
committerpeter <peter@FreeBSD.org>2002-09-17 01:49:00 +0000
commita51c9b66271f0551fb83b90a7db6c464eac2318b (patch)
tree7d8147c99f6bfb34b7cb47ad46e24a4f7dc93102 /sys/boot/i386
parent2a4cb24fb4a35753b66a2503614b874481e35535 (diff)
downloadFreeBSD-src-a51c9b66271f0551fb83b90a7db6c464eac2318b.zip
FreeBSD-src-a51c9b66271f0551fb83b90a7db6c464eac2318b.tar.gz
Initiate deorbit burn for the i386-only a.out related support. Moves are
under way to move the remnants of the a.out toolchain to ports. As the comment in src/Makefile said, this stuff is deprecated and one should not expect this to remain beyond 4.0-REL. It has already lasted WAY beyond that. Notable exceptions: gcc - I have not touched the a.out generation stuff there. ldd/ldconfig - still have some code to interface with a.out rtld. old as/ld/etc - I have not removed these yet, pending their move to ports. some includes - necessary for ldd/ldconfig for now. Tested on: i386 (extensively), alpha
Diffstat (limited to 'sys/boot/i386')
-rw-r--r--sys/boot/i386/boot0/Makefile5
-rw-r--r--sys/boot/i386/btx/btx/Makefile5
-rw-r--r--sys/boot/i386/btx/btxldr/Makefile5
-rw-r--r--sys/boot/i386/btx/lib/Makefile2
-rw-r--r--sys/boot/i386/cdboot/Makefile5
-rw-r--r--sys/boot/i386/kgzldr/Makefile11
-rw-r--r--sys/boot/i386/kgzldr/crt.s4
-rw-r--r--sys/boot/i386/kgzldr/kgzldr.m418
-rw-r--r--sys/boot/i386/kgzldr/sio.s4
-rw-r--r--sys/boot/i386/kgzldr/start.s4
-rw-r--r--sys/boot/i386/liloldr/Makefile11
-rw-r--r--sys/boot/i386/mbr/Makefile5
-rw-r--r--sys/boot/i386/pxeldr/Makefile5
13 files changed, 6 insertions, 78 deletions
diff --git a/sys/boot/i386/boot0/Makefile b/sys/boot/i386/boot0/Makefile
index 9de7dcf..434691e 100644
--- a/sys/boot/i386/boot0/Makefile
+++ b/sys/boot/i386/boot0/Makefile
@@ -24,13 +24,8 @@ BOOT_BOOT0_TICKS?= 0xb6
BOOT_BOOT0_ORG?= 0x600
boot0: boot0.o
-.if ${OBJFORMAT} == aout
- ${LD} -N -s -T ${BOOT_BOOT0_ORG} -o boot0.out boot0.o
- dd if=boot0.out of=${.TARGET} ibs=32 skip=1
-.else
${LD} -N -e start -Ttext ${BOOT_BOOT0_ORG} -o boot0.out boot0.o
objcopy -S -O binary boot0.out ${.TARGET}
-.endif
boot0.o: boot0.s
${AS} ${AFLAGS} --defsym FLAGS=${BOOT_BOOT0_FLAGS} \
diff --git a/sys/boot/i386/btx/btx/Makefile b/sys/boot/i386/btx/btx/Makefile
index 1d03cfd..c2a33a6 100644
--- a/sys/boot/i386/btx/btx/Makefile
+++ b/sys/boot/i386/btx/btx/Makefile
@@ -28,13 +28,8 @@ ORG= 0x9000
all: btx
btx: btx.o
-.if ${OBJFORMAT} == aout
- ${LD} -nostdlib -N -s -T ${ORG} -o btx.out btx.o
- dd if=btx.out of=${.TARGET} ibs=32 skip=1
-.else
${LD} -N -e start -Ttext ${ORG} -o btx.out btx.o
objcopy -S -O binary btx.out ${.TARGET}
-.endif
btx.o: btx.s
(cd ${.CURDIR}; ${M4} ${M4FLAGS} btx.s) | \
diff --git a/sys/boot/i386/btx/btxldr/Makefile b/sys/boot/i386/btx/btxldr/Makefile
index 0d61889..bd69850 100644
--- a/sys/boot/i386/btx/btxldr/Makefile
+++ b/sys/boot/i386/btx/btxldr/Makefile
@@ -10,13 +10,8 @@ M4FLAGS+= -DBTXLDR_VERBOSE
all: btxldr
btxldr: btxldr.o
-.if ${OBJFORMAT} == aout
- ${LD} -nostdlib -N -s -T ${LOADER_ADDRESS} -o btxldr.out btxldr.o
- dd if=btxldr.out of=${.TARGET} ibs=32 skip=1
-.else
${LD} -N -e start -Ttext ${LOADER_ADDRESS} -o btxldr.out btxldr.o
objcopy -S -O binary btxldr.out ${.TARGET}
-.endif
btxldr.o: btxldr.s
(cd ${.CURDIR}; ${M4} ${M4FLAGS} btxldr.s ) | \
diff --git a/sys/boot/i386/btx/lib/Makefile b/sys/boot/i386/btx/lib/Makefile
index 737d5ec..0eba8f9 100644
--- a/sys/boot/i386/btx/lib/Makefile
+++ b/sys/boot/i386/btx/lib/Makefile
@@ -1,8 +1,6 @@
# $FreeBSD$
OBJS= btxcsu.o btxsys.o btxv86.o
-AFLAGS+= -elf
-LDFLAGS+= -elf
CLEANFILES+= crt0.o ${OBJS}
all: crt0.o
diff --git a/sys/boot/i386/cdboot/Makefile b/sys/boot/i386/cdboot/Makefile
index 18ca69f..9e8e813 100644
--- a/sys/boot/i386/cdboot/Makefile
+++ b/sys/boot/i386/cdboot/Makefile
@@ -10,13 +10,8 @@ STRIP=
BINDIR?= /boot
${PROG}: ${PROG}.o
-.if ${OBJFORMAT} == aout
- ${LD} -nostdlib -N -s -T ${ORG} -o ${PROG}.out ${PROG}.o
- dd if=${PROG}.out of=${.TARGET} ibs=32 skip=1
-.else
${LD} -N -e start -Ttext ${ORG} -o ${PROG}.out ${PROG}.o
objcopy -S -O binary ${PROG}.out ${.TARGET}
-.endif
CLEANFILES+= ${PROG}.o ${PROG}.out
diff --git a/sys/boot/i386/kgzldr/Makefile b/sys/boot/i386/kgzldr/Makefile
index 607b686..9ed9114 100644
--- a/sys/boot/i386/kgzldr/Makefile
+++ b/sys/boot/i386/kgzldr/Makefile
@@ -4,11 +4,7 @@ FILES= kgzldr.o
SRCS= start.s boot.c inflate.c lib.c crt.s sio.s
OBJS= ${SRCS:N*.h:R:S/$/.o/g}
CFLAGS= -ffreestanding
-.if ${OBJFORMAT} == aout
-CFLAGS+=-O2
-.else
CFLAGS+=-Os
-.endif
CFLAGS+=-DKZIP
LDFLAGS=-nostdlib -static -r
BINDIR= /usr/lib
@@ -16,17 +12,10 @@ BINDIR= /usr/lib
CLEANFILES=${FILES}
-M4?= m4
-M4FLAGS=-DOBJFORMAT=${OBJFORMAT}
-
BOOT_COMCONSOLE_PORT?= 0x3f8
M4FLAGS+=-DSIOPRT=${BOOT_COMCONSOLE_PORT}
kgzldr.o: ${OBJS}
${CC} ${LDFLAGS} -o ${.TARGET} ${OBJS}
-.s.o:
- (cd ${.CURDIR}; ${M4} ${M4FLAGS} kgzldr.m4 ${.IMPSRC}) |\
- ${AS} ${AFLAGS} -o ${.TARGET}
-
.include <bsd.prog.mk>
diff --git a/sys/boot/i386/kgzldr/crt.s b/sys/boot/i386/kgzldr/crt.s
index ac26a20..cfb479f 100644
--- a/sys/boot/i386/kgzldr/crt.s
+++ b/sys/boot/i386/kgzldr/crt.s
@@ -38,11 +38,11 @@
.set BDA_SCR,0x449 # Video mode
.set BDA_POS,0x450 # Cursor position
- .globl _(crt_putchr)
+ .globl crt_putchr
# void crt_putchr(int c)
-_(crt_putchr): movb 0x4(%esp,1),%al # Get character
+crt_putchr: movb 0x4(%esp,1),%al # Get character
pusha # Save
xorl %ecx,%ecx # Zero for loops
movb $SCR_MAT,%ah # Mode/attribute
diff --git a/sys/boot/i386/kgzldr/kgzldr.m4 b/sys/boot/i386/kgzldr/kgzldr.m4
deleted file mode 100644
index 1441a4b..0000000
--- a/sys/boot/i386/kgzldr/kgzldr.m4
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Copyright (c) 2000 Robert Nordier
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms are freely
-# permitted provided that the above copyright notice and this
-# paragraph and the following disclaimer are duplicated in all
-# such forms.
-#
-# This software is provided "AS IS" and without any express or
-# implied warranties, including, without limitation, the implied
-# warranties of merchantability and fitness for a particular
-# purpose.
-#
-
-# $FreeBSD$
-
-define(_,`ifelse(OBJFORMAT,`aout',`_$1',`$1')')
diff --git a/sys/boot/i386/kgzldr/sio.s b/sys/boot/i386/kgzldr/sio.s
index 86b8ccd..79ea8a6 100644
--- a/sys/boot/i386/kgzldr/sio.s
+++ b/sys/boot/i386/kgzldr/sio.s
@@ -29,11 +29,11 @@
.set SIO_PRT,SIOPRT # Base port
- .globl _(sio_putchr)
+ .globl sio_putchr
# void sio_putchr(int c)
-_(sio_putchr): movw $SIO_PRT+0x5,%dx # Line status reg
+sio_putchr: movw $SIO_PRT+0x5,%dx # Line status reg
xor %ecx,%ecx # Timeout
movb $0x40,%ch # counter
sio_putchr.1: inb %dx,%al # Transmitter
diff --git a/sys/boot/i386/kgzldr/start.s b/sys/boot/i386/kgzldr/start.s
index ff43c77..550fa52 100644
--- a/sys/boot/i386/kgzldr/start.s
+++ b/sys/boot/i386/kgzldr/start.s
@@ -40,6 +40,6 @@ _start: cld # String ops inc
rep # Clear
stosb # bss
pushl 0x4(%esp) # Pass howto flags
- call _(boot) # Call C code
+ call boot # Call C code
popl %ecx # Clear stack
- jmp *_(kgz)+entry # To loaded code
+ jmp *kgz+entry # To loaded code
diff --git a/sys/boot/i386/liloldr/Makefile b/sys/boot/i386/liloldr/Makefile
index 3986eca..5ccffee 100644
--- a/sys/boot/i386/liloldr/Makefile
+++ b/sys/boot/i386/liloldr/Makefile
@@ -27,23 +27,12 @@ ${BOOT}: ${BSECT} ${LDR} ${LOADER}
rm ${.TARGET}.tmp
${LDR}: ${LDR}.o
-.if ${OBJFORMAT} == aout
- ${LD} -nostdlib -N -s -T ${ORG} -o ${LDR}.out ${LDR}.o
- dd if=${LDR}.out of=${.TARGET} ibs=32 skip=1
-.else
${LD} -N -e start -Ttext ${ORG} -o ${LDR}.out ${LDR}.o
objcopy -S -O binary ${LDR}.out ${.TARGET}
-.endif
${BSECT}: ${BSECT}.o
-.if ${OBJFORMAT} == aout
- ${LD} -nostdlib -N -s -T ${ORG} -o ${BSECT}.out ${BSECT}.o
- dd if=${BSECT}.out of=${.TARGET} ibs=32 skip=1
-.else
${LD} -N -e start -Ttext ${ORG} -o ${BSECT}.out ${BSECT}.o
objcopy -S -O binary ${BSECT}.out ${.TARGET}
-.endif
-
${BSECT}.o: ${BSECT}.s ${LOADER}
diff --git a/sys/boot/i386/mbr/Makefile b/sys/boot/i386/mbr/Makefile
index ed77dba..50add632 100644
--- a/sys/boot/i386/mbr/Makefile
+++ b/sys/boot/i386/mbr/Makefile
@@ -9,13 +9,8 @@ BINMODE= 444
ORG= 0x600
mbr: mbr.o
-.if ${OBJFORMAT} == aout
- ${LD} -N -s -T ${ORG} -o mbr.out mbr.o
- dd if=mbr.out of=${.TARGET} ibs=32 skip=1
-.else
${LD} -N -e start -Ttext ${ORG} -o mbr.out mbr.o
objcopy -S -O binary mbr.out ${.TARGET}
-.endif
CLEANFILES+= mbr.out mbr.o
diff --git a/sys/boot/i386/pxeldr/Makefile b/sys/boot/i386/pxeldr/Makefile
index e798824..6ba21a3 100644
--- a/sys/boot/i386/pxeldr/Makefile
+++ b/sys/boot/i386/pxeldr/Makefile
@@ -43,13 +43,8 @@ ${LOADER}: ${LOADERBIN} ${BTXLDR} ${BTXKERN} ${BTXCRT}
-b ${BTXKERN} ${LOADERBIN}
${LDR}: ${LDR}.o
-.if ${OBJFORMAT} == aout
- ${LD} -nostdlib -N -s -T ${ORG} -o ${LDR}.out ${LDR}.o
- dd if=${LDR}.out of=${.TARGET} ibs=32 skip=1
-.else
${LD} -N -e start -Ttext ${ORG} -o ${LDR}.out ${LDR}.o
objcopy -S -O binary ${LDR}.out ${.TARGET}
-.endif
${LDR}.o: ${LDR}.s
(cd ${.CURDIR}; ${M4} ${M4FLAGS} ${LDR}.s) | \
OpenPOWER on IntegriCloud