Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/amiga/stand/bootblock Add FFSv2 support for primary...
details: https://anonhg.NetBSD.org/src/rev/65e3930440d6
branches: trunk
changeset: 959789:65e3930440d6
user: rin <rin%NetBSD.org@localhost>
date: Thu Feb 25 03:42:14 2021 +0000
description:
Add FFSv2 support for primary- and second-stage boot loaders.
Rename primary-stage boot for FFSv1 (and ustarfs) to bootxx_ffsv1 for clarity.
Bump version to 3.1.
diffstat:
sys/arch/amiga/stand/bootblock/Makefile | 4 +-
sys/arch/amiga/stand/bootblock/boot/Makefile | 4 +-
sys/arch/amiga/stand/bootblock/boot/version | 3 +-
sys/arch/amiga/stand/bootblock/boot/xd.c | 7 ++++-
sys/arch/amiga/stand/bootblock/bootxx_ffs/Makefile | 25 +++++++++++++++----
sys/arch/amiga/stand/bootblock/bootxx_ffsv2/Makefile | 7 +++++
6 files changed, 38 insertions(+), 12 deletions(-)
diffs (149 lines):
diff -r f99af7e38a94 -r 65e3930440d6 sys/arch/amiga/stand/bootblock/Makefile
--- a/sys/arch/amiga/stand/bootblock/Makefile Thu Feb 25 03:40:27 2021 +0000
+++ b/sys/arch/amiga/stand/bootblock/Makefile Thu Feb 25 03:42:14 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2010/07/06 05:59:57 mrg Exp $
+# $NetBSD: Makefile,v 1.5 2021/02/25 03:42:14 rin Exp $
.include <bsd.own.mk>
@@ -9,7 +9,7 @@
.endif
# but these:
-SUBDIR+=boot bootxx_ffs
+SUBDIR+=boot bootxx_ffs bootxx_ffsv2
.include <bsd.subdir.mk>
diff -r f99af7e38a94 -r 65e3930440d6 sys/arch/amiga/stand/bootblock/boot/Makefile
--- a/sys/arch/amiga/stand/bootblock/boot/Makefile Thu Feb 25 03:40:27 2021 +0000
+++ b/sys/arch/amiga/stand/bootblock/boot/Makefile Thu Feb 25 03:42:14 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.56 2017/04/09 14:51:52 christos Exp $
+# $NetBSD: Makefile,v 1.57 2021/02/25 03:42:14 rin Exp $
.include <bsd.init.mk>
.include <bsd.sys.mk> # for HOST_SH
@@ -40,7 +40,7 @@
COBJS = main.o console.o xd.o twiddle.o bzero.o gets.o
COBJS+= lseek.o open.o read.o close.o dev.o errno.o
-COBJS+= ufs.o ustarfs.o panic.o vers.o files.o
+COBJS+= ufs.o ustarfs.o ffsv2.o panic.o vers.o files.o
COBJS+= divdi3.o moddi3.o qdivrem.o
SOBJS = alloc.o ashrdi3.o ashldi3.o bcopy.o muldi3.o printf.o startit.o
diff -r f99af7e38a94 -r 65e3930440d6 sys/arch/amiga/stand/bootblock/boot/version
--- a/sys/arch/amiga/stand/bootblock/boot/version Thu Feb 25 03:40:27 2021 +0000
+++ b/sys/arch/amiga/stand/bootblock/boot/version Thu Feb 25 03:42:14 2021 +0000
@@ -1,4 +1,4 @@
-$NetBSD: version,v 1.1 2001/12/17 05:41:13 mhitch Exp $
+$NetBSD: version,v 1.2 2021/02/25 03:42:14 rin Exp $
NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE. The format of this
file is important - make sure the entries are appended on end, last item
@@ -11,3 +11,4 @@
2.3: ???
2.4: Moved default command into fixed location for easy patching
3.0: Initial 2 stage amiga bootblocks
+3.1: Add support for FFSv2
diff -r f99af7e38a94 -r 65e3930440d6 sys/arch/amiga/stand/bootblock/boot/xd.c
--- a/sys/arch/amiga/stand/bootblock/boot/xd.c Thu Feb 25 03:40:27 2021 +0000
+++ b/sys/arch/amiga/stand/bootblock/boot/xd.c Thu Feb 25 03:42:14 2021 +0000
@@ -1,5 +1,5 @@
/*
- * $NetBSD: xd.c,v 1.10 2009/03/14 21:04:04 dsl Exp $
+ * $NetBSD: xd.c,v 1.11 2021/02/25 03:42:14 rin Exp $
*
* Copyright (c) 1996 Ignatios Souvatzis.
* Copyright (c) 1995 Waldi Ravens.
@@ -53,8 +53,13 @@
};
struct fs_ops file_system[] = {
+#if !defined(_PRIMARY_BOOT) || BOOTXX_FFS_VERSION == 1
FS_OPS(ufs),
FS_OPS(ustarfs),
+#endif
+#if !defined(_PRIMARY_BOOT) || BOOTXX_FFS_VERSION == 2
+ FS_OPS(ffsv2),
+#endif
};
int nfsys = sizeof(file_system)/sizeof(struct fs_ops);
diff -r f99af7e38a94 -r 65e3930440d6 sys/arch/amiga/stand/bootblock/bootxx_ffs/Makefile
--- a/sys/arch/amiga/stand/bootblock/bootxx_ffs/Makefile Thu Feb 25 03:40:27 2021 +0000
+++ b/sys/arch/amiga/stand/bootblock/bootxx_ffs/Makefile Thu Feb 25 03:42:14 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.25 2017/04/09 14:51:52 christos Exp $
+# $NetBSD: Makefile,v 1.26 2021/02/25 03:42:14 rin Exp $
.include <bsd.init.mk>
.include <bsd.sys.mk>
@@ -24,12 +24,21 @@
.SUFFIXES:
.SUFFIXES: .out .o .po .pico .so .s .S .c .cc .C .f .y .l .ln .m4 .sh
-FILES= bootxx_ffs bootxx_fd
+.ifdef BOOTXX_FFSV2
+FILES= bootxx_ffsv2
+FSOBJS= ffsv2.o
+DEFS+= -DBOOTXX_FFS_VERSION=2
+.else
+FILES= bootxx_ffsv1 bootxx_fd
+FSOBJS= ufs.o ustarfs.o
+DEFS+= -DBOOTXX_FFS_VERSION=1
+.endif
+
BINDIR=/usr/mdec
COBJS = main.o console.o xd.o twiddle.o bzero.o gets.o
COBJS+= lseek.o open.o vers.o read.o close.o dev.o errno.o
-COBJS+= ufs.o ustarfs.o panic.o files.o
+COBJS+= ${FSOBJS} panic.o files.o
SOBJS = alloc.o ashrdi3.o ashldi3.o bcopy.o muldi3.o printf.o startit.o
SOBJS += strlen.o strcmp.o fstat.o
@@ -37,7 +46,7 @@
OBJS+= $(SOBJS) $(COBJS)
-DEFS = -D_STANDALONE -DSA_EXEC_ANYOWNER -D_PRIMARY_BOOT -DSERCONSOLE
+DEFS+= -D_STANDALONE -DSA_EXEC_ANYOWNER -D_PRIMARY_BOOT -DSERCONSOLE
.NOPATH: ${OBJS} x.out f.out libboot.a xxstart.o
@@ -45,7 +54,7 @@
realall: ${FILES}
-CLEANFILES += bootxx_ffs bootxx_fd x.out f.out xxstart.o fdstart.o libboot.a
+CLEANFILES += ${FILES} x.out f.out xxstart.o fdstart.o libboot.a
VERSIONFILE=${.CURDIR}/../boot/version
VERSIONFLAGS+=-n
@@ -87,7 +96,11 @@
${_MKTARGET_COMPILE}
${CC} ${CAFLAGS} ${COPTS} -x assembler-with-cpp -o $@ -c $<
-bootxx_ffs: x.out
+bootxx_ffsv1: x.out
+ ${_MKTARGET_CREATE}
+ ${RELOC2BB} x.out $@ || (${NM} -u x.out && false)
+
+bootxx_ffsv2: x.out
${_MKTARGET_CREATE}
${RELOC2BB} x.out $@ || (${NM} -u x.out && false)
diff -r f99af7e38a94 -r 65e3930440d6 sys/arch/amiga/stand/bootblock/bootxx_ffsv2/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/amiga/stand/bootblock/bootxx_ffsv2/Makefile Thu Feb 25 03:42:14 2021 +0000
@@ -0,0 +1,7 @@
+# $NetBSD: Makefile,v 1.1 2021/02/25 03:42:15 rin Exp $
+
+BOOTXX_FFSV2= defined
+
+.PATH: ${.CURDIR}/../bootxx_ffs
+
+.include "../bootxx_ffs/Makefile"
Home |
Main Index |
Thread Index |
Old Index