This shows you the differences between two versions of the page.
|
hw:zynq:linux:petalinux_2020.2:start [2021/04/21 14:45] jakub.moron created |
hw:zynq:linux:petalinux_2020.2:start [2021/04/21 14:47] (current) jakub.moron |
||
|---|---|---|---|
| Line 10: | Line 10: | ||
| - Set bash as default shell: <code> | - Set bash as default shell: <code> | ||
| dpkg-reconfigure dash | dpkg-reconfigure dash | ||
| - | </code> | ||
| - | - PetaLinux needs a patch for sed (in Debian Strech bash and sed are too new for PetaLinux). \\ From Xilinx forum: "The problem is the "ls | sed" command sequence in the last line generates a multi-line response while the bash read builtin only reads a single line. I added a wrapper around sed that translates the newlines generated into spaces and the installer completed as expected on an otherwise stock Debian stretch install." -- the default Xilinx workaround is to... replace the system sed with the wrapper, which is really nasty solution. Let's make it properly:\\ Create sed path script (assume example name ''sed.sh'') and make it executable: <code> | ||
| - | #!/bin/sh | ||
| - | # Remove newlines if called by the silly Xilinx PetaLinux 2018.1 installer | ||
| - | if [ "$2" = "s/^.*minimal-\(.*\)-toolchain.*/\1/" ] ; then | ||
| - | /bin/sed "$@" | tr '\n' ' ' | ||
| - | else | ||
| - | /bin/sed "$@" | ||
| - | fi </code> | ||
| - | - Create source script which will later set the PetaLinux enviroment. Assume example name ''settings_petalinux_2018.3.sh'': <code> | ||
| - | alias sed="<path_to_sed_wrapper_script>/sed.sh" | ||
| </code> | </code> | ||
| - Download PetaLinux from Xilinx - PetaLinux version have to match the installed Vivado version: \\ [[https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/embedded-design-tools.html|]] \\ \\ | - Download PetaLinux from Xilinx - PetaLinux version have to match the installed Vivado version: \\ [[https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/embedded-design-tools.html|]] \\ \\ | ||
| - | - Source the ''settings_petalinux_2018.3.sh'' script. \\ \\ | ||
| - Run downloaded PetaLinux installer: <code> | - Run downloaded PetaLinux installer: <code> | ||
| ./petalinux-v2020.2-final-installer.run -d <path_to_PetaLinux_target_directory> | ./petalinux-v2020.2-final-installer.run -d <path_to_PetaLinux_target_directory> | ||
| </code> It seems to be better to install the PetaLinux as user in user-accessible directory, not as root in ''/opt/''. \\ | </code> It seems to be better to install the PetaLinux as user in user-accessible directory, not as root in ''/opt/''. \\ | ||
| - | - Modify the ''settings_petalinux_2018.3.sh'' script and add the source of PetaLinux environment: <code> | + | - Create source script which will later set the PetaLinux environment. Assume example name ''settings_petalinux_2020.2.sh'': <code> |
| source <path_to_PetaLinux_target_directory>/settings.sh | source <path_to_PetaLinux_target_directory>/settings.sh | ||
| </code> | </code> | ||
| - | - In order to use the PetaLinux, source the ''settings_petalinux_2018.3.sh'' script. | + | - In order to use the PetaLinux, source the ''settings_petalinux_2020.2.sh'' script. |