9 Replies Latest reply on Mar 30, 2016 12:15 PM by DanielFitzgerald

    Latest (1.2.1) Gen-II build differences between Intel provided SD Card image / documentation - can't boot from new compiled image/sd card

    DanielFitzgerald

      Hi all,

       

      I'll try to summarise as best the steps I've gone through and then the issue i'm having:

      1) Intel provided SD card image working:

      - got the latest SD Card image, installed on the sd card, booted no problem, loaded arduino script to enable networking (telnetd -l /bin/sh   needs to be run - then I can ssh into the board through network port).

      - Upgraded board firmware to 1.0.4 -- https://downloadcenter.intel.com/downloads/eula/24748/Intel-Galileo-Firmware-and-Drivers-1-0-4?httpDown=http%3A%2F%2Fdownloadmirror.intel.com%2F24748%2Feng%2FIntelGalileoFirmwareUpdater-1.0.4-Windows.zip

      - to note this SD card image has 2 partitions - 53MB (1st partition, primary,  FAT32, boot flag enabled) , 1.44 GB (2nd partition, primary, EXT3)

       

      2) build my own system

      - I'm using for reference:  Intel ®  Quark™ SoC X1000  Board Support Package (BSP) Build and Software User Guide; release 1.2.1; feb 2016

      - Downloaded latest (1.2.1) BSP from here: https://downloadcenter.intel.com/download/23197/Intel-Quark-BSP

      - set up a Debian 7.9 build machine and went through all steps in user's guide above, section 6 to create file system and kernel using Yocto project

      - final steps here say to simply copy 5 files over the the SD card -- see 1st attachment

      - no mention of 2 partitions on the SD card.  only info I could find is that it just should be fat32 and copy over files.

       

      Problems/other things i tried:

      - the main problem i'm having is that if i copy this straight over it doesn't boot.

      - looking at the console output when booting sees the build get stuck looking for something on  "Waiting for root device /dev/mmcblk0p2".  Extrapolating and many nights of investigating, I can see that in the Intel provided SD card image, we have a complete filesystem on the second partition, however in the user guide above there is NO MENTION of this at all.

      - On the intel SD card image, there is also no ext3 image file in the first partition

      - I tried some other things given the above, I figured that perhaps the ext3 file needed to be extracted out and then copied to the second SD card partition.  I tried this, however it still got stuck at the point waiting for the /dev/mmcblk0p2 device.    See attachment log of the boot for this version - compiled system, with files copied to 1st partition of SD card and image file extracted to the second partition.   Note to do this (for others interested) i used the command (on my build system) to mount to a directory then copied over all files:    mount -o loop image-full-quark.ext3 /directory/to/mount/

      - 3rd attachment is the intel sd card boot up log.    Note big differences between mine and theirs

      - next thing I noticed was that in my build there WAS NO FILE in the /boot directory in my second partition (from my image-full-quark.ext3 filesystem image file).  The file is called:  vmlinux-3.8.7-yocto-standard

      - My guess is that file is used to load up on boot, but as mentioned above there is NO reference to any of this in the docco about anything about a second partition on the SD card.   I couldn't seem to find any file like this on my build - so any help on why I don't have this file in my build image greatly appreciated. -- NOTE i was building everything from defaults from the steps in the doc user guide above (ie: running the setup.sh scripts, environment vars setup etc then bitbake image-full)


      Overall I was assuming that the latest downloads for the SD card image would be the same as the latest full SD card compile following the steps in the latest user guide above.   It's VERY different and I would like to know why and how I can get my image compiling so the SD card boots up so I can start do other things i need to do like customizing some kernel options, etc -- i don't want to do that until the base install works!


      thanks all,

      Daniel


       

        • 2. Re: Latest (1.2.1) Gen-II build differences between Intel provided SD Card image / documentation - can't boot from new compiled image/sd card
          FGT

          Do you (or anybody) know if the new image is based in either eglibc or uclibc? The SD you are using is based on uclibc. I assume the one created from src is based on eglibc...

           

          Fernando.

          • 3. Re: Latest (1.2.1) Gen-II build differences between Intel provided SD Card image / documentation - can't boot from new compiled image/sd card
            xbolshe

            I guess it works as expected:

             

            [0.000000] Kernel command line: root=/dev/mmcblk0p2 rootwait console=ttyS1,115200n8 earlycon=uart8250,mmio32,0x9010b000,115200n8 reboot=efi,warm apic=debug rw LABEL=boot debugshell=5 efi_main=0x00000001734e9aec jmp_code32=0x00000001a7abe534

             

            BR,

            xbolshe

            • 4. Re: Latest (1.2.1) Gen-II build differences between Intel provided SD Card image / documentation - can't boot from new compiled image/sd card
              DanielFitzgerald

              I don't understand what you are saying.  What is working as expected?     For my card install it stalls here:  [    2.142703] Waiting for root device /dev/mmcblk0p2...

              and never continues.  I set up 2 partitions and a file structure on the second partition in case it wanted to put some kind of image on mmcblk0p2 (the second partition) but i can't figure out exactly what's happening.

               

              For the intel SD card image when it boots up it has the following lines:

              [    2.932490] Using IPI Shortcut mode

              [    2.945596]  mmcblk0: p1 p2

              [    2.967487]   Magic number: 1:0:0

              [    2.972371] rtc_cmos 00:01: setting system clock to 2001-01-01 00:00:36 UTC (978307236)

              [    3.183897] kjournald starting.  Commit interval 5 seconds

              [    3.199203] EXT3-fs (mmcblk0p2): using internal journal

              [    3.210397] EXT3-fs (mmcblk0p2): recovery complete

              [    3.215326] EXT3-fs (mmcblk0p2): mounted filesystem with writeback data mode

              [    3.222780] VFS: Mounted root (ext3 filesystem) on device 179:2.

               

              and then continues, which seems to indicate that it loaded the bzImage correctly and then boots up with the filesystem on partition 2.   

               

              I'm really unsure what is going on in the booting process actually.   I think the problem is that my bzImage file isn't loading starting / some problem with it.

              I think if the bzImage file is loaded correctly it then tries to load up things from the file system stored on partition 2.

               

              As an example to test this, i copied the intel provided bzImage file from the SDcard image to my card.    What happened was interesting.  it booted up all the way through to the login screen.  However it failed to load kernel modules (as expected as it's the wrong filestructure).

              So overall i think something wrong with my bzImage file or how it's loaded in.

               

              Please refer to the other reply above about the grub.conf file to see how that's configured

               

              PLEASE HELP!!

              thanks

              • 5. Re: Latest (1.2.1) Gen-II build differences between Intel provided SD Card image / documentation - can't boot from new compiled image/sd card
                DanielFitzgerald

                Yes i've been chasing this around for days and days and looking in there a lot.  the default option is the same on the intel image and my build, except for one parameter which is interesting.

                the two are below.  The only difference is the "$EARLY_CON_ADDR_REPLACE" field.   The intel image has some address but i cannot find any reference to this anywhere.

                Can someone help understand what this is for???

                 

                grub files:   (both default to the second menu option)

                 

                intel image grub:

                default 1

                timeout 5

                 

                color white/blue white/cyan

                 

                title Quark X1000 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 Quark X1000 kernel-MassStorage iot-devkit on SD IMR-On IO-APIC/HPET NoEMU debug

                    root (hd0,0)

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

                 

                my grub file:

                default 1

                timeout 5

                 

                color white/blue white/cyan

                 

                title Quark X1000 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 Quark X1000 kernel-MassStorage iot-devkit on SD IMR-On IO-APIC/HPET NoEMU debug

                    root (hd0,0)

                    kernel /bzImage root=/dev/mmcblk0p2 rootwait console=ttyS1,115200n8 earlycon=uart8250,mmio32,$EARLY_CON_ADDR_REPLACE,115200n8 reboot=efi,warm apic=debug rw LABEL=boot debugshell=5

                • 6. Re: Latest (1.2.1) Gen-II build differences between Intel provided SD Card image / documentation - can't boot from new compiled image/sd card
                  DanielFitzgerald

                  thanks for the reply.

                   

                  how do i check this? 

                  how will this help?

                   

                  all i know at the moment is the sd image version is:  linux galileo 3.8.7-yocto-standard

                  the one i'm building i believe is:   3.14.28-ltsi-yocto-standard

                   

                  not sure what the "ltsi" is -- perhaps this has something to do with my issues?

                   

                  again, please help!

                  thanks

                  Daniel

                  • 7. Re: Latest (1.2.1) Gen-II build differences between Intel provided SD Card image / documentation - can't boot from new compiled image/sd card
                    FGT

                    Hi Daniel

                     

                    how do i check this? 

                    how will this help?

                    I don't know how to check, but I think it could help (remember I'm not an expert) at least to compare/try to make similar configuration to the proper image provided by Intel, i.e. I think it makes sense to replicate the configuration/boot process of the eglibc image provided by Intel if you are actually generating a new eglibc image.

                     

                    Summary: I'm of not much help.

                     

                    Fernando.

                    • 8. Re: Latest (1.2.1) Gen-II build differences between Intel provided SD Card image / documentation - can't boot from new compiled image/sd card
                      DanielFitzgerald

                      Ok everyone, I think I've found some useful information here.

                      I've discovered in the bootup for the intel image, we have lines:

                      [    2.740363] mmc0: SDHCI controller on PCI [0000:00:14.0] using ADMA

                       

                      From the bootup from my build it never lists anything to do with the memory card, so I think the issue here is the memory card controller is not being initialised. so it hangs waiting for /dev/mmcblk0p2 to be mounted.

                      Does anyone have any ideas for this?

                      The weird thing is that it's booting from the grub.conf file right on the first partition - so it must have found /dev/mmcblk0p1 -- i'm really confused here.

                       

                      This still doesn't answer my most important question:   WHY IN SECTION 6 OF THE INTEL INSTRUCTIONS IT SAYS TO JUST COPY OVER FILES TO SD CARD BUT DOESN'T TALK ABOUT ANY PARTITIONS OR ANYTHING FOR THE SD CARD.  CLEARLY, THE GRUB MENU IS LOOKING FOR A 2ND PARTITION, SO THERE SHOULD BE SOME INFO ON THIS.

                       

                      PLEASE REPLY INTEL!! 

                      • 9. Re: Latest (1.2.1) Gen-II build differences between Intel provided SD Card image / documentation - can't boot from new compiled image/sd card
                        DanielFitzgerald

                        Hi all,

                        Up again till after 4am! but i've solved this.   The problem is bad config options in the grub menu file.   All this time I had correctly compiled code, etc but was because of the grub config it wasn't working.

                         

                        regarding the files, you just copy them all over to the SD Card; ONE partition only is required for the options below.  I had it as a FAT 32 partition but i think ext3 will work also.

                         

                        the menu option in the grub.conf file you need is as follows :

                         

                        title Quark X1000 kernel-MassStorage initrd-MassStorage RootFS-MassStorage 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-quark.ext3

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