Add support for FVP emulator and fiptool
PATCH 1/1 Add support for FVP emulator and fiptool
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.
---
Cc: Harrison Mutai <[email protected]>
Cc: Manish Pandey <[email protected]>
Cc: nd <[email protected]>
--- 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
bin/console.fvp new file +28 -0
@@ -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
bin/flash.fiptool new file +22 -0
@@ -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}
bin/travis-ci/conf.vexpress_fvp_bloblist_na new file +1 -0
@@ -0,0 +1 @@ +conf.vexpress_fvp_na
bin/travis-ci/conf.vexpress_fvp_na new file +29 -0
@@ -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
Signature · 1 line
2.43.0
Quoted 120 lines · Tom Rini
This adds support for the
vexpress_fvpplatforms. 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 forvexpress_fvpto make use of this, and a symlink for thevexpress_fvp_bloblistplatform.Signed-off-by Tom Rini <[email protected]>---
Cc: Harrison Mutai <[email protected]>
Cc: Manish Pandey <[email protected]>
Cc: nd <[email protected]>--- 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_nabin/console.fvp new file +28
-0@@ -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 5000bin/flash.fiptool new file +22
-0@@ -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}bin/travis-ci/conf.vexpress_fvp_bloblist_na new file +1
-0@@ -0,0 +1 @@ +conf.vexpress_fvp_nabin/travis-ci/conf.vexpress_fvp_na new file +19
-0@@ -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.
bin/travis-ci/conf.vexpress_fvp_na line 29
Quoted 10 lines
bin/travis-ci/conf.vexpress_fvp_na new file +10
-0+ +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
Thanks for the patch. Looks good to me.
Quoted 10 lines · Tom Rini
This adds support for the
vexpress_fvpplatforms. 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 forvexpress_fvpto make use of this, and a symlink for thevexpress_fvp_bloblistplatform.[...]
Applied to u-boot/u-boot-test-hooks.git/master, thanks!
[1/1] Add support for FVP emulator and fiptool
commit: 0d8c51967901ae52c79ebe5180ad36fcac23b705
Signature · 1 line
Tom