2 Replies Latest reply on Apr 3, 2019 5:52 AM by linuxengineer

    Unable to flash Compute Module 3

    wittend

      I have a Compute Module IO Board V3.0 and six CM3 units with flash (not Lite).  I have been completely unable get any of them to be recognized after loading the bootloader (or trying to) using Ubuntu Linux 16.04, Windows 10, or Windows 7.1 as hosts.  I never get to the point that I have a recognizable device on which to load the OS.  I have attempted to do this with two Linux machines and three Windows machines, of various vintages from old to new - all 64 bit.  No VM's, no weirdness.

       

      The published instructions for installing the bootloader and flashing the OS are extremely poorly written, but the process should not be difficult.  I am an experienced embedded ARM user and have done similar operations on many platforms.

       

      I am using the latest code from the recommended official sites.  On Linux I have built the bootloader repeatedly from the GitHub source. 

      On Windows I have tried every recommendation that I can find, but always get to either 'Using current X-Box driver' or 'Driver not signed' messages, as regular user or as administrator.

      On Linux though the rpiboot runs and sees the module, I am never able to find a usable device in /dev.

       

      I have been at this for weeks, and am extremely frustrated.  I see lots of other people with similar problems, but others appear to get past them. 

       

      I am about to give up on using the CM3's and write off the time and money invested.  I am at the point of believing these modules are a botched product.

       

      Can anyone please explain how to get beyond this impasse?

       

      Dave

        • Re: Unable to flash Compute Module 3
          balearicdynamics

          Hello David,

           

          you are right over all the points you mention. CM3 has serious problems flashing accordingly with the crap provided documentation. I have tried many times too including - you don't mention - a regular Raspberry Pi B3 model as host. None of these methods works plain; this is a serious issue already acknowledged by the Raspberry Pi documentation team.

          I have also posted a short update about this issue that at the date remains open. You can find the issue thread on GitHub Raspberry Pi documentation here: https://github.com/raspberrypi/documentation/issues/720 but I see that you have already reached this point.

           

          First of all, image transfer when the Pi is in the OTG enabled mode will occur if the disk is not formatted nor partitioned. Then I have tried several versions but all generates errors when done using a single computer (weird ha )

           

          So the first approach is to setup the bootloader and as far as I know the only version that really works is Windows. It runs and the first time installs the drivers too.

           

          Then do not expect that the bootloader ends under Windows. The same beaviur under Linux and Mac OSX. The problem is that while in Windows you can close forcely the terminal window when you see that bootloader enters the second stage, this is not successful with Debian or Raspberry Pi not OSX. So consider to use Windows just for setup the CM3 in the right mode.

           

          If it is the first time you setup the CM3 board, you can use Windows 10 32 bit (64 bit is not working) also for flashing ignoring both the bootloader terminal window that you can leave open on the desktop and the popup the the new device should be formatted (just close it).

          The documentation suggests to use Winimager but it in some cases - not all are clear - it hangs between 15% and 25% of the flashing process. Better if you use Etcher that is great and multi platform (linux, WIndows, OSX, Raspbian etc.)

           

          Anyway after the bootloader has been set by Windows, you can move the CM3 USB OTG Connector on another computer leaving the board in the same state. So, if the Windows Etcher image transfer creates you problems, you can try using the Ubuntu desktop to do this.

           

          If you should reflash the module after a previous installation

          In this case - in theory - you should use windows disk utility do remove the previous installation partitions and start Etcher to flash the module like it is a fresh installation. But it does not work for some unclear reason. As well as what suggested above, here for me it was a best practice: setup the bootloader with windows then flash the module (leaving it unformatted or fat 32 formatted) with Ubuntu - or if you can try with a Mac OSX.

           

          About the last Raspbian distribution to use

          At the actual date the downloadable version of Raspbian is the Stretch but I strongly suggest you use the last previous Jessie version (distro by July, 5, 2017). The Strech version - in theory - will support in a different way the network and WLAN0 is replaced by the self network assignment that create a lot of troubles especially with the WiFi settings. To setup the WiFi for run immediately after boot and be able to make the first apt-get update/upgrade is to setup directly the wpa-supplicant network. To do this:

           

          sudo edit /etc/wpa-supplicant/wpa-supplicant.conf
          

           

          Then to the bottom of the file add the following:

           

          network={
               ssid="your WiFi ssid full qualification name"
               psk="your WiFi password"
          }
          

           

          Then reboot the system and you should see in one of the last sentences of the boot on the termina my IP address is: aaa.bbb.ccc.ddd

          SSH Enabling

          With CM3 the SSH enable method via the sudo raspi-config is not sufficient. You should add an empty file named ssh in the /boot partition. But... if you create the ssh file like shown below after the board starts,

           

          pi@raspberry>sudo touch /boot/ssh
          

           

          You get no effect at all. Because you should create the file (that will be automatically deleted at next boot in the boot partitiion! So setup the bootloader again under windows, leave the system recognize the boot as the only readable partition of the CM3 and just create the file. Then invert the flag again and ssh will work.

           

          Hope this will be at least a starting point. For any further issue let me know and we will try to find a solution.

           

          Enrico

          2 of 2 people found this helpful
          • Re: Unable to flash Compute Module 3
            linuxengineer

            Hi David-

             

            Like yourself, I thought the official procedure for flashing a Compute Module's eMMC storage with a Raspbian image was ugly & inelegant.  So I found a much easier way which I've documented at the below link:

             

            https://raspberrypi.stackexchange.com/questions/96032/how-do-i-flash-install-raspbian-on-raspberry-pi-compute-module-3-3

             

            This will get you up in running much more quickly so you can start building your solution on the Compute Module.  -Terrence

            1 of 1 people found this helpful