@:~$ mkdir ~/repos
@:~$ git clone --mirror https://bitbucket.org/spacewire_firmware/swuk_tutorial.git ~/repos/swuk_tutorial.git
@:~$ git clone ~/repos/swuk_tutorial
@:~$ cd
@:$ git switch -c my_master
@:$ git reset --hard zedboard_linux_v17.0
@:$ git push -u origin my_master
@:$ source ~/.bashrc
@:~$ swuk_xilinx 2023.2
Tools are as follows :-
Vivado @ /opt/Xilinx/Vivado/2023.2/bin/vivado
SDK @ Not available!
Vitis @ /opt/Xilinx/Vitis/2023.2/bin/vitis
PetaLinux @ /opt/Xilinx/PetaLinux/2023.2/tool/tools/common/petalinux/bin/petalinux-build
@:$ ping -c 1
PING () 56(84) bytes of data.
64 bytes from : icmp_seq=1 ttl=64 time=0.149 ms
--- ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.149/0.149/0.149/0.000 ms
@:$ swuk_terminal
Welcome to minicom 2.7.1
OPTIONS: I18n
Compiled on Dec 23 2019, 02:06:26.
Port /dev/ttyACM0, 06:34:25
Press CTRL-A Z for help on special keys
PetaLinux 2021.2 petalinux /dev/ttyPS0
petalinux login:
@:$ swuk_ssh
@:$ sshpass -p petalinux scp -r /petalinux petalinux@:/media/sd-mmcblk0p1
@:$ sshpass -p petalinux scp -r /configuration petalinux@:/media/sd-mmcblk0p1
@:$ subl zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/files/cgi-bin/reload_os.cgi
@:$ wget https://spacewire.co.uk/tutorial/shared/repos/0035/zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/files/cgi-bin/reload_os.cgi -O zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/files/cgi-bin/reload_os.cgi
@:$ chmod +x zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/files/cgi-bin/reload_os.cgi
@:$ subl zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/files/share/header.php
@:$ wget https://spacewire.co.uk/tutorial/shared/repos/0035/zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/files/share/header.php.txt -O zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/files/share/header.php
@:$ git difftool zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/files/share/header.php
@:$ subl zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/files/system/index.php
@:$ wget https://spacewire.co.uk/tutorial/shared/repos/0035/zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/files/system/index.php.txt -O zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/files/system/index.php
@:$ git difftool zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/files/system/index.php
@:$ subl zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/files/system/script.js
@:$ wget https://spacewire.co.uk/tutorial/shared/repos/0035/zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/files/system/script.js -O zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/files/system/script.js
@:$ git difftool zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/files/system/script.js
@:$ subl zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/files/peekpoke/index.php
@:$ wget https://spacewire.co.uk/tutorial/shared/repos/0035/zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/files/peekpoke/index.php.txt -O zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/files/peekpoke/index.php
@:$ git difftool zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/files/peekpoke/index.php
@:$ subl zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/files/peekpoke/script.js
@:$ wget https://spacewire.co.uk/tutorial/shared/repos/0035/zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/files/peekpoke/script.js -O zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/files/peekpoke/script.js
@:$ git difftool zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/files/peekpoke/script.js
@:$ swuk_ssh
@:$ sshpass -p petalinux scp -r zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website petalinux@:/home/petalinux
@:$ sshpass -p petalinux ssh -t petalinux@ "sudo sh -c 'cp website/files/cgi-bin/reload_os.cgi /srv/www/cgi-bin/reload_os.cgi; cp website/files/share/header.php /srv/www/share/header.php; cp website/files/peekpoke/index.php /srv/www/peekpoke/index.php; cp website/files/peekpoke/script.js /srv/www/peekpoke/script.js; cp website/files/system/index.php /srv/www/system/index.php; cp website/files/system/script.js /srv/www/system/script.js'"
@:$ swuk_ssh
@:$ sshpass -p root scp zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/files/cgi-bin/reload_os.cgi root@:/srv/www/cgi-bin/reload_os.cgi
@:$ sshpass -p root scp zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/files/share/header.php root@:/srv/www/share/header.php
@:$ sshpass -p root scp zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/files/peekpoke/index.php root@:/srv/www/peekpoke/index.php
@:$ sshpass -p root scp zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/files/peekpoke/script.js root@:/srv/www/peekpoke/script.js
@:$ sshpass -p root scp zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/files/system/index.php root@:/srv/www/system/index.php
@:$ sshpass -p root scp zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/files/system/script.js root@:/srv/www/system/script.js
@:$ swuk_ssh
@:$ sshpass -p petalinux scp -r zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website petalinux@:/home/petalinux
@:$ sshpass -p petalinux ssh -t petalinux@ "sudo sh -c 'cp website/files/cgi-bin/reload_os.cgi /srv/www/cgi-bin/reload_os.cgi; cp website/files/share/header.php /srv/www/share/header.php; cp website/files/peekpoke/index.php /srv/www/peekpoke/index.php; cp website/files/peekpoke/script.js /srv/www/peekpoke/script.js; cp website/files/system/index.php /srv/www/system/index.php; cp website/files/system/script.js /srv/www/system/script.js'"
@:$ swuk_ssh
@:$ sshpass -p petalinux ssh -t petalinux@ "sudo ln -s /media/sd-mmcblk0p1/configuration /srv/www/peekpoke/configuration"
@:$ sed -i 's/17.0/18.0/g' zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/files/project.txt
@:$ wget https://spacewire.co.uk/tutorial/shared/repos/0035/zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/files/project.txt -O zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/files/project.txt
@:$ git difftool zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/files/project.txt
@:$ subl zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/website.bb
@:$ wget https://spacewire.co.uk/tutorial/shared/repos/0035/zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/website.bb -O zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/website.bb
@:$ git difftool zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/website.bb
@:$ subl zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/boot-extras/files/boot-extras
@:$ wget https://spacewire.co.uk/tutorial/shared/repos/0035/zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/boot-extras/files/boot-extras -O zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/boot-extras/files/boot-extras
@:$ git difftool zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/boot-extras/files/boot-extras
@:$ git status -u
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/boot-extras/files/boot-extras
modified: zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/files/peekpoke/index.php
modified: zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/files/peekpoke/script.js
modified: zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/files/project.txt
modified: zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/files/share/header.php
modified: zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/files/system/index.php
modified: zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/files/system/script.js
modified: zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/website.bb
Untracked files:
(use "git add <file>..." to include in what will be committed)
zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website/files/cgi-bin/reload_os.cgi
no changes added to commit (use "git add" and/or "git commit -a")
@:$ git add -A
@:$ git commit -a -m "Added Reload Operating System function. Updated Reload Firmware function. Added Peek & Poke local configuration file load. This version of PetaLinux includes the XSA from zedboard_video_tpg_hdmi v1.0."
@:$ git push
@:$ git tag -a my_zedboard_linux_v18.0 -m "PetaLinux, Peek/Poke, LED Runner, LAMP (Apache, SQLite, PHP & myLiteAdmin), Peek/Poke CGI, Load Firmware CGI, PL Access, Style Sheet, Register Bank, ID Strings, ADV5711 configuration & Reload OS with XSA from zedboard_video_tpg_hdmi v1.0"
@:$ git push origin my_zedboard_linux_v18.0
@:$ cd zedboard_linux/os/petalinux
@:/zedboard_linux/os/petalinux$ git clean -fdx
@:/zedboard_linux/os/petalinux$ rm -rf /tftpboot/*
@:/zedboard_linux/os/petalinux$ git status -u
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working tree clean
@:/zedboard_linux/os/petalinux$ swuk_petalinux-build
::
::
ERROR: Failed to build project. Check the /zedboard_linux/os/petalinux/build/build.log file for more details...
@:/zedboard_linux/os/petalinux$ git status -u
On branch my_master
Your branch is up-to-date with 'origin/my_master'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: .petalinux/metadata
modified: project-spec/configs/config
no changes added to commit (use "git add" and/or "git commit -a")
@:/zedboard_linux/os/petalinux$ git difftool
@:/zedboard_linux/os/petalinux$ git restore .petalinux/metadata project-spec/configs/config
@:/zedboard_linux/os/petalinux$ swuk_petalinux-build
::
::
INFO: Successfully copied built images to tftp dir: /tftpboot
[INFO] Successfully built project
@:/zedboard_linux/os/petalinux$ petalinux-package --boot --force --fsbl images/linux/zynq_fsbl.elf --fpga images/linux/system.bit --uboot images/linux/u-boot.elf
@:/zedboard_linux/os/petalinux$ mkdir -p /petalinux/v18.0
@:/zedboard_linux/os/petalinux$ cp /tftpboot/{BOOT.BIN,boot.scr,image.ub} /petalinux/v18.0
@:/zedboard_linux/os/petalinux$ swuk_ssh
@:/zedboard_linux/os/petalinux$ sshpass -p petalinux scp -r /petalinux/v18.0 petalinux@:/media/sd-mmcblk0p1/petalinux
@:$ swuk_ssh
@:$ sshpass -p petalinux scp -r zedboard_linux/os/petalinux/project-spec/meta-user/recipes-apps/website petalinux@:/home/petalinux
@:$ sshpass -p petalinux ssh -t petalinux@ "sudo sh -c 'cp website/files/cgi-bin/reload_os.cgi /srv/www/cgi-bin/reload_os.cgi; cp website/files/share/header.php /srv/www/share/header.php; cp website/files/peekpoke/index.php /srv/www/peekpoke/index.php; cp website/files/peekpoke/script.js /srv/www/peekpoke/script.js; cp website/files/system/index.php /srv/www/system/index.php; cp website/files/system/script.js /srv/www/system/script.js'"
After the reload sequence has finished...
The Timestamp & Hash shown from GIT (1st entry) should marry up perfectly with the displayed Operating System Information.
@:/zedboard_linux/os/petalinux$ git log -1
commit df5cd3f8437bb145558a3ec123570ec8dc500396 (HEAD -> my_master, tag: my_zedboard_linux_v18.0, origin/my_master)
Author: Steve Haywood <@spacewire.co.uk>
Date: Sun Mar 15 09:24:23 2026 +0000
Added Reload Operating System function. Updated Reload Firmware function. Added Peek & Poke local configuration file load. This version of PetaLinux includes the XSA from zedboard_video_tpg_hdmi v1.0.