implement "raw" file system type. this can be used when the primary

bootstrap is being installed at a particular block offset and the underlying
filesystem doesn't matter (e.g, alpha ustarboot in ustar floppies)
This commit is contained in:
lukem 2002-04-30 14:45:12 +00:00
parent 36dc09c47d
commit 80ae5fb69d
3 changed files with 43 additions and 7 deletions

View File

@ -1,11 +1,11 @@
/* $NetBSD: fstypes.c,v 1.1 2002/04/19 07:08:52 lukem Exp $ */
/* $NetBSD: fstypes.c,v 1.2 2002/04/30 14:45:12 lukem Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by Matt Fredette.
* by Matt Fredette and Luke Mewburn.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -37,9 +37,32 @@
*/
#include <sys/types.h>
#include <assert.h>
#include <stdio.h>
#include "installboot.h"
struct ib_fs fstypes[] = {
{ "ffs", ffs_match, ffs_findstage2 },
{ "raw", raw_match, raw_findstage2 },
{ 0, 0, 0 }
};
int
raw_match(ib_params *params)
{
assert(params != NULL);
return (1); /* can always write to a "raw" file system */
}
int
raw_findstage2(ib_params *params, uint32_t *maxblk, ib_block *blocks)
{
assert(params != NULL);
assert(maxblk != NULL);
assert(blocks != NULL);
return (0); /* no stage2 support for raw */
}

View File

@ -1,4 +1,4 @@
.\" $NetBSD: installboot.8,v 1.10 2002/04/22 17:17:36 lukem Exp $
.\" $NetBSD: installboot.8,v 1.11 2002/04/30 14:45:12 lukem Exp $
.\"
.\" Copyright (c) 2002 The NetBSD Foundation, Inc.
.\" All rights reserved.
@ -224,9 +224,19 @@ as the type of
The default operation is to attempt to auto-detect this setting.
The following file system types are currently supported by
.Nm "" :
.Bd -ragged -offset indent
.Sy ffs
.Ed
.
.Bl -tag -offset indent -width ffs
.
.It Sy ffs
.Bx
Fast File System.
.
.It Sy raw
.Sq Raw
image.
Note: the block offset of the secondary bootstrap cannot be searched
for on this file system type.
.El
.
.It Fl v
Verbose operation.
@ -305,6 +315,7 @@ Install the Berkeley Fast File System primary bootstrap on to disk sd0:
.Pp
Remove the primary bootstrap from disk sd1:
.Dl Ic installboot -c /dev/swd1c
.Pp
Install the ISO 9660 primary bootstrap in the file
.Pa /tmp/cd-image :
.Dl Ic installboot -m pmax /tmp/cd-image /usr/mdec/bootxx_cd9660

View File

@ -1,4 +1,4 @@
/* $NetBSD: installboot.h,v 1.6 2002/04/22 17:17:36 lukem Exp $ */
/* $NetBSD: installboot.h,v 1.7 2002/04/30 14:45:12 lukem Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -100,6 +100,8 @@ int no_clearboot(ib_params *);
/* fstypes.c */
int ffs_match(ib_params *);
int ffs_findstage2(ib_params *, uint32_t *, ib_block *);
int raw_match(ib_params *);
int raw_findstage2(ib_params *, uint32_t *, ib_block *);
/* machines.c */
int alpha_parseopt(ib_params *, const char *);