--- a/ohbuild.sh
+++ b/ohbuild.sh
@@ -121,9 +121,8 @@
 
 
     cd $topdir/ohNet
-    # Nov 30 2015. Commits from early december broke ohNetGenerated
-    git checkout 0e22566e3da0eb9b40f4183e76254c6f2a3c2909 || exit 1
-
+    #  Mon Apr 24 15:23:27 2017
+    git checkout 1dd6411ffbe59fe09517162fb88e2405adb4990f || exit 1
     git checkout Makefile
     # Note: the 'make: o: Command not found' errors originate in
     # common.mak and are due to variable t4 being undefined. t4 is
@@ -131,77 +130,61 @@
     # only if 'uset4' is set (which it is not by default). Common.mak
     # should heed uset4, but it does not. This does not seem to have
     # consequences, and the errors are suppressed by defining t4 as 'echo'
+
+    # odroid64: aarch64-linux-gnu.
+    # odroid32,rasp30: arm-linux-gnueabihf,
+    # cubox: armv7hl-redhat-linux-gnueabi
+
     patch -p1 << "EOF"
 diff --git a/Makefile b/Makefile
-index 7c0dae8..6f51a86 100644
+index 29f2d6a..038b05e 100644
 --- a/Makefile
 +++ b/Makefile
-@@ -88,6 +88,12 @@ else
-     ifeq ($(gcc_machine),arm-linux-gnueabihf)
-       detected_openhome_architecture = armhf
+@@ -82,12 +82,19 @@ else
+     ifneq (,$(findstring arm,$(gcc_machine)))
+         ifneq (,$(findstring linux-gnueabihf,$(gcc_machine)))
+             detected_openhome_architecture = armhf
++        else ifneq (,$(findstring armv7hl,$(gcc_machine)))
++            # cubox: armv7hl-redhat-linux-gnueabi
++            detected_openhome_architecture = armhf
+         else ifeq (${detected_openhome_system},Qnap)
+             detected_openhome_architecture = x19
+         else
+             detected_openhome_architecture = armel
+         endif
      endif
-+    ifneq (,$(findstring linux-gnueabihf,$(gcc_machine)))
-+      detected_openhome_architecture = armhf
-+    endif
-+    ifneq (,$(findstring armv7hl,$(gcc_machine)))
-+      detected_openhome_architecture = armhf
++    ifneq (,$(findstring aarch64,$(gcc_machine)))
++      # odroid64: aarch64-linux-gnu
++      detected_openhome_architecture = arm64
 +    endif
      ifneq (,$(findstring i686,$(gcc_machine)))
        detected_openhome_architecture = x86
      endif
-@@ -412,6 +415,7 @@ ifeq ($(uset4), yes)
- build_targets = $(build_targets_base) tt
+@@ -375,6 +382,10 @@ mkdir = mkdir -p
+ rmdir = rm -rf
+ uset4 = no
+ 
++# This avoids errors in Generated/Devices.mak (they apparently have no
++# consequences anyway because we use make native_only=yes)
++t4 = echo
++
+ ifeq ($(managed_only), yes)
+ build_targets_base = make_obj_dir ohNet.net.dll CpProxyDotNetAssemblies DvDeviceDotNetAssemblies
  else
- build_targets = $(build_targets_base)
-+t4 = echo
- endif
- default : all
- 
 EOF
 
     cd  $topdir/ohNetGenerated
-    # Jul 30 2015
-    git checkout 92294ce514dbe38fa569fce8b58588f40bf09cdb || exit 1
+    # Tue May 9 08:54:47 2017 
+    git checkout e3edb912410d4c5a4d5323bb1e9c27660a42d78f || exit 1
     git checkout Makefile
-    patch -p1 << "EOF"
-diff --git a/Makefile b/Makefile
-index a7b84e3..5175a6f 100644
---- a/Makefile
-+++ b/Makefile
-@@ -79,6 +79,12 @@ else
-     ifeq ($(gcc_machine),arm-linux-gnueabihf)
-       detected_openhome_architecture = armhf
-     endif
-+    ifneq (,$(findstring linux-gnueabihf,$(gcc_machine)))
-+      detected_openhome_architecture = armhf
-+    endif
-+    ifneq (,$(findstring armv7hl,$(gcc_machine)))
-+      detected_openhome_architecture = armhf
-+    endif
-     ifneq (,$(findstring i686,$(gcc_machine)))
-       detected_openhome_architecture = x86
-     endif
-@@ -359,6 +362,7 @@ ifeq ($(uset4), yes)
- build_targets = $(build_targets_base) tt
- else
- build_targets = $(build_targets_base)
-+t4 = echo
- endif
- default : all
- 
-EOF
-
-    cd  $topdir/ohdevtools
-    # Dec 9 2015
-    git checkout 77f4f971e2c62e84a7eab2a1bcf4aa3dc3590840 || exit 1
-   
+
     cd  $topdir/ohTopology
-    # Mar 17 2015
-    git checkout 18f004621a7b0dc3add6ddfeec781bd3878ae42e || exit 1
+    # Wed Mar 22 11:15:28 2017 +0000
+    git checkout cc09c09da4be8d3d04adae5b8f0daaf8450906a3 || exit 1
 
     cd  $topdir/ohSongcast
-    # Aug 19 2015
-    git checkout fe9b8a80080118f3bff9b44328975d10bc2c230b || exit 1
+    # Tue Oct 18 08:34:33 2016 +0100
+    git checkout 3299eaedfea34993b79e6d30444792d4fb12a110 || exit 1
 }
 
 make_tarfile()
@@ -259,13 +242,6 @@
         tar xvzf $topdir/ohNet/Build/Bundles/ohNet-${arch}-${debug}.tar.gz
     ) || exit 1
 
-    # Create bogus files for unused Makefile dependencies which we don't
-    # carry in the tar file.
-    mkdir -p OpenHome/Net/Service/ OpenHome/Net/T4/Templates/
-    touch OpenHome/Net/Service/Services.xml \
-          OpenHome/Net/T4/Templates/UpnpMakeT4.tt \
-          OpenHome/Net/T4/Templates/CpUpnpMakeProxies.tt \
-          OpenHome/Net/T4/Templates/DvUpnpMakeDevices.tt
 
     make native_only=yes