1 2 3 Previous Next 44 Replies Latest reply on May 27, 2014 12:38 PM by Hal_Allard

    Galileo Setup

    Hal_Allard

      Setting up the Galileo board for the first time... after days of frustration I'm hoping someone has a clue... I'm also hoping to start a road map that will not only get me going but will save others endless days of frustration so they wont just give up.

       

      I have been a developer for years... done many Arduino projects and I just can't believe the complication of this setup.

       

      My Goal--> Setup a bootable SD card with OpenCV to communicate to the Arduino side to control hardware

       

      So first thing, I setup Ubuntu 14.04 in virtualBox...

       

      Download packages from here...

      Software Downloads - Drivers

       

      After downloading the packages I went here to get the instructions on setting up the cross compiler...

      https://communities.intel.com/servlet/JiveServlet/previewBody/21882-102-1-25153/Quark_BSPBuildGuide_329687_001.pdf

       

      3 days of pounding my head to realize the BSP package wont build with bitbake because the version of tar(1.2.7) can't handle the -c parameter.

       

      Made a new virtual image with Ubuntu 12.04 with tar(1.2.6) .

       

      re-downloaded all the packages...

       

      Spent hours waiting for the bitbake build to complete... then when it was done I ran into issues because my OS is 64 bit and there were some compatibility issues when cross compiling

       

      Made a new virtual image with Ubuntu 12.04 32 bit

       

      Did a bunch of others steps

       

      Re-re-downloaded all the packages

       

      Cross compile finally worked

       

      But after running "bitbake image-full -c populate_sdk" the deploy directory contained nothing to load on the SD Card... but the cross compiler worked

       

      Installed the Arduino IDE to program the board... You think things would just work... not so... turns out virtualbox can't map the USB port to /dev/ttyAMC0

       

      /dev/ttyAMC0 does not exist just /dev/ttyS3

       

      So I got the windows side working so I could upload sketches

       

      I made a share to the SD card and mounted it inside Ubuntu, extracted the files from  LINUX_IMAGE_FOR_SD_Intel_Galileo_v0.7.5.7z to the SD card

       

      Plugged the SD card into the Galileo and restarted it...

       

      nothing... I have no idea how to validate if anything happened

       

      So here are my questions and concerns...

       

      1) How in the world do I know the image on the SD card is working if at all?

       

      2) How can I get my cross compiled code using OpenCV on the SD image?

       

      3) How can I get my cpp code on the SD image to talk to the Arduino side of the board?

       

      4) When I ran "bitbake image-full -c populate_sdk" the deploy directory did not have an image in it like the documentation suggested... what do I do now?

       

      5) Where do I incorporate my code into the bitbake image?

       

      I couldn't find these answers anywhere in the documentation or posted anywhere else on the internet. I'm convinced that the best developers in the world would be stumped at the complication of putting all these pieces together.

       

      Any help would be greatly appreciated.

       

      Kindest Regards,

      Hal

        • 1. Re: Galileo Setup
          mhahn

          Hi Hal,

          In order to use OpenCV you need an eglibc based image. You could use a ready built image including OpenCV from IoT Developer Kit. However, Arduino is currently not directly supported on that image but you would need to build an eglibc based toolchain as described in my comments to the thread clloader in a Linux Base Image (clanton-full) build not working?

           

          Hope that helps,

          Matthias

          • 2. Re: Galileo Setup
            Hal_Allard

            Hi Matthias,

             

               Thank you for your reply... I will try the recommendation regarding the bitbake build... but putting OpenCV aside for a second... could you possibly answer a couple supposed basic Galileo questions for the Galileo illiterate? :-)

             

            As I have described, I unpacked the contents of this package (LINUX IMAGE FOR SD for Intel Galileo) on to the SD card... so I presume the SD Card can be formatted in FAT/FAT32...

            the card now shows the contents...

            -------------------------

            boot {dir}

            core-image-minimal-initramfs-clanton.cpio.gz

            bzImage

            image-full-clanton.ext3

            -------------------------

             

            I rebooted the Galileo and I presumed I would just open a terminal using putty and telnet into the SD card image using serial port COM# 115200

             

            I hit the enter key a couple times and I get nothing... must have done it 20 times from Windows and Ubuntu

             

            I know something is listening because the telnet session does connect... if I switch COM ports to something else the session can't connect

             

            So that's one issue

             

            Issue two... I am hoping you or someone can explain to me, when I'm finally able to telnet into the image

             

            How can I get an Arduino sketch to communicate to a cpp program I place on the SD card?

             

            further more, where would I place the cpp program on the SD card?

             

            Am I correct in assuming I can load an arduino sketch which works independently of the SD Image? Or do I just talk to the Galileo hardware with the cpp program

             

            If you can't tell, I am really confused... I guess some people just get this... I'm not one of them... It wasn't clear to me in any documentation :-)

             

            Kindest Regards,

            Hal

            • 3. Re: Galileo Setup
              mhahn

              Hi Hal,

              not sure about that image. I guess there should be some information around on that image. For the image I referred to you'd have 2 partitions at the end: 1 boot (FAT) and on rootfs (ext3) rather than the ext3 put into the FAT partition.

              On the booting: I don't know which firmware you do have on your system. Also don't know which settings you have in your SPI grub.

              I think by default the system would boot from SPI. So you'd have to change the setting in order to have a default boot from SD card.

               

              On the communication: I think there are samples out which use files to communicate between Arduino and your native programs. You would be able to start your native programs from within Arduino by the "system" call.

               

              Cheers,

              Matthias

              • 4. Re: Galileo Setup
                mhahn

                and: the Arduino sketch (if enabled for eglibc) would run within the SD card image. The Arduino sketch is a sketch.elf which will be executed just as any other Linux program

                • 5. Re: Galileo Setup
                  Hal_Allard

                  Hi Matthias,

                   

                  Here is the grub bub...

                  ----------------------------------------------------------------------------------

                  title Clanton SVP kernel-SPI initrd-SPI IMR-On IO-APIC/HPET NoEMU

                      kernel --spi root=/dev/ram0 console=ttyS1,115200n8 earlycon=uart8250,mmio32,0x8010f000,115200n8 reboot=efi,warm apic=debug rw

                      initrd --spi

                   

                  title Clanton SVP kernel-SPI rootfs-SD IMR-On IO-APIC/HPET NoEMU

                      root (hd0,0)

                      kernel /bzImage root=/dev/mmcblk0p2 console=ttyS1,115200n8 earlycon=uart8250,mmio32,0x9000b000,115200n8 reboot=efi,warm apic=debug rw rootwait quiet

                   

                  title Clanton SVP kernel-MassStorage initrd-MassStorage big-rootfs IMR-On IO-APIC/HPET NoEMU debug

                      root (hd0,0)

                      kernel /bzImage root=/dev/ram0 console=ttyS1,115200n8 earlycon=uart8250,mmio32,0x8010f000,115200n8 reboot=efi,warm apic=debug rw LABEL=boot debugshell=5

                      initrd /core-image-minimal-initramfs-clanton.cpio.gz

                  ----------------------------------------------------------------------------------

                   

                  To translate... I think it means I'm retarded... This stuff came with the "getting started" documentation... how in the world did you get your SD Card booting without using the provided documentation... maybe that's how you got it working lol

                   

                  So to reiterate what you are saying... you say... take the SD card and build two partitions...

                   

                  1 FAT (boot)

                  2) EXT3

                   

                  What do I put on those partitions?

                   

                  Remember I'm just trying to get this working for the very first time :-)

                   

                  "I think there are samples out which use files to communicate between Arduino and your native programs"

                  WHERE?? lol


                  "The Arduino sketch is a sketch.elf which will be executed just as any other Linux program"

                  Could you point me to an example?

                   

                  Kindest Regards,

                  Hal

                  • 6. Re: Galileo Setup
                    Hal_Allard

                    BTW - the board is straight from the factory... I didn't update the firmware...

                     

                    why is this so complicated

                    • 7. Re: Galileo Setup
                      SpiderKenny
                      why is this so complicated


                      The galileo is a powerful and complex small sized computer.

                      As shipped it runs a power linux distro which is small and fast enough to run from an SPI Flash chip. From there is can run a fair amount of Arduino sketches and supports a good number of existing Arduino shields. However Arduino compatibility is just one small facet to it's many abilities.


                      If you want to do something more powerful with it, such as Running OpenCV the you need a more powerful operating system. Probably one with some dev tools built in.

                      Both Intel and members of the Makers community have made available various builds which include dev tools.

                      You can select a pre-built SD Card image with dev tools, and I believe there are both ulibc  and eglibc variants about.


                      It's complicated because it's not an Arduino UNO - you couldn't run openCV on that!

                      However there are some great people around in these forums who will help you get up and running.

                      Once you do, why not share your SD Card image so the next person doesn't have to spend days building from scratch again?


                      -Kenny


                      • 8. Re: Galileo Setup
                        Hal_Allard

                        Hi Kenny,

                         

                          Yes, I bought the Galileo because it was OpenCV friendly... I really hope to get it working and I will share the image when, and if, i get it running. :-) As well as hopefully a detailed list of steps that may help others.

                         

                        OpenCV runs on my Ubuntu system and I can cross compile it and run it... though I'm lost as to why the deploy directory didn't contain the image for my sd card after 15 hours of build time which completed successfully.

                         

                        One of my gripes is I can't seem to get by the most basic of steps... like actually booting from a pre-built sd image... so indicated by my rant above.

                         

                        Do you think Intel checks these forums? lol

                         

                        Take Care,

                        Hal

                        • 9. Re: Galileo Setup
                          Clayton Hofrock

                          In order to boot from the SD card, you have to update the firmware. The shipping firmware does not support SD card usage.

                           

                          After upgrading your firmware it should work just fine. If not try these steps:

                          SD Card Issues — Clay and Galileo

                           

                          The firmware might also be the reason you cannot connect to the console.

                          • 10. Re: Galileo Setup
                            Hal_Allard

                            Thank you kind sir... I will do so tonight and see if it works... that would certainly explain a thing or two

                            • 11. Re: Galileo Setup
                              mhahn

                               

                              ----------------------------------------------------------------------------------

                              title Clanton SVP kernel-SPI initrd-SPI IMR-On IO-APIC/HPET NoEMU

                                  kernel --spi root=/dev/ram0 console=ttyS1,115200n8 earlycon=uart8250,mmio32,0x8010f000,115200n8 reboot=efi,warm apic=debug rw

                                  initrd --spi

                               

                              title Clanton SVP kernel-SPI rootfs-SD IMR-On IO-APIC/HPET NoEMU

                                  root (hd0,0)

                                  kernel /bzImage root=/dev/mmcblk0p2 console=ttyS1,115200n8 earlycon=uart8250,mmio32,0x9000b000,115200n8 reboot=efi,warm apic=debug rw rootwait quiet

                               

                              title Clanton SVP kernel-MassStorage initrd-MassStorage big-rootfs IMR-On IO-APIC/HPET NoEMU debug

                                  root (hd0,0)

                                  kernel /bzImage root=/dev/ram0 console=ttyS1,115200n8 earlycon=uart8250,mmio32,0x8010f000,115200n8 reboot=efi,warm apic=debug rw LABEL=boot debugshell=5

                                  initrd /core-image-minimal-initramfs-clanton.cpio.gz

                              ----------------------------------------------------------------------------------

                               

                               

                               

                              looks like you'd have to make your 2nd entry the default one

                              ... how in the world did you get your SD Card booting without using the provided documentation...

                               

                              I'm illiterate - that helps ;-)

                               

                              "The Arduino sketch is a sketch.elf which will be executed just as any other Linux program"

                              Could you point me to an example?

                               

                              just start any Arduino sketch from the IDE and check your /sketch/ folder.

                              Afterwards just start the /sketch/sketch.elf and you should see the very same sketch running

                               

                               

                               

                              So to reiterate what you are saying... you say... take the SD card and build two partitions...

                               

                              1 FAT (boot)

                              2) EXT3

                               

                              What do I put on those partitions?

                               

                              Remember I'm just trying to get this working for the very first time :-)

                               

                               

                               

                              as mentioned: I don't know about the clanton-full. If doing the first time just take a ready to go image (Yocto - there seems to be also Debian image available) and dd it over to your SD card.

                              • 12. Re: Galileo Setup
                                Hal_Allard

                                :-) Alright thanks Matthias! I will hammer on it tonight and see what I come up with.

                                • 13. Re: Galileo Setup
                                  gustafn

                                  Concerning the image LINUX_IMAGE_FOR_SD_Intel_Galileo_v0.7.5.7z 

                                  This is a ulibc based image capable to run sketches. You find the matching instructions in

                                  Galileo_GettingStarted_329685_005.pdf

                                  In short: I'd recommend upgrade first the flash via IDE (item 6) and copy the uncompressed content 1:1 to the SD card (item 11).

                                  One FAT (or FAT32) partition is all you need, the .ext3 "partition" is kept as a file there (convenient for backup etc.).

                                  • 14. Re: Galileo Setup
                                    mhahn

                                    thanks for the clarifications.

                                     

                                     

                                    Concerning the image LINUX_IMAGE_FOR_SD_Intel_Galileo_v0.7.5.7z 

                                    This is a ulibc based image capable to run sketches.

                                    In order to run OpenCV an eglibc based image is required

                                    1 2 3 Previous Next