Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/fdisk/mbr mbr for FDISK-formatted macppc disk
details: https://anonhg.NetBSD.org/src/rev/0c9cd5770c9a
branches: trunk
changeset: 532883:0c9cd5770c9a
user: itojun <itojun%NetBSD.org@localhost>
date: Mon Jun 17 15:25:45 2002 +0000
description:
mbr for FDISK-formatted macppc disk
diffstat:
sbin/fdisk/mbr/Makefile | 11 ++++++++++-
sbin/fdisk/mbr/mbr_macppc.S | 24 ++++++++++++++++++++++++
2 files changed, 34 insertions(+), 1 deletions(-)
diffs (53 lines):
diff -r 0d4386e75e4c -r 0c9cd5770c9a sbin/fdisk/mbr/Makefile
--- a/sbin/fdisk/mbr/Makefile Mon Jun 17 15:11:46 2002 +0000
+++ b/sbin/fdisk/mbr/Makefile Mon Jun 17 15:25:45 2002 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.13 2001/09/22 02:01:13 tv Exp $
+# $NetBSD: Makefile,v 1.14 2002/06/17 15:25:45 itojun Exp $
MAN= mbr.8
MLINKS= mbr.8 bootselect.8
@@ -25,6 +25,15 @@
${STRIP} ${PROG}.tmp
${OBJCOPY} -O binary ${PROG}.tmp ${PROG}
rm -f ${PROG}.tmp
+.elif ${MACHINE} == "macppc"
+PROG= mbr
+SRCS= mbr_macppc.S
+
+${PROG}: ${OBJS}
+ ${LD} -o ${PROG}.tmp ${LDFLAGS} -Ttext 0x600 ${OBJS}
+ ${STRIP} ${PROG}.tmp
+ ${OBJCOPY} -O binary ${PROG}.tmp ${PROG}
+ rm -f ${PROG}.tmp
.endif
.include <bsd.prog.mk>
diff -r 0d4386e75e4c -r 0c9cd5770c9a sbin/fdisk/mbr/mbr_macppc.S
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sbin/fdisk/mbr/mbr_macppc.S Mon Jun 17 15:25:45 2002 +0000
@@ -0,0 +1,24 @@
+/* $NetBSD: mbr_macppc.S,v 1.1 2002/06/17 15:25:45 itojun Exp $ */
+
+/*
+ * macppc master boot code - generates /usr/mdec/mbr identical to OpenBSD's.
+ * not sure what it means, but it makes OpenFirmware happy
+ */
+
+#include <machine/asm.h>
+
+ .text
+ENTRY(start)
+ . = _C_LABEL(start) + 0x1be
+ .byte 0x80
+ . = _C_LABEL(start) + 0x1c2
+ .byte 0x06
+ . = _C_LABEL(start) + 0x1c6
+ .byte 0x01
+ . = _C_LABEL(start) + 0x1cb
+ .byte 0x08
+ . = _C_LABEL(start) + 0x1ef
+ .byte 0x06
+ . = _C_LABEL(start) + 0x1f0
+ .byte 0x22, 0x02, 0xa6, 0x06, 0xb6, 0xa7, 0x01, 0x08
+ .byte 0x00, 0x00, 0x59, 0x6f, 0x1f, 0x00, 0x55, 0xaa
Home |
Main Index |
Thread Index |
Old Index