Merge ~alfonsosanchezbeato/ubuntu/+source/flash-kernel:kria-support into ~alfonsosanchezbeato/ubuntu/+source/flash-kernel:applied/ubuntu/focal-updates

Proposed by Alfonso Sanchez-Beato
Status: Rejected
Rejected by: Alfonso Sanchez-Beato
Proposed branch: ~alfonsosanchezbeato/ubuntu/+source/flash-kernel:kria-support
Merge into: ~alfonsosanchezbeato/ubuntu/+source/flash-kernel:applied/ubuntu/focal-updates
Diff against target: 497 lines (+360/-31)
9 files modified
README (+9/-0)
bootscript/arm64/bootscr.zynqmp (+119/-0)
db/all.db (+36/-0)
debian/changelog (+12/-0)
debian/rules (+7/-0)
functions (+64/-30)
its/arm64/image-kria.its (+62/-0)
its/arm64/image-zcu.its (+50/-0)
test_db (+1/-1)
Reviewer Review Type Date Requested Status
Alfonso Sanchez-Beato Pending
Review via email: mp+403942@code.launchpad.net

Commit message

Just for review

Description of the change

Just for review

To post a comment you must log in.
88b9115... by Alfonso Sanchez-Beato

Move .its files to /usr/share/flash-kernel/its

The .its files are static data, so move them from
/etc/flash-kernel/its/ to /usr/share/flash-kernel/its/

a8806ca... by Alfonso Sanchez-Beato

Remove Mkimage-FIT-Options field

It was not really required for Kria, and also it is not clear it in
general required to generate a FIT image.

7d319ee... by Alfonso Sanchez-Beato

Remove Mkimage-FIT-Options also from test

54e58e7... by Alfonso Sanchez-Beato

Make sure temp FIT file lives in same filesystem as final

So mv can be "more atomic".

6c1c8c3... by Alfonso Sanchez-Beato

Remove fit method and make it part of the generic method instead

aeb8973... by Alfonso Sanchez-Beato

Add DTB-Install field

DTB-Install tells us whether to copy the dtb to the /boot/ folder or
not. It is introduced because some times this is not really needed,
for instance FIT images usually include the dtb inside.

bdb6bc0... by Alfonso Sanchez-Beato

Add support for ZCU* boards

Revision history for this message
Loïc Minier (lool) wrote :

Rather than add a dtb-install flag, can you just omit the unused dtb-id on boards where we shouldn't copy it?

The boot scripts between ZCU and Kria look very similar, it's very tempting to make a generic script with a zcu and kria config, call that xlnx boot script, and select through a templated "default = @FIT_DEFAULT_CONFIG@". But it's also ok to keep things simple and have two simple data files :-)

Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

We need the dtb-id, as we are putting it inside the its file (by replacing @@DEVICE_TREE_FILE@@). It is true though that this is only for Kria, not for ZCU*. I have removed dtb-id from the ZCU entries now.

b6604b1... by Alfonso Sanchez-Beato

Remove unneeded DTB-Id in ZCU boards

2b1a6f9... by Alfonso Sanchez-Beato

Remove DTB-Install from the ZCU boards (no dtb)

Revision history for this message
Loïc Minier (lool) wrote :

Oh wow, so this overall looks really good now; the only small thing that disturbs me a little bit is the whole dtb-install field / dtb-is use is just for that one board and related to the fact the its / fit generation requires the file to be copied to the tmpdir because it needs to be in the same dir; I don't know if there's an elegant way to avoid this forcing the creation of a new database field

f85495e... by Alfonso Sanchez-Beato

Remove DTB-Install option

Try to avoid adding a new option. For the Kria, just hard-code dtb in
the its file for the moment and do not use DTB-Id.

Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

This is now in the debian package. Closing this MP as it was opened just for discussion.

Unmerged commits

f85495e... by Alfonso Sanchez-Beato

Remove DTB-Install option

Try to avoid adding a new option. For the Kria, just hard-code dtb in
the its file for the moment and do not use DTB-Id.

2b1a6f9... by Alfonso Sanchez-Beato

Remove DTB-Install from the ZCU boards (no dtb)

b6604b1... by Alfonso Sanchez-Beato

Remove unneeded DTB-Id in ZCU boards

