The network bootloader entry point should be nisse(), not start(). Fixes a

very long-standing netboot issue.

Patch contributed by Hans Rosenfeld.
This commit is contained in:
sekiya 2006-03-08 09:32:22 +00:00
parent cafe884d2c
commit 11927f82ba
2 changed files with 5 additions and 11 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.36 2005/12/11 12:19:30 christos Exp $
# $NetBSD: Makefile,v 1.37 2006/03/08 09:32:22 sekiya Exp $
S= ${.CURDIR}/../../../..
@ -31,19 +31,13 @@ KERN_AS=library
.include "${S}/lib/libkern/Makefile.inc"
LIBKERN=${KERNLIB}
.if ${OBJECT_FMT} == "ELF"
START=start
.else
START=nisse
.endif
.PHONY: vers.c
vers.c: ${.CURDIR}/version
${HOST_SH} ${S}/conf/newvers_stand.sh -NM ${.CURDIR}/version "${MACHINE}"
${PROG}: machine-links ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
${_MKTARGET_LINK}
${LD} -N -Ttext ${RELOC} -e ${START} -o ${PROG}.sym ${OBJS} \
${LD} -N -Ttext ${RELOC} -e nisse -o ${PROG}.sym ${OBJS} \
${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN}
${STRIP} -o ${PROG} ${PROG}.sym

View File

@ -1,4 +1,4 @@
/* $NetBSD: bootxx.c,v 1.23 2006/01/27 07:33:47 he Exp $ */
/* $NetBSD: bootxx.c,v 1.24 2006/03/08 09:32:22 sekiya Exp $ */
/*-
* Copyright (c) 1982, 1986 The Regents of the University of California.
@ -166,8 +166,8 @@ Xmain()
read(io, &tmp, sizeof(tmp));
off += sizeof(tmp);
}
read(io, (void *) ph.p_paddr, ph.p_filesz);
memset((void *) (ph.p_paddr + ph.p_filesz), 0,
read(io, (void *) hdr.elf.e_entry, ph.p_filesz);
memset((void *) (hdr.elf.e_entry + ph.p_filesz), 0,
ph.p_memsz - ph.p_filesz);
} else {
goto die;