1 2 Previous Next 26 Replies Latest reply on Mar 13, 2015 6:42 PM by radiofrequency

    Debugging boot startup

    radiofrequency

      Hello I built the yocto source with the full image. But when I put the files on the sd card and  when I connect the galileo with a usb cable it doesn't show up.  But if I use the default yocto image found on the intel website it works fine and the galileo shows up as a COM device.  I was wondering how can we find out the problem or debug this?  I didn't change any of the yocto source code.  I am also using the Intel Quark BSP 1.0.1 with the 1.0.4 patches.  From the yocto/tmp/deploy/images folder i moved the required files there and renamed them accordingly.

        • 1. Re: Debugging boot startup
          xthunderheartx

          Did you watch the boot process over the system console?  Did grub load? At what point in the boot process did it fail? Got any console output?

           

          Dallas

          • 2. Re: Debugging boot startup
            radiofrequency

            How exactly could I find this information? 

            • 3. Re: Debugging boot startup
              xthunderheartx

              Well you need an ftdi-to-USB dongle and a terminal program of some kind.  I'm guessing you are developing under Windoze?  I abandoned Microsoft decades ago but the terminal program of choice in that domain used to be hyperterminal.  You need the ftdi-to-USB to connect to the console port of the Galileo.  Let me snap a quick photo:

               

              galileo_console_hookup.jpg

               

              The ftdi-to-usb is the little gadget with the red light on it top middle of frame. The blue and green wires are rx/tx and as you can see they are connected to tx/rx on the Gen2 console header.  The black is the ground.  Ignore the shield, it is just a ttl to rs232 level shifter for breaking out UART0.  Can you set something like this up?

               

              Dallas

              • 4. Re: Debugging boot startup
                radiofrequency

                Thanks a lot for the information, I actually just ordered an ftdi cable since I didn't have one, once it comes I will get back to you!

                • 5. Re: Debugging boot startup
                  xthunderheartx

                  No problem.  Did you try to secure shell to it after booting the new image?  If you get a minute post a directory of the toplevel of your sd card as well.

                   

                  Dallas

                  • 6. Re: Debugging boot startup
                    radiofrequency

                    That's the thing the device shows up as dev/ttyACM0 .  I uploaded the ardunio sketch to get the ip address to ssh to it.

                     

                                void setup() {

                      Serial.begin(9600);

                      //It’ll not continue until you send an ‘a’ through the serial monitor

                      while(Serial.read()!='a'){

                        Serial.println("hello");

                        delay(1000);

                      }

                      //Display ifconfig result to serial monitor

                      system("ifconfig > /dev/ttyGS0");

                    }

                     

                    void loop() {

                     

                    }

                     

                    But it doesn't show an ip address it only shows the loopback for the ethernet port.  This works fine if I am using the Intel's official linux image it will show the ip address, but from the yocto source build it doesn't show the ip address.  I am expecting because its not booting properly  This is the serial output for the code:

                     

                    lo   Link encap:Local Loopback
                    inet addr:127.0.0.1  Mask:255.0.0.0
                    UP LOOPBACK RUNNING  MTU:65536  Metric:1
                    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
                    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
                    collisions:0 txqueuelen:0
                    RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

                     

                    this is my deploy folder: I copy the necessary files and rename them to their proper names

                     

                    Thisis my build configuration not sure if everything there is correct:

                     

                    Build Configuration:

                    BB_VERSION        = "1.18.0"

                    BUILD_SYS         = "x86_64-linux"

                    NATIVELSBSTRING   = "Ubuntu-12.04"

                    TARGET_SYS        = "i586-poky-linux"

                    MACHINE           = "clanton"

                    DISTRO            = "clanton-full"

                    DISTRO_VERSION    = "1.4.2"

                    TUNE_FEATURES     = "m32 i586"

                    TARGET_FPU        = ""

                    meta            

                    meta-yocto      

                    meta-yocto-bsp    = "clanton:2d58a0d834ad578eefe1513327041a37f903eff6"

                    meta-intel        = "clanton:048def7bae8e3e1a11c91f5071f99bdcf8e6dd16"

                    meta-oe           = "clanton:13ae5105ee30410136beeae66ec41ee4a8a2e2b0"

                    meta-clanton-distro

                    meta-clanton-bsp  = "<unknown>:<unknown>"

                     

                     

                    This is my top level sd card

                     

                     

                    this is also my grub.conf:

                     

                    default 1

                    timeout 1

                     

                    color white/blue white/cyan

                     

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

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

                        initrd --spi

                     

                    title Clanton SVP kernel-MassStorage initrd-MassStorage image-full IMR-On IO-APIC/HPET NoEMU debug

                        root (hd0,0)

                        kernel /bzImage root=/dev/ram0 console=ttyS1,115200n8 earlycon=uart8250,mmio32,$EARLY_CON_ADDR_REPLACE,115200n8 reboot=efi,warm apic=debug rw LABEL=boot debugshell=5 rootimage=image-full-galileo-clanton.ext3

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

                    • 7. Re: Debugging boot startup
                      xthunderheartx

                      Looks just like my build Radio and we're both building under Ubuntu 12.04.  You've got to be pretty close if you can run your little sketch and get the output you indicate. Looks like the eth0 didn't come up though.  Change the ifconfig in your sketch to "ifconfig -a".  Then it'll show all interfaces even if they aren't activated.  If eth0 isn't there then I would suspect the driver crapped out or something.  Just guessing though.  Any weird warning along those lines in the bitbake?

                      • 8. Re: Debugging boot startup
                        radiofrequency

                        yeah I put the ifconfig -a and I get the following now with the eth0.

                         

                        eth0  Link encap:Ethernet  HWaddr 00:00:00:00:00:00 
                              BROADCAST MULTICAST  MTU:1500  Metric:1
                              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
                              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
                              collisions:0 txqueuelen:1000
                              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
                              Interrupt:41 Base address:0x8000
                        • 9. Re: Debugging boot startup
                          radiofrequency

                          No bitbake was fine occasionally there were errors but were fixed through some patches.  I also did "bitbake image-full-galileo" not 100% this is the command I needed to use.

                          • 10. Re: Debugging boot startup
                            xthunderheartx

                            Yeah I'm pretty sure that's the right target.  It worked for me.  Funny thing you and I must have been building at almost the same time. The only patch that I made though (outside the normal 1.0.4 patches) was changing the repository location for grub.  Did you build in a VM by the way or a native Ubuntu 12.04?

                            • 11. Re: Debugging boot startup
                              xthunderheartx

                              Anyway eth0 having no MAC is definitely FUBAR. Not sure what caused that.  That FTDI dongle will be helpful.

                              • 12. Re: Debugging boot startup
                                radiofrequency

                                yeah its funny the build process is the same from you and me(I found the patching could be better), so I might suspect the files I copied to the sd card might not be right? I see in the deploy/images folder a bunch of symbolic links should i copy those.  Also the bizimage has a .bin extension, I removed the .bin extension is that what you did?

                                • 13. Re: Debugging boot startup
                                  xthunderheartx

                                  No I think you did the right thing.  Your SD card looks good to me.  Basically I followed Chapter 2 of Manoel Ramon's book, not the BSP quide.  You know it just occurred to me that you're load may not have loaded after all.  That may be the SPI image running your sketch.  Let me check what my eth0 looks like on the SPI ... yeah gripes.  What a mo-mo.  I thought your image was booting but not properly configuring eth0.  But it's just the SPI image.

                                   

                                  Dood if the image baked without error you should be good.  Got to be a naming error or something ... what is the size of the partition on your SD card?  It is FAT32 right?  Grasping a straws.

                                  • 14. Re: Debugging boot startup
                                    radiofrequency

                                    Yeah I was following the BSP guide but I think its outdated  I am going to check out his book. And its fat32, and the parition size is the default one like ~ 300 mb.  Yeah I can tell its not booting up because the led blinks for like 5 times and stops normal it should go on for like 1 minute.

                                    1 2 Previous Next