1 2 Previous Next 17 Replies Latest reply on Feb 11, 2014 12:49 PM by AlexT_Intel

    Capsule Build 0.8.0

    rmm200

      OK, I got tired of reset not working, and I want to update my firmware.

      I am using the BSP for 0.8.0, section 6. Note: 0.9.0 really improves this section. Like, it tells you what directory to be in when you issue commands.

      I found no needed updates to layout.conf, and I manually made links to the appropriate directories.

      I get a syntax error I can't find running Makefile capsule:

       

      galileo@robert-virtual-machine:~/sysimage/sysimage.CP-8M-release$ ../../spi-flash*/Makefile capsule

      rm -f image.ffs

      ../../spi-flash-tools_v0.8.0/BaseTools/x86_64/C/bin/GenFw ../../meta-clanton/yocto_build/tmp/deploy/images/grub.efi -o ../../meta-clanton/yocto_build/tmp/deploy/images/grub.efi.fw -e UEFI_APPLICATION || { cat ../../spi-flash-tools_v0.8.0/BaseTools/README.txt; exit 1; }

      ../../spi-flash-tools_v0.8.0/BaseTools/x86_64/C/bin/GenFw: 1: ../../spi-flash-tools_v0.8.0/BaseTools/x86_64/C/bin/GenFw: Syntax error: "(" unexpected

       

      So... Has anyone sucessfully built a capsule file on 0.8.0? Any ideas on what is wrong?

       

      Crazy me - I thought after successfully building image-spi, the capsule would be the easy part.

        • 1. Re: Capsule Build 0.8.0
          AlexT_Intel

          I've built it several times. If getting into very details of the process is not your goal, I'd suggest you to use a script I wrote: http://github.com/alext-mkrs/galileo-fw

          • 2. Re: Capsule Build 0.8.0
            rmm200

            Well, being the stubborn type, I ran an image-spi build against 0.9.0. and then found I had to build all the EDKII build tools. OK - so I built those - huge build.

            Then I ran ../../spi-flash-tools*/Makefile from the sysimage release directory.

            It created signed images of everything down to grub.

            Then it failed with the same unexpected "(" error I got on 0.8.0.

            OK - I know when I am beat. Alex I used your github link, and tried to download your 0.8.0 capsule efi file.

            No such file. Intel says it has been moved.

            Actually, what I would like I think is something like sysimage_00782_capsulefull_noreset.cap, not a cap.efi, for use by upgrading through the Arduino IDE.

            • 3. Re: Capsule Build 0.8.0
              MarcIII

              It's unfortunate you did not post the error + help message immediately after the "syntax error" message. Can you post it now to make sure we are all on the same page?

               

              As mentioned there, on your 32bits Linux system you can override the location of the (64bits by default) BASETOOLS with something like this:

               

                BASETOOLS=../EDK2/BaseTools/Source/C/bin ../spi-flash-tools/Makefile

              • 4. Re: Capsule Build 0.8.0
                rmm200

                This is the complete build stream:

                 

                galileo@robert-virtual-machine:~$ cd sysimage/sysimage.CP-8M-release

                galileo@robert-virtual-machine:~/sysimage/sysimage.CP-8M-release$ ../../spi-flash-tools/Makefile

                rm -f image.ffs

                ../../spi-flash-tools/BaseTools/x86_64/C/bin/GenFw ../../meta-clanton/yocto_build/tmp/deploy/images/grub.efi -o ../../meta-clanton/yocto_build/tmp/deploy/images/grub.efi.fw -e UEFI_APPLICATION || { cat ../../spi-flash-tools/BaseTools/README.txt; exit 1; }

                ../../spi-flash-tools/BaseTools/x86_64/C/bin/GenFw: 1: ../../spi-flash-tools/BaseTools/x86_64/C/bin/GenFw: Syntax error: "(" unexpected

                 

                For convenience, these BaseTools binaries were pre-built for Linux

                x86_64 from this source code:

                 

                  BaseTools -r13937 http://svn.code.sf.net/p/edk2/code/branches/UDK2010.SR1/BaseTools

                 

                If these binaries are not compatible with your system then you must

                download the source code and build them, follow these instructions:

                 

                http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=Edk2-buildtools

                 

                Then you can override the BASETOOLS Make variable on the command line.

                 

                make: *** [../../meta-clanton/yocto_build/tmp/deploy/images/grub.efi.fv] Error 1

                galileo@robert-virtual-machine:~/sysimage/sysimage.CP-8M-release$

                 

                I list this only for reference - the BaseTools Makefile variable fixed it. That needs to be in the manual - and I am giving credit for a complete answer!  Thanks! I think I am all set to write the firmware - if I brick it, I will be back...

                 

                Well - I am not there yet. Build process created Flash-missingPDAT.cap. I placed that in arduino-1.5.3\hardware\tools\x86\bin as the only .cap file.

                Running firmware update from the ide gives the reminder to plug in the power supply, and then it gets a java run time exception - illegal number format.

                I will try a different method of updating the firmware - another day...

                • 5. Re: Capsule Build 0.8.0
                  AlexT_Intel

                  Alex I used your github link, and tried to download your 0.8.0 capsule efi file.

                  No such file. Intel says it has been moved.

                   

                  Hmm, that's interesting. The links looked like they won't change arbitrarily. I'll look into that right away.

                  • 6. Re: Capsule Build 0.8.0
                    AlexT_Intel

                    Okay, it looks like the 0.8.0 package was completely removed from downloads. There's only 0.9.0 and 0.7.5. That doesn't make sense to me, especially given the fact that 0.9.0 is marked as "beta".

                     

                    @Intel_JEspinoza, maryc_intel, @intel_jorge (looks like the @mentions don't  work in full here) - do you folks know any reason behind that, or maybe it's just hidden somewhere and I can't find it?

                    • 7. Re: Capsule Build 0.8.0
                      rmm200

                      Alex question for you:  You posted a capsule.efi file for download - what is that for? The output of the build process is a .cap file, which supposedly contains everything needed for a firmware burn. And what is the best way to get either / both of those to the Galileo, lacking a dedicated programmer? Thanks!

                      • 8. Re: Capsule Build 0.8.0
                        AlexT_Intel

                        You posted a capsule.efi file for download - what is that for? The output of the build process is a .cap file, which supposedly contains everything needed for a firmware burn

                        There are two main ways of gettng the capsule package applied:

                        1. running CapsuleApp.efi from UEFI shell via a serial console (CapsuleApp.efi in this case is the one doing the flashing process);
                        2. using the way IDE does - loading a kernel module+putting the capsule into proper place on the board itself+echoing right string into right file under /sys/firmware+rebooting the board;

                         

                        I personally like the UEFI shell one more, because IMHO there are much fewer "moving parts" and things, which may go wrong. And up until 0.9.0 that was the only officially listed way for cap files (the 0.9.0 BSP Build Guide lists the instructions for the second approach too).

                         

                        The second way enables you to update the SPI image even if you don't have the serial cable, but you don't see what's going on, which makes it harder to troubleshoot in case something goes wrong.

                        • 9. Re: Capsule Build 0.8.0
                          rmm200

                          Thanks Alex - that helps. If you can re-post your CapsuleApp.efi where we can download it again, I will give that a shot. I have a Serial cable.

                          Using the Arduino IDE to do a firmware update using the .cap file was appealing, because I could pretend the IDE did more error checking - but I will settle for anything that works. And I especially like using a file that you have verified works.

                          Since it looks like Intel has buried the 0.8.0 release, would there be any significant difference between 0.8.0 and 0.9.0 CapsuleApp.efi? If you are feeling generous, you might just want to post one for 0.9.0.

                          • 10. Re: Capsule Build 0.8.0
                            MarcIII

                            Reminder: the last release of the IDE does NOT officially support anything but 0.7.5 yet. Combine the 0.7.5 IDE with a more recent BSP at your own risk!

                             

                            If you have a serial cable I would definitely recommend upgrading from UEFI and not from Linux. Before 0.9.0 the capsule upgrade driver in Linux was not reliable. Reliably upgrading from Linux is far from simple because it requires copying the new & fixed driver from 0.9.0 into the 0.7.5 Linux tree and recompiling it there.

                            • 11. Re: Capsule Build 0.8.0
                              rmm200

                              The questions never stop...

                              The directory tree Quark_EDKII_v0.9.0 contains 21 (Twenty One!) files named CapsuleApp.efi. Nothing in the documentation gives a clue as to which one to use. Are they all the same? There are no other CapsuleApp.efi's on my system.

                              Then I copy an appropriate CapsuleApp.efi and my generated Flash-missingPDAT.cap (what does that name mean?) to a blank sd card and go from there? The actual serial burning part seems straightforward.

                              • 12. Re: Capsule Build 0.8.0
                                AlexT_Intel

                                If you're going to flash the 0.9.0 version, then you'll need to first build that CapsuleApp.efi according to the BSP Build Guide. Previously it was posted for download, now you build it yourself. I haven't tried that yet, so I can't tell you what's the deal with 21 versions of it, but that looks strange, maybe these are just symlinks?

                                Flash-missingPDAT.cap (what does that name mean?)

                                "missing Platform Data" as far as I understand. But that's fine because for capsule file you don't need platform data, so "missing" in this specific case is not a synonim for "bad" or  "lacking".

                                 

                                Then I copy an appropriate CapsuleApp.efi and my generated Flash-missingPDAT.cap (what does that name mean?) to a blank sd card and go from there

                                Yes, as per the instructions in teh BSP Build Guide. I just followed that when I was upgrading my board and that was it.

                                1 of 1 people found this helpful
                                • 13. Re: Capsule Build 0.8.0
                                  rmm200

                                  Thank you all! With a lot of handholding, I successfully updated my firmware to 0.9.0.

                                  It works successfully with my 0.8.0 Linux - and reset works! No more pulling power to reset.

                                   

                                  One note: the CapsuleApp.efi (one of 21) that I wound up using does not respond with version number to -? or -h.

                                  Worked successfully anyway. I think I need a vacation now.

                                   

                                  That -? or -h came from my 0.8.0 documentation. 0.9.0 says use -v, and I did not try that. Always use matching docs...

                                  • 14. Re: Capsule Build 0.8.0
                                    AlexT_Intel

                                    Congratulations! :-)

                                     

                                    Yeah, it's actually -v, in 0.8.0 too. I've reported that a while ago, but looks like it didn't make to docs [yet]


                                    EDIT: okay, I've misread that :-) So it is corrected in 0.9.0 - that's great, glad this is now clarified.

                                    1 2 Previous Next