From any directory within the PetaLinux project, build the PetaLinux project.
petalinux-build
The PetaLinux image files are generated in
/images/linux directory. Create a sysroot self-installer for the target Linux system
petalinux-build --sdk
The generated sysroot package sdk.sh is located in
/images/linux directory and you can extract it when you need.