I work from a linux system. The game should be to connect the Galileo to power and let it boot, then connect it to my linux machine via USB. Linux should see it as /dev/ttyACM0 or some such. Then I fire up the updater software, give it the proper serial device name and go for it.
Next I plug in the Galileo, while I dig around for a USB cable it boots (no doubt) and when I connect it via the USB cable, I see this in my /var/log/messages file:
Nov 22 17:02:10 trona kernel: usb 3-1: new high-speed USB device number 3 using xhci_hcd Nov 22 17:02:10 trona kernel: usb 3-1: New USB device found, idVendor=8086, idProduct=babe Nov 22 17:02:10 trona kernel: usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0 Nov 22 17:02:10 trona kernel: usb 3-1: Product: Gadget Serial v2.4 Nov 22 17:02:10 trona kernel: usb 3-1: Manufacturer: Linux 3.8.7-yocto-standard with pch_udc Nov 22 17:02:10 trona kernel: cdc_acm 3-1:1.0: ttyACM0: USB ACM device Nov 22 17:02:10 trona kernel: usbcore: registered new interface driver cdc_acm Nov 22 17:02:10 trona kernel: cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adaptersThen I run the updater:
chmod a+x firmware-updater-1.0.4 ./firmware-updater-1.0.4 Exception in thread "AWT-EventQueue-0" java.awt.HeadlessException at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:204) at java.awt.Window.And nobody is surprised, this is java after all, and it never works without pain and suffering. I hate java. We are using the following version on a Fedora 24 system.(Window.java:536) at java.awt.Frame. (Frame.java:420) at java.awt.Frame. (Frame.java:385) at javax.swing.JFrame. (JFrame.java:189) at com.intel.galileo.flash.tool.FirmwareUpdateTool. (Unknown Source) at com.intel.galileo.flash.tool.FirmwareUpdateTool$1.run(Unknown Source) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:726) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
[tom@trona Firmware]$ java -version openjdk version "1.8.0_111" OpenJDK Runtime Environment (build 1.8.0_111-b16) OpenJDK 64-Bit Server VM (build 25.111-b16, mixed mode)Maybe it wants the actual Oracle java with all the grief involved with installing that. But before launching into that, we google on the error given and then try this based on a suggestion:
export JAVA_TOOL_OPTIONS='-Djava.awt.headless=false' ./firmware-updater-1.0.4 Picked up JAVA_TOOL_OPTIONS: -Djava.awt.headless=false Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-3.b16.fc24.x86_64/jre/lib/amd64/libawt_xawt.so at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1827) at java.lang.Runtime.load0(Runtime.java:809) at java.lang.System.load(System.java:1086) at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1845) at java.lang.Runtime.loadLibrary0(Runtime.java:870) at java.lang.System.loadLibrary(System.java:1122) at java.awt.Toolkit$3.run(Toolkit.java:1640) at java.awt.Toolkit$3.run(Toolkit.java:1638) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Toolkit.loadLibraries(Toolkit.java:1637) at java.awt.Toolkit.So that environment variable setting got us further, but now we are missing the awt library or something of the sort.(Toolkit.java:1672) at java.awt.Component. (Component.java:593)
dnf install jdk-8u112-linux-x64.rpm alternatives --config java alternatives --config javac java -version Picked up JAVA_TOOL_OPTIONS: -Djava.awt.headless=false java version "1.8.0_112" Java(TM) SE Runtime Environment (build 1.8.0_112-b15) Java HotSpot(TM) 64-Bit Server VM (build 25.112-b15, mixed mode)There was only one choice for javac. For java I changed to the oracle version in /usr/java/jdk1.8.0_112/jre/bin/java
./firmware-updater-1.0.4 Picked up JAVA_TOOL_OPTIONS: -Djava.awt.headless=false zmodemOperationWithTimeout Output was: 0x01000200 Transfer complete Exception in thread "serial-input" java.lang.NullPointerException at com.intel.galileo.flash.tool.JsscZmodemService$SerialInputPipe.run(Unknown Source) at java.lang.Thread.run(Thread.java:745) Nov 22, 2016 5:36:36 PM com.intel.galileo.flash.tool.GalileoFirmwareUpdater updateFirmwareOnBoard INFO: Uploading: /home/tom/.galileo/firmware.cap Nov 22, 2016 5:36:36 PM com.intel.galileo.flash.tool.AbstractZmodemService sendFile INFO: [/home/tom/.galileo/lsz, --escape, --binary, --overwrite, --verbose, firmware.cap] Nov 22, 2016 5:39:42 PM com.intel.galileo.flash.tool.GalileoFirmwareUpdater updateFirmwareOnBoard INFO: Checking uploaded file: md5sum /firmware.cap Nov 22, 2016 5:39:43 PM com.intel.galileo.flash.tool.GalileoFirmwareUpdater updateFirmwareOnBoard INFO: MD5 result: f9d79a6813dede6f7f184b5460a32718 /firmware.cap Transfer complete Nov 22, 2016 5:39:43 PM com.intel.galileo.flash.tool.GalileoFirmwareUpdater updateFirmwareOnBoard INFO: Integrity good, preparing for upgrade... Nov 22, 2016 5:39:43 PM com.intel.galileo.flash.tool.GalileoFirmwareUpdater updateFirmwareOnBoard INFO: mkdir -p /tmp/spi_upgrade Nov 22, 2016 5:39:43 PM com.intel.galileo.flash.tool.GalileoFirmwareUpdater updateFirmwareOnBoard INFO: mkdir -p /lib/firmware/tmp/spi_upgrade Nov 22, 2016 5:39:43 PM com.intel.galileo.flash.tool.GalileoFirmwareUpdater updateFirmwareOnBoard INFO: mv /firmware.cap /tmp/spi_upgrade/galileo_firmware.bin Nov 22, 2016 5:39:44 PM com.intel.galileo.flash.tool.GalileoFirmwareUpdater updateFirmwareOnBoard INFO: cp /tmp/spi_upgrade/galileo_firmware.bin /lib/firmware/tmp/spi_upgrade/galileo_firmware.bin Nov 22, 2016 5:39:44 PM com.intel.galileo.flash.tool.GalileoFirmwareUpdater updateFirmwareOnBoard INFO: Preparations complete! Nov 22, 2016 5:39:44 PM com.intel.galileo.flash.tool.GalileoFirmwareUpdater updateFirmwareOnBoard INFO: ./opt/cln/galileo/start_spi_upgrade.sh Nov 22, 2016 5:39:44 PM com.intel.galileo.flash.tool.GalileoFirmwareUpdater updateFirmwareOnBoard INFO: reboot Nov 22, 2016 5:39:45 PM com.intel.galileo.flash.tool.GalileoFirmwareUpdater updateFirmwareOnBoard INFO: Updating firmware...This may take up to 5 minutes. Nov 22, 2016 5:42:45 PM com.intel.galileo.flash.tool.GalileoFirmwareUpdater updateFirmwareOnBoard INFO: poll ... 1 Nov 22, 2016 5:42:45 PM com.intel.galileo.flash.tool.JsscZmodemService openSerialTransport SEVERE: Port name - /dev/ttyACM0; Method name - openPort(); Exception type - Port not found. Nov 22, 2016 5:42:50 PM com.intel.galileo.flash.tool.GalileoFirmwareUpdater updateFirmwareOnBoard INFO: poll ... 2 Nov 22, 2016 5:42:50 PM com.intel.galileo.flash.tool.JsscZmodemService openSerialTransport SEVERE: Port name - /dev/ttyACM0; Method name - openPort(); Exception type - Port not found. Nov 22, 2016 5:42:55 PM com.intel.galileo.flash.tool.GalileoFirmwareUpdater updateFirmwareOnBoard INFO: poll ... 3 Nov 22, 2016 5:42:55 PM com.intel.galileo.flash.tool.JsscZmodemService openSerialTransport SEVERE: Port name - /dev/ttyACM0; Method name - openPort(); Exception type - Port not found. Nov 22, 2016 5:43:00 PM com.intel.galileo.flash.tool.GalileoFirmwareUpdater updateFirmwareOnBoard INFO: poll ... 4 Nov 22, 2016 5:43:00 PM com.intel.galileo.flash.tool.JsscZmodemService openSerialTransport SEVERE: Port name - /dev/ttyACM0; Method name - openPort(); Exception type - Port busy. Nov 22, 2016 5:43:05 PM com.intel.galileo.flash.tool.GalileoFirmwareUpdater updateFirmwareOnBoard INFO: poll ... 5 Nov 22, 2016 5:43:05 PM com.intel.galileo.flash.tool.JsscZmodemService openSerialTransport SEVERE: Port name - /dev/ttyACM0; Method name - openPort(); Exception type - Port busy. Nov 22, 2016 5:43:10 PM com.intel.galileo.flash.tool.GalileoFirmwareUpdater updateFirmwareOnBoard INFO: poll ... 6 Nov 22, 2016 5:43:10 PM com.intel.galileo.flash.tool.JsscZmodemService openSerialTransport SEVERE: Port name - /dev/ttyACM0; Method name - openPort(); Exception type - Port busy. Nov 22, 2016 5:43:15 PM com.intel.galileo.flash.tool.GalileoFirmwareUpdater updateFirmwareOnBoard INFO: poll ... 7 Nov 22, 2016 5:43:15 PM com.intel.galileo.flash.tool.JsscZmodemService openSerialTransport SEVERE: Port name - /dev/ttyACM0; Method name - openPort(); Exception type - Port busy. Nov 22, 2016 5:43:20 PM com.intel.galileo.flash.tool.GalileoFirmwareUpdater updateFirmwareOnBoard INFO: poll ... 8 zmodemOperationWithTimeout Output was: 0x01000400 Transfer complete Nov 22, 2016 5:43:25 PM com.intel.galileo.flash.tool.JsscZmodemService$SerialInputPipe run SEVERE: Stream closed Nov 22, 2016 5:43:25 PM com.intel.galileo.flash.tool.GalileoFirmwareUpdater updateFirmwareOnBoard INFO: Update was successful!I connect my serial console and I see:
Poky 9.0.2 (Yocto Project 1.4 Reference Distro) 1.4.2 clanton /dev/ttyS1 clanton login: root uname -a Linux clanton 3.8.7-yocto-standard #1 Fri Oct 10 16:20:19 PDT 2014 i586 GNU/Linux haltThe halt takes about 10 seconds.
Restarting the board and running the firmware updater again shows that 1.0.4 firmware is in place. After verifying this, I simply quit the updater.
Tom's Computer Info / tom@mmto.org