PetaLinux 2023.2をUbuntu 24.04 LTSでビルドする

PetaLinux 2023.2がUbuntu 24.04LTSでビルドできなかったのかな?

ちょっと、探ってみよう…

でました、でました。

ERROR: PermissionError: [Errno 1] Operation not permitted

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "${PETALINUX_BUILD}/components/yocto/layers/poky/bitbake/bin/bitbake-worker", line 268, in child
    bb.utils.disable_network(uid, gid)
  File "${PETALINUX_BUILD}/components/yocto/layers/poky/bitbake/lib/bb/utils.py", line 1693, in disable_network
    with open("/proc/self/uid_map", "w") as f:
PermissionError: [Errno 1] Operation not permitted

ERROR: Task (${PETALINUX_BUILD}/components/yocto/layers/poky/meta/recipes-devtools/gcc/gcc-source_12.2.bb:do_rm_work) failed with exit code '1'
ERROR: PermissionError: [Errno 1] Operation not permitted

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "${PETALINUX_BUILD}/components/yocto/layers/poky/bitbake/bin/bitbake-worker", line 268, in child
    bb.utils.disable_network(uid, gid)
  File "${PETALINUX_BUILD}/components/yocto/layers/poky/bitbake/lib/bb/utils.py", line 1693, in disable_network
    with open("/proc/self/uid_map", "w") as f:
PermissionError: [Errno 1] Operation not permitted

ERROR: Task (${PETALINUX_BUILD}/components/yocto/layers/meta-xilinx/meta-xilinx-core/recipes-kernel/linux/linux-xlnx_2023.2.bb:do_rm_work) failed with exit code '1'

これはつぎのようにapp armorでエラーが出ているのでポリシーを解除すると解決します。

[375088.928971] audit: type=1400 audit(1716297940.003:336): apparmor="DENIED" operation="capable" class="cap" profile="unprivileged_userns" pid=4051557 comm="linux-xlnx:rm_w" capability=21  capname="sys_admin"

こんな感じで解除します。

sudo apparmor_parser -R /etc/apparmor.d/unprivileged_userns 

つぎはこんなエラーが出ました。

ERROR: Failed to spawn fakeroot worker to run ${PETALINUX_BUILD}/components/yocto/layers/meta-xilinx-tools/recipes-bsp/hdf/external-hdf.bb:do_package: [Errno 32] Broken pipe

do_package でエラーなんだけど、なにを直せばよかったかな…

write: 2024/05/25/ 10:00:00