aboutsummaryrefslogtreecommitdiff
path: root/sys/boot
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2002-09-17 01:49:00 +0000
committerPeter Wemm <peter@FreeBSD.org>2002-09-17 01:49:00 +0000
commit66422f5b7a1a6055f0b2358268eb902aab6e2e3e (patch)
tree7d8147c99f6bfb34b7cb47ad46e24a4f7dc93102 /sys/boot
parent4e6ef0845de37f8c4a29410d48d3847da78a9c9f (diff)
Notes
Diffstat (limited to 'sys/boot')
-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
-rw-r--r--sys/boot/pc98/btx/btx/Makefile5
-rw-r--r--sys/boot/pc98/btx/btxldr/Makefile5
-rw-r--r--sys/boot/pc98/kgzldr/Makefile5
16 files changed, 6 insertions, 93 deletions
diff --git a/sys/boot/i386/boot0/Makefile b/sys/boot/i386/boot0/Makefile
index 9de7dcf464141..434691e798aef 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 1d03cfdf5bd8c..c2a33a60b9d82 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 0d61889827295..bd69850cb0e19 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 737d5ec97fc7f..0eba8f91616d5 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 18ca69f7b75cf..9e8e8136933cd 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 607b68644899e..9ed9114c18662 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 ac26a20409ed1..cfb479fd2d84f 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 1441a4b4a01ca..0000000000000
--- 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 86b8ccd1d1a42..79ea8a666b1ae 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 ff43c77b3f2e9..550fa526d946f 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 3986eca079063..5ccffee5345dc 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 ed77dba881c2e..50add6321ab5e 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 e7988247a0efc..6ba21a37c3375 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) | \
diff --git a/sys/boot/pc98/btx/btx/Makefile b/sys/boot/pc98/btx/btx/Makefile
index de14daade2a1b..3b8408d80b12f 100644
--- a/sys/boot/pc98/btx/btx/Makefile
+++ b/sys/boot/pc98/btx/btx/Makefile
@@ -29,13 +29,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/pc98/btx/btxldr/Makefile b/sys/boot/pc98/btx/btxldr/Makefile
index 35964cee3aa2a..f88004bf588a8 100644
--- a/sys/boot/pc98/btx/btxldr/Makefile
+++ b/sys/boot/pc98/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/pc98/kgzldr/Makefile b/sys/boot/pc98/kgzldr/Makefile
index 0c2998bd1ef45..22f0cb4d8dfc8 100644
--- a/sys/boot/pc98/kgzldr/Makefile
+++ b/sys/boot/pc98/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
@@ -20,7 +16,6 @@ AFLAGS+=--defsym PC98=1
CLEANFILES=${FILES}
M4?= m4
-M4FLAGS=-DOBJFORMAT=${OBJFORMAT}
BOOT_COMCONSOLE_PORT?= 0x238
M4FLAGS+=-DSIOPRT=${BOOT_COMCONSOLE_PORT}