This commit is contained in:
tsutsui 2008-03-02 06:17:41 +00:00
parent b14b0caf09
commit 590ed564a8
7 changed files with 22 additions and 11 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.14 2008/03/01 18:13:02 tsutsui Exp $
# $NetBSD: Makefile,v 1.15 2008/03/02 06:17:41 tsutsui Exp $
NOMAN= # defined
@ -63,6 +63,10 @@ CPPFLAGS+= -DSUPPORT_DHCP -DSUPPORT_BOOTP
# compiler flags for smallest code size
CFLAGS= -Os -mmemcpy -ffreestanding -mno-abicalls -msoft-float -G 128
CFLAGS+= -Wall -Werror
CFLAGS+= -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
CFLAGS+= -Wno-pointer-sign
NETBSD_VERS!= ${HOST_SH} ${S}/conf/osrelease.sh
CPPFLAGS+= -DNETBSD_VERS='"${NETBSD_VERS}"'

View File

@ -1,4 +1,4 @@
/* $NetBSD: boot.c,v 1.12 2008/03/01 18:13:02 tsutsui Exp $ */
/* $NetBSD: boot.c,v 1.13 2008/03/02 06:17:41 tsutsui Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@ -429,6 +429,8 @@ main(unsigned int memsize)
try_bootp = 1;
/* Initialize boot info early */
dev = NULL;
kernel = NULL;
howto = 0x0;
bi_flags.bi_flags = 0x0;
bi_addr = bi_init();

View File

@ -1,4 +1,4 @@
/* $NetBSD: com.c,v 1.6 2007/10/17 19:54:09 garbled Exp $ */
/* $NetBSD: com.c,v 1.7 2008/03/02 06:17:41 tsutsui Exp $ */
/*-
* Copyright (c) 1993, 1994, 1995, 1996, 1997
@ -65,6 +65,8 @@
*/
#include <sys/types.h>
#include <lib/libsa/stand.h>
#include "boot.h"
#define COM_FREQ 1843200 /* 16-bit baud rate divisor */
#define COM_TOLERANCE 30 /* baud rate tolerance, in 0.1% units */

View File

@ -1,4 +1,4 @@
/* $NetBSD: devopen.c,v 1.4 2007/10/30 15:07:08 tsutsui Exp $ */
/* $NetBSD: devopen.c,v 1.5 2008/03/02 06:17:41 tsutsui Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@ -96,6 +96,7 @@ devparse(const char *fname, int *dev, uint8_t *unit, uint8_t *part,
return EPART;
/* partition number */
p = 0;
if (i < devlen)
p = fname[i++] - 'a';

View File

@ -1,4 +1,4 @@
/* $NetBSD: prf.c,v 1.3 2007/10/17 19:54:09 garbled Exp $ */
/* $NetBSD: prf.c,v 1.4 2008/03/02 06:17:41 tsutsui Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@ -37,6 +37,7 @@
*/
#include <lib/libsa/stand.h>
#include "boot.h"
void
putchar(int c)

View File

@ -1,4 +1,4 @@
/* $NetBSD: wd.c,v 1.8 2007/10/17 19:54:09 garbled Exp $ */
/* $NetBSD: wd.c,v 1.9 2008/03/02 06:17:41 tsutsui Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@ -40,6 +40,7 @@
#include <sys/stdint.h>
#include <lib/libsa/stand.h>
#include <lib/libkern/libkern.h>
#include <machine/param.h>
#include <machine/stdarg.h>
@ -243,12 +244,13 @@ wdclose(struct open_file *f)
* Read some data.
*/
int
wdstrategy(void *f, int rw, daddr_t dblk, size_t size, void *buf, size_t *rsize)
wdstrategy(void *f, int rw, daddr_t dblk, size_t size, void *p, size_t *rsize)
{
int i, nsect;
daddr_t blkno;
struct wd_softc *wd;
struct partition *pp;
uint8_t *buf;
if (size == 0)
return 0;
@ -256,6 +258,7 @@ wdstrategy(void *f, int rw, daddr_t dblk, size_t size, void *buf, size_t *rsize)
if (rw != F_READ)
return EOPNOTSUPP;
buf = p;
wd = f;
pp = &wd->sc_label.d_partitions[wd->sc_part];

View File

@ -1,4 +1,4 @@
/* $NetBSD: wdc.c,v 1.9 2007/10/17 19:54:10 garbled Exp $ */
/* $NetBSD: wdc.c,v 1.10 2008/03/02 06:17:41 tsutsui Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@ -118,7 +118,7 @@ __wdcwait_reset(struct wdc_channel *chp, int drv_mask)
static int
wdcprobe(struct wdc_channel *chp)
{
uint8_t st0, st1, sc, sn, cl, ch;
uint8_t st0, st1;
uint8_t ret_value = 0x03;
uint8_t drive;
int found;
@ -227,7 +227,6 @@ wdc_read_block(struct wd_softc *sc, struct wdc_command *wd_c)
int
wdccommand(struct wd_softc *sc, struct wdc_command *wd_c)
{
uint8_t err;
struct wdc_channel *chp = &sc->sc_channel;
#if 0
@ -264,7 +263,6 @@ wdccommand(struct wd_softc *sc, struct wdc_command *wd_c)
int
wdccommandext(struct wd_softc *wd, struct wdc_command *wd_c)
{
uint8_t err;
struct wdc_channel *chp = &wd->sc_channel;
/* Select drive, head, and addressing mode. */