Subject: building -current
To: None <netbsd-help@netbsd.org>
From: Jukka Salmi <jukka-netbsd@2003.salmi.ch>
List: netbsd-help
Date: 01/15/2004 12:39:19
Hi,

after running NetBSD stable for a few months on a i386 machine without
problems I decided to switch that box to a -current kernel and userland.
I fetched sources via CVS (from anoncvs.netbsd.org at about 2004-01-13
00:00:00 GMT), built the tools and a GENERIC kernel and restarted the
machine:

[...]
atapibus0 at atabus1: 2 targets
cd0 at atapibus0 drive 1: <ASUS   CD-S520/A, , 1.6K>, cdrom removable
cd0: 32 bit data port
cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33)
uvm_fault(0xc079e180,0,0,1) -> 0xe
kernel: page fault trap, code=0
Stopped in pid 4.1 (atabus1) at netbsd:kprintf+0x893:   repne scasb   (%esi)
db>

Physically removing the ASUS CD-ROM device and solved this problem...

Building a release failed, too:

# cd /usr/src && ./build.sh -u -D /opt/dst -R /opt/rel release
[..]
#   compile  INSTALL_TINY/subr_xxx.o
/opt/tools/bin/i386--netbsdelf-gcc -ffreestanding -Os -Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wno-sign-compare -Di386 -I. -I/usr/src/sys/arch -I/usr/src/sys -nostdinc -DPIC_DELAY -DMALLOC_NOINLINE -DNVNODE=50 -DNBUF=20 -DNMBCLUSTERS=64 -DMAXUSERS=2 -D_KERNEL -D_KERNEL_OPT -c /usr/src/sys/kern/subr_xxx.c
nbmake: don't know how to make machine/byte_swa`.h. Stop

nbmake: stopped in /opt/obj/sys/arch/i386/compile/INSTALL_TINY

*** Failed target:  kern-INSTALL_TINY
*** Failed command: cd /usr/src/sys/arch/i386/compile/obj/INSTALL_TINY && /opt/tools/bin/nbmake depend && /opt/tools/bin/nbmake
*** Error code 2

Stop.
nbmake: stopped in /usr/src/etc

*** Failed target:  release
*** Failed command: (cd /usr/src/etc && /opt/tools/bin/nbmake INSTALL_DONE=1 release)
*** Error code 1

Stop.
nbmake: stopped in /usr/src

ERROR: failed to make release
*** BUILD ABORTED ***


After this I noticed the following was output to the console:

kernel: page fault trap, code=0
Stopped at      netbsd:mii_bitbang_readreg+0xec:        adcb      %al,0x430b08ec(%ebx)
db>


Hmm...

- Should it be possible to build a -current release from a stable system
  (running a -current GENERIC kernel and using a -current toolchain)? Or
  do I need to install a -current binary snapshot first?

- What could be the source of the release build problem? (I think I can rule
  bad hardware out; I successfully built stable releases on that machine.)


Help is appreciated!

TIA, Jukka

-- 
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~