rootfs generation failed : permission denied in do_rootfs

Open
#8 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
20/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
linux, python

Research direction

Start with the do_rootfs call in image.bbclass and follow the traceback through oe/rootfs.py and oe/package_manager.py to the subprocess PermissionError. Reproduce the clean project generation described in the issue and identify which executable or path fails. Done means the zcu104_dpu rootfs task completes successfully without the permission-denied error.

Written by the indexing model from the issue text.

Description

Hello,

I am trying to create the petalinux project in zcu104_dpu,

make -C petalinux all XSA_DIR=/hdd-raid0/home_server/mathieu/Documents/Xilinx/vitis/Vitis_Embedded_Platform_Source/Xilinx_Official_Platforms/zcu104_dpu/vivado/ PLATFORM=zcu104_dpu

The process is almost done :

NOTE: Tasks Summary: Attempted 8618 tasks of which 8617 didn't need to be rerun and 1 failed.

this task is the rootfs generation :

Xilinx/Petalinux/2019.2/components/yocto/source/aarch64/layers/core/meta/classes/image.bbclass', lineno: 245, function: do_rootfs
*** 0245: create_rootfs(d, progress_reporter=progress_reporter, logcatcher=logcatcher)

Xilinx/Petalinux/2019.2/components/yocto/source/aarch64/layers/core/meta/lib/oe/rootfs.py', lineno: 965, function: create_rootfs
dpkgRootfs(d, manifest_dir, progress_reporter, logcatcher).create()

Xilinx/Petalinux/2019.2/components/yocto/source/aarch64/layers/core/meta/lib/oe/rootfs.py', lineno: 210, function: create
self.pm.run_intercepts()

Xilinx/Petalinux/2019.2/components/yocto/source/aarch64/layers/core/meta/lib/oe/package_manager.py', lineno: 443, function: run_intercepts
output = subprocess.check_output(script_full, stderr=subprocess.STDOUT)

Xilinx/Petalinux/2019.2/components/yocto/source/aarch64/buildtools/sysroots/x86_64-petalinux-linux/usr/lib/python3.5/subprocess.py', lineno: 316, function: check_output
0315: return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
*** 0316: **kwargs).stdout

Xilinx/Petalinux/2019.2/components/yocto/source/aarch64/buildtools/sysroots/x86_64-petalinux-linux/usr/lib/python3.5/subprocess.py', lineno: 383, function: run
*** 0383: with Popen(*popenargs, **kwargs) as process:

Xilinx/Petalinux/2019.2/components/yocto/source/aarch64/buildtools/sysroots/x86_64-petalinux-linux/usr/lib/python3.5/subprocess.py', lineno: 1296, function: _execute_child
*** 1296: raise child_exception_type(errno_num, err_msg)

the sample code is below :

`

if issubclass(child_exception_type, OSError) and hex_errno: 
                errno_num = int(hex_errno, 16)
                child_exec_never_called = (err_msg == "noexec")
                if child_exec_never_called:
                    err_msg = ""
                if errno_num != 0:
                    err_msg = os.strerror(errno_num)
                    if errno_num == errno.ENOENT:
                        if child_exec_never_called:
                            # The error must be from chdir(cwd).
                            err_msg += ': ' + repr(cwd) + 'ERROR 1'
                        else:
                            err_msg += ': ' + repr(orig_executable)
                            + 'ERROR 2'
                raise child_exception_type(errno_num, err_msg)
            raise child_exception_type(err_msg)

`

I tried to find which file/directory hasn't the right permission or doesn't exist, however I didn't find the information since the error message contain only :

Exception: PermissionError: [Errno 13] Permission denied

I tried to clean the project and restart the generation but I obtain the same error.

Do you have any suggestions ?

Thank you

Dominant language
Tcl
Stars
141
Forks
78
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Xilinx/Vitis_Embedded_Platform_Source

All issues in Xilinx/Vitis_Embedded_Platform_Source

Similar issues

More Build System issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.