1 2 Previous Next 20 Replies Latest reply on Apr 23, 2014 9:45 AM by rmm200

    Makefile Capsule Error

    zijue

      The following is the error msg when I tried to build the capsule file. I've already used the command

      sudo apt-get install build-essentials uuid-dev
      
      

       

      So what can I do so as to fix the problem listed below. Thank you very much.

       

      zijue@~/labfiles/sysimage_v0.7.5/sysimage.CP-8M-release$ BASETOOLS=~/buildtools-BaseTools-master/Bin/CYGWIN_NT-5.1-i686/ ../../spi-flash-tools_v0.7.5/Makefile capsule

      ../../spi-flash-tools_v0.7.5//Makefile:104: layout.mk: 没有那个文件或目录

      ../../spi-flash-tools_v0.7.5///generator/generator.py ./layout.conf -M

      Found boot_index=0 in section boot_stage1_image1

      # When building on NFS with high precision timestamps you

      # might see a harmless "clock skew" warning. If that bothers

      # you then enable the next line:

      # usleep 100000 || sleep 1

      ../../spi-flash-tools_v0.7.5//asset-signing-tool/exports/lastbuilt/bin/cssinput -input grub/grub-ce.conf -bodyoffset 0x400 -svn 0 -svnindex 5 -output grub/grub-ce.conf.cssinput >/dev/null

      rm -f grub/grub-ce.conf.signed

      >/dev/null ../../spi-flash-tools_v0.7.5//asset-signing-tool/exports/lastbuilt/bin/codesignemulator -input grub/grub-ce.conf.cssinput -output grub/grub-ce.conf.signed -keyfile "./config/key.pem"

      test -e grub/grub-ce.conf.signed

      dd if=grub/grub-ce.conf.signed of=grub/grub-ce.conf.csbh bs=1024 count=1

      记录了1+0 的读入

      记录了1+0 的写出

      1024字节(1.0 kB)已复制,0.000273171 秒,3.7 MB/秒

      ../../spi-flash-tools_v0.7.5///generator/generator.py ./layout.conf

      Found boot_index=0 in section boot_stage1_image1

       

       

      ---- Flash content [15 items] ----

      Address       Size    Free    Type  BI  Name

      0x ff80 0000   328704    3072 0x0c     grub

      0x ff85 1000     2393    1703 0x0e     grub.conf

      0x ff85 2000  2114528   39968 0x11     Kernel

      0x ffa6 0000  2508093  240323 0x13     Ramdisk

      0x ffcf f000     3215     881 0x18     LAYOUT.CONF_DUMP

      0x ffd0 0000   918528  654336 0x04     boot_stage_2_compact

      0x ffe8 0000   259072    3072 0x01   1 boot_stage1_image2

      0x ffec 0000   259072    3072 0x01   0 boot_stage1_image1

      0x fff0 0000     8192   24576          RMU

      0x fff0 8000      168  163672          MFH

      0x fff3 0000   131072  262144          NV_Storage

      0x fff9 0000   259072    3072 0x01     fixed_recovery_image

      0x fffd 0000    32768       0          svn-area

      0x fffd 8000      856   31912          signed-key-module

      0x fffe 0000   131072       0          ROM_OVERLAY

      Total         6956805 1431803       

      Warning: sections in the layout.conf with duplicate names are ignored

       

       

      ../../spi-flash-tools_v0.7.5//generator/dediprog-checksum.py Flash-missingPDAT.bin

      45F473FB  Flash-missingPDAT.bin

      ../../spi-flash-tools_v0.7.5//generator/scan-padding.py Flash-missingPDAT.bin

      Found about 1398 KB of byte 0XC0 padding in Flash-missingPDAT.bin

      Found about 393 KB of byte 0XFF padding in Flash-missingPDAT.bin

      Found about 139 KB of byte 0X00 padding in Flash-missingPDAT.bin

      ../../clanton_peak_EDK2/Build/ClantonPeakCRBPlatform/RELEASE_GCC/FV/Tools/CapsuleCreate CapsuleComponents.ini  ./  _Flash-missingPDAT.cap.noheader 0x10000

      ../../clanton_peak_EDK2/Build/ClantonPeakCRBPlatform/RELEASE_GCC/FV/Tools/CapsuleCreate: 1: ../../clanton_peak_EDK2/Build/ClantonPeakCRBPlatform/RELEASE_GCC/FV/Tools/CapsuleCreate: Syntax error: "(" unexpected

      make: *** [Flash-missingPDAT.cap] 错误 2

        • 1. Re: Makefile Capsule Error
          rmm200

          Are you running your build on a 32 bit operating system or 64 bit?

          EDK2 defaults to 64 bit as I recall, and there is a parameter for that...

          I have had every build problem it is possible to have - I just don't remember all the steps to fix them. Wish I kept a journal.

          • 2. Re: Makefile Capsule Error
            zijue

            On a 32 bit Ubuntu.

             

            Where can I find the parameter?

            • 3. Re: Makefile Capsule Error
              rmm200

              You are in luck - I found my post where I describe your exact error:

              Re: Capsule Build 0.8.0

               

              Fix is simple - and I use the same Ubuntu 32 bit system you do.

              • 4. Re: Makefile Capsule Error
                zijue

                Thank you. But I've read that post before. So I use the command

                BASETOOLS=~/buildtools-BaseTools-master/Bin/CYGWIN_NT-5.1-i686/ ../../spi-flash-tools_v0.7.5/Makefile capsule

                to build the capsule.

                 

                I followed the steps to build the basic HelloWorld.epi. It succeeded. But When I run the command

                ../../spi-flash-tools_v0.7.5/Makefile capsule

                the same error occurs again.

                 

                So I think maybe I'm wrong in building the BaseTools. So would mind giving me at least hints on how to build the BaseTools? I run the command make in the base directory of the BaseTools, but only the Test directory changed. I don't know why. Thank you again.

                • 5. Re: Makefile Capsule Error
                  rmm200

                  I am sorry - now I am totally confused. The capsule file is built only once, to replace the firmware. It has nothing to do with build tools other than you need the tools to build it. It has nothing to do with HelloWorld or any other sketch. We may need Alex on this one.

                   

                  Also: verify you can cd to the file path listed in your basetools parameter. The uppercase B in Bin just looks - wrong.

                  • 6. Re: Makefile Capsule Error
                    AlexT_Intel

                    Hmm. In addition to what rmm200 said, I'd ask about that CYGWIN_NT I see in your path. Cygwin on Ubuntu? Really? Why? :-)

                    • 7. Re: Makefile Capsule Error
                      zijue

                      I downloaded the basetools and don't know how to build the basetools, so I tried that path, and the error msg in rmm200's post disappeared, but mine occured. I tried the "make" command in the base directory but only to find the Test directory changed while others not. I think I didn't rebuild the basetools at all.

                       

                      The second time (in a new terminal session) I followed the steps to build the HelloWorld.efi here SourceForge.net: Using EDK II with Native GCC 4.4 - tianocore. Since there is a step to build the shell environment, I think I don't need to configure the shell environment again. So the second time I tried Makefile capsule, I didn't add the BASETOOLS='...', but the same error msg occurs again.

                       

                      Maybe the reason is that I didn't build the basetools. So would you mind giving me some hints on how to build the basetools. Thank you.

                      • 8. Re: Makefile Capsule Error
                        zijue

                        Hi Alex,

                         

                        I deleted the edk2/BaseTools/Source/C/bin directory and type make -C edke/BaseTools. The bin file was created. Then I tried  BASETOOLS=~/src/edk2/BaseTools/Source/C/bin/  ../../spi-flash-tools_v0.7.5/Makefile capsule but the same error msg occured again. I deleted the clanton_peak_EDK2 and decompressed it again, the same error is still there. I think this time I might build the basetools correctly. So any idea of how to fix this problem? Thank you very much.

                         

                        The error msg is given below for a quick reference.

                        ../../clanton_peak_EDK2/Build/ClantonPeakCRBPlatform/RELEASE_GCC/FV/Tools/CapsuleCreate: Syntax error: "(" unexpected
                        • 9. Re: Makefile Capsule Error
                          rmm200

                          Take note that "BASETOOLS=~/src/edk2/BaseTools/Source/C/bin/  ../../spi-flash-tools_v0.7.5/Makefile capsule" is two lines - not one. After the space is the command you manually enter on a separate command line.

                          • 10. Re: Makefile Capsule Error
                            zijue

                            zijue@(13:11:49):~/labfiles/sysimage_v0.7.5/sysimage.CP-8M-release$ BASETOOLS=~/src/edk2/BaseTools/Source/C/bin/

                            zijue@(13:12:18):~/labfiles/sysimage_v0.7.5/sysimage.CP-8M-release$ ../../spi-flash-tools_v0.7.5/Makefile capsule

                             

                            like this in two seperate commands? ( there is not any breakline in the first command, it just displayed like that). Still that error.

                            • 11. Re: Makefile Capsule Error
                              rmm200

                              Well that looks a lot better.. BASETOOLS sets the location of where Makefile finds executables. Verify you can CD to that directory from where you are.

                              I don't know what else could be wrong, unless 0.7.5 does not honor the parameter. It worked for me on 0.9.0.

                              • 12. Re: Makefile Capsule Error
                                zijue

                                When I type the directory, I use tab to finish the rest names of each directory, so I'm sure I can CD to that directory from where I am.

                                • 13. Re: Makefile Capsule Error
                                  Cherne

                                  同学,我是下午找你要链接的那个人,我也是跟你一样,在解决了第一个问题之后碰到了第二个同样的问题:Syntax error: "(" unexpected

                                  请问你后来解决了没?谢谢!

                                  • 14. Re: Makefile Capsule Error
                                    AlexT_Intel

                                    Hmm, to  be honest I don't have any ideas other than it's indeed something with the basetools, but I'm not sure why it doesn't build for you. Any chance you could try a 64-bit Ubuntu to rule out at least this piece with a known problem on 32-bit ones?

                                     

                                    By the way, which version of Ubuntu you're using? 12.04 is highly recommended versus any newer ones (at least for the Yocto part, not sure if that applies to the firmware part).

                                    1 2 Previous Next