I extended the installation of Petalinux v2021.2 into: /opt/Xilinx/petalinux/v2021.2/
Dockerfile changed to recursively set chmod on above folder, starting at Xilinx/
[Dockerfile]
RUN chmod a+rx /${PETA_RUN_FILE} &&
chmod a+rx /accept-eula.sh &&
mkdir -p /opt/Xilinx/petalinux/${PETA_VERSION} &&
mkdir -p /opt/Xilinx/petalinux/bsps &&
chmod 777 /tmp &&
chmod -R 777 /opt/Xilinx &&
find / -maxdepth 1 -name *.bsp -exec mv {} /opt/Xilinx/petalinux/bsps ; &&
cd /tmp &&
sudo -u vivado -i /accept-eula.sh /${PETA_RUN_FILE} /opt/Xilinx/petalinux/${PETA_VERSION} &&
rm -f /${PETA_RUN_FILE} /accept-eula.sh
($PETA_VERSION = "v2021.2", note: also pulled in a .bsp file...)
The install fails though, some errors generated prior to an expect line failing:
[Docker Output]
(all fine up to here)
Step 11/20 : COPY accept-eula.sh ${PETA_RUN_FILE} *.bsp /
---> acf92fc1669f
Step 12/20 : RUN chmod a+rx /${PETA_RUN_FILE} && chmod a+rx /accept-eula.sh && mkdir -p /opt/Xilinx/petalinux/${PETA_VERSION} && mkdir -p /opt/Xilinx/petalinux/bsps && chmod 777 /tmp && chmod -R 777 /opt/Xilinx && find / -maxdepth 1 -name *.bsp -exec mv {} /opt/Xilinx/petalinux/bsps ; && cd /tmp && sudo -u vivado -i /accept-eula.sh /${PETA_RUN_FILE} /opt/Xilinx/petalinux/${PETA_VERSION} && rm -f /${PETA_RUN_FILE} /accept-eula.sh
---> Running in b407c32a0b72
spawn /petalinux-v2021.2-final-installer.run /opt/Xilinx/petalinux/v2021.2
ERROR: Invalid options: /opt/Xilinx/petalinux/v2021.2
spawn /petalinux-v2021.2-final-installer.run -d /opt/Xilinx/petalinux/v2021.2
INFO: Checking installation environment requirements...
WARNING: This is not a supported OS
INFO: Checking free disk space
INFO: Checking installed tools
INFO: Checking installed development libraries
INFO: Checking network and other services
WARNING: No tftp server found - please refer to "UG1144 PetaLinux Tools Documentation Reference Guide" for its impact and solution
INFO: Checking installer checksum...
INFO: Extracting PetaLinux installer...
LICENSE AGREEMENTS
PetaLinux SDK contains software from a number of sources. Please review
the following licenses and indicate your acceptance of each to continue.
You do not have to accept the licenses, however if you do not then you may
not use PetaLinux SDK.
Use PgUp/PgDn to navigate the license viewer, and press 'q' to close
Press Enter to display the license agreements
WARNING: terminal is not fully functional
Do you accept Xilinx End User License Agreement? [y/N] > y
WARNING: terminal is not fully functional
Do you accept Third Party End User License Agreement? [y/N] > yment.txt (press RETURN)
INFO: Installing PetaLinux...
qqINFO: Checking PetaLinux installer integrity...
qqINFO: Installing PetaLinux SDK to "/opt/Xilinx/petalinux/v2021.2/."
qq*********************************************
ERROR: Failed to install PetaLinux SDK into "/opt/Xilinx/petalinux/v2021.2/."
Please refer to the PetaLinux Tools Installation Guide.
Check the troubleshooting guide at the end of that manual, and if you are
unable to resolve the issue please contact customer support with file:
/home/vivado/petalinux_installation_log
expect: spawn id exp6 not open
while executing
"expect "INFO: Checking PetaLinux installer integrity...""
(file "/accept-eula.sh" line 32)
The command '/bin/sh -c chmod a+rx /${PETA_RUN_FILE} && chmod a+rx /accept-eula.sh && mkdir -p /opt/Xilinx/petalinux/${PETA_VERSION} && mkdir -p /opt/Xilinx/petalinux/bsps && chmod 777 /tmp && chmod -R 777 /opt/Xilinx && find / -maxdepth 1 -name *.bsp -exec mv {} /opt/Xilinx/petalinux/bsps ; && cd /tmp && sudo -u vivado -i /accept-eula.sh /${PETA_RUN_FILE} /opt/Xilinx/petalinux/${PETA_VERSION} && rm -f /${PETA_RUN_FILE} /accept-eula.sh' returned a non-zero code: 1
I generated a temporary image from b407c32a0b72 and ran it interactively.
$ docker commit b407c32a0b72 temp-failed-peta-env
$ docker run -ti --rm temp-failed-peta-env /bin/bash
All directories exist, but the /opt/Xilinx/petalinux/v2021.2/ folder is still own by root (more on this later)
Changing to user: vivado ..
$ su vivado
vivado@aa83c66a7ccf:/$ cd ~
And looking at the Petalinux install log:
vivado@aa83c66a7ccf:/$ less petalinux_installation_log
[LOG]
INFO: Checking installation environment requirements...
WARNING: This is not a supported OS
INFO: Checking free disk space
INFO: Checking installed tools
INFO: Checking installed development libraries
INFO: Checking network and other services
WARNING: No tftp server found - please refer to "UG1144 PetaLinux Tools Documentation Reference Guide" for its impact and solution
INFO: Checking installer checksum...
INFO: Extracting PetaLinux installer...
INFO: Installing PetaLinux...
INFO: Checking PetaLinux installer integrity...
INFO: Installing PetaLinux SDK to "/opt/Xilinx/petalinux/v2021.2/."
...................................................tar: .: Cannot utime: Operation not permitted
tar: .: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: Exiting with failure status due to previous errors
ERROR: Failed to install PetaLinux SDK into "/opt/Xilinx/petalinux/v2021.2/."
Please refer to the PetaLinux Tools Installation Guide.
Check the troubleshooting guide at the end of that manual, and if you are
unable to resolve the issue please contact customer support with file:
/home/vivado/petalinux_installation_log
Errors --------------------------------
(1) tar "Cannot utime: Operation not permitted"
tar wants to adjust timestamp but cannot because user vivado does not own /opt/Xilinx/petalinux/v2021.2/
So how was this working before? I would assume this is fixed by getting docker to change the ownership of the /opt/Xilinx/petalinux/v2021.2/ folder to user: vivado at either petalinux/ or v2021.2?
Or is there some other issue?
Thanks,