From bugmaster at FreeBSD.org Mon Jun 1 11:06:49 2009 From: bugmaster at FreeBSD.org (FreeBSD bugmaster) Date: Mon Jun 1 11:07:43 2009 Subject: Current problem reports assigned to freebsd-embedded@FreeBSD.org Message-ID: <200906011106.n51B6mb8021016@freefall.freebsd.org> Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/101228 embedded [nanobsd] [patch] Two more entries for FlashDevice.sub o misc/52256 embedded [picobsd] picobsd build script does not read in user/s o kern/42728 embedded [picobsd] many problems in src/usr.sbin/ppp/* after c o misc/15876 embedded [picobsd] PicoBSD message of the day problems 4 problems total. From nick at van-laarhoven.org Fri Jun 5 12:31:57 2009 From: nick at van-laarhoven.org (Nick Hibma) Date: Fri Jun 5 12:32:05 2009 Subject: nanobsd change Message-ID: <200906051412.01425.nick@van-laarhoven.org> Folks, below a patch included (I think attachments are stripped) that changes most occurrences of MAKEOBJDIRPREFIX to NANO_OBJ as that is what it should be. The idea is to be able to set them differently and reuse a build world. I have several (20+) image configurations and can't store all make worlds, nor do I need to rebuild the world very often. MAKEOBJDIRPREFIX=/usr/obj/nanobsd/ NANO_OBJ=/usr/obj/nanobsd.image1/ will build the world in /usr/obj/nanobsd/usr... and then install the world into /usr/obj/nanobsd.image1/_.w/ The _.bw log file is stored in MAKEOBJDIRPREFX, the rest in NANO_OBJ. Poul-Henning, I've included you as you have done the implementation of that aspect and no one has changed anything of that since then. Perhaps there is a hidden reason why it is like it is now? Any objections? If none I will commit this change next week once I have played with it some more. Cheers, Nick Index: /usr/src/tools/tools/nanobsd/nanobsd.sh =================================================================== --- /usr/src/tools/tools/nanobsd/nanobsd.sh (revision 190447) +++ /usr/src/tools/tools/nanobsd/nanobsd.sh (working copy) @@ -51,7 +51,6 @@ # Object tree directory # default is subdir of /usr/obj -# XXX: MAKEOBJDIRPREFIX handling... ? #NANO_OBJ="" # The directory to put the final images @@ -147,21 +146,23 @@ clean_build ( ) ( pprint 2 "Clean and create object directory (${MAKEOBJDIRPREFIX})" - if rm -rf ${MAKEOBJDIRPREFIX} > /dev/null 2>&1 ; then - true - else + if ! rm -rf ${MAKEOBJDIRPREFIX} > /dev/null 2>&1 ; then chflags -R noschg ${MAKEOBJDIRPREFIX} rm -rf ${MAKEOBJDIRPREFIX} fi - mkdir -p ${MAKEOBJDIRPREFIX} - printenv > ${MAKEOBJDIRPREFIX}/_.env + if ! rm -rf ${NANO_OBJ} > /dev/null 2>&1 ; then + chflags -R noschg ${NANO_OBJ} + rm -rf ${NANO_OBJ} + fi + mkdir -p ${MAKEOBJDIRPREFIX} ${NANO_OBJ} + printenv > ${NANO_OBJ}/_.env ) make_conf_build ( ) ( - pprint 2 "Construct build make.conf ($NANO_MAKE_CONF)" + pprint 2 "Construct build make.conf ($NANO_MAKE_CONF_BUILD)" - echo "${CONF_WORLD}" > ${NANO_MAKE_CONF} - echo "${CONF_BUILD}" >> ${NANO_MAKE_CONF} + echo "${CONF_WORLD}" > ${NANO_MAKE_CONF_BUILD} + echo "${CONF_BUILD}" >> ${NANO_MAKE_CONF_BUILD} ) build_world ( ) ( @@ -170,13 +171,13 @@ cd ${NANO_SRC} env TARGET_ARCH=${NANO_ARCH} ${NANO_PMAKE} \ - __MAKE_CONF=${NANO_MAKE_CONF} buildworld \ + __MAKE_CONF=${NANO_MAKE_CONF_BUILD} buildworld \ > ${MAKEOBJDIRPREFIX}/_.bw 2>&1 ) build_kernel ( ) ( pprint 2 "build kernel ($NANO_KERNEL)" - pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.bk" + pprint 3 "log: ${NANO_OBJ}/_.bk" if [ -f ${NANO_KERNEL} ] ; then cp ${NANO_KERNEL} ${NANO_SRC}/sys/${NANO_ARCH}/conf @@ -188,8 +189,8 @@ unset TARGET_CPUTYPE unset TARGET_BIG_ENDIAN env TARGET_ARCH=${NANO_ARCH} ${NANO_PMAKE} buildkernel \ - __MAKE_CONF=${NANO_MAKE_CONF} KERNCONF=`basename ${NANO_KERNEL}` \ - > ${MAKEOBJDIRPREFIX}/_.bk 2>&1 + __MAKE_CONF=${NANO_MAKE_CONF_BUILD} KERNCONF=`basename ${NANO_KERNEL}` \ + > ${NANO_OBJ}/_.bk 2>&1 ) ) @@ -205,45 +206,45 @@ ) make_conf_install ( ) ( - pprint 2 "Construct install make.conf ($NANO_MAKE_CONF)" + pprint 2 "Construct install make.conf ($NANO_MAKE_CONF_INSTALL)" - echo "${CONF_WORLD}" > ${NANO_MAKE_CONF} - echo "${CONF_INSTALL}" >> ${NANO_MAKE_CONF} + echo "${CONF_WORLD}" > ${NANO_MAKE_CONF_INSTALL} + echo "${CONF_INSTALL}" >> ${NANO_MAKE_CONF_INSTALL} ) install_world ( ) ( pprint 2 "installworld" - pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.iw" + pprint 3 "log: ${NANO_OBJ}/_.iw" cd ${NANO_SRC} env TARGET_ARCH=${NANO_ARCH} \ - ${NANO_PMAKE} __MAKE_CONF=${NANO_MAKE_CONF} installworld \ + ${NANO_PMAKE} __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} installworld \ DESTDIR=${NANO_WORLDDIR} \ - > ${MAKEOBJDIRPREFIX}/_.iw 2>&1 + > ${NANO_OBJ}/_.iw 2>&1 chflags -R noschg ${NANO_WORLDDIR} ) install_etc ( ) ( pprint 2 "install /etc" - pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.etc" + pprint 3 "log: ${NANO_OBJ}/_.etc" cd ${NANO_SRC} env TARGET_ARCH=${NANO_ARCH} \ - ${NANO_PMAKE} __MAKE_CONF=${NANO_MAKE_CONF} distribution \ + ${NANO_PMAKE} __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} distribution \ DESTDIR=${NANO_WORLDDIR} \ - > ${MAKEOBJDIRPREFIX}/_.etc 2>&1 + > ${NANO_OBJ}/_.etc 2>&1 ) install_kernel ( ) ( pprint 2 "install kernel" - pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.ik" + pprint 3 "log: ${NANO_OBJ}/_.ik" cd ${NANO_SRC} env TARGET_ARCH=${NANO_ARCH} ${NANO_PMAKE} installkernel \ DESTDIR=${NANO_WORLDDIR} \ - __MAKE_CONF=${NANO_MAKE_CONF} KERNCONF=`basename ${NANO_KERNEL}` \ - > ${MAKEOBJDIRPREFIX}/_.ik 2>&1 + __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} KERNCONF=`basename ${NANO_KERNEL}` \ + > ${NANO_OBJ}/_.ik 2>&1 ) run_customize() ( @@ -252,9 +253,9 @@ for c in $NANO_CUSTOMIZE do pprint 2 "customize \"$c\"" - pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.cust.$c" + pprint 3 "log: ${NANO_OBJ}/_.cust.$c" pprint 4 "`type $c`" - ( $c ) > ${MAKEOBJDIRPREFIX}/_.cust.$c 2>&1 + ( $c ) > ${NANO_OBJ}/_.cust.$c 2>&1 done ) @@ -264,15 +265,15 @@ for c in $NANO_LATE_CUSTOMIZE do pprint 2 "late customize \"$c\"" - pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.late_cust.$c" + pprint 3 "log: ${NANO_OBJ}/_.late_cust.$c" pprint 4 "`type $c`" - ( $c ) > ${MAKEOBJDIRPREFIX}/_.late_cust.$c 2>&1 + ( $c ) > ${NANO_OBJ}/_.late_cust.$c 2>&1 done ) setup_nanobsd ( ) ( pprint 2 "configure nanobsd setup" - pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.dl" + pprint 3 "log: ${NANO_OBJ}/_.dl" ( cd ${NANO_WORLDDIR} @@ -312,7 +313,7 @@ rm tmp || true ln -s var/tmp tmp - ) > ${MAKEOBJDIRPREFIX}/_.dl 2>&1 + ) > ${NANO_OBJ}/_.dl 2>&1 ) setup_nanobsd_etc ( ) ( @@ -348,7 +349,7 @@ create_i386_diskimage ( ) ( pprint 2 "build diskimage" - pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.di" + pprint 3 "log: ${NANO_OBJ}/_.di" ( echo $NANO_MEDIASIZE $NANO_IMAGES \ @@ -417,10 +418,10 @@ # for booting the image from a USB device to work. print "a 1" } - ' > ${MAKEOBJDIRPREFIX}/_.fdisk + ' > ${NANO_OBJ}/_.fdisk IMG=${NANO_DISKIMGDIR}/${NANO_IMGNAME} - MNT=${MAKEOBJDIRPREFIX}/_.mnt + MNT=${NANO_OBJ}/_.mnt mkdir -p ${MNT} if [ "${NANO_MD_BACKING}" = "swap" ] ; then @@ -429,14 +430,14 @@ else echo "Creating md backing file..." dd if=/dev/zero of=${IMG} bs=${NANO_SECTS}b \ count=`expr ${NANO_MEDIASIZE} / ${NANO_SECTS}` MD=`mdconfig -a -t vnode -f ${IMG} -x ${NANO_SECTS} \ -y ${NANO_HEADS}` fi trap "df -i ${MNT} ; umount ${MNT} || true ; mdconfig -d -u $MD" 1 2 15 EXIT - fdisk -i -f ${MAKEOBJDIRPREFIX}/_.fdisk ${MD} + fdisk -i -f ${NANO_OBJ}/_.fdisk ${MD} fdisk ${MD} # XXX: params # XXX: pick up cached boot* files, they may not be in image anymore. @@ -446,27 +447,26 @@ # Create first image newfs ${NANO_NEWFS} /dev/${MD}s1a mount /dev/${MD}s1a ${MNT} df -i ${MNT} echo "Copying worlddir..." ( cd ${NANO_WORLDDIR} && find . -print | cpio -dump ${MNT} ) df -i ${MNT} echo "Generating mtree..." - ( cd ${MNT} && mtree -c ) > ${MAKEOBJDIRPREFIX}/_.mtree - ( cd ${MNT} && du -k ) > ${MAKEOBJDIRPREFIX}/_.du + ( cd ${MNT} && mtree -c ) > ${NANO_OBJ}/_.mtree + ( cd ${MNT} && du -k ) > ${NANO_OBJ}/_.du umount ${MNT} if [ $NANO_IMAGES -gt 1 -a $NANO_INIT_IMG2 -gt 0 ] ; then # Duplicate to second image (if present) echo "Duplicating to second image..." dd if=/dev/${MD}s1 of=/dev/${MD}s2 bs=64k mount /dev/${MD}s2a ${MNT} for f in ${MNT}/etc/fstab ${MNT}/conf/base/etc/fstab do sed -i "" "s/${NANO_DRIVE}s1/${NANO_DRIVE}s2/g" $f done umount ${MNT} - fi # Create Config slice @@ -485,16 +485,16 @@ fi echo "Writing out _.disk.image..." dd if=/dev/${MD}s1 of=${NANO_DISKIMGDIR}/_.disk.image bs=64k mdconfig -d -u $MD - ) > ${MAKEOBJDIRPREFIX}/_.di 2>&1 + ) > ${NANO_OBJ}/_.di 2>&1 ) last_orders () ( # Redefine this function with any last orders you may have # after the build completed, for instance to copy the finished # image to a more convenient place: - # cp ${MAKEOBJDIRPREFIX}/_.disk.image /home/ftp/pub/nanobsd.disk + # cp ${NANO_OBJ}/_.disk.image /home/ftp/pub/nanobsd.disk ) ####################################################################### @@ -751,19 +751,13 @@ ####################################################################### # Setup and Export Internal variables # -if [ "x${NANO_OBJ}" = "x" ] ; then - MAKEOBJDIRPREFIX=/usr/obj/nanobsd.${NANO_NAME}/ - NANO_OBJ=${MAKEOBJDIRPREFIX} -else - MAKEOBJDIRPREFIX=${NANO_OBJ} -fi - -if [ "x${NANO_DISKIMGDIR}" = "x" ] ; then - NANO_DISKIMGDIR=${MAKEOBJDIRPREFIX} -fi - -NANO_WORLDDIR=${MAKEOBJDIRPREFIX}/_.w -NANO_MAKE_CONF=${MAKEOBJDIRPREFIX}/make.conf +test -n "${NANO_OBJ}" || NANO_OBJ=/usr/obj/nanobsd.${NANO_NAME}/ +test -n "${MAKEOBJDIRPREFIX}" || MAKEOBJDIRPREFIX=${NANO_OBJ} +test -n "${NANO_DISKIMGDIR}" || NANO_DISKIMGDIR=${NANO_OBJ} + +NANO_WORLDDIR=${NANO_OBJ}/_.w +NANO_MAKE_CONF_BUILD=${MAKEOBJDIRPREFIX}/make.conf.build +NANO_MAKE_CONF_INSTALL=${NANO_OBJ}/make.conf.install if [ -d ${NANO_TOOLS} ] ; then true @@ -791,7 +785,8 @@ export NANO_HEADS export NANO_IMAGES export NANO_IMGNAME -export NANO_MAKE_CONF +export NANO_MAKE_CONF_BUILD +export NANO_MAKE_CONF_INSTALL export NANO_MEDIASIZE export NANO_NAME export NANO_NEWFS @@ -840,7 +835,7 @@ run_late_customize if $do_image ; then create_${NANO_ARCH}_diskimage - echo "# Created NanoBSD disk image: ${MAKEOBJDIRPREFIX}/${NANO_IMGNAME}" + echo "# Created NanoBSD disk image: ${NANO_DISKIMGDIR}/${NANO_IMGNAME}" else pprint 2 "Skipping image build (as instructed)" fi From phk at phk.freebsd.dk Fri Jun 5 20:46:24 2009 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Fri Jun 5 20:46:53 2009 Subject: nanobsd change In-Reply-To: Your message of "Fri, 05 Jun 2009 14:12:00 +0200." <200906051412.01425.nick@van-laarhoven.org> Message-ID: <7266.1244233828@critter.freebsd.dk> In message <200906051412.01425.nick@van-laarhoven.org>, Nick Hibma writes: >Folks, > >below a patch included (I think attachments are stripped) that changes most >occurrences of MAKEOBJDIRPREFIX to NANO_OBJ as that is what it should be. > >The idea is to be able to set them differently and reuse a build world. I >have several (20+) image configurations and can't store all make worlds, >nor do I need to rebuild the world very often. > > MAKEOBJDIRPREFIX=/usr/obj/nanobsd/ > NANO_OBJ=/usr/obj/nanobsd.image1/ Sounds sensible, go ahead and commit. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From linimon at FreeBSD.org Fri Jun 5 21:44:24 2009 From: linimon at FreeBSD.org (linimon@FreeBSD.org) Date: Fri Jun 5 21:44:31 2009 Subject: misc/135301: [tinybsd] [patch] Patch for fix architecture support for tinybsd script Message-ID: <200906052144.n55LiNRO008387@freefall.freebsd.org> Old Synopsis: Patch for fix architecture support for tinybsd script New Synopsis: [tinybsd] [patch] Patch for fix architecture support for tinybsd script Responsible-Changed-From-To: freebsd-bugs->freebsd-embedded Responsible-Changed-By: linimon Responsible-Changed-When: Fri Jun 5 21:43:40 UTC 2009 Responsible-Changed-Why: Over to maintainer(s). http://www.freebsd.org/cgi/query-pr.cgi?pr=135301 From bugmaster at FreeBSD.org Mon Jun 8 11:06:51 2009 From: bugmaster at FreeBSD.org (FreeBSD bugmaster) Date: Mon Jun 8 11:07:50 2009 Subject: Current problem reports assigned to freebsd-embedded@FreeBSD.org Message-ID: <200906081106.n58B6nN3020583@freefall.freebsd.org> Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o misc/135301 embedded [tinybsd] [patch] Patch for fix architecture support f o kern/101228 embedded [nanobsd] [patch] Two more entries for FlashDevice.sub o misc/52256 embedded [picobsd] picobsd build script does not read in user/s o kern/42728 embedded [picobsd] many problems in src/usr.sbin/ppp/* after c o misc/15876 embedded [picobsd] PicoBSD message of the day problems 5 problems total. From jmelo at freebsdbrasil.com.br Mon Jun 8 13:31:20 2009 From: jmelo at freebsdbrasil.com.br (Jean Milanez Melo) Date: Mon Jun 8 13:31:36 2009 Subject: misc/135301: [tinybsd] [patch] Patch for fix architecture support for tinybsd script In-Reply-To: <200906052144.n55LiNRO008387@freefall.freebsd.org> References: <200906052144.n55LiNRO008387@freefall.freebsd.org> Message-ID: <4A2D0C60.9070903@freebsdbrasil.com.br> linimon@FreeBSD.org wrote: > Old Synopsis: Patch for fix architecture support for tinybsd script > New Synopsis: [tinybsd] [patch] Patch for fix architecture support for tinybsd script > > Responsible-Changed-From-To: freebsd-bugs->freebsd-embedded > Responsible-Changed-By: linimon > Responsible-Changed-When: Fri Jun 5 21:43:40 UTC 2009 > Responsible-Changed-Why: > Over to maintainer(s). > > http://www.freebsd.org/cgi/query-pr.cgi?pr=135301 > _______________________________________________ > freebsd-embedded@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-embedded > To unsubscribe, send any mail to "freebsd-embedded-unsubscribe@freebsd.org" I approve this patch, any src committer could commit it? Thanks Jean From remko at elvandar.org Mon Jun 8 14:00:05 2009 From: remko at elvandar.org (Remko Lodder) Date: Mon Jun 8 14:00:11 2009 Subject: misc/135301: [tinybsd] [patch] Patch for fix architecture support for tinybsd script In-Reply-To: <4A2D0C60.9070903@freebsdbrasil.com.br> References: <200906052144.n55LiNRO008387@freefall.freebsd.org> <4A2D0C60.9070903@freebsdbrasil.com.br> Message-ID: <505b61e199f6e15b0a65d89cdca87a6c.squirrel@galain.elvandar.org> On Mon, June 8, 2009 3:04 pm, Jean Milanez Melo wrote: > linimon@FreeBSD.org wrote: >> Old Synopsis: Patch for fix architecture support for tinybsd script >> New Synopsis: [tinybsd] [patch] Patch for fix architecture support for >> tinybsd script >> >> Responsible-Changed-From-To: freebsd-bugs->freebsd-embedded >> Responsible-Changed-By: linimon >> Responsible-Changed-When: Fri Jun 5 21:43:40 UTC 2009 >> Responsible-Changed-Why: >> Over to maintainer(s). >> >> http://www.freebsd.org/cgi/query-pr.cgi?pr=135301 >> _______________________________________________ > > I approve this patch, any src committer could commit it? > > Thanks > Jean Mail me :-) -- /"\ Best regards, | remko@FreeBSD.org \ / Remko Lodder | remko@EFnet X http://www.evilcoder.org/ | / \ ASCII Ribbon Campaign | Against HTML Mail and News From andrew at fubar.geek.nz Sat Jun 13 11:27:40 2009 From: andrew at fubar.geek.nz (Andrew Turner) Date: Sat Jun 13 11:27:48 2009 Subject: Devices with NAND flash Message-ID: <20090613231155.6f442915@fubar.geek.nz> I'm looking for people to help port my NAND Flash driver [1] to more devices. I'm interested in porting the driver to a device that is currently supported by FreeBSD. If anyone has access to a device that boots FreeBSD and has NAND Flash attached could they contact me. Andrew [1] http://github.com/zxombie/freebsd-nand/tree/master From bugmaster at FreeBSD.org Mon Jun 15 11:06:52 2009 From: bugmaster at FreeBSD.org (FreeBSD bugmaster) Date: Mon Jun 15 11:07:40 2009 Subject: Current problem reports assigned to freebsd-embedded@FreeBSD.org Message-ID: <200906151106.n5FB6pxk076856@freefall.freebsd.org> Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o misc/135301 embedded [tinybsd] [patch] Patch for fix architecture support f o kern/101228 embedded [nanobsd] [patch] Two more entries for FlashDevice.sub o misc/52256 embedded [picobsd] picobsd build script does not read in user/s o kern/42728 embedded [picobsd] many problems in src/usr.sbin/ppp/* after c o misc/15876 embedded [picobsd] PicoBSD message of the day problems 5 problems total. From edwin at FreeBSD.org Tue Jun 16 12:06:14 2009 From: edwin at FreeBSD.org (edwin@FreeBSD.org) Date: Tue Jun 16 12:06:20 2009 Subject: kern/101228: [nanobsd] [patch] Two more entries for FlashDevice.sub Message-ID: <200906161206.n5GC6DjM081967@freefall.freebsd.org> Synopsis: [nanobsd] [patch] Two more entries for FlashDevice.sub State-Changed-From-To: open->patched State-Changed-By: edwin State-Changed-When: Tue Jun 16 12:05:47 UTC 2009 State-Changed-Why: Commited to head, waiting for MFC. Responsible-Changed-From-To: freebsd-embedded->edwin Responsible-Changed-By: edwin Responsible-Changed-When: Tue Jun 16 12:05:47 UTC 2009 Responsible-Changed-Why: I'll handle the MFC http://www.freebsd.org/cgi/query-pr.cgi?pr=101228 From vwe at FreeBSD.org Tue Jun 16 21:02:16 2009 From: vwe at FreeBSD.org (vwe@FreeBSD.org) Date: Tue Jun 16 21:02:28 2009 Subject: misc/135588: [nanobsd] simple patch for adding amd64 support Message-ID: <200906162102.n5GL2F9W097937@freefall.freebsd.org> Synopsis: [nanobsd] simple patch for adding amd64 support Responsible-Changed-From-To: freebsd-bugs->freebsd-embedded Responsible-Changed-By: vwe Responsible-Changed-When: Tue Jun 16 21:00:32 UTC 2009 Responsible-Changed-Why: I hate code duplication. If it's really the same code, there's no need to copy'n paste. It's much simpler to maintain something like the following patch. Over to maintainer(s). sample replacement patch may look like: --- nanobsd.sh.orig 2009-06-16 22:56:29.000000000 +0200 +++ nanobsd.sh 2009-06-16 23:00:09.000000000 +0200 @@ -490,6 +490,10 @@ ) > ${MAKEOBJDIRPREFIX}/_.di 2>&1 ) +create_amd64_diskimage ( ) ( + create_i386_diskimage $@ +) + last_orders () ( # Redefine this function with any last orders you may have # after the build completed, for instance to copy the finished http://www.freebsd.org/cgi/query-pr.cgi?pr=135588 From nick at van-laarhoven.org Thu Jun 18 12:04:57 2009 From: nick at van-laarhoven.org (Nick Hibma) Date: Thu Jun 18 12:05:04 2009 Subject: svn commit: r194431 - head/tools/tools/nanobsd Message-ID: <200906181404.48264.nick@van-laarhoven.org> I've just committed a change to nanobsd that allows to build multiple different images with one built world. This is convenient if you, like us, have several projects with different nanobsd.conf files which create different images, but based on the same image. If you do not use this feature, this should be a no-op. Let me know if you run into problems. Nick > Author: n_hibma > Date: Thu Jun 18 10:39:08 2009 > New Revision: 194431 > URL: http://svn.freebsd.org/changeset/base/194431 > > Log: > Allow building world into a separate dir (for reuse in multiple > images): - buildworld and buildkernel are built into MAKEOBJDIRPREFIX > - installworld and installkernel are performed on NANO_OBJ. > > No change of functionality if MAKEOBJDIRPREFIX is not set. If it is > sea,t clean_world deletes NANO_OBJ instead of NANO_WORLDDIR. By starting > nanobsd.sh with the -b option the existing world can be reused to build a > new world reducing time and disk space considerably. > > While there: > - Fix two cases where (in comments) MAKEOBJDIRPREFIX should have been > NANO_DISKIMGDIR. > - Simplify an 'if (not wrong); then true; else action; fi' into > 'if wrong; then action; fi'. 'if ! false; then echo hello; fi' > produces hello. > > Note: Make sure you use NANO_OBJ were you use MAKEOBJDIRPREFIX now in > your nanobsd.conf files if you want to split out. > > Modified: > head/tools/tools/nanobsd/nanobsd.sh > > Modified: head/tools/tools/nanobsd/nanobsd.sh > ========================================================================= >===== --- head/tools/tools/nanobsd/nanobsd.sh Thu Jun 18 09:55:26 > 2009 (r194430) +++ head/tools/tools/nanobsd/nanobsd.sh Thu Jun 18 > 10:39:08 2009 (r194431) @@ -51,7 +51,6 @@ NANO_PACKAGE_LIST="*" > > # Object tree directory > # default is subdir of /usr/obj > -# XXX: MAKEOBJDIRPREFIX handling... ? > #NANO_OBJ="" > > # The directory to put the final images > @@ -147,21 +146,19 @@ NANO_ARCH=i386 > clean_build ( ) ( > pprint 2 "Clean and create object directory (${MAKEOBJDIRPREFIX})" > > - if rm -rf ${MAKEOBJDIRPREFIX} > /dev/null 2>&1 ; then > - true > - else > + if ! rm -rf ${MAKEOBJDIRPREFIX} > /dev/null 2>&1 ; then > chflags -R noschg ${MAKEOBJDIRPREFIX} > - rm -rf ${MAKEOBJDIRPREFIX} > + rm -r ${MAKEOBJDIRPREFIX} > fi > mkdir -p ${MAKEOBJDIRPREFIX} > printenv > ${MAKEOBJDIRPREFIX}/_.env > ) > > make_conf_build ( ) ( > - pprint 2 "Construct build make.conf ($NANO_MAKE_CONF)" > + pprint 2 "Construct build make.conf ($NANO_MAKE_CONF_BUILD)" > > - echo "${CONF_WORLD}" > ${NANO_MAKE_CONF} > - echo "${CONF_BUILD}" >> ${NANO_MAKE_CONF} > + echo "${CONF_WORLD}" > ${NANO_MAKE_CONF_BUILD} > + echo "${CONF_BUILD}" >> ${NANO_MAKE_CONF_BUILD} > ) > > build_world ( ) ( > @@ -170,7 +167,7 @@ build_world ( ) ( > > cd ${NANO_SRC} > env TARGET_ARCH=${NANO_ARCH} ${NANO_PMAKE} \ > - __MAKE_CONF=${NANO_MAKE_CONF} buildworld \ > + __MAKE_CONF=${NANO_MAKE_CONF_BUILD} buildworld \ > > > ${MAKEOBJDIRPREFIX}/_.bw 2>&1 > > ) > > @@ -188,62 +185,70 @@ build_kernel ( ) ( > unset TARGET_CPUTYPE > unset TARGET_BIG_ENDIAN > env TARGET_ARCH=${NANO_ARCH} ${NANO_PMAKE} buildkernel \ > - __MAKE_CONF=${NANO_MAKE_CONF} KERNCONF=`basename ${NANO_KERNEL}` \ > - > ${MAKEOBJDIRPREFIX}/_.bk 2>&1 > + __MAKE_CONF=${NANO_MAKE_CONF_BUILD} KERNCONF=`basename ${NANO_KERNEL}` > \ + > ${NANO_OBJ}/_.bk 2>&1 > ) > ) > > clean_world ( ) ( > - pprint 2 "Clean and create world directory (${NANO_WORLDDIR})" > - if rm -rf ${NANO_WORLDDIR}/ > /dev/null 2>&1 ; then > - true > + if [ "${NANO_OBJ}" != "${MAKEOBJDIRPREFIX}" ]; then > + pprint 2 "Clean and create object directory (${NANO_OBJ})" > + if ! rm -rf ${NANO_OBJ} > /dev/null 2>&1 ; then > + chflags -R noschg ${NANO_OBJ} > + rm -r ${NANO_OBJ} > + fi > + mkdir -p ${NANO_OBJ} ${NANO_WORLDDIR} > + printenv > ${NANO_OBJ}/_.env > else > - chflags -R noschg ${NANO_WORLDDIR}/ > - rm -rf ${NANO_WORLDDIR}/ > + pprint 2 "Clean and create world directory (${NANO_WORLDDIR})" > + if ! rm -rf ${NANO_WORLDDIR}/ > /dev/null 2>&1 ; then > + chflags -R noschg ${NANO_WORLDDIR} > + rm -rf ${NANO_WORLDDIR} > + fi > + mkdir -p ${NANO_WORLDDIR} > fi > - mkdir -p ${NANO_WORLDDIR}/ > ) > > make_conf_install ( ) ( > - pprint 2 "Construct install make.conf ($NANO_MAKE_CONF)" > + pprint 2 "Construct install make.conf ($NANO_MAKE_CONF_INSTALL)" > > - echo "${CONF_WORLD}" > ${NANO_MAKE_CONF} > - echo "${CONF_INSTALL}" >> ${NANO_MAKE_CONF} > + echo "${CONF_WORLD}" > ${NANO_MAKE_CONF_INSTALL} > + echo "${CONF_INSTALL}" >> ${NANO_MAKE_CONF_INSTALL} > ) > > install_world ( ) ( > pprint 2 "installworld" > - pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.iw" > + pprint 3 "log: ${NANO_OBJ}/_.iw" > > cd ${NANO_SRC} > env TARGET_ARCH=${NANO_ARCH} \ > - ${NANO_PMAKE} __MAKE_CONF=${NANO_MAKE_CONF} installworld \ > + ${NANO_PMAKE} __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} installworld \ > DESTDIR=${NANO_WORLDDIR} \ > - > ${MAKEOBJDIRPREFIX}/_.iw 2>&1 > + > ${NANO_OBJ}/_.iw 2>&1 > chflags -R noschg ${NANO_WORLDDIR} > ) > > install_etc ( ) ( > > pprint 2 "install /etc" > - pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.etc" > + pprint 3 "log: ${NANO_OBJ}/_.etc" > > cd ${NANO_SRC} > env TARGET_ARCH=${NANO_ARCH} \ > - ${NANO_PMAKE} __MAKE_CONF=${NANO_MAKE_CONF} distribution \ > + ${NANO_PMAKE} __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} distribution \ > DESTDIR=${NANO_WORLDDIR} \ > - > ${MAKEOBJDIRPREFIX}/_.etc 2>&1 > + > ${NANO_OBJ}/_.etc 2>&1 > ) > > install_kernel ( ) ( > pprint 2 "install kernel" > - pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.ik" > + pprint 3 "log: ${NANO_OBJ}/_.ik" > > cd ${NANO_SRC} > env TARGET_ARCH=${NANO_ARCH} ${NANO_PMAKE} installkernel \ > DESTDIR=${NANO_WORLDDIR} \ > - __MAKE_CONF=${NANO_MAKE_CONF} KERNCONF=`basename ${NANO_KERNEL}` \ > - > ${MAKEOBJDIRPREFIX}/_.ik 2>&1 > + __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} KERNCONF=`basename > ${NANO_KERNEL}` \ + > ${NANO_OBJ}/_.ik 2>&1 > ) > > run_customize() ( > @@ -252,9 +257,9 @@ run_customize() ( > for c in $NANO_CUSTOMIZE > do > pprint 2 "customize \"$c\"" > - pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.cust.$c" > + pprint 3 "log: ${NANO_OBJ}/_.cust.$c" > pprint 4 "`type $c`" > - ( $c ) > ${MAKEOBJDIRPREFIX}/_.cust.$c 2>&1 > + ( $c ) > ${NANO_OBJ}/_.cust.$c 2>&1 > done > ) > > @@ -264,15 +269,15 @@ run_late_customize() ( > for c in $NANO_LATE_CUSTOMIZE > do > pprint 2 "late customize \"$c\"" > - pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.late_cust.$c" > + pprint 3 "log: ${NANO_OBJ}/_.late_cust.$c" > pprint 4 "`type $c`" > - ( $c ) > ${MAKEOBJDIRPREFIX}/_.late_cust.$c 2>&1 > + ( $c ) > ${NANO_OBJ}/_.late_cust.$c 2>&1 > done > ) > > setup_nanobsd ( ) ( > pprint 2 "configure nanobsd setup" > - pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.dl" > + pprint 3 "log: ${NANO_OBJ}/_.dl" > > ( > cd ${NANO_WORLDDIR} > @@ -312,7 +317,7 @@ setup_nanobsd ( ) ( > rm tmp || true > ln -s var/tmp tmp > > - ) > ${MAKEOBJDIRPREFIX}/_.dl 2>&1 > + ) > ${NANO_OBJ}/_.dl 2>&1 > ) > > setup_nanobsd_etc ( ) ( > @@ -348,7 +353,7 @@ prune_usr() ( > > create_i386_diskimage ( ) ( > pprint 2 "build diskimage" > - pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.di" > + pprint 3 "log: ${NANO_OBJ}/_.di" > > ( > echo $NANO_MEDIASIZE $NANO_IMAGES \ > @@ -417,10 +422,10 @@ create_i386_diskimage ( ) ( > # for booting the image from a USB device to work. > print "a 1" > } > - ' > ${MAKEOBJDIRPREFIX}/_.fdisk > + ' > ${NANO_OBJ}/_.fdisk > > IMG=${NANO_DISKIMGDIR}/${NANO_IMGNAME} > - MNT=${MAKEOBJDIRPREFIX}/_.mnt > + MNT=${NANO_OBJ}/_.mnt > mkdir -p ${MNT} > > if [ "${NANO_MD_BACKING}" = "swap" ] ; then > @@ -429,14 +434,14 @@ create_i386_diskimage ( ) ( > else > echo "Creating md backing file..." > dd if=/dev/zero of=${IMG} bs=${NANO_SECTS}b \ > - count=`expr ${NANO_MEDIASIZE} / ${NANO_SECTS}` > + seek=`expr ${NANO_MEDIASIZE} / ${NANO_SECTS}` count=0 > MD=`mdconfig -a -t vnode -f ${IMG} -x ${NANO_SECTS} \ > -y ${NANO_HEADS}` > fi > > trap "df -i ${MNT} ; umount ${MNT} || true ; mdconfig -d -u $MD" 1 2 15 > EXIT > > - fdisk -i -f ${MAKEOBJDIRPREFIX}/_.fdisk ${MD} > + fdisk -i -f ${NANO_OBJ}/_.fdisk ${MD} > fdisk ${MD} > # XXX: params > # XXX: pick up cached boot* files, they may not be in image anymore. > @@ -446,27 +451,26 @@ create_i386_diskimage ( ) ( > > # Create first image > newfs ${NANO_NEWFS} /dev/${MD}s1a > - mount /dev/${MD}s1a ${MNT} > + mount -o async /dev/${MD}s1a ${MNT} > df -i ${MNT} > echo "Copying worlddir..." > ( cd ${NANO_WORLDDIR} && find . -print | cpio -dump ${MNT} ) > df -i ${MNT} > echo "Generating mtree..." > - ( cd ${MNT} && mtree -c ) > ${MAKEOBJDIRPREFIX}/_.mtree > - ( cd ${MNT} && du -k ) > ${MAKEOBJDIRPREFIX}/_.du > + ( cd ${MNT} && mtree -c ) > ${NANO_OBJ}/_.mtree > + ( cd ${MNT} && du -k ) > ${NANO_OBJ}/_.du > umount ${MNT} > > if [ $NANO_IMAGES -gt 1 -a $NANO_INIT_IMG2 -gt 0 ] ; then > # Duplicate to second image (if present) > echo "Duplicating to second image..." > - dd if=/dev/${MD}s1 of=/dev/${MD}s2 bs=64k > + dd conv=sparse if=/dev/${MD}s1 of=/dev/${MD}s2 bs=64k > mount /dev/${MD}s2a ${MNT} > for f in ${MNT}/etc/fstab ${MNT}/conf/base/etc/fstab > do > sed -i "" "s/${NANO_DRIVE}s1/${NANO_DRIVE}s2/g" $f > done > umount ${MNT} > - > fi > > # Create Config slice > @@ -474,7 +478,7 @@ create_i386_diskimage ( ) ( > # XXX: fill from where ? > > # Create Data slice, if any. > - if [ $NANO_DATASIZE -ne 0 ] ; then > + if [ $NANO_DATASIZE -gt 0 ] ; then > newfs ${NANO_NEWFS} /dev/${MD}s4 > # XXX: fill from where ? > fi > @@ -485,16 +489,16 @@ create_i386_diskimage ( ) ( > fi > > echo "Writing out _.disk.image..." > - dd if=/dev/${MD}s1 of=${NANO_DISKIMGDIR}/_.disk.image bs=64k > + dd conv=sparse if=/dev/${MD}s1 of=${NANO_DISKIMGDIR}/_.disk.image > bs=64k mdconfig -d -u $MD > - ) > ${MAKEOBJDIRPREFIX}/_.di 2>&1 > + ) > ${NANO_OBJ}/_.di 2>&1 > ) > > last_orders () ( > # Redefine this function with any last orders you may have > # after the build completed, for instance to copy the finished > # image to a more convenient place: > - # cp ${MAKEOBJDIRPREFIX}/_.disk.image /home/ftp/pub/nanobsd.disk > + # cp ${NANO_DISKIMGDIR}/_.disk.image /home/ftp/pub/nanobsd.disk > ) > > ####################################################################### > @@ -751,19 +755,13 @@ fi > ####################################################################### > # Setup and Export Internal variables > # > -if [ "x${NANO_OBJ}" = "x" ] ; then > - MAKEOBJDIRPREFIX=/usr/obj/nanobsd.${NANO_NAME}/ > - NANO_OBJ=${MAKEOBJDIRPREFIX} > -else > - MAKEOBJDIRPREFIX=${NANO_OBJ} > -fi > - > -if [ "x${NANO_DISKIMGDIR}" = "x" ] ; then > - NANO_DISKIMGDIR=${MAKEOBJDIRPREFIX} > -fi > - > -NANO_WORLDDIR=${MAKEOBJDIRPREFIX}/_.w > -NANO_MAKE_CONF=${MAKEOBJDIRPREFIX}/make.conf > +test -n "${NANO_OBJ}" || NANO_OBJ=/usr/obj/nanobsd.${NANO_NAME}/ > +test -n "${MAKEOBJDIRPREFIX}" || MAKEOBJDIRPREFIX=${NANO_OBJ} > +test -n "${NANO_DISKIMGDIR}" || NANO_DISKIMGDIR=${NANO_OBJ} > + > +NANO_WORLDDIR=${NANO_OBJ}/_.w > +NANO_MAKE_CONF_BUILD=${MAKEOBJDIRPREFIX}/make.conf.build > +NANO_MAKE_CONF_INSTALL=${NANO_OBJ}/make.conf.install > > if [ -d ${NANO_TOOLS} ] ; then > true > @@ -791,7 +789,8 @@ export NANO_DRIVE > export NANO_HEADS > export NANO_IMAGES > export NANO_IMGNAME > -export NANO_MAKE_CONF > +export NANO_MAKE_CONF_BUILD > +export NANO_MAKE_CONF_INSTALL > export NANO_MEDIASIZE > export NANO_NAME > export NANO_NEWFS > @@ -840,7 +839,7 @@ prune_usr > run_late_customize > if $do_image ; then > create_${NANO_ARCH}_diskimage > - echo "# Created NanoBSD disk image: > ${MAKEOBJDIRPREFIX}/${NANO_IMGNAME}" + echo "# Created NanoBSD disk > image: ${NANO_DISKIMGDIR}/${NANO_IMGNAME}" else > pprint 2 "Skipping image build (as instructed)" > fi > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" -- AnyWi Technologies ------------------------------------------------------- From nick at van-laarhoven.org Thu Jun 18 12:05:17 2009 From: nick at van-laarhoven.org (Nick Hibma) Date: Thu Jun 18 12:05:23 2009 Subject: nanobsd disk usage display Message-ID: <200906181405.13008.nick@van-laarhoven.org> We use an extra function to display the amount of free space on the image. But it is not entirely accurate: disk_usage () { sync; sync; sync set -- `du -sk $NANO_WORLDDIR/` used=$1 set -- `ls -sk $NANO_DISKIMGDIR/_.disk.image` size=$1 avail=$(( $size - $used )) availp=$(( ${avail}00 / $size)) pprint 1 "disk usage: $used of $size used, $avail available ($availp%)" } last_orders () { disk_usage } Shall I commit this or does anyone have a better idea on how to do this? Nick ------------------------------------------------------- From edwin at FreeBSD.org Thu Jun 18 22:44:17 2009 From: edwin at FreeBSD.org (edwin@FreeBSD.org) Date: Thu Jun 18 22:44:22 2009 Subject: misc/15876: [picobsd] PicoBSD message of the day problems Message-ID: <200906182244.n5IMiFmC071816@freefall.freebsd.org> Synopsis: [picobsd] PicoBSD message of the day problems State-Changed-From-To: open->patched State-Changed-By: edwin State-Changed-When: Thu Jun 18 22:40:09 UTC 2009 State-Changed-Why: Fixed in HEAD Responsible-Changed-From-To: freebsd-embedded->edwin Responsible-Changed-By: edwin Responsible-Changed-When: Thu Jun 18 22:40:09 UTC 2009 Responsible-Changed-Why: I'll do the MFC . http://www.freebsd.org/cgi/query-pr.cgi?pr=15876 From remko at FreeBSD.org Sat Jun 20 20:36:32 2009 From: remko at FreeBSD.org (remko@FreeBSD.org) Date: Sat Jun 20 20:36:39 2009 Subject: misc/135301: [tinybsd] [patch] Patch for fix architecture support for tinybsd script Message-ID: <200906202036.n5KKaVa1075420@freefall.freebsd.org> Synopsis: [tinybsd] [patch] Patch for fix architecture support for tinybsd script State-Changed-From-To: open->patched State-Changed-By: remko State-Changed-When: Sat Jun 20 20:36:15 UTC 2009 State-Changed-Why: Grab, committed to -HEAD Responsible-Changed-From-To: freebsd-embedded->remko Responsible-Changed-By: remko Responsible-Changed-When: Sat Jun 20 20:36:15 UTC 2009 Responsible-Changed-Why: Grab, committed to -HEAD http://www.freebsd.org/cgi/query-pr.cgi?pr=135301 From bugmaster at FreeBSD.org Mon Jun 22 11:06:52 2009 From: bugmaster at FreeBSD.org (FreeBSD bugmaster) Date: Mon Jun 22 11:07:40 2009 Subject: Current problem reports assigned to freebsd-embedded@FreeBSD.org Message-ID: <200906221106.n5MB6psA017967@freefall.freebsd.org> Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o misc/135588 embedded [nanobsd] simple patch for adding amd64 support o misc/52256 embedded [picobsd] picobsd build script does not read in user/s o kern/42728 embedded [picobsd] many problems in src/usr.sbin/ppp/* after c 3 problems total. From info at martenvijn.nl Wed Jun 24 10:51:21 2009 From: info at martenvijn.nl (Marten Vijn) Date: Wed Jun 24 10:51:27 2009 Subject: wifi benchmark lab Message-ID: <1245839503.649.57.camel@polaris> hi all, In perspective of the Network Event Kit (NEK) (http://bsd.wifisoft.org/nek) I am building a benchmark setup for wlan on embedded systems. It is setup to benchmark one ap with multiple clients. Now I have 6 working clients. But as soon pxeboot and boot0(sio) do work again for net4826 and wrap and Alix1c it can raise to 12 now and later up to 20 or clients. Since the project has founding from NLnet.nl we have budget to buy more ap's. First I want to collect: - good hardware to build accesspoints. - additional ideas of building a good setup. Currently I use it to test: - embedded FreeBSD (nanobsd and tinybsd) on 7.x and 8.0 - hardware to select for the NEK (and publish) My first findings: - DOS situations is easy created using udp and dbs - 7.1 release of Oct 2008 give problems. (ath0: ath_rx_proc: no mbuf!)(see crash reports below) - a lot unexpected, hard to define data from measurements. (help wanted) - recent 7.1 7.2 8.0 are fairly stable (udp/tcp tests) on a net4521 and a prism based wlancard. Background: http://bsd.wifisoft.org/trac/wiki/NEK http://bsd.wifisoft.org/trac/wiki/wireless_benchmark Crash Reports: http://bsd.wifisoft.org/trac/wiki/crash1 http://bsd.wifisoft.org/trac/wiki/crash2 Status and progress: Current show blocker is failing boot pxe|0|0sio on recent 7.1 7.2. 8 versions of freebsd on: - ALIX 1C - WRAP 2E - NET4826 If have posted a pr for this: http://www.freebsd.org/cgi/query-pr.cgi?pr=135961 So I hope it will be fixed. If want to get involved pls let me know. Needed knowlegde: - ip tcp udp benchmarking - driver improvements - data collection and analysis Kind regards, Marten -- Marten Vijn linux 2.0.18 OpenBSD 3.6 FreeBSD 4.6 http://martenvijn.nl http://opencommunitycamp.org http://wifisoft.org From bugmaster at FreeBSD.org Mon Jun 29 11:06:56 2009 From: bugmaster at FreeBSD.org (FreeBSD bugmaster) Date: Mon Jun 29 11:07:40 2009 Subject: Current problem reports assigned to freebsd-embedded@FreeBSD.org Message-ID: <200906291106.n5TB6tqq046274@freefall.freebsd.org> Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o misc/135588 embedded [nanobsd] simple patch for adding amd64 support o misc/52256 embedded [picobsd] picobsd build script does not read in user/s o kern/42728 embedded [picobsd] many problems in src/usr.sbin/ppp/* after c 3 problems total.