UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor sephamorr
Visitor
651 Views
Registered: ‎10-29-2017

petalinux 2017.3 fails to build in etc/scripts_py/deploy.py

I'm on a fresh install of ubuntu 16.04 + vivado 2017.3 + petalinux 2017.3.

Building petalinux fails with the following:

 

$ petalinux-build 
[INFO] building project
[INFO] sourcing bitbake
INFO: bitbake petalinux-user-image
Loading cache: 100% |##############################################################################| Time: 0:00:00
Loaded 3256 entries from dependency cache.
Parsing recipes: 100% |############################################################################| Time: 0:00:01
Parsing of 2466 .bb files complete (2433 cached, 33 parsed). 3259 targets, 226 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Initialising tasks: 100% |#########################################################################| Time: 0:00:06
Checking sstate mirror object availability: 100% |#################################################| Time: 0:00:07
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 2439 tasks of which 2434 didn't need to be rerun and all succeeded.
INFO: Copying Images from deploy to images
Traceback (most recent call last):
  File "/opt/Xilinx/petalinux/etc/scripts_py/deploy.py", line 235, in <module>
    parse_args(sys.argv[1:])
  File "/opt/Xilinx/petalinux/etc/scripts_py/deploy.py", line 230, in parse_args
    main_func(proot,machine_name)
  File "/opt/Xilinx/petalinux/etc/scripts_py/deploy.py", line 205, in main_func
    copy_rootfs(proot,machine_name,machine_conf)
  File "/opt/Xilinx/petalinux/etc/scripts_py/deploy.py", line 148, in copy_rootfs
    for _file in os.listdir(source_folder):
OSError: [Errno 2] No such file or directory: '/opt/fra/petalinux/build/tmp/deploy/images/plnx_arm'
ERROR: Failed to copy images from deploy directory
ERROR: Failed to build project

Diffing deploy.py between petalinux 2017.2 and 2017.3 shows that the copy_rootfs function changed, and now breaks the build. I'm just upgrading from 2017.2, so still had a copy of the files on my old image.

 

Replacing the function with the old copy_rootfs and adding get_image_fstypes (helper function) appears to fix things. See old (functional) code below:

 

def get_image_fstypes(machine_conf):
  image_fstypes = []
  serch_str = re.escape("IMAGE_FSTYPES")
  for e in machine_conf:
    e_str = str(e)
    if re.search(serch_str,e_str):
      fstypes = e_str.split('=')[1]
      fstypes = re.sub(' ','',fstypes,1)
      fstypes = re.sub("\"",'',fstypes)
      fstypes = fstypes.split(' ')
      image_fstypes += fstypes
  return image_fstypes

def copy_rootfs(proot,machine_name,machine_conf):
  image_fstypes=get_image_fstypes(machine_conf)
  for e in image_fstypes:
    rfs_image = "petalinux-user-image-" + machine_name + '.' + str(e)
    dest_name = "rootfs." + str(e)
    copy_file(proot,machine_name,rfs_image,dest_name)

 

Has anyone else seen this / have a better workaround?

 

0 Kudos
1 Reply
Moderator
Moderator
603 Views
Registered: ‎12-04-2016

Re: petalinux 2017.3 fails to build in etc/scripts_py/deploy.py

Hi

 

Are you using Virtual machine for this experiment? Make sure you have more than 16GB VM RAM allocated.

 

I believe you have installed all the required packages mentioned in "Installation requirements" of UG1144 petalinux guide

 

 

Best Regards

Shabbir

0 Kudos