[CUWiN-Dev] building a new live cd...

Bill Comisky bcomisky at pobox.com
Wed Jul 19 09:27:49 CDT 2006


On Wed, 19 Jul 2006, dan blah wrote:

> we have a guy using the live cd with a newer atheros based pci card.
> my current guess is that the newer netbsd sources in rev 4053+ will
> fix this or at least narrow down some possible issues.
>
> ./buildiso builds staboot-19-Jul-2006.iso which is 26M but the script
> does give me the following oso'utput:
>
> mkstaboot: begin step 'iso'
> /u4/blah/cuwin/trunk/src/boot-image/./steps.d/iso: cannot open
> /u4/blah/cuwin/scratch/i386/cuw_pc.gz: no such file
> nbinstall: /u4/blah/cuwin/scratch/i386/cuw_pc: stat: No such file or 
> directory
> mkstaboot: finished step 'iso'
>
> i just wanted to make sure the iso i have is good and see what that
> output means.

Sounds like it didn't compile the cuw_pc kernel.. If you run builds back 
to back with different kernels, the build scripts don't know that it 
shouldn't skip the kernel step.  If you start at the kernel or kernelenv 
step, I think it should work.  Also, the missing kernel isn't fatal so the 
creation of the iso will still happen, it just won't boot.

I tweaked a few build files at some point to prevent this from happening; 
if you want you can try the attached patch and see how it works for you.

Bill

--
Bill Comisky
bcomisky at pobox.com
-------------- next part --------------
Index: steps.d/kernelenv
===================================================================
--- steps.d/kernelenv	(revision 4089)
+++ steps.d/kernelenv	(working copy)
@@ -12,3 +12,4 @@
 fi
 
 export KERNEL=${OVERRIDE_KERNEL:-$CUWSRC/kernel-conf/$_kernel}
+[ ! -f $BUILDDIR/$(basename $KERNEL).gz ] && reset_steps_depending_on kernelenv
Index: step.subr
===================================================================
--- step.subr	(revision 4089)
+++ step.subr	(working copy)
@@ -1,3 +1,22 @@
+reverse_deps()
+{
+	local step
+	step=$1
+	awk "/$step\$/ {print \$1;}" $CUWSRC/steps.d/deps
+}
+
+reset_steps_depending_on()
+{
+	local step
+	step=$1
+
+	set -- $(reverse_deps $step)
+	while [ $# -ne 0 ]; do
+		rm -f $BUILDDIR/.$1.begin $BUILDDIR/.$1.end
+		shift
+	done
+}
+
 is_step_skippable()
 {
 	local step
Index: image.subr
===================================================================
--- image.subr	(revision 4089)
+++ image.subr	(working copy)
@@ -102,7 +102,7 @@
 
 	# copy in the kernel
 	kernelname=$(basename $KERNEL)
-	gunzip < ${MACHDIR}/$kernelname.gz > ${MACHDIR}/$kernelname
+	gunzip < ${MACHDIR}/$kernelname.gz > ${MACHDIR}/$kernelname || exit 1
 	$IMAGE_INSTALL -o root -g wheel ${MACHDIR}/$kernelname $INSTDIR/netbsd
 	$IMAGE_INSTALL -o root -g wheel $DESTDIR/usr/mdec/boot $INSTDIR
 
@@ -145,7 +145,7 @@
 
 	kernelname=$(basename $KERNEL)
 	# copy in the kernel
-	gunzip < ${MACHDIR}/$kernelname.gz > ${MACHDIR}/$kernelname
+	gunzip < ${MACHDIR}/$kernelname.gz > ${MACHDIR}/$kernelname || exit 1
 	rm -f $INSTDIR/netbsd
 
 	$TOOL_MAKEFS -x -F $DESTDIR/metalog.image -N $INSTDIR/etc \
@@ -193,7 +193,7 @@
 
 	# copy in the kernel
 	kernelname=$(basename $KERNEL)
-	gunzip < ${MACHDIR}/$kernelname.gz > ${MACHDIR}/$kernelname
+	gunzip < ${MACHDIR}/$kernelname.gz > ${MACHDIR}/$kernelname || exit 1
 	$IMAGE_INSTALL -o root -g wheel ${MACHDIR}/$kernelname $INSTDIR/netbsd
 	$IMAGE_INSTALL -o root -g wheel $DESTDIR/usr/mdec/boot $INSTDIR
 
@@ -290,7 +290,7 @@
 
 	# copy in the kernel
 	kernelname=$(basename $KERNEL)
-	gunzip < ${MACHDIR}/$kernelname.gz > ${MACHDIR}/$kernelname
+	gunzip < ${MACHDIR}/$kernelname.gz > ${MACHDIR}/$kernelname || exit 1
 	$IMAGE_INSTALL -o root -g wheel ${MACHDIR}/$kernelname $INSTDIR/netbsd
 	$IMAGE_INSTALL -o root -g wheel $DESTDIR/usr/mdec/boot $INSTDIR
 


More information about the CU-Wireless-Dev mailing list