diff -Nru flash-kernel-3.106ubuntu2/bootscript/arm64/bootscr.zynqmp flash-kernel-3.106ubuntu3/bootscript/arm64/bootscr.zynqmp --- flash-kernel-3.106ubuntu2/bootscript/arm64/bootscr.zynqmp 2022-06-15 14:27:53.000000000 +0000 +++ flash-kernel-3.106ubuntu3/bootscript/arm64/bootscr.zynqmp 2022-06-29 05:42:03.000000000 +0000 @@ -7,6 +7,19 @@ # - Get vmlinuz from Ubuntu rootfs and uncompress # system.dtb is a normal dtb file # +# Here is the ZCU board support list: +# +# ZCU102/104/106/111 +# +# Here is the Kria board support list: +# +# Kria board | DTB Name | +# :----------------------------- | :---------------------------- | +# Revision A KR Carrier Card | smk-k26-revA-sck-kr-g-revA | +# Revision B/1 KR Carrier Card | smk-k26-revA-sck-kr-g-revB | +# Revision A/Z KV Carrier Card | smk-k26-revA-sck-kv-g-revA | +# Revision B/1 KV Carrier Card | smk-k26-revA-sck-kv-g-revB | +# ################ @@UBOOT_ENV_EXTRA@@ @@ -25,54 +38,69 @@ fpga load 0 0x10000000 $filesize fi - # Set DT selection for Kria boards - if test "${card1_name}" = "SCK-KV-G"; then - if test "${card1_rev}" = "Z" || test "${card1_rev}" = "A"; then - # revA dtb also supports revZ boards - boot_conf=#conf-smk-k26-revA-sck-kv-g-revA - elif test "${card1_rev}" = "B" || test "${card1_rev}" = "1"; then - # revB dtb also supports rev1 boards - boot_conf=#conf-smk-k26-revA-sck-kv-g-revB - fi - elif test "${card1_name}" = "SCK-KR-G"; then - if test "${card1_rev}" = "B" || test "${card1_rev}" = "1"; then - # revB dtb also supports rev1 dtb - boot_conf=#conf-smk-k26-revA-sck-kr-g-revB - elif test "${card1_rev}" = "A"; then - boot_conf=#conf-smk-k26-revA-sck-kr-g-revA + # Legacy KV260 U-Boot was not eliminating a space at the end of the card1_name variable + # e.g. card1_name is "SCK-KV-G ", not "SCK-KV-G" + # Force drop of the extra space character by setenv for backward compatibility + setenv card1_name $card1_name + # Check for KR/KV260 board and choose the proper device tree + if test "${card1_name}" = "SCK-KV-G" || test "${card1_name}" = "SCK-KR-G"; then + setenv kria 1 + echo "Selecting DT for Kria boards" + if test "${card1_name}" = "SCK-KV-G"; then + if test "${card1_rev}" = "Z" || test "${card1_rev}" = "A"; then + # revA dtb also supports revZ boards + boot_conf=#conf-smk-k26-revA-sck-kv-g-revA + elif test "${card1_rev}" = "B" || test "${card1_rev}" = "1"; then + # revB dtb also supports rev1 boards + boot_conf=#conf-smk-k26-revA-sck-kv-g-revB + fi + elif test "${card1_name}" = "SCK-KR-G"; then + if test "${card1_rev}" = "B" || test "${card1_rev}" = "1"; then + # revB dtb also supports rev1 dtb + boot_conf=#conf-smk-k26-revA-sck-kr-g-revB + elif test "${card1_rev}" = "A"; then + boot_conf=#conf-smk-k26-revA-sck-kr-g-revA + fi + else + # fallback dtb + boot_conf=#conf-zynqmp-smk-k26-revA + echo "The detected Kria board is not in the supported list" fi - else - # fallback dtb - boot_conf=#conf-zynqmp-smk-k26-revA + echo "Kria DT: ${boot_conf}" fi setenv bootargs "earlycon root=LABEL=writable rootwait" - if test "${card1_name}" = "SCK-KR-G"; then - setenv bootargs "${bootargs} console=ttyPS1,115200 console=tty1 clk_ignore_unused xilinx_tsn_ep.st_pcp=4" - elif test "${card1_name}" = "SCK-KV-G"; then - setenv bootargs "${bootargs} console=ttyPS1,115200 console=tty1 uio_pdrv_genirq.of_id=generic-uio xilinx_tsn_ep.st_pcp=4" + if test "${card1_name}" = "SCK-KR-G" || test "${card1_name}" = "SCK-KV-G"; then + setenv bootargs "${bootargs} console=ttyPS1,115200 console=tty1 clk_ignore_unused uio_pdrv_genirq.of_id=generic-uio xilinx_tsn_ep.st_pcp=4" else setenv bootargs "${bootargs} console=ttyPS0,115200 console=tty1 uio_pdrv_genirq.of_id=generic-uio" fi - # Load different cma on zynqmp boards + + echo "Configuring the cma value based on the board type" fdt addr $fdtcontroladdr - # For ZCU: ZynqMP ZCU10* Rev* + # For ZCU: ZynqMP ZCU1* Rev* # For Kria: ZynqMP K26 Rev* fdt get value model_test / model - if setexpr model_test gsub '.*104.*' 104; then - setenv bootargs "${bootargs} cma=700M" + if test -n $kria; then + cma="1000M" + elif setexpr model_test gsub '.*104.*' 104; then + cma="700M" elif setexpr model_test gsub '.*106.*' 106; then - setenv bootargs "${bootargs} cma=1200M" + cma="1200M" else - setenv bootargs "${bootargs} cma=1000M" + # zcu102, zcu111 + cma="1000M" fi - # Get custom values from /etc/default/u-boot-xlnx + echo "cma=${cma}" + setenv bootargs "${bootargs} cma=${cma}" + + # Get custom values from /etc/default/flash-kernel setenv bootargs "@@LINUX_KERNEL_CMDLINE_DEFAULTS@@ ${bootargs} @@LINUX_KERNEL_CMDLINE@@" img_addr=- initrd_addr=- # Take dtb from boot image unless Kria, where we take from FIT - if setexpr model_test gsub '.*K26.*' K26; then + if test -n $kria; then dtb_addr=0x10000000${boot_conf} else dtb_addr=$fdtcontroladdr @@ -101,14 +129,14 @@ echo "Loading image.fit" load ${devtype} ${devnum}:${distro_bootpart} 0x10000000 image.fit; if test $img_addr = "-"; then - if setexpr model_test gsub '.*K26.*' K26; then + if test -n $kria; then img_addr=0x10000000${boot_conf} else img_addr=0x10000000 fi fi if test $initrd_addr = "-"; then - if setexpr model_test gsub '.*K26.*' K26; then + if test -n $kria; then initrd_addr=0x10000000${boot_conf} else initrd_addr=0x10000000 diff -Nru flash-kernel-3.106ubuntu2/db/all.db flash-kernel-3.106ubuntu3/db/all.db --- flash-kernel-3.106ubuntu2/db/all.db 2022-07-06 10:25:35.000000000 +0000 +++ flash-kernel-3.106ubuntu3/db/all.db 2022-07-08 02:38:54.000000000 +0000 @@ -2383,3 +2383,12 @@ Boot-FIT-Path: /boot/firmware/image.fit Boot-ITS-File-Name: image-zcu.its Required-Packages: u-boot-tools xlnx-firmware + +Machine: ZynqMP ZCU111* +Kernel-Flavors: xilinx-zynqmp +Method: generic +Boot-Script-Path: /boot/firmware/boot.scr.uimg +U-Boot-Script-Name: bootscr.zynqmp +Boot-FIT-Path: /boot/firmware/image.fit +Boot-ITS-File-Name: image-zcu.its +Required-Packages: u-boot-tools xlnx-firmware diff -Nru flash-kernel-3.106ubuntu2/debian/changelog flash-kernel-3.106ubuntu3/debian/changelog --- flash-kernel-3.106ubuntu2/debian/changelog 2022-07-06 10:25:53.000000000 +0000 +++ flash-kernel-3.106ubuntu3/debian/changelog 2022-07-08 02:38:54.000000000 +0000 @@ -1,3 +1,14 @@ +flash-kernel (3.106ubuntu3) kinetic; urgency=medium + + * Add ZCU111 support + * bootscr.zynqmp + - Improve messaging in U-Boot boot script for board detection + - Add kria and zcu board support lists + - Update kR260 and KV260's bootargs as per AMD-Xilinx's request + - Support legacy KV260 U-Boot + + -- Ethan Hsieh Fri, 08 Jul 2022 10:38:54 +0800 + flash-kernel (3.106ubuntu2) kinetic; urgency=medium * db/all.db: add dummy entry for RISC-V under QEMU (LP: #1980519)