Hacking the 2018.2 PetaLinux Tools Installer

xilinx_logo_1

This post shows some ways to hack petalinux-v2018.2-final-installer.run

Hacks

Pull Out the Bash Script

awk '1;/^##__PLNXSDK_FOLLOWS__/{if (NR>1) exit}' petalinux-v2018.2-final-installer.run > petalinux.sh

Print the Line Where the Tarball Starts

awk '/^##__PLNXSDK_FOLLOWS__/ { print NR + 1; exit 0; }' petalinux-v2018.2-final-installer.run

Extract the Tarball from the Installer to the Current Directory

tail -n +$(awk '/^##__PLNXSDK_FOLLOWS__/ { print NR + 1; exit 0; }' petalinux-v2018.2-final-installer.run) petalinux-v2018.2-final-installer.run | tar -xvJ

Install PetaLinux Tools

Note: this sequence assumes your executing from the directory of the extracted the built-in tarball

1. Type:

touch petalinux_installation_log
export PLNXINSTALLLER=petalinux-v2018.2-final-installer.run
export PLNXINSTALLDIR=/opt/pkg/petalinux
export PLNXINSTALL_LOG=petalinux_installation_log
tools/common/petalinux/utils/petalinux-install

2. Type Control-C

3. PetaLinux will then install

References

  • Awk One-Liners Explained, Part I: File Spacing, Numbering and Calculations at [link]

  • man awk, awk –version is GNU Awk 4.1.3, API: 1.1 (GNU MPFR 3.1.4, GNU MP 6.1.0)

  • Answer to awk + print lines from the first line until match word on StackExchange at [link]

  • Awk at [link]

  • How to Write AWK Commans and Scripts at [link]

  • Xilinx logo found via https://twitter.com/xilinxinc at [link]