Files
qdl/tests/data/generate_flat_build.sh
Igor Opaniuk 6c0fbcce08 tests: add initial test set
Add tests make target and a simple test that executes qdl in dry-run mode
for a synthetic reference FLAT build with VIP table generation.

The FLAT build contains:
- patch0.xml
- patch1.xml
- rawprogram0.xml
- rawprogram1.xml

All binaries that these XML files point to are filled with zeros, generated
during github action  execution.

Tests ensures that the table is generated correctly by comparing
calculated and expected SHA256 hashes of DigestToSign.bin file.

Signed-off-by: Igor Opaniuk <igor.opaniuk@oss.qualcomm.com>
2025-06-20 11:51:49 +02:00

22 lines
628 B
Bash
Executable File

#!/bin/sh
# SPDX-License-Identifier: BSD-3-Clause
SCRIPT_PATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
create_file_with_size() {
filename="$1"
size_kbytes="$2"
dd if=/dev/zero of="$SCRIPT_PATH/$filename" bs=1024 count="$size_kbytes" status=none
}
create_file_with_size prog_firehose_ddr.elf 20
create_file_with_size efi.bin 524288
create_file_with_size gpt_backup0.bin 20
create_file_with_size gpt_backup1.bin 20
create_file_with_size gpt_main0.bin 24
create_file_with_size gpt_main1.bin 24
create_file_with_size rootfs.img 512000
create_file_with_size xbl_config.elf 320
create_file_with_size xbl.elf 800