hooks: Add support for Jetson TX2 testing on swarren-lx1

Signed-off-by: Stephen Warren <swarren@nvidia.com>
This commit is contained in:
Stephen Warren
2018-01-16 15:25:26 -07:00
committed by Simon Glass
parent 3c2e81994d
commit 0ac2d77b56
6 changed files with 134 additions and 2 deletions

View File

@@ -0,0 +1,46 @@
# Copyright (c) 2015-2018, NVIDIA CORPORATION. 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_dir}/recovery.${recovery_impl}"
# USB enumeration delay
for ((i = 0; i <= 100; i++)); do
if [ -e "${board_usb_dev}" ]; then
break
fi
sleep 0.1
done
sleep 1
cp "${U_BOOT_BUILD_DIR}"/u-boot-dtb.bin "${flash_l4t}/${flash_l4t_uboot_path}/u-boot.bin"
# FIXME: Need to enhance flash.sh to accept --instance parameter and pass to
# tegraflash.py. Sigh.
# FIXME: To speed things up here, we could add "-k kernel" and just reflash the
# "kernel" partition (which holds U-Boot when it's in use). However, this
# relies on having the right L4T already flashed, which isn't likely on my
# system since I use the board for other things.
(cd "${flash_l4t}" && sudo "${flash_l4t}/flash.sh" -r "${flash_l4t_board}" mmcblk0p1)
# Prevent the system from booting before the reset script is run. Otherwise,
# either (a) the test system won't capture the start of the UART log, or (b)
# U-Boot will start running early, and the test system will start capturing
# part way through boot, and see extra copies of all the U-Boot messages, and
# hence fail the boot test. Ideally, flash.sh wouldn't auto-reset/boot the
# system.
. "${bin_dir}/recovery.${recovery_impl}"

View File

@@ -21,4 +21,4 @@
# Basic power on
"${nv_board_automation_bin}/boardctl" --target pm342 --serial "${pm342_serial}" power_on
# Put board into recovery so it doesn't boot
"${nv_board_automation_bin}/boardctl" --target pm342 --serial "${pm342_serial}" recovery
. "${bin_dir}/recovery.pm342"

View File

@@ -18,4 +18,9 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
"${nv_board_automation_bin}/boardctl" --target pm342 --serial "${pm342_serial}" recovery
# The "recovery" command doesn't work on p2771-0000, so do this manually:
"${nv_board_automation_bin}/boardctl" --target pm342 --serial "${pm342_serial}" recovery_down
sleep 0.25
"${nv_board_automation_bin}/boardctl" --target pm342 --serial "${pm342_serial}" reset
sleep 0.25
"${nv_board_automation_bin}/boardctl" --target pm342 --serial "${pm342_serial}" recovery_up

View File

@@ -0,0 +1,21 @@
# Copyright (c) 2015-2018, NVIDIA CORPORATION. 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.
"${nv_board_automation_bin}/boardctl" --target pm342 --serial "${pm342_serial}" reset

View File

@@ -0,0 +1,31 @@
# Copyright (c) 2015-2018, NVIDIA CORPORATION. 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.
console_dev=/dev/serial/by-path/pci-0000:00:14.0-usb-0:14:1.2-port0
power_impl=pm342
flash_impl=recovery_l4t
recovery_impl=pm342
flash_l4t="${HOME}/ubtest-l4t-r28.1-p2771-0000"
flash_l4t_uboot_path=bootloader/t186ref/p2771-0000/500/
flash_l4t_board=jetson-tx2
reset_impl=pm342
nv_board_automation_bin="${HOME}/ubtest-nvidia-board-automation"
pm342_serial=SRW-1
board_usb_dev=/dev/usbdev-p2771-0000

View File

@@ -0,0 +1,29 @@
# Copyright (c) 2015-2018, NVIDIA CORPORATION. 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.
env__net_uses_pci = False
env__net_dhcp_server = True
env__net_tftp_readable_file = {
"fn": "ubtest-readable.bin",
"size": 5058624,
"crc32": "c2244b26",
}