Date: Sat, 11 Sep 1999 18:25:43 -0400 (EDT) From: John Baldwin <jobaldwi@vt.edu> To: freebsd-small@FreeBSD.org Subject: Patches for PicoBSD to fix building of custom floppies.. Message-ID: <0FHX00DAP2AOUA@gkar.cc.vt.edu>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] Hey all. I use a custom version of PicoBSD to clone hard drives of workstations running FreeBSD and NT over the network, thus being able to build a custom version of PicoBSD is quite useful for my job. :) To my dismay, I found that the recent changes to Pico's build scripts broke that. So, I fixed it with the attached patch. I've built my custom version successfully several times with this patch. I would appreciate feedback and testing so that this can get committed. --- John Baldwin <jobaldwi@vt.edu> -- http://www.cslab.vt.edu/~jobaldwi/ PGP Key: http://www.cslab.vt.edu/~jobaldwi/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ [-- Attachment #2 --] Index: build =================================================================== RCS file: /src/cvs/src/release/picobsd/build/build,v retrieving revision 1.12.2.6 diff -u -r1.12.2.6 build --- build 1999/08/29 19:18:57 1.12.2.6 +++ build 1999/09/09 01:59:55 @@ -33,6 +33,10 @@ . ../Version +# support symbolically linked custom directory +BUILDDIR=`pwd` +export BUILDDIR + # assign default values to variables. set_defaults() { TYPE=${TYPE:-dial} # PicoBSD type (isp, router, net, custom, ... @@ -89,7 +93,7 @@ # Build the kernel, if necessary echo "" echo "-> Checking if we have to build the PICOBSD kernel..." - (cd ../${TYPE}; make -f ../build/Makefile.conf ) + (cd ../${TYPE}; make -f ${BUILDDIR}/Makefile.conf ) echo "" ./stage1 @@ -121,6 +125,7 @@ CUSTOMLINK=`ls -l ../custom | awk -F\> '{ print $2 }' | awk '{ print $1 }'` if dialog --title "Custom directory setup" --yesno "A custom configuration\n ${CUSTOMLINK}\nalready exists. Would you like to use it?" 7 50 ; then KEEP_CUSTOM=yes + CUST_DIR=${CUSTOMLINK} else KEEP_CUSTOM=no fi @@ -336,7 +341,7 @@ \n\ Your options:\n\ * ^C or [Cancel] to abort,\n\ - * Enter to install \"${FILENAME}\",\n\ + * Enter to install \"picobsd.bin\",\n\ * name of other file to install.\n\ " 20 70 2> ${RISU} if [ "$?" = "0" ]; then Index: stage1 =================================================================== RCS file: /src/cvs/src/release/picobsd/build/stage1,v retrieving revision 1.7.2.5 diff -u -r1.7.2.5 stage1 --- stage1 1999/08/29 15:52:26 1.7.2.5 +++ stage1 1999/09/09 03:23:25 @@ -92,7 +92,7 @@ MFS_RC=floppy.tree/etc/mfs.rc if [ ! -f ${MFS_RC} ] ; then # no private version. use generic mfs.rc - MFS_RC=../${MFS_RC} + MFS_RC=${BUILDDIR}/../${MFS_RC} fi if [ "${INIT}" = "oinit" ] ; then cat ${MFS_RC} | sed -e "s/@VER@/${VER}/g" > /mnt/etc/oinit.rc @@ -101,7 +101,7 @@ if [ -f floppy.tree/etc/mfs.login.conf ] ; then cp floppy.tree/etc/mfs.login.conf /mnt/etc/login.conf else - cp ../floppy.tree/etc/mfs.login.conf /mnt/etc/login.conf + cp ${BUILDDIR}/../floppy.tree/etc/mfs.login.conf /mnt/etc/login.conf fi cat lang/README.${LANGUAGE} | sed -e "s/@VER@/${VER}/g" > /mnt/README fi @@ -178,7 +178,7 @@ echo "-> Populating floppy filesystem..." ### copy floppy tree excluding private files. -excl=../${TYPE}/floppy.tree.exclude +excl=${BUILDDIR}/../${TYPE}/floppy.tree.exclude if [ -f ${excl} ] ; then excl="--exclude-from ${excl}" echo "Exclude following files from ${excl}:\n===" @@ -187,17 +187,17 @@ else excl="" fi -(cd ../floppy.tree ; tar -cf - ${excl} . ) | (cd /mnt ; tar xvf - ) +(cd ${BUILDDIR}/../floppy.tree ; tar -cf - ${excl} . ) | (cd /mnt ; tar xvf - ) -if [ -d ../${TYPE}/floppy.tree ] ; then +if [ -d ${BUILDDIR}/../${TYPE}/floppy.tree ] ; then echo "-> update with private files:" - (cd ../${TYPE}/floppy.tree ; tar cf - . ) | (cd /mnt ; tar xvf - ) + (cd ${BUILDDIR}/../${TYPE}/floppy.tree ; tar cf - . ) | (cd /mnt ; tar xvf - ) fi files="hosts motd" echo "-> Copying language dependent files: ${files} -> /mnt/etc ..." for i in ${files} ; do - cat ../${TYPE}/lang/${i}.${LANGUAGE} | \ + cat ${BUILDDIR}/../${TYPE}/lang/${i}.${LANGUAGE} | \ sed -e "s/@VER@/${VER}/g" > /mnt/etc/${i} done
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0FHX00DAP2AOUA>
