Subject: port-i386/1641: i386 boot blocks don't build
To: None <gnats-bugs@gnats.netbsd.org>
From: John Kohl <jtk@kolvir.arlington.ma.us>
List: netbsd-bugs
Date: 10/17/1995 22:38:02
>Number:         1641
>Category:       port-i386
>Synopsis:       i386 boot blocks don't build
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 18 07:20:15 1995
>Last-Modified:
>Originator:     John Kohl
>Organization:
NetBSD Kernel Hackers `R` Us
>Release:        NetBSD-current, 1995/10/17
>Environment:
	
System: NetBSD pattern 1.0A NetBSD 1.0A (PATTERN) #191: Wed Oct 11 21:53:46 EDT 1995 jtk@pattern:/u1/NetBSD-current/src/sys/arch/i386/compile/PATTERN i386


>Description:
	The i386 boot blocks don't build, due to old unneeded libkern stuff.
>How-To-Repeat:
try to build them.  You'll get:
ld -Bstatic -e start -N -T 0 -o boot start.o table.o boot.o asm.o bios.o io.o disk.o sys.o version.o lib/kern/libkern.o
io.o: Definition of symbol `_strcmp' (multiply defined)
lib/kern/libkern.o: Definition of symbol `_strcmp' (multiply defined)
*** Error code 1

>Fix:
This fix removes the unneeded libkern, and adds a size check to insure
the blocks don't get too big:

*** /sys/arch/i386/boot/Makefile	Fri Oct 13 21:54:54 1995
--- Makefile	Sun Oct 15 21:18:24 1995
***************
*** 26,40 ****
  
  S=	${.CURDIR}/../../..
  
- ### find out what to use for libkern
- KERNREL=
- .include "$S/lib/libkern/Makefile.inc"
- .ifndef PROF
- LIBKERN=	${KERNLIB}
- .else
- LIBKERN=	${KERNLIB_PROF}
- .endif
- 
  machine-links:
  	-rm -f machine && \
  	    ln -s ${.CURDIR}/../include machine
--- 26,31 ----
***************
*** 68,73 ****
--- 59,68 ----
  
  bootbios:	boot
  	dd if=boot of=bootbios skip=1
+ 	if [ `ls -l bootbios |awk '{print $$5}'` -gt 7152 ]; then \
+ 		echo "bootbios too big"; \
+ 		exit 1; \
+ 	fi
  
  ${DESTDIR}/usr/mdec/bootsd:	bootbios
  	cp bootbios ${DESTDIR}/usr/mdec/bootsd

>Audit-Trail:
>Unformatted: