This adds support for the vexpress_fvp platforms. In order to do that we need to add support for calling fiptool to update an existing "fip" file with our U-Boot build. We also need to support launching the FVP emulator itself. This is a little tricky in that we need to use "telnet" to reach the created serial ports and cannot just use an existing file descriptor for our needs. Finally, we add in conf files for vexpress_fvp to make use of this, and a symlink for the vexpress_fvp_bloblist platform.
Signed-off-by: Tom Rini <tr...@konsulko.com> --- Cc: Harrison Mutai <harrison.mu...@arm.com> Cc: Manish Pandey <manish.pand...@arm.com> Cc: nd <n...@arm.com> --- bin/console.fvp | 28 ++++++++++++++++++++ bin/flash.fiptool | 22 ++++++++++++++++ bin/travis-ci/conf.vexpress_fvp_bloblist_na | 1 + bin/travis-ci/conf.vexpress_fvp_na | 29 +++++++++++++++++++++ 4 files changed, 80 insertions(+) create mode 100644 bin/console.fvp create mode 100644 bin/flash.fiptool create mode 120000 bin/travis-ci/conf.vexpress_fvp_bloblist_na create mode 100644 bin/travis-ci/conf.vexpress_fvp_na diff --git a/bin/console.fvp b/bin/console.fvp new file mode 100644 index 000000000000..eacae7d107d3 --- /dev/null +++ b/bin/console.fvp @@ -0,0 +1,28 @@ +# Copyright (c) 2025 Konsulko Group. All rights reserved. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +# We must be passed the arguments to pass to FVP +ARGS="${fvp_args}" + +"${fvp_binary}" ${ARGS} & + +# We need to wait for FVP to have spawned itself before launching telnet +sleep 1 +exec telnet localhost 5000 diff --git a/bin/flash.fiptool b/bin/flash.fiptool new file mode 100644 index 000000000000..23014f2bbe82 --- /dev/null +++ b/bin/flash.fiptool @@ -0,0 +1,22 @@ +# Copyright (c) 2025 Konsulko Group. All rights reserved. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +# Call fiptool to update an existing fip.bin file +fiptool update --nt-fw="${U_BOOT_BUILD_DIR}/u-boot.bin" ${fip} diff --git a/bin/travis-ci/conf.vexpress_fvp_bloblist_na b/bin/travis-ci/conf.vexpress_fvp_bloblist_na new file mode 120000 index 000000000000..ef6f0a4ee827 --- /dev/null +++ b/bin/travis-ci/conf.vexpress_fvp_bloblist_na @@ -0,0 +1 @@ +conf.vexpress_fvp_na \ No newline at end of file diff --git a/bin/travis-ci/conf.vexpress_fvp_na b/bin/travis-ci/conf.vexpress_fvp_na new file mode 100644 index 000000000000..0f99cc9aead9 --- /dev/null +++ b/bin/travis-ci/conf.vexpress_fvp_na @@ -0,0 +1,29 @@ +# Copyright (c) 2025 Konsulko Group. All rights reserved. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +if [ -z "${fip}" -o -z "${bl1}" ]; then + echo "The environment must point 'fip' and 'bl1' at existing fip and bl1 files" + exit 1 +fi +console_impl=fvp +fvp_binary="FVP_Base_RevC-2xAEMvA" +fvp_args="-C bp.flashloader0.fname=${fip} -C bp.secureflashloader.fname=${bl1} -C bp.vis.disable_visualisation=1" +reset_impl=none +flash_impl=fiptool -- 2.43.0