diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2008-05-16 18:57:02 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2008-05-16 18:57:02 +0000 |
commit | 20af62d22afc94a01f99e9e2e48cc39e6ed98430 (patch) | |
tree | 82eb1063e55a4f10372513859d367df98a74bd68 /sys/arch | |
parent | 4cba98c6d45ee07d68609bdc1b421761468c8f6e (diff) |
There's no point in having an ELF bootloader; turn it into a U-Boot image.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/socppc/stand/Makefile | 4 | ||||
-rw-r--r-- | sys/arch/socppc/stand/Makefile.inc | 8 | ||||
-rw-r--r-- | sys/arch/socppc/stand/boot/Makefile | 12 |
3 files changed, 18 insertions, 6 deletions
diff --git a/sys/arch/socppc/stand/Makefile b/sys/arch/socppc/stand/Makefile index f0d17b97d19..ad47bdbefd6 100644 --- a/sys/arch/socppc/stand/Makefile +++ b/sys/arch/socppc/stand/Makefile @@ -1,5 +1,5 @@ -# $OpenBSD: Makefile,v 1.2 2008/05/15 21:34:15 kettenis Exp $ +# $OpenBSD: Makefile,v 1.3 2008/05/16 18:57:01 kettenis Exp $ -SUBDIR= boot mkboot +SUBDIR= mkboot boot .include <bsd.subdir.mk> diff --git a/sys/arch/socppc/stand/Makefile.inc b/sys/arch/socppc/stand/Makefile.inc index 62c1e072bb9..9e8f2e14dea 100644 --- a/sys/arch/socppc/stand/Makefile.inc +++ b/sys/arch/socppc/stand/Makefile.inc @@ -1,3 +1,9 @@ -# $OpenBSD: Makefile.inc,v 1.1 2008/05/15 20:18:00 kettenis Exp $ +# $OpenBSD: Makefile.inc,v 1.2 2008/05/16 18:57:01 kettenis Exp $ + +.if exists(${STANDIR}/mkboot/mkboot) +MKBOOT=${STANDIR}/mkboot/mkboot +.else +MKBOOT=${STANDIR}/mkboot/${__objdir}/mkboot +.endif BINDIR=/usr/mdec diff --git a/sys/arch/socppc/stand/boot/Makefile b/sys/arch/socppc/stand/boot/Makefile index d03593ae31d..4f68796b787 100644 --- a/sys/arch/socppc/stand/boot/Makefile +++ b/sys/arch/socppc/stand/boot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.2 2008/05/11 19:58:24 kettenis Exp $ +# $OpenBSD: Makefile,v 1.3 2008/05/16 18:57:01 kettenis Exp $ NOMAN= @@ -32,10 +32,16 @@ USE_LOADFILE= yes .include "${S}/lib/libsa/Makefile.inc" LIBSA= ${SALIB} -LDFLAGS= -Ttext 0x100000 +STANDIR= ${.CURDIR}/.. + +RELOC= 0x100000 +LDFLAGS= -Ttext ${RELOC} +OBJCOPY?= objcopy ${PROG}: ${OBJS} ${LIBSA} - ${LD} ${LDFLAGS} -o boot ${OBJS} ${LIBSA} ${LIBSA} + ${LD} ${LDFLAGS} -o ${PROG}.elf ${OBJS} ${LIBSA} ${LIBSA} + ${OBJCOPY} -O binary ${PROG}.elf ${PROG}.bin + ${MKBOOT} -e ${RELOC} -l ${RELOC} ${PROG}.bin ${PROG} .if !make(obj) .BEGIN: |