Add UFS2 boot support. Tested on lantank.

This commit is contained in:
tsutsui 2009-04-21 15:17:58 +00:00
parent 78fa90b2d3
commit 6bdfd94ab7
4 changed files with 19 additions and 11 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.boot,v 1.1 2006/09/01 21:26:18 uwe Exp $
# $NetBSD: Makefile.boot,v 1.2 2009/04/21 15:17:58 tsutsui Exp $
PROG?= boot
@ -17,7 +17,8 @@ SRCS+= vers.c
LDFLAGS+= -e boot_start
CFLAGS=
CPPFLAGS= -DSUPPORT_UFS
CPPFLAGS= -DSUPPORT_FFSv1
CPPFLAGS+= -DSUPPORT_FFSv2
CPPFLAGS+= -DSUPPORT_DOSFS
CPPFLAGS+= -DDBMONITOR
#CPPFLAGS+= -DDEBUG

View File

@ -1,4 +1,4 @@
/* $NetBSD: conf.c,v 1.1 2006/09/01 21:26:18 uwe Exp $ */
/* $NetBSD: conf.c,v 1.2 2009/04/21 15:17:58 tsutsui Exp $ */
/*
* Copyright (c) 1996
@ -42,18 +42,20 @@
#include "biosdisk.h"
struct devsw devsw[] = {
#if defined(SUPPORT_UFS)
{ "hd", biosdisk_strategy, biosdisk_open, biosdisk_close, biosdisk_ioctl},
#endif
{ "hd", biosdisk_strategy, biosdisk_open, biosdisk_close,
biosdisk_ioctl},
};
int ndevs = sizeof(devsw) / sizeof(devsw[0]);
struct fs_ops file_system[] = {
#ifdef SUPPORT_UFS
{ ufs_open, ufs_close, ufs_read, ufs_write, ufs_seek, ufs_stat },
#ifdef SUPPORT_FFSv1
FS_OPS(ffsv1),
#endif
#ifdef SUPPORT_FFSv2
FS_OPS(ffsv2),
#endif
#ifdef SUPPORT_DOSFS
{ dosfs_open, dosfs_close, dosfs_read, dosfs_write, dosfs_seek, dosfs_stat },
FS_OPS(dosfs),
#endif
};
int nfsys = sizeof(file_system) / sizeof(file_system[0]);

View File

@ -1,6 +1,6 @@
# $NetBSD: Makefile,v 1.2 2006/11/14 14:09:54 drochner Exp $
# $NetBSD: Makefile,v 1.3 2009/04/21 15:17:58 tsutsui Exp $
SUBDIR= bootxx_ffsv1
SUBDIR= bootxx_ffsv1 bootxx_ffsv2
LIBOBJ= ${.OBJDIR}
.MAKEOVERRIDES+= LIBOBJ

View File

@ -0,0 +1,5 @@
# $NetBSD: Makefile,v 1.1 2009/04/21 15:17:58 tsutsui Exp $
FS= ffsv2
.include "../Makefile.bootxx"