Index: /branches/releng-9/nanobsd/README.txt
===================================================================
--- /branches/releng-9/nanobsd/README.txt	(revision 12218)
+++ /branches/releng-9/nanobsd/README.txt	(revision 12219)
@@ -11,3 +11,4 @@
 pkg		=	Packages to be installed
 tools		=	Helper scripts for use after image
+patches		=	Patches to stock FreeBSD, mostly backports from -CURRENT
 
Index: /branches/releng-9/nanobsd/patches/udav-broken-phy.patch
===================================================================
--- /branches/releng-9/nanobsd/patches/udav-broken-phy.patch	(revision 12219)
+++ /branches/releng-9/nanobsd/patches/udav-broken-phy.patch	(revision 12219)
@@ -0,0 +1,70 @@
+#------------------------------------------------------------------------
+#r238466 | rpaulo | 2012-07-15 07:49:02 +0200 (Sun, 15 Jul 2012) | 4 lines
+#
+#The JP1082 device doesn't respond to the MII_BMSR command and it turns
+#out that it has an unusable PHY. It still works, although very slowly,
+#without a PHY, so I implemented non-PHY support in the udav driver.
+#
+#------------------------------------------------------------------------
+Index: sys/dev/usb/net/if_udav.c
+===================================================================
+--- sys/dev/usb/net/if_udav.c	(revision 238465)
++++ sys/dev/usb/net/if_udav.c	(revision 238466)
+@@ -169,7 +169,7 @@
+ MODULE_DEPEND(udav, miibus, 1, 1, 1);
+ MODULE_VERSION(udav, 1);
+ 
+-static const struct usb_ether_methods udav_ue_methods = {
++static struct usb_ether_methods udav_ue_methods = {
+ 	.ue_attach_post = udav_attach_post,
+ 	.ue_start = udav_start,
+ 	.ue_init = udav_init,
+@@ -206,7 +206,8 @@
+ 	{USB_VPI(USB_VENDOR_SHANTOU, USB_PRODUCT_SHANTOU_ADM8515, 0)},
+ 	/* Kontron AG USB Ethernet */
+ 	{USB_VPI(USB_VENDOR_KONTRON, USB_PRODUCT_KONTRON_DM9601, 0)},
+-	{USB_VPI(USB_VENDOR_KONTRON, USB_PRODUCT_KONTRON_JP1082, 0)},
++	{USB_VPI(USB_VENDOR_KONTRON, USB_PRODUCT_KONTRON_JP1082,
++	    UDAV_FLAG_NO_PHY)},
+ };
+ 
+ static void
+@@ -259,6 +260,16 @@
+ 		goto detach;
+ 	}
+ 
++	/*
++	 * The JP1082 has an unusable PHY and provides no link information.
++	 */
++	if (sc->sc_flags & UDAV_FLAG_NO_PHY) {
++		udav_ue_methods.ue_tick = NULL;
++		udav_ue_methods.ue_mii_upd = NULL;
++		udav_ue_methods.ue_mii_sts = NULL;
++		sc->sc_flags |= UDAV_FLAG_LINK;
++	}
++
+ 	ue->ue_sc = sc;
+ 	ue->ue_dev = dev;
+ 	ue->ue_udev = uaa->device;
+@@ -712,7 +723,8 @@
+ 	UDAV_LOCK_ASSERT(sc, MA_OWNED);
+ 
+ 	ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
+-	sc->sc_flags &= ~UDAV_FLAG_LINK;
++	if (!(sc->sc_flags & UDAV_FLAG_NO_PHY))
++		sc->sc_flags &= ~UDAV_FLAG_LINK;
+ 
+ 	/*
+ 	 * stop all the transfers, if not already stopped:
+Index: sys/dev/usb/net/if_udavreg.h
+===================================================================
+--- sys/dev/usb/net/if_udavreg.h	(revision 238465)
++++ sys/dev/usb/net/if_udavreg.h	(revision 238466)
+@@ -159,6 +159,7 @@
+ 	int			sc_flags;
+ #define	UDAV_FLAG_LINK		0x0001
+ #define	UDAV_FLAG_EXT_PHY	0x0040
++#define	UDAV_FLAG_NO_PHY	0x0080
+ };
+ 
+ #define	UDAV_LOCK(_sc)			mtx_lock(&(_sc)->sc_mtx)
Index: /branches/releng-9/nanobsd/tools/image-build.sh
===================================================================
--- /branches/releng-9/nanobsd/tools/image-build.sh	(revision 12218)
+++ /branches/releng-9/nanobsd/tools/image-build.sh	(revision 12219)
@@ -1,5 +1,9 @@
 #!/bin/sh
+#
 # Wrapper around nanobsd.sh with autodetection of already processed steps
 # to provide some failsafe net
+#
+# Rick van der Zwet <info@rickvanderzwet>
+#
 
 BASEDIR=`dirname $0`
@@ -21,4 +25,5 @@
   FORCE_KERNEL=1
   FORCE_WORLD=1
+else
 fi
 shift
