Leonardo Sandoval | 9dfdd1b | 2020-08-06 17:08:11 -0500 | [diff] [blame] | 1 | #!/usr/bin/env bash |
Manish Pandey | 3c43558 | 2020-07-15 12:14:26 +0100 | [diff] [blame] | 2 | # |
Harrison Mutai | a6d6e68 | 2023-03-27 13:20:33 +0100 | [diff] [blame] | 3 | # Copyright (c) 2020-2023, Arm Limited. All rights reserved. |
Manish Pandey | 3c43558 | 2020-07-15 12:14:26 +0100 | [diff] [blame] | 4 | # |
| 5 | # SPDX-License-Identifier: BSD-3-Clause |
| 6 | # |
| 7 | |
Olivier Deprez | f839dcf | 2021-09-03 10:41:17 +0200 | [diff] [blame] | 8 | pre_tftf_build() { |
| 9 | # Build Cactus and Ivy images only |
| 10 | targets="cactus ivy" set_tftf_build_targets |
| 11 | } |
| 12 | |
Manish Pandey | 3c43558 | 2020-07-15 12:14:26 +0100 | [diff] [blame] | 13 | post_tf_build() { |
| 14 | # |
| 15 | # To build SP packages in TF-A we need to build FIP. |
| 16 | # The resulting FIP has valid SP Packages mentioned in SP_LAYOUT_FILE |
| 17 | # but dummy BL33 and BL32. |
| 18 | # |
| 19 | local dummy_file="$(mktempfile)" |
Chris Kay | 4e8aaf1 | 2022-09-01 15:21:55 +0100 | [diff] [blame] | 20 | echo "hello world" >"$dummy_file" |
Manish Pandey | 3c43558 | 2020-07-15 12:14:26 +0100 | [diff] [blame] | 21 | |
| 22 | build_fip BL33="$dummy_file" BL32="$dummy_file" |
| 23 | |
Manish Pandey | 3c43558 | 2020-07-15 12:14:26 +0100 | [diff] [blame] | 24 | url="${tf_build_root}/${plat}/${mode}/fdts/fvp_spmc_manifest.dtb" fetch_file |
| 25 | url="${tf_build_root}/${plat}/${mode}/cactus-primary.pkg" fetch_file |
| 26 | url="${tf_build_root}/${plat}/${mode}/cactus-secondary.pkg" fetch_file |
Olivier Deprez | 0b83409 | 2020-08-21 08:36:01 +0200 | [diff] [blame] | 27 | url="${tf_build_root}/${plat}/${mode}/cactus-tertiary.pkg" fetch_file |
Olivier Deprez | dd9ed33 | 2021-07-02 12:07:17 +0200 | [diff] [blame] | 28 | url="${tf_build_root}/${plat}/${mode}/ivy.pkg" fetch_file |
Manish Pandey | 3c43558 | 2020-07-15 12:14:26 +0100 | [diff] [blame] | 29 | |
Manish Pandey | 3c43558 | 2020-07-15 12:14:26 +0100 | [diff] [blame] | 30 | archive_file "fvp_spmc_manifest.dtb" |
| 31 | archive_file "cactus-primary.pkg" |
| 32 | archive_file "cactus-secondary.pkg" |
Olivier Deprez | 0b83409 | 2020-08-21 08:36:01 +0200 | [diff] [blame] | 33 | archive_file "cactus-tertiary.pkg" |
Olivier Deprez | dd9ed33 | 2021-07-02 12:07:17 +0200 | [diff] [blame] | 34 | archive_file "ivy.pkg" |
Manish Pandey | 3c43558 | 2020-07-15 12:14:26 +0100 | [diff] [blame] | 35 | } |
| 36 | |
Olivier Deprez | aa4d126 | 2020-10-30 15:02:17 +0100 | [diff] [blame] | 37 | fetch_tf_resource() { |
Olivier Deprez | 575bf89 | 2021-07-30 10:52:53 +0200 | [diff] [blame] | 38 | url="$tfa_downloads/spm/07-29-2021/initrd.img" saveas="initrd.bin" fetch_file |
Olivier Deprez | f839dcf | 2021-09-03 10:41:17 +0200 | [diff] [blame] | 39 | url="$tfa_downloads/spm/07-29-2021/manifest.dtb" saveas="dtb.bin" fetch_file |
Olivier Deprez | aa4d126 | 2020-10-30 15:02:17 +0100 | [diff] [blame] | 40 | |
Leonardo Sandoval | 4f0c791 | 2021-03-17 11:35:07 -0600 | [diff] [blame] | 41 | archive_file "initrd.bin" |
Olivier Deprez | f839dcf | 2021-09-03 10:41:17 +0200 | [diff] [blame] | 42 | archive_file "dtb.bin" |
Chris Kay | 4e8aaf1 | 2022-09-01 15:21:55 +0100 | [diff] [blame] | 43 | } |
Olivier Deprez | aa4d126 | 2020-10-30 15:02:17 +0100 | [diff] [blame] | 44 | |
Chris Kay | 4e8aaf1 | 2022-09-01 15:21:55 +0100 | [diff] [blame] | 45 | generate_lava_job_template() { |
Harrison Mutai | a6d6e68 | 2023-03-27 13:20:33 +0100 | [diff] [blame] | 46 | payload_type="linux" gen_yaml_template |
Olivier Deprez | aa4d126 | 2020-10-30 15:02:17 +0100 | [diff] [blame] | 47 | } |
| 48 | |
Chris Kay | 4e8aaf1 | 2022-09-01 15:21:55 +0100 | [diff] [blame] | 49 | generate_lava_job() { |
| 50 | local model="base-aemv8a" |
| 51 | |
| 52 | uart="0" file="spm-linux-uart0.exp" track_expect |
Leonardo Sandoval | 00ced1f | 2020-12-07 12:55:08 -0600 | [diff] [blame] | 53 | |
| 54 | model="$model" \ |
Chris Kay | 4e8aaf1 | 2022-09-01 15:21:55 +0100 | [diff] [blame] | 55 | arch_version="8.5" \ |
| 56 | has_branch_target_exception="1" \ |
| 57 | has_smmuv3_params="1" \ |
| 58 | kernel_addr="0x88000000" \ |
| 59 | kernel_bin="$archive/hafnium.bin" \ |
| 60 | memory_tagging_support_level="2" \ |
| 61 | reset_to_bl31="1" \ |
| 62 | sp1_pkg="cactus-primary.pkg" \ |
| 63 | sp2_pkg="cactus-secondary.pkg" \ |
| 64 | sp3_pkg="cactus-tertiary.pkg" \ |
| 65 | sp4_pkg="ivy.pkg" \ |
| 66 | spm_bin="$archive/secure_hafnium.bin" \ |
| 67 | spmc_manifest="fvp_spmc_manifest.dtb" \ |
Madhukar Pappireddy | b642aa0 | 2023-08-23 16:49:20 -0500 | [diff] [blame] | 68 | gicd_are_fixed_one="1" \ |
| 69 | gicv3_ext_interrupt_range="1" \ |
| 70 | gicd_ext_ppi_count="64" \ |
| 71 | gicd_ext_spi_count="1024" \ |
Manish Pandey | 3c43558 | 2020-07-15 12:14:26 +0100 | [diff] [blame] | 72 | gen_model_params |
Olivier Deprez | 18101ca | 2021-04-23 19:42:04 +0200 | [diff] [blame] | 73 | |
Leonardo Sandoval | b1fb634 | 2021-11-18 15:34:25 -0600 | [diff] [blame] | 74 | model="$model" gen_fvp_yaml |
Manish Pandey | 3c43558 | 2020-07-15 12:14:26 +0100 | [diff] [blame] | 75 | } |