bdb6bc0... by Alfonso Sanchez-Beato

Add support for ZCU* boards

aeb8973... by Alfonso Sanchez-Beato

Add DTB-Install field

DTB-Install tells us whether to copy the dtb to the /boot/ folder or
not. It is introduced because some times this is not really needed,
for instance FIT images usually include the dtb inside.

6c1c8c3... by Alfonso Sanchez-Beato

Remove fit method and make it part of the generic method instead

54e58e7... by Alfonso Sanchez-Beato

Make sure temp FIT file lives in same filesystem as final

So mv can be "more atomic".

7d319ee... by Alfonso Sanchez-Beato

Remove Mkimage-FIT-Options also from test

a8806ca... by Alfonso Sanchez-Beato

Remove Mkimage-FIT-Options field

It was not really required for Kria, and also it is not clear it in
general required to generate a FIT image.

88b9115... by Alfonso Sanchez-Beato

Move .its files to /usr/share/flash-kernel/its

The .its files are static data, so move them from
/etc/flash-kernel/its/ to /usr/share/flash-kernel/its/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/README b/README
2index 5ffeca0..59151d1 100644
3--- a/README
4+++ b/README
5@@ -136,6 +136,15 @@ The supported fields are:
6 kernel, initrd and U-Boot script; Boot-Kernel-Path, Boot-Initrd-Path and
7 Boot-Script-Path are then taken relative to this boot device
8
9+* Boot-FIT-Path: (optional) when present, a FIT image will be created. It
10+ contains the path where the FIT image will be written.
11+
12+* Boot-ITS-File-Name: (optional) name of the ITS file used to describe the
13+ content of the FIT image when a FIT image is being created.
14+ @@LINUX_IMAGE_FILE@@, @@INITRD_FILE@@, and @@DEVICE_TREE_FILE@@ strings in
15+ the file will be replaced by the path to the kernel, initrd, and device
16+ tree blob respectively.
17+
18
19 Configuration
20 - - - - - - -
21diff --git a/bootscript/arm64/bootscr.zynqmp b/bootscript/arm64/bootscr.zynqmp
22new file mode 100644
23index 0000000..3fd3979
24--- /dev/null
25+++ b/bootscript/arm64/bootscr.zynqmp
26@@ -0,0 +1,119 @@
27+# This is a boot script for U-Boot
28+# Generate boot.scr:
29+# mkimage -c none -A arm -T script -d boot.cmd boot.scr
30+# For initrd, when using a file override:
31+# mkimage -A arm -O linux -T ramdisk -d initrd.img rootfs.cpio.gz.u-boot
32+# Kernel "Image" file must be of EFI type:
33+# - Get vmlinuz from Ubuntu rootfs and uncompress
34+# system.dtb is a normal dtb file
35+#
36+################
37+
38+@@UBOOT_ENV_EXTRA@@
39+
40+for boot_target in ${boot_targets};
41+do
42+ if test "${boot_target}" = "jtag" ; then
43+ booti 0x00200000 0x04000000 0x00100000
44+ exit;
45+ fi
46+ if test "${boot_target}" = "mmc0" || test "${boot_target}" = "mmc1" ; then
47+ # Load alternative bitstream if present
48+ if test -e ${devtype} ${devnum}:${distro_bootpart} /system.bit; then
49+ echo "Loading alternative bitstream"
50+ load ${devtype} ${devnum}:${distro_bootpart} 0x10000000 system.bit
51+ fpga load 0 0x10000000 $filesize
52+ fi
53+ # Load different cma on zynqmp boards
54+ setenv bootargs "earlycon console=ttyPS0,115200 console=tty1 root=/dev/mmcblk0p2 uio_pdrv_genirq.of_id=generic-uio"
55+ fdt addr $fdtcontroladdr
56+ # For ZCU: ZynqMP ZCU10* Rev*
57+ # For Kria: ZynqMP K26 Rev*
58+ fdt get value model_test / model
59+ if setexpr model_test gsub '.*104.*' 104; then
60+ setenv bootargs "${bootargs} cma=700M"
61+ elif setexpr model_test gsub '.*106.*' 106; then
62+ setenv bootargs "${bootargs} cma=1200M"
63+ else
64+ setenv bootargs "${bootargs} cma=1000M"
65+ fi
66+ # Get custom values from /etc/default/u-boot-xlnx
67+ setenv bootargs "@@LINUX_KERNEL_CMDLINE_DEFAULTS@@ ${bootargs} @@LINUX_KERNEL_CMDLINE@@"
68+ img_addr=-
69+ initrd_addr=-
70+
71+ # Take dtb from boot image unless Kria, where we take from FIT
72+ if setexpr model_test gsub '.*K26.*' K26; then
73+ dtb_addr=0x10000000
74+ else
75+ dtb_addr=$fdtcontroladdr
76+ fi
77+
78+ if test -e ${devtype} ${devnum}:${distro_bootpart} /Image; then
79+ echo "Loading Image"
80+ img_addr=0x00200000
81+ load ${devtype} ${devnum}:${distro_bootpart} ${img_addr} Image;
82+ fi
83+ if test -e ${devtype} ${devnum}:${distro_bootpart} /system.dtb; then
84+ echo "Loading system.dtb"
85+ dtb_addr=0x70000000
86+ load ${devtype} ${devnum}:${distro_bootpart} ${dtb_addr} system.dtb;
87+ fi
88+ if test -e ${devtype} ${devnum}:${distro_bootpart} /rootfs.cpio.gz.u-boot; then
89+ echo "Loading rootfs.cpio.gz.u-boot"
90+ initrd_addr=0x04000000
91+ load ${devtype} ${devnum}:${distro_bootpart} ${initrd_addr} rootfs.cpio.gz.u-boot
92+ fi
93+
94+ @@UBOOT_PREBOOT_EXTRA@@
95+
96+ if test $img_addr = "-" || test $initrd_addr = "-"; then
97+ if test -e ${devtype} ${devnum}:${distro_bootpart} /image.fit; then
98+ echo "Loading image.fit"
99+ load ${devtype} ${devnum}:${distro_bootpart} 0x10000000 image.fit;
100+ if test $img_addr = "-"; then
101+ img_addr=0x10000000
102+ fi
103+ if test $initrd_addr = "-"; then
104+ initrd_addr=0x10000000
105+ fi
106+ fi
107+ fi
108+ if test "${img_addr}" -eq "0x10000000"; then
109+ bootm ${img_addr} ${initrd_addr} ${dtb_addr}
110+ elif test "${img_addr}" -eq "0x00200000"; then
111+ booti ${img_addr} ${initrd_addr} ${dtb_addr}
112+ fi
113+ echo "No kernel found in ${devtype}"
114+ exit;
115+ fi
116+ if test "${boot_target}" = "xspi0" || test "${boot_target}" = "qspi" || test "${boot_target}" = "qspi0"; then
117+ sf probe 0 0 0;
118+ if test "image.fit" = "image.fit"; then
119+ sf read 0x10000000 0xF00000 0x6400000;
120+ bootm 0x10000000;
121+ exit;
122+ fi
123+ if test "image.fit" = "Image"; then
124+ sf read 0x00200000 0xF00000 0x1D00000;
125+ sf read 0x04000000 0x4000000 0x4000000
126+ booti 0x00200000 0x04000000 0x00100000
127+ exit;
128+ fi
129+ exit;
130+ fi
131+ if test "${boot_target}" = "nand" || test "${boot_target}" = "nand0"; then
132+ nand info
133+ if test "image.fit" = "image.fit"; then
134+ nand read 0x10000000 0x4100000 0x6400000;
135+ bootm 0x10000000;
136+ exit;
137+ fi
138+ if test "image.fit" = "Image"; then
139+ nand read 0x00200000 0x4100000 0x3200000;
140+ nand read 0x04000000 0x7800000 0x3200000;
141+ booti 0x00200000 0x04000000 0x00100000
142+ exit;
143+ fi
144+ fi
145+done
146diff --git a/db/all.db b/db/all.db
147index b7212e5..5b46cea 100644
148--- a/db/all.db
149+++ b/db/all.db
150@@ -2164,3 +2164,39 @@ Boot-Script-Path: /boot/boot.scr
151 DTB-Id: sun6i-a31s-yones-toptech-bs1078-v2.dtb
152 U-Boot-Script-Name: bootscr.sunxi
153 Required-Packages: u-boot-tools
154+
155+Machine: ZynqMP *K26*
156+Kernel-Flavors: xilinx-zynqmp
157+Method: generic
158+Boot-Script-Path: /boot/firmware/boot.scr.uimg
159+U-Boot-Script-Name: bootscr.zynqmp
160+Boot-FIT-Path: /boot/firmware/image.fit
161+Boot-ITS-File-Name: image-kria.its
162+Required-Packages: u-boot-tools xlnx-kria-firmware
163+
164+Machine: ZynqMP ZCU102*
165+Kernel-Flavors: xilinx-zynqmp
166+Method: generic
167+Boot-Script-Path: /boot/firmware/boot.scr.uimg
168+U-Boot-Script-Name: bootscr.zynqmp
169+Boot-FIT-Path: /boot/firmware/image.fit
170+Boot-ITS-File-Name: image-zcu.its
171+Required-Packages: u-boot-tools xlnx-firmware
172+
173+Machine: ZynqMP ZCU104*
174+Kernel-Flavors: xilinx-zynqmp
175+Method: generic
176+Boot-Script-Path: /boot/firmware/boot.scr.uimg
177+U-Boot-Script-Name: bootscr.zynqmp
178+Boot-FIT-Path: /boot/firmware/image.fit
179+Boot-ITS-File-Name: image-zcu.its
180+Required-Packages: u-boot-tools xlnx-firmware
181+
182+Machine: ZynqMP ZCU106*
183+Kernel-Flavors: xilinx-zynqmp
184+Method: generic
185+Boot-Script-Path: /boot/firmware/boot.scr.uimg
186+U-Boot-Script-Name: bootscr.zynqmp
187+Boot-FIT-Path: /boot/firmware/image.fit
188+Boot-ITS-File-Name: image-zcu.its
189+Required-Packages: u-boot-tools xlnx-firmware
190diff --git a/debian/changelog b/debian/changelog
191index 4dc8258..693f87a 100644
192--- a/debian/changelog
193+++ b/debian/changelog
194@@ -1,3 +1,15 @@
195+flash-kernel (3.103ubuntu1~20.04.1test2) focal; urgency=medium
196+
197+ * Update dtb path to the one from xlnx-kria-firmware focal
198+
199+ -- Alfonso Sanchez-Beato (email Canonical) <alfonso.sanchez-beato@canonical.com> Tue, 08 Jun 2021 11:51:16 +0200
200+
201+flash-kernel (3.103ubuntu1~20.04.1test1) focal; urgency=medium
202+
203+ * Add support for Kria SOM devices
204+
205+ -- Alfonso Sanchez-Beato (email Canonical) <alfonso.sanchez-beato@canonical.com> Mon, 07 Jun 2021 17:50:21 +0200
206+
207 flash-kernel (3.103ubuntu1~20.04.1) focal; urgency=medium
208
209 * Backport latest upstream version to groovy (LP: #1904890)
210diff --git a/debian/rules b/debian/rules
211index 8913ca0..d6f6e1e 100755
212--- a/debian/rules
213+++ b/debian/rules
214@@ -27,6 +27,13 @@ ifeq (armhf,$(DEB_HOST_ARCH))
215 debian/flash-kernel/etc/flash-kernel/bootscript/
216 endif
217
218+ install -m0755 -p -d debian/flash-kernel/usr/share/flash-kernel/its
219+ set -ex ; for arch in all $(DEB_HOST_ARCH) ; do \
220+ [ -d its/$${arch} ] || continue ; \
221+ install -m0644 its/$${arch}/* \
222+ debian/flash-kernel/usr/share/flash-kernel/its/ ; \
223+ done
224+
225 dh_auto_install
226
227 override_dh_auto_clean:
228diff --git a/functions b/functions
229index 1a4debd..ddc9597 100644
230--- a/functions
231+++ b/functions
232@@ -20,6 +20,7 @@
233 # USA.
234
235 BOOTSCRIPTS_DIR="${FK_CHECKOUT:-/etc/flash-kernel}/bootscript"
236+ITSFILES_DIR="${FK_CHECKOUT:-/usr/share/flash-kernel}/its"
237 FK_ETC_MACHINE="${FK_ETC_MACHINE:-/etc/flash-kernel/machine}"
238 FK_DEFAULTS="${FK_DEFAULTS:-/etc/default/flash-kernel}"
239 PROC_CPUINFO="${FK_PROC_CPUINFO:-/proc/cpuinfo}"
240@@ -571,6 +572,58 @@ mkimage_multi() {
241 echo "done." >&2
242 }
243
244+mkimage_fit() {
245+ local image_its="$1"
246+ local image_fit="$2"
247+ local kernel_file="$3"
248+ local initrd_file="$4"
249+ local dtb_file="$5"
250+
251+ local its_tmp="$tmpdir/image.its"
252+
253+ sed -e "s#@@LINUX_IMAGE_FILE@@#$kernel_file#g" \
254+ -e "s#@@INITRD_FILE@@#$initrd_file#g" \
255+ -e "s#@@DEVICE_TREE_FILE@@#$dtb_file#g" \
256+ < "$ITSFILES_DIR/$image_its" > "$its_tmp"
257+
258+ printf "Generating u-boot image..." >&2
259+ mkimage -D "-I dts -O dtb" -f "$its_tmp" "$image_fit" >&2 1>/dev/null
260+ echo " done." >&2
261+}
262+
263+create_boot_script() {
264+ case $usname in
265+ bootscr*)
266+ boot_script_path="$boot_mnt_dir/$boot_script_path"
267+ boot_script="$tmpdir/bootscript"
268+ for script in $usname ; do
269+ echo "\n#\n# flash-kernel: $script\n#\n" >> "$boot_script"
270+ cat "$BOOTSCRIPTS_DIR/$script" >> "$boot_script"
271+ done
272+ mkimage_script "$usaddr" "boot script" "$boot_script" \
273+ "$tmpdir/boot.scr"
274+ boot_script="$tmpdir/boot.scr"
275+ backup_and_install "$boot_script" "$boot_script_path"
276+ ;;
277+ uEnvtxt*)
278+ VOLID=${VOLID:-"$(get_root_uuid)"}
279+ boot_script_in="$BOOTSCRIPTS_DIR/$usname"
280+ boot_script="$boot_mnt_dir/$usname"
281+ cp $boot_script_in $boot_script
282+
283+ boot_script_path="$boot_mnt_dir/uEnv.txt"
284+ boot_script_env="$boot_mnt_dir/preEnv.txt"
285+ env_script="$tmpdir/preEnv.txt"
286+
287+ [ -e /etc/default/flash-kernel ] && . /etc/default/flash-kernel
288+ echo "bootargs=ro $(LINUX_KERNEL_CMDLINE) root=UUID=$VOLID" > $env_script
289+
290+ backup_and_install "$env_script" "$boot_script_env"
291+ backup_and_install "$boot_script" "$boot_script_path"
292+ ;;
293+ esac
294+}
295+
296 # Return a nonempty string *unless* NO_CREATE_DOT_BAK_FILES is set.
297 get_dot_bak_preference() {
298 . ${FK_DEFAULTS}
299@@ -969,6 +1022,8 @@ boot_initrd_path_version="$(get_machine_field "$machine" "Boot-Initrd-Path-Versi
300 boot_script_path="$(get_machine_field "$machine" "Boot-Script-Path")" || :
301 boot_dtb_path="$(get_machine_field "$machine" "Boot-DTB-Path")" || :
302 boot_dtb_path_version="$(get_machine_field "$machine" "Boot-DTB-Path-Version")" || :
303+boot_fit_path="$(get_machine_field "$machine" "Boot-FIT-Path")" || :
304+boot_its_file_name="$(get_machine_field "$machine" "Boot-ITS-File-Name")" || :
305 boot_multi_path="$(get_machine_field "$machine" "Boot-Multi-Path")" || :
306 android_boot_device="$(get_machine_field "$machine" "Android-Boot-Device")" || :
307 android_skip_initrd="$(get_machine_field "$machine" "Android-Skip-Initrd")" || :
308@@ -1091,6 +1146,14 @@ case "$method" in
309 "$tmpdir/uImage"
310 rm -f "$tmpdir/kernel"
311 fi
312+ if [ -n "$boot_fit_path" ]; then
313+ [ -n "$ifile" ] || error "Initrd required for FIT method"
314+ # Write tmp file in same filesystem as final destination
315+ fit_tmp="$boot_fit_path".tmp
316+ mkimage_fit "$boot_its_file_name" "$fit_tmp" \
317+ "$kfile" "$ifile" "$(find_dtb_file)"
318+ backup_and_install "$fit_tmp" "$boot_fit_path"
319+ fi
320 if [ -n "$boot_device" ]; then
321 check_block_dev "$boot_device"
322 echo "Will use $boot_device as boot device." >&2
323@@ -1146,36 +1209,7 @@ case "$method" in
324 rm -f "$tmpdir/uInitrd"
325 fi
326 if [ -n "$boot_script_path" ]; then
327- case $usname in
328- bootscr*)
329- boot_script_path="$boot_mnt_dir/$boot_script_path"
330- boot_script="$tmpdir/bootscript"
331- for script in $usname ; do
332- echo "\n#\n# flash-kernel: $script\n#\n" >> "$boot_script"
333- cat "$BOOTSCRIPTS_DIR/$script" >> "$boot_script"
334- done
335- mkimage_script "$usaddr" "boot script" "$boot_script" \
336- "$tmpdir/boot.scr"
337- boot_script="$tmpdir/boot.scr"
338- backup_and_install "$boot_script" "$boot_script_path"
339- ;;
340- uEnvtxt*)
341- VOLID=${VOLID:-"$(get_root_uuid)"}
342- boot_script_in="$BOOTSCRIPTS_DIR/$usname"
343- boot_script="$boot_mnt_dir/$usname"
344- cp $boot_script_in $boot_script
345-
346- boot_script_path="$boot_mnt_dir/uEnv.txt"
347- boot_script_env="$boot_mnt_dir/preEnv.txt"
348- env_script="$tmpdir/preEnv.txt"
349-
350- [ -e /etc/default/flash-kernel ] && . /etc/default/flash-kernel
351- echo "bootargs=ro $(LINUX_KERNEL_CMDLINE) root=UUID=$VOLID" > $env_script
352-
353- backup_and_install "$env_script" "$boot_script_env"
354- backup_and_install "$boot_script" "$boot_script_path"
355- ;;
356- esac
357+ create_boot_script
358 fi
359 if [ -n "$boot_dtb_path" ] && [ "$dtb_append" != "no" ]; then
360 boot_dtb_path="$boot_mnt_dir/$boot_dtb_path"
361diff --git a/its/arm64/image-kria.its b/its/arm64/image-kria.its
362new file mode 100644
363index 0000000..4ff3cc0
364--- /dev/null
365+++ b/its/arm64/image-kria.its
366@@ -0,0 +1,62 @@
367+/*
368+ * Simple U-Boot uImage source file containing a single kernel, ramdisk and FDT blob
369+ */
370+
371+/dts-v1/;
372+
373+/ {
374+ description = "Simple image with single Linux kernel, ramdisk and FDT blob";
375+ #address-cells = <1>;
376+
377+ images {
378+ kernel-1 {
379+ description = "Ubuntu kernel";
380+ data = /incbin/("@@LINUX_IMAGE_FILE@@");
381+ type = "kernel";
382+ arch = "arm64";
383+ os = "linux";
384+ compression = "gzip";
385+ load = <0x00080000>;
386+ entry = <0x00080000>;
387+ hash-1 {
388+ algo = "sha1";
389+ };
390+ };
391+
392+ ramdisk-1 {
393+ description = "Ubuntu ramdisk";
394+ data = /incbin/("@@INITRD_FILE@@");
395+ type = "ramdisk";
396+ arch = "arm64";
397+ os = "linux";
398+ compression = "none";
399+ hash-1 {
400+ algo = "sha1";
401+ };
402+ };
403+
404+ fdt-1 {
405+ description = "Kria Device Tree blob";
406+ data = /incbin/("/usr/share/xlnx-kria-firmware/devicetree/system-top.dtb");
407+ type = "flat_dt";
408+ arch = "arm64";
409+ compression = "none";
410+ hash-1 {
411+ algo = "sha1";
412+ };
413+ };
414+ };
415+
416+ configurations {
417+ default = "kria";
418+ kria {
419+ description = "Boot Ubuntu on kria SOM";
420+ kernel = "kernel-1";
421+ ramdisk = "ramdisk-1";
422+ fdt = "fdt-1";
423+ hash-1 {
424+ algo = "sha1";
425+ };
426+ };
427+ };
428+};
429diff --git a/its/arm64/image-zcu.its b/its/arm64/image-zcu.its
430new file mode 100644
431index 0000000..61e2ef0
432--- /dev/null
433+++ b/its/arm64/image-zcu.its
434@@ -0,0 +1,50 @@
435+/*
436+ * Simple U-Boot uImage source file containing a single kernel, ramdisk and FDT blob
437+ */
438+
439+/dts-v1/;
440+
441+/ {
442+ description = "Simple image with single Linux kernel, ramdisk and FDT blob";
443+ #address-cells = <1>;
444+
445+ images {
446+ kernel-1 {
447+ description = "Ubuntu kernel";
448+ data = /incbin/("@@LINUX_IMAGE_FILE@@");
449+ type = "kernel";
450+ arch = "arm64";
451+ os = "linux";
452+ compression = "gzip";
453+ load = <0x00080000>;
454+ entry = <0x00080000>;
455+ hash-1 {
456+ algo = "sha1";
457+ };
458+ };
459+
460+ ramdisk-1 {
461+ description = "Ubuntu ramdisk";
462+ data = /incbin/("@@INITRD_FILE@@");
463+ type = "ramdisk";
464+ arch = "arm64";
465+ os = "linux";
466+ compression = "none";
467+ hash-1 {
468+ algo = "sha1";
469+ };
470+ };
471+ };
472+
473+ configurations {
474+ default = "zcu";
475+ zcu {
476+ description = "Boot Ubuntu on zcu board";
477+ kernel = "kernel-1";
478+ ramdisk = "ramdisk-1";
479+ hash-1 {
480+ algo = "sha1";
481+ };
482+ };
483+ };
484+};
485diff --git a/test_db b/test_db
486index 622fd3c..19a02ee 100755
487--- a/test_db
488+++ b/test_db
489@@ -22,7 +22,7 @@
490 MACHINE_DB="$(cat "${FK_CHECKOUT:-$FK_DIR}/db/"*.db)"
491
492 test_no_unknown_fields() {
493- local expected='Android-Boot-Device Android-Skip-Initrd Boot-Device Boot-DTB-Path Boot-Initrd-Path Boot-Kernel-Path Bootloader-Has-Broken-Ext4-Extent-Support Bootloader-Sets-Incorrect-Root Bootloader-sets-root Boot-Multi-Path Boot-Script-Path DTB-Append DTB-Append-From DTB-Id Kernel-Flavors Machine Machine-Id Method Mtd-Initrd Mtd-Kernel Optional-Packages Required-Packages U-Boot-Initrd-Address U-Boot-Kernel-Address U-Boot-Kernel-Entry-Point U-Boot-Multi-Address U-Boot-Script-Address U-Boot-Script-Name'
494+ local expected='Android-Boot-Device Android-Skip-Initrd Boot-Device Boot-DTB-Path Boot-FIT-Path Boot-Initrd-Path Boot-ITS-File-Name Boot-Kernel-Path Bootloader-Has-Broken-Ext4-Extent-Support Bootloader-Sets-Incorrect-Root Bootloader-sets-root Boot-Multi-Path Boot-Script-Path DTB-Append DTB-Append-From DTB-Id Kernel-Flavors Machine Machine-Id Method Mtd-Initrd Mtd-Kernel Optional-Packages Required-Packages U-Boot-Initrd-Address U-Boot-Kernel-Address U-Boot-Kernel-Entry-Point U-Boot-Multi-Address U-Boot-Script-Address U-Boot-Script-Name'
495 expected="$(echo "$expected" | sed 's/ /\n/g' | sort -u | xargs)"
496 local fields="$(echo "$MACHINE_DB" | sed -n '/^[^#]*:/s/:.*//p' | sort -u | xargs)"
497 if [ "$fields" != "$expected" ]; then

Subscribers

People subscribed via source and target branches

to all changes: