diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2006-11-08 17:46:57 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2006-11-08 17:46:57 +0000 |
commit | 5e39be0504085820c4397dae0a884c9662787f24 (patch) | |
tree | 92d48315797daf607d549808f2999f6d8fbabbf6 | |
parent | 6eaa3d49ce01c5570839bde7de18ebf3bdfd3db0 (diff) |
this is actually a primary bootblock (xxboot) not a secondary bootblock
(bootxx) thus disklabel -B will automatically pick it up now; ok drahn
-rw-r--r-- | sys/arch/landisk/stand/Makefile | 4 | ||||
-rw-r--r-- | sys/arch/landisk/stand/xxboot/Makefile (renamed from sys/arch/landisk/stand/bootxx/Makefile) | 22 | ||||
-rw-r--r-- | sys/arch/landisk/stand/xxboot/boot1.c (renamed from sys/arch/landisk/stand/bootxx/boot1.c) | 2 | ||||
-rw-r--r-- | sys/arch/landisk/stand/xxboot/pbr.S (renamed from sys/arch/landisk/stand/bootxx/pbr.S) | 30 | ||||
-rw-r--r-- | sys/arch/landisk/stand/xxboot/xxboot.8 (renamed from sys/arch/landisk/stand/bootxx/bootxx.8) | 10 | ||||
-rw-r--r-- | sys/arch/landisk/stand/xxboot/xxboot.S (renamed from sys/arch/landisk/stand/bootxx/bootxx.S) | 14 |
6 files changed, 42 insertions, 40 deletions
diff --git a/sys/arch/landisk/stand/Makefile b/sys/arch/landisk/stand/Makefile index d060d47eae5..a2732395dbf 100644 --- a/sys/arch/landisk/stand/Makefile +++ b/sys/arch/landisk/stand/Makefile @@ -1,6 +1,6 @@ -# $OpenBSD: Makefile,v 1.3 2006/10/10 05:26:54 miod Exp $ +# $OpenBSD: Makefile,v 1.4 2006/11/08 17:46:54 deraadt Exp $ -SUBDIR= mbr bootxx +SUBDIR= mbr xxboot .if ${MACHINE} == "landisk" SUBDIR+= boot .endif diff --git a/sys/arch/landisk/stand/bootxx/Makefile b/sys/arch/landisk/stand/xxboot/Makefile index 887e3fe72ee..5cafc9b3f77 100644 --- a/sys/arch/landisk/stand/bootxx/Makefile +++ b/sys/arch/landisk/stand/xxboot/Makefile @@ -1,20 +1,21 @@ -# $OpenBSD: Makefile,v 1.3 2006/10/11 17:19:06 drahn Exp $ +# $OpenBSD: Makefile,v 1.1 2006/11/08 17:46:56 deraadt Exp $ -MAN= bootxx.8 +MAN= xxboot.8 .if ${MACHINE} == "landisk" -PROG= bootxx -SRCS= pbr.S bootxx.S boot1.c +PROG= xxboot +LINKS= sdboot wdboot +SRCS= pbr.S xxboot.S boot1.c LDFLAGS=-nostdlib -Ttext 0x8c201000 -N -x -Bstatic -e start INSTALL_STRIP= -BOOTXX_SECTORS?= 15 -BOOTXX_MAXSIZE?= (( ${BOOTXX_SECTORS} * 512 )) +XXBOOT_SECTORS?= 15 +XXBOOT_MAXSIZE?= (( ${XXBOOT_SECTORS} * 512 )) CPPFLAGS+=-D_STANDALONE CPPFLAGS+=-nostdinc -I${.OBJDIR} -I${.CURDIR}/.. -I${.CURDIR}/../../../.. -CPPFLAGS+=-DLOADADDRESS=0x8ff00000 -DBOOTXX_SECTORS=${BOOTXX_SECTORS} +CPPFLAGS+=-DLOADADDRESS=0x8ff00000 -DXXBOOT_SECTORS=${XXBOOT_SECTORS} CFLAGS+=-m4-nofpu S= ${.CURDIR}/../../../.. @@ -36,8 +37,8 @@ ${PROG}: ${OBJS} ${DPADD} -Map ${PROG}.map -cref ${OBJS} ${LDADD} ${OBJCOPY} -O binary ${PROG}.sym ${PROG} @ sz=$$(ls -ln ${PROG} | tr -s ' ' | cut -d' ' -f5); \ - if [ "$$sz" -gt "$$${BOOTXX_MAXSIZE}" ]; then \ - echo "### ${PROG} size $$sz is larger than ${BOOTXX_MAXSIZE}" >&2 \ + if [ "$$sz" -gt "$$${XXBOOT_MAXSIZE}" ]; then \ + echo "### ${PROG} size $$sz is larger than ${XXBOOT_MAXSIZE}" >&2 \ rm -f ${PROG}; \ ! :; \ else \ @@ -45,10 +46,11 @@ ${PROG}: ${OBJS} ${DPADD} pad=$$(( 512 - ( $$sz & 511 ) )); \ [ $$pad = 512 ] || \ dd if=/dev/zero bs=1 count=$$pad >>${PROG} 2>/dev/null; \ - echo "${PROG} size $$sz, $$((${BOOTXX_MAXSIZE} - $$sz)) free"; \ + echo "${PROG} size $$sz, $$((${XXBOOT_MAXSIZE} - $$sz)) free"; \ fi .else NOPROG= .endif + .include <bsd.prog.mk> diff --git a/sys/arch/landisk/stand/bootxx/boot1.c b/sys/arch/landisk/stand/xxboot/boot1.c index 7c1cdbd7b11..e1645f235f2 100644 --- a/sys/arch/landisk/stand/bootxx/boot1.c +++ b/sys/arch/landisk/stand/xxboot/boot1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: boot1.c,v 1.2 2006/10/11 17:18:10 drahn Exp $ */ +/* $OpenBSD: boot1.c,v 1.1 2006/11/08 17:46:56 deraadt Exp $ */ /* $NetBSD: boot1.c,v 1.1 2006/09/01 21:26:19 uwe Exp $ */ /*- diff --git a/sys/arch/landisk/stand/bootxx/pbr.S b/sys/arch/landisk/stand/xxboot/pbr.S index 24513a1936b..2729f648048 100644 --- a/sys/arch/landisk/stand/bootxx/pbr.S +++ b/sys/arch/landisk/stand/xxboot/pbr.S @@ -1,4 +1,4 @@ -/* $OpenBSD: pbr.S,v 1.2 2006/10/10 05:26:54 miod Exp $ */ +/* $OpenBSD: pbr.S,v 1.1 2006/11/08 17:46:56 deraadt Exp $ */ /* $NetBSD: pbr.S,v 1.1 2006/09/01 21:26:19 uwe Exp $ */ /*- @@ -64,7 +64,7 @@ start0: mov #0, r5 /* LBA #0 */ mov r10, r6 /* buffer address */ bsr read_sectors_lba - mov #BOOTXX_SECTORS, r7 /* number of sectors */ + mov #XXBOOT_SECTORS, r7 /* number of sectors */ mov.l @r11, r1 mov.l @r10, r2 @@ -130,7 +130,7 @@ read_error: magic_error: bra error - mova ERR_NO_BOOTXX, r0 + mova ERR_NO_XXBOOT, r0 message_crlf: mov #32, r0 @@ -155,11 +155,11 @@ boot_lba: mov r9, r5 /* LBA # */ mov r10, r6 /* buffer address */ bsr read_sectors_lba - mov #BOOTXX_SECTORS, r7 /* number of sectors */ + mov #XXBOOT_SECTORS, r7 /* number of sectors */ pbr_read_ok: - mov.l .L.bootxx_magic1, r1 - mov.l .L.bootxx_magic, r2 + mov.l .L.xxboot_magic1, r1 + mov.l .L.xxboot_magic, r2 mov.l @r2, r2 cmp/eq r1, r2 bf magic_error @@ -169,9 +169,9 @@ pbr_read_ok: mov #6, r0 trapa #0x3f - mov.l .L.bootxx_start, r13 - jmp @r13 /* jump to bootxx */ - mov r9, r4 /* pass sector address to bootxx */ + mov.l .L.xxboot_start, r13 + jmp @r13 /* jump to xxboot */ + mov r9, r4 /* pass sector address to xxboot */ .align 1 @@ -184,12 +184,12 @@ part_offset: .word 0x1be magic_offset: .word 0x1fe .align 2 -.L.bootxx_magic1: +.L.xxboot_magic1: .long 0x20031125 -.L.bootxx_magic: - .long _C_LABEL(bootxx_magic) -.L.bootxx_start: - .long _C_LABEL(bootxx_start) +.L.xxboot_magic: + .long _C_LABEL(xxboot_magic) +.L.xxboot_start: + .long _C_LABEL(xxboot_start) .align 2 crlf: .asciz "\r\n" @@ -197,7 +197,7 @@ crlf: .asciz "\r\n" .align 2 ERR_READ: .asciz "Disk read" .align 2 -ERR_NO_BOOTXX: .asciz "Not a bootxx image" +ERR_NO_XXBOOT: .asciz "Not a xxboot image" .align 2 ERR_PTN: .asciz "No OpenBSD partition" diff --git a/sys/arch/landisk/stand/bootxx/bootxx.8 b/sys/arch/landisk/stand/xxboot/xxboot.8 index a2745b51778..f6ed6ea5303 100644 --- a/sys/arch/landisk/stand/bootxx/bootxx.8 +++ b/sys/arch/landisk/stand/xxboot/xxboot.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: bootxx.8,v 1.1 2006/10/06 21:48:50 mickey Exp $ +.\" $OpenBSD: xxboot.8,v 1.1 2006/11/08 17:46:56 deraadt Exp $ .\" .\" Copyright (c) 2006 Michael Shalayeff .\" All rights reserved. @@ -16,10 +16,10 @@ .\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" .Dd October 5, 2006 -.Dt BOOTXX 8 landisk +.Dt XXBOOT 8 landisk .Os .Sh NAME -.Nm bootxx +.Nm xxboot .Nd LANDISK-specific primary boot loader .Sh DESCRIPTION @@ -46,10 +46,10 @@ followed by a little twiddler while reading the second-stage boot. .Nm will print messages indicating errors as returned from the firmware. .Sh FILES -.Bl -tag -width /usr/mdec/bootxx -compact +.Bl -tag -width /usr/mdec/xxboot -compact .It Pa /usr/mdec/mbr Master Boot Record block -.It Pa /usr/mdec/bootxx +.It Pa /usr/mdec/xxboot primary bootstrap .It Pa /boot secondary bootstrap diff --git a/sys/arch/landisk/stand/bootxx/bootxx.S b/sys/arch/landisk/stand/xxboot/xxboot.S index 0a7b9c34e4c..c8c0e4cece5 100644 --- a/sys/arch/landisk/stand/bootxx/bootxx.S +++ b/sys/arch/landisk/stand/xxboot/xxboot.S @@ -1,5 +1,5 @@ -/* $OpenBSD: bootxx.S,v 1.1 2006/10/06 21:48:50 mickey Exp $ */ -/* $NetBSD: bootxx.S,v 1.1 2006/09/01 21:26:19 uwe Exp $ */ +/* $OpenBSD: xxboot.S,v 1.1 2006/11/08 17:46:56 deraadt Exp $ */ +/* $NetBSD: xxboot.S,v 1.1 2006/09/01 21:26:19 uwe Exp $ */ /*- * Copyright (c) 2005 NONAKA Kimihiro @@ -29,17 +29,17 @@ #include <machine/asm.h> -ENTRY(bootxx_start) - bra bootxx_start1 +ENTRY(xxboot_start) + bra xxboot_start1 nop .balign 4 -ENTRY(bootxx_magic) +ENTRY(xxboot_magic) .long 0x20031125 boot_params: .long 1f - boot_params - . = bootxx_start + 0x80 -bootxx_start1: + . = xxboot_start + 0x80 +xxboot_start1: mov.l .L._end, r0 /* zero bss */ mov.l .L.__bss_start, r1 sub r1, r0 |