6 Replies Latest reply on Apr 1, 2014 4:22 PM by MarcIII

    Creating SD Card image from 'direct' file?

    SpiderKenny

      Over at Intel's IoT ADT Page you can download a USB Live Bootable image to boot a PC into a development version of llinux, from where you can build projects to run on Galileo.

       

      That page also includes a download for the SD Card image which you need to accompany it. This SD Card image (I believe) includes the debug server.

       

      When I download the SD Card image and unzip it I get a file named "iot-devkit-201402201605-mmcblkp0.direct".

      What type of file is this? And how do I create an SD Card image form that? (right about now I hear all you linux guys laughing....)

        • 1. Re: Creating SD Card image from 'direct' file?
          SpiderKenny

          I hope you don't mind if I make my own reply...

          I did a bit of digging about and finally, I think, have found what to do.

           

          I am using a Mac running  OS X 10.9 (Mavericks)

          I downloaded the bz file, which gave me a '.direct' file.

           

          This is the process I used to burn the image to the SD Card.

          • Insert the SD Card into the SD Card reader on the rear of the iMac
          • Start 'terminal' to get a shell window.
          • run diskutil list to finger out where the SD Card was mounted. In my case this was /dev/disk2
          • run diskutil unmountdisk /dev/disk2 to unmount the SD Card
          • run sudo dd if=iot-devkit-201402201605-mmcblkp0.direct of=/dev/disk2 to burn the image to the SD Card

           

          It took quite a few minutes to write the image to the SD Card, there is probably some optimisation I can do with the dd command options to speed things up. In fact it is still running as I type this. If it doesn't work I'll report back.

           

          Now I have to do the same thing with the Live USB drive image too.....

          • 2. Re: Creating SD Card image from 'direct' file?
            AlexT_Intel

            You're on the right track. As you've already found out - that file is simply a direct block device image, so dd is your best friend here. As for the speed - that hugely depends on the SD card and card reader you have. I'm not sure, but you can try playing with the block sizes (bs and count options)  to make it faster, but I don't have any specific advice here - that's just my educated guess and the direction I'd look to if I needed to do that myself :-)

            • 3. Re: Creating SD Card image from 'direct' file?
              SpiderKenny

              Well,

               

              The SD Card image work fine - the Galileo boots from it, and starts without trouble.

              For the life of me, though, I cannot get the binblob to make a bootable flash drive image.

               

              It takes a bout 8 Hours to 'dd' it to a 32GB USB Stick, which then tries to boot, but fails with 'segmentation' faults during boot.

               

              I also tried 'dd'ing it to an 8GB USB Disk which took about 4 hours, and would boot into Debian, but eclipse would not load with IO Failures - so I think there is something not right with the end image on the flash drive.

               

              Actually, I wonder if I'm heading down the wrong track trying to make a bootable USB drive.

               

              I have a Mac with OS X which has Eclipse and so on. Can I somehow use the BSP and build the correct environment on here? Why do I have to create a VM with Debian and so on...

               

              The end goal is to be able to build native apps which will run on Galileo, and to be able to debug them, from the Mac.

              • 4. Re: Creating SD Card image from 'direct' file?
                SpiderKenny

                Some progress....

                 

                So with the image on USB Flash drive, like I said before it would not boot.

                I inserted the flash drive into my laptop with Win 7.1 running and Windows told me the disk had error and needed fixed, so I let it scan and automatically fix the flash drive. Now it boots into debian and I can launch eclipse.

                 

                So there is something not quite working with flashing the binary blob image onto the flash drive, possibly something to do with the command options (conv or bs maybe?) but I don't know enough about Unix/Linux to say for sure.

                 

                Anyway, I still think that booting from the Flash drive should be unnecessary - there must be some way to install eclipse and the board support packages onto a Mac, or even a PC, and run eclipse there, without having to boot to an old 32 Bit version of Debian. I will start another thread to discuss that.

                • 5. Re: Creating SD Card image from 'direct' file?
                  AlexT_Intel

                  If Windows was smart enough to fix that, I think that's indeed not more than just some non-optimal settings for dd. Or wrong device you dd onto (e.g. partition vs. the device itself). You could write the image, then take a look at it with e.g. fdisk to understand the layout, then let windows fix it and check again.

                  1 of 1 people found this helpful