This adds support for a BeagleBone Black board, which is supported under the am335x_evm configuration.
Signed-off-by: Tom Rini <[email protected]> --- For the moment, this uses snmpset to manage power on the board. The relevant changes have been submitted upstream, but rather than use a local wheel (which is doable but complicated for all custodian repositories) we go with this option instead for now. --- bin/sage/conf.am335x_evm | 24 +++++++++ bin/sage/labgrid-sage-env.yaml | 37 +++++++++++++ py/sage/u_boot_boardenv_am335x_evm.py | 76 +++++++++++++++++++++++++++ 3 files changed, 137 insertions(+) create mode 100644 bin/sage/conf.am335x_evm create mode 100644 py/sage/u_boot_boardenv_am335x_evm.py diff --git a/bin/sage/conf.am335x_evm b/bin/sage/conf.am335x_evm new file mode 100644 index 0000000..6c84f12 --- /dev/null +++ b/bin/sage/conf.am335x_evm @@ -0,0 +1,24 @@ +# 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. + +console_impl=labgrid-trini +reset_impl=labgrid-trini +flash_impl=labgrid-trini.sd-mux +flash_writer=labgrid-trini.ti-omap_mount diff --git a/bin/sage/labgrid-sage-env.yaml b/bin/sage/labgrid-sage-env.yaml index 97363be..9fc8b98 100644 --- a/bin/sage/labgrid-sage-env.yaml +++ b/bin/sage/labgrid-sage-env.yaml @@ -100,6 +100,32 @@ targets: autoboot: 'Hit any key to stop autoboot' strategy: cls: UBootStrategy + bbb-1: + resources: + RemotePlace: + name: bbb-1 + drivers: + power: + cls: ExternalPowerDriver + cmd_on: 'snmpset -v 2c -c private 192.168.1.254 .1.3.6.1.4.1.1718.3.2.3.1.11.1.1.9 i 1' + cmd_off: 'snmpset -v 2c -c private 192.168.1.254 .1.3.6.1.4.1.1718.3.2.3.1.11.1.1.9 i 2' + mux: + cls: USBSDWireDriver + storage: + cls: USBStorageDriver + serial: + cls: SerialDriver + shell: + cls: ShellDriver + prompt: 'root@.*:~# ' + login_prompt: 'login: ' + username: 'root' + uboot: + cls: UBootDriver + prompt: 'U-Boot> ' + autoboot: 'Hit any key to stop autoboot' + strategy: + cls: UBootStrategy sage-exporter-rpi3-1: resources: RemotePlace: @@ -136,3 +162,14 @@ targets: cls: NetworkPowerDriver ssh: cls: SSHDriver + sage-exporter-bbb-1: + resources: + RemotePlace: + name: sage-exporter-bbb-1 + drivers: + power: + cls: ExternalPowerDriver + cmd_on: 'snmpset -v 2c -c private 192.168.1.254 .1.3.6.1.4.1.1718.3.2.3.1.11.1.1.13 i 1' + cmd_off: 'snmpset -v 2c -c private 192.168.1.254 .1.3.6.1.4.1.1718.3.2.3.1.11.1.1.13 i 2' + ssh: + cls: SSHDriver diff --git a/py/sage/u_boot_boardenv_am335x_evm.py b/py/sage/u_boot_boardenv_am335x_evm.py new file mode 100644 index 0000000..cbd5590 --- /dev/null +++ b/py/sage/u_boot_boardenv_am335x_evm.py @@ -0,0 +1,76 @@ +# 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. + +env__net_dhcp_server = True + +env__net_tftp_readable_file = { + "fn": "1MiBtest.bin", + "size": 1048576, + "crc32": "2fa737e0", +} + +env__efi_loader_helloworld_file = { + 'fn': 'EFI/arm/helloworld.efi', + 'size': 2320, + 'addr': 0x82000000, + 'crc32': 'e37e06d4', +} +env__efi_helloworld_net_http_test_skip = False + +env__efi_loader_grub_file = { + 'fn': 'EFI/arm/grubarm.efi', + 'size': 471040, + 'addr': 0x82000000, + 'crc32': '4a84b065', +} + +# No console output from Linux +#env__tftp_boot_test_skip = False +# +#env__net_tftp_bootable_file = { +# 'fn': 'v6.13/image.fit.arm', +# 'addr': 0x82000000, +# 'size': 22348800, +# 'crc32': 'cecdd6f1', +# 'pattern': 'Booting Linux on physical CPU', +#} + +# Details regarding a file that may be read from a TFTP server. This variable +# may be omitted or set to None if PXE testing is not possible or desired. +env__net_pxe_bootable_file = { + 'fn': 'default', + 'addr': 0x82000000, + 'size': 64, + 'timeout': 50000, + 'pattern': 'Linux', + 'valid_label': '1', + 'invalid_label': '2', + 'exp_str_invalid': 'Skipping install for failure retrieving', + 'local_label': '3', + 'exp_str_local': 'missing environment variable: localcmd', + 'empty_label': '4', + 'exp_str_empty': 'No kernel given, skipping boot', +} + +# False or omitted if a PXE boot test should be tested. +# If PXE boot testing is not possible or desired, set this variable to True. + +# For example: If pxe configuration file is not proper to boot +env__pxe_boot_test_skip = False -- 2.39.2

