atusb: Build updates
authorJason Self <j@jxself.org>
Thu, 4 Jul 2019 23:57:58 +0000 (16:57 -0700)
committerJason Self <j@jxself.org>
Thu, 4 Jul 2019 23:57:58 +0000 (16:57 -0700)
Update the root level Makefile to both invoke "make atusb.dfu" when
building.

Update the INSTALL document to mention the dependency on dfu-util.

Update the root level Makefile to install atusb.dfu if it's compiled.
Even though the kernel itself doesn't load the firmware into the
device this will ensure that pre-compiled firmware is included in the
release tarballs.

INSTALL
Makefile

diff --git a/INSTALL b/INSTALL
index 9ea6dada36898c67ee58c64a4694a9c66c32f89c..70c4381baa5903049907fa98a75c8ea549b79106 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -17,6 +17,7 @@ system:
 
     * A C/C++ compiler, like GCC
     * Cmake
 
     * A C/C++ compiler, like GCC
     * Cmake
+    * dfu-util - Device Firmware Upgrade Utilities
     * GNU Bison/YACC
     * GNU Flex
     * GNU Gperf
     * GNU Bison/YACC
     * GNU Flex
     * GNU Gperf
@@ -35,7 +36,7 @@ system:
 On GNU/Linux distros that use apt you can install these with:
 
     apt install gcc-avr avr-libc binutils-arm-linux-gnueabi \
 On GNU/Linux distros that use apt you can install these with:
 
     apt install gcc-avr avr-libc binutils-arm-linux-gnueabi \
-    binutils-arm-none-eabi bison cmake flex g++ gcc \
+    binutils-arm-none-eabi bison cmake dfu-util flex g++ gcc \
     gcc-arm-linux-gnueabi gcc-arm-none-eabi gperf make wget
 
 CARL9170 Firmware Configuration
     gcc-arm-linux-gnueabi gcc-arm-none-eabi gperf make wget
 
 CARL9170 Firmware Configuration
@@ -48,7 +49,7 @@ atusb: Firmware for the ATUSB IEEE 802.15.4 USB Adapter
 
 To flash the firmware you need dfu-util on the host. Issue
 
 
 To flash the firmware you need dfu-util on the host. Issue
 
-    make dfu
+    dfu-util -d 20b7:1540 -D atusb.dfu
 
 right after plugging the device into the USB port while the red led is
 still on.
 
 right after plugging the device into the USB port while the red led is
 still on.
index 8474b304f164eb89bcb5dbfb047bd9de71781c6a..51f708d1ca10209677d99ee2b4e18db828dd8e92 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -37,7 +37,7 @@ ath9k_htc: ath9k_htc_toolchain
        cd ath9k_htc && $(MAKE) -C target_firmware
 
 atusb:
        cd ath9k_htc && $(MAKE) -C target_firmware
 
 atusb:
-       cd atusb && $(MAKE)
+       cd atusb && $(MAKE) atusb.dfu
 
 av7110:
        cd av7110 && $(MAKE)
 
 av7110:
        cd av7110 && $(MAKE)
@@ -103,6 +103,7 @@ install:
                ln -s ath9k_htc/htc_9271-1.4.0.fw $(prefix)/htc_9271.fw; fi;
        if [ -a ath9k_htc/target_firmware/htc_7010.fw ]; then $(install_program) -D ath9k_htc/target_firmware/htc_7010.fw $(prefix)/ath9k_htc/htc_7010-1.4.0.fw && \
                ln -s ath9k_htc/htc_7010-1.4.0.fw $(prefix)/htc_7010.fw; fi;
                ln -s ath9k_htc/htc_9271-1.4.0.fw $(prefix)/htc_9271.fw; fi;
        if [ -a ath9k_htc/target_firmware/htc_7010.fw ]; then $(install_program) -D ath9k_htc/target_firmware/htc_7010.fw $(prefix)/ath9k_htc/htc_7010-1.4.0.fw && \
                ln -s ath9k_htc/htc_7010-1.4.0.fw $(prefix)/htc_7010.fw; fi;
+        if [ -a atusb/atusb.dfu ]; then $(install_program) -D atusb/atusb.dfu $(prefix)/atusb/atusb.dfu; fi;
        if [ -a av7110/bootcode.bin ]; then $(install_program) -D av7110/bootcode.bin $(prefix)/av7110/bootcode.bin; fi;
        if [ -a cis/3CCFEM556.cis ]; then $(install_program) -D cis/3CCFEM556.cis $(prefix)/cis/3CCFEM556.cis; fi;
        if [ -a cis/3CXEM556.cis ]; then $(install_program) -D cis/3CXEM556.cis $(prefix)/cis/3CXEM556.cis; fi;
        if [ -a av7110/bootcode.bin ]; then $(install_program) -D av7110/bootcode.bin $(prefix)/av7110/bootcode.bin; fi;
        if [ -a cis/3CCFEM556.cis ]; then $(install_program) -D cis/3CCFEM556.cis $(prefix)/cis/3CCFEM556.cis; fi;
        if [ -a cis/3CXEM556.cis ]; then $(install_program) -D cis/3CXEM556.cis $(prefix)/cis/3CXEM556.cis; fi;