linux_nvidia_jetson icon indicating copy to clipboard operation
linux_nvidia_jetson copied to clipboard

Building as non-root does not work

Open r0l1 opened this issue 1 year ago • 1 comments

Building the l4t-34.1.1-5.0.1-beta-1 as non-root does not work as intended. The last step fails.

INFO     Signing kernel image for t19x
ERROR    Error 1 executing `/home/foo/projetcs/linux_nvidia_jetson/avt_build/work/xavier/Linux_for_Tegra/l4t_sign_image.sh --file Image.t19x --chip 0x19 --type kernel`
ERROR    stdout:
/home/foo/projetcs/linux_nvidia_jetson/avt_build/work/xavier/Linux_for_Tegra/bootloader/tegraflash.py --chip 0x19 --key  --cmd sign Image.t19x kernel
Welcome to Tegra Flash
version 1.0.0
Type ? or help for help and q or quit to exit
Use ! to execute system commands

[   0.0018 ] Generating signature
[   0.0044 ] tegrasign_v3.py --key  --getmode mode.txt
[   0.0045 ] Assuming zero filled SBK key : not reading
[   0.0039 ] header_magic: 4d5a0091
[   0.0262 ] tegrahost_v2 --chip 0x19 --align 1_Image_aligned.t19x
[   0.0267 ]
[   0.0283 ] tegrahost_v2 --chip 0x19 0 --magicid KRNL --appendsigheader 1_Image_aligned.t19x zerosbk
[   0.0288 ] adding BCH for 1_Image_aligned.t19x
[   0.5900 ]
[   0.5933 ] tegrasign_v3.py --key  --list 1_Image_aligned_sigheader.t19x_list.xml
[   0.5935 ] Assuming zero filled SBK key : not reading
[   0.6483 ] tegrahost_v2 --chip 0x19 0 --updatesigheader 1_Image_aligned_sigheader.t19x.encrypt 1_Image_aligned_sigheader.t19x.hash zerosbk
[   0.9848 ]
[   1.0249 ] Signed file: /home/foo/projetcs/linux_nvidia_jetson/avt_build/work/xavier/Linux_for_Tegra/kernel/avt/kernel/debian/out/boot/Image_sigheader.t19x.encrypt
l4t_sign_image.sh: Generate header for Image_sigheader.t19x.encrypt
l4t_sign_image.sh: chip 0x19: add 0x218ca00 to offset  0x8 in sig file
l4t_sign_image.sh: Generate 16-byte-size-aligned base file for Image_sigheader.t19x.encrypt
l4t_sign_image.sh: the sign header is saved at Image.t19x.sig

stderr:
rm: cannot remove '/home/foo/projetcs/linux_nvidia_jetson/avt_build/work/xavier/Linux_for_Tegra/bootloader/__pycache__/tegraflash_internal.cpython-36.pyc': Permission denied
rm: cannot remove '/home/foo/projetcs/linux_nvidia_jetson/avt_build/work/xavier/Linux_for_Tegra/bootloader/__pycache__/tegrasign_v3_util.cpython-36.pyc': Permission denied
rm: cannot remove '/home/foo/projetcs/linux_nvidia_jetson/avt_build/work/xavier/Linux_for_Tegra/bootloader/__pycache__/t194.cpython-36.pyc': Permission denied

Traceback (most recent call last):
  File "/home/foo/projetcs/linux_nvidia_jetson/avt_build/jetson_build/tools.py", line 81, in execute
    raise RuntimeError(f'Subprocess returned error {sub.returncode}')
RuntimeError: Subprocess returned error 1

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "./build.py", line 5, in <module>
    main()
  File "/home/foo/projetcs/linux_nvidia_jetson/avt_build/jetson_build/build.py", line 138, in main
    deploy.deploy(args, brd)
  File "/home/foo/projetcs/linux_nvidia_jetson/avt_build/jetson_build/deploy.py", line 300, in deploy
    build_kernel_deb(args, board)
  File "/home/foo/projetcs/linux_nvidia_jetson/avt_build/jetson_build/deploy.py", line 39, in build_kernel_deb
    t.execute([board.build_dir / f"Linux_for_Tegra/l4t_sign_image.sh",'--file','Image.t19x','--chip','0x19','--type','kernel'],cwd=board.build_dir / "Linux_for_Tegra/kernel/avt/kernel/debian/out/boot/")
  File "/home/foo/projetcs/linux_nvidia_jetson/avt_build/jetson_build/tools.py", line 84, in execute
    raise RuntimeError(f'Error {str(err)} executing `{" ".join(str(x) for x in args)}`') from err
RuntimeError: Error Subprocess returned error 1 executing `/home/foo/projetcs/linux_nvidia_jetson/avt_build/work/xavier/Linux_for_Tegra/l4t_sign_image.sh --file Image.t19x --chip 0x19 --type kernel`

r0l1 avatar Aug 24 '22 12:08 r0l1

Hi, I struggled with same issue :

stderr: rm: cannot remove '/devel/RTR/SW/linux_nvidia_jetson/avt_build/work/xavier/Linux_for_Tegra/bootloader/pycache/t194.cpython-36.pyc': Permission denied rm: cannot remove '/devel/RTR/SW/linux_nvidia_jetson/avt_build/work/xavier/Linux_for_Tegra/bootloader/pycache/tegrasign_v3_internal.cpython-36.pyc': Permission denied avt_build

Traceback (most recent call last): File "/devel/RTR/SW/jlinux_nvidia_jetson/avt_build/jetson_build/tools.py", line 81, in execute raise RuntimeError(f'Subprocess returned error {sub.returncode}') RuntimeError: Subprocess returned error 1

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "./build.py", line 5, in main() File "/devel/RTR/SW/linux_nvidia_jetson/avt_build/jetson_build/build.py", line 138, in main deploy.deploy(args, brd) File "/devel/RTR/SW/linux_nvidia_jetson/avt_build/jetson_build/deploy.py", line 300, in deploy build_kernel_deb(args, board) File "/devel/RTR/SW/linux_nvidia_jetson/avt_build/jetson_build/deploy.py", line 39, in build_kernel_deb t.execute([board.build_dir / f"Linux_for_Tegra/l4t_sign_image.sh",'--file','Image.t19x','--chip','0x19','--type','kernel'],cwd=board.build_dir / "Linux_for_Tegra/kernel/avt/kernel/debian/out/boot/") File "/devel/RTR/SW/linux_nvidia_jetson/avt_build/jetson_build/tools.py", line 84, in execute raise RuntimeError(f'Error {str(err)} executing {" ".join(str(x) for x in args)}') from err RuntimeError: Error Subprocess returned error 1 executing /devel/RTR/SW/linux_nvidia_jetson/avt_build/work/xavier/Linux_for_Tegra/l4t_sign_image.sh --file Image.t19x --chip 0x19 --type kernel

l4es avatar Nov 02 '22 16:11 l4es