diff --git a/mote/v2/openwrt/install.sh b/mote/v2/openwrt/install.sh index 9c2ff52..03df483 100755 --- a/mote/v2/openwrt/install.sh +++ b/mote/v2/openwrt/install.sh @@ -46,17 +46,21 @@ cp patches/420-tune_spi_bitbanging_for_avr.patch $BACKFIRE_PATH/target/linux/ath # backport loglevel fix to busybox v1.15.3-2 # see: https://bugs.busybox.net/show_bug.cgi?id=681 -cp patches/920-fix_crond_loglevel.patch $BACKFIRE_PATH/package/busybox/patches +cp patches/820-fix_crond_loglevel.patch $BACKFIRE_PATH/package/busybox/patches # patch the default OpenWRT Lua package rm $BACKFIRE_PATH/package/lua/patches/400-luaposix_5.1.4-embedded.patch rm $BACKFIRE_PATH/package/lua/patches/500-eglibc_config.patch cp patches/600-lua-tablecreate.patch $BACKFIRE_PATH/package/lua/patches +# copy flash utility to the tools dir +cp ../tools/ap51-flash $BACKFIRE_PATH/tools + # patch files of the OpenWRT build system cd $BACKFIRE_PATH patch -p0 < $REPO_PATH/patches/900-disable_console.patch patch -p0 < $REPO_PATH/patches/910-set_ttyS0_baud_to_115200.patch +patch -p0 < $REPO_PATH/patches/920-add-make-flash-option.patch # we don't need rdate, relying on ntpclient instead rm $BACKFIRE_PATH/package/base-files/files/etc/hotplug.d/iface/40-rdate diff --git a/mote/v2/openwrt/patches/920-fix_crond_loglevel.patch b/mote/v2/openwrt/patches/820-fix_crond_loglevel.patch similarity index 100% rename from mote/v2/openwrt/patches/920-fix_crond_loglevel.patch rename to mote/v2/openwrt/patches/820-fix_crond_loglevel.patch diff --git a/mote/v2/openwrt/patches/920-add-make-flash-option.patch b/mote/v2/openwrt/patches/920-add-make-flash-option.patch new file mode 100644 index 0000000..d53642c --- /dev/null +++ b/mote/v2/openwrt/patches/920-add-make-flash-option.patch @@ -0,0 +1,20 @@ +--- Makefile (revision 26802) ++++ Makefile (working copy) +@@ -90,6 +90,17 @@ + package/symlinks-clean: + $(SCRIPT_DIR)/feeds uninstall -a + ++# flash the target with Sven Ola's ap51-flash tool ++SUDO=sudo ++AP51=tools/ap51-flash ++ETH=eth0 ++BINDIR=bin/atheros ++ROOTFS=$(BINDIR)/openwrt-atheros-root.squashfs ++KERNEL=$(BINDIR)/openwrt-atheros-vmlinux.lzma ++ ++flash: ++ $(SUDO) $(AP51) $(ETH) $(ROOTFS) $(KERNEL) ++ + .PHONY: clean dirclean prereq prepare world package/symlinks package/symlinks-install package/symlinks-clean + + endif diff --git a/mote/v2/tools/ap51-flash b/mote/v2/tools/ap51-flash new file mode 100755 index 0000000..5ab47be Binary files /dev/null and b/mote/v2/tools/ap51-flash differ