6 Replies Latest reply on Jan 13, 2021 10:10 AM by drozwood90

    Petalinux 2020.1 failed to compile with tagged version

    pmdp3

      Hello,

       

      I am trying to build petalinux using ./make_uz7ev_evcc.sh

      I set both the petalinux and the hdl version to tag 2020p1_uz_petalinux_UZ7EV_EVCC_20201104_065342

      I am using Vitis 2020.1.

      When the code runs create_petalinux_project(), it fails at

      petalinux-config --silentconfig --get-hw-description=./hw_platform/ -p ${PETALINUX_PROJECTS_FOLDER}/${PETALINUX_PROJECT_NAME}

      with:

      [INFO] generating user layers

      ERROR: Failed to add user layer: /home/pdaye/workspace/ultrazed/git/avnet/petalinux/projects/uz7ev_evcc_2020_1/project-spec/meta-user

      ERROR: Failed to config project.

      ERROR: Get hw description Failed!

       

      Does anyone have an idea to the reason why it is happening?

      Yours,

       

      Pierre

      • Reply
        • Re: Petalinux 2020.1 failed to compile with tagged version
          drozwood90

          Hi there,

           

          I think you changed the wrong variable.

          You do not change the version from 2020.1.  That needs to stay the same.  The only thing that would change is the meta-avnet definition in common.sh.

          However, you should not have to modify that either.

           

          All you need to do is pull down that tag itself.  All the variables, tagstamp.txt and anything else would be setup properly.

           

          Here is a script that I use when I am working with the 2020.1 tags/tips/etc.

          copy of getClones.sh

          # Zynq 7000 (non-Vitis)
          #branchTag=2020p1_minized_petalinux_MINIZED_20201104_065342
          #branchTag=2020p1_mz_petalinux_MZ7010_FMCCC_20201104_065342
          #branchTag=2020p1_mz_petalinux_MZ7020_FMCCC_20201104_065342
          #branchTag=2020p1_pz_petalinux_PZ7010_FMC2_20201104_065342
          #branchTag=2020p1_pz_petalinux_PZ7015_FMC2_20201104_065342
          #branchTag=2020p1_pz_petalinux_PZ7020_FMC2_20201104_065342
          #branchTag=2020p1_pz_petalinux_PZ7030_FMC2_20201104_065342
          
          
          # UltraScale+ (Vitis Capable)
          #branchTag=2020p1_ultra96v2_oob_ULTRA96V2_20201104_065342
          #branchTag=2020p1_uz_petalinux_UZ3EG_IOCC_20201104_065342
          #branchTag=2020p1_uz_petalinux_UZ3EG_PCIEC_20201104_065342
          branchTag=2020p1_uz_petalinux_UZ7EV_EVCC_20201104_065342
          
          
          #branchTag=2020.1
          
          
          if [ -z ${PETALINUX_VER+x} ]; 
          then 
               echo "PETALINUX_VER is unset"; 
          else 
               echo "PETALINUX_VER is set to '$PETALINUX_VER'"; 
          fi
          
          
          echo "Cloning '$branchTag'"; 
          git clone https://github.com/Avnet/vitis.git
          cd vitis
          git checkout ${branchTag}
          cd ..
          git clone https://github.com/Avnet/bdf.git
          git clone https://github.com/Avnet/hdl.git
          git clone https://github.com/Avnet/petalinux.git
          cd hdl
          git checkout ${branchTag}
          cd ..
          cd petalinux
          git checkout ${branchTag}
          cd ..
          
          

           

          Copy this into ~/getClones.sh

          save it, and set it to executable

          sudo chmod 755 getClones.sh
          

           

          cd to your projects folder

          ex:

          cd ~/projects
          mkdir getTag
          cd getTag
          

           

          Run the script

          ./getClones.sh
          

           

          --Dan

          2 of 2 people found this helpful
            • Re: Petalinux 2020.1 failed to compile with tagged version
              pmdp3

              Hello,

               

              Thank you for your quick response to my request! This is very kind of you.

              I am currently running the code you provided.

              In the meantime, and for my personnal knowledge, I don't understand why meta-avnet should have an impact at this point.

              From my reading of the make_uz7ev_evcc.sh script,

              1. First you check the repos and the env variables
              2. Then you check if you have to build the XSA
              3. Then you create the petalinux projet
              4. Then you configure the petalinux project

              The meta-avnet layer is, from what I understand, added during step 4 (configure_petalinux_project ln 89 call config.board.uz7ev_evcc.sh which does the patching).

              So I don't get where the problem could be as I haven't call the meta-avnet layer at that time...

               

              (In the meantime, the code is finished and it works! Thank you very much)

               

              Yours,

               

              Pierre

                • Re: Petalinux 2020.1 failed to compile with tagged version
                  drozwood90

                  Hi there,

                   

                  Without knowing exactly which variables you changed, my feeling, related to what you posted, is you removed the ability of the tool to be able to tell what version of tool it is supposed to work with - which then upsets a chain of events and other variables related to that.

                   

                  We are working on some cleaner ways to handle this and trying to make things more clear.  This last release was the first time we tried this.

                   

                  Regardless, I am very happy that you got everything working now!

                   

                  --Dan

                  1 of 1 people found this helpful
              • Re: Petalinux 2020.1 failed to compile with tagged version
                pmdp3

                Thank you, it is working now!

                 

                Yours

                 

                Pierre

                • Re: Petalinux 2020.1 failed to compile with tagged version
                  pmdp3

                  Hello,

                   

                  I am very sorry about that but it seems that the issue was a little bit more complicated than I expected.

                  I could use the script you gave and, randomly (which is frustrating ), it worked but most of the time it didn't.

                  I found this post on the Xilinx forum https://forums.xilinx.com/t5/Embedded-Linux/Petalinux-project-2020-2-failed-to-add-user-layer/td-p/1188455

                  in which they suggest to change a sysctl value with

                  sudo sysctl -n -w fs.inotify.max_user_watches=524288

                  Now, it is working all the time...

                   

                  In the hope that it could help someone else

                   

                  Pierre

                    • Re: Petalinux 2020.1 failed to compile with tagged version
                      drozwood90

                      Pierre,

                       

                      Thank you for posting that.  I had just seen some other users that needed something like that.  I will make sure to get that added into our VM setup guide.

                      It is strange, sometimes people do not need that.  Other times they do.  I did not recommend it as I have yet to work out why that is.  Seems you have pushed it far enough that I think we'll just recommend that change.

                      Personally, I've just completed building all of the 2020.1 and 2020.2 images and did not need that change.  Go figure.

                       

                      --Dan