Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

U-Boot integration [WIP] #1411

Open
wants to merge 63 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
2d31f11
util/helper: Allow setting environment and cwd
sjg20 May 17, 2024
e6731a6
util/helper: Change command output level to debug
sjg20 May 18, 2024
150cacc
helper: Support long-running processes
sjg20 May 23, 2024
4b69987
Provide variables to control drivers from the command line
sjg20 May 16, 2024
caa8844
driver: Add driver for Dediprog SPI-flash emulator
sjg20 May 16, 2024
42f8c5f
protocol: Add a new recovery protocol
sjg20 May 17, 2024
413c350
protocol: Allow more control of reset
sjg20 May 18, 2024
87d5a34
labgrid: Add a way to query information from a driver
sjg20 May 21, 2024
bf0ff8c
remote/client: Support finding a place by role
sjg20 May 21, 2024
9f5ddb0
driver/qemudriver: Make extra_args, cpu and machine optional
sjg20 Jul 27, 2024
fefbb6e
driver/qemudriver: Delay setting of the QEMU arguments
sjg20 Jul 27, 2024
6542260
driver/qemudriver: Allow the BIOS filename to be changed
sjg20 Jul 27, 2024
04dd7b8
driver/qemudriver: Report an error if QEMU is not turned on
sjg20 Aug 28, 2024
1980738
driver: Add a digital-output driver for recovery
sjg20 May 17, 2024
fb3f7ef
driver: Add a driver for the Servo board
sjg20 May 16, 2024
d4790b6
driver: Add a way to build U-Boot images
sjg20 May 16, 2024
c7ea039
driver: Provide a driver for writing U-Boot to a board
sjg20 May 16, 2024
f4c3fa8
Add a driver for a device which is always powered
sjg20 May 16, 2024
87974d2
Correct binding for HIDRelayDriver
sjg20 May 16, 2024
abe7017
bootstrapprotocol: Support a boot phase
sjg20 May 18, 2024
9891957
driver/usbloader: Add a USB loader for sunxi / Allwinner
sjg20 May 16, 2024
2cdae53
driver/usbloader: Add a loader for Tegra
sjg20 May 16, 2024
6b5ec1e
driver/usbloader: Add a loader for samsung
sjg20 May 16, 2024
4307a8a
driver/usbstoragedriver: Allow block size in write_image()
sjg20 May 16, 2024
bb87abc
driver/usbstoragedriver: Allow block count in write_image()
sjg20 May 16, 2024
17c9fce
driver/usbstoragedriver: Adjust how sync works
sjg20 May 16, 2024
ae80fa5
driver/usbstoragedriver: Write silently
sjg20 May 16, 2024
702bf10
driver/usbstoragedriver: Report time take to write
sjg20 May 16, 2024
39229dc
pytestplugin: Allow selecting a particular target
sjg20 May 17, 2024
d72d39d
pytestplugin: Allow setting variables
sjg20 May 17, 2024
388dbeb
usbhidrelay: Support generating a recovery signal
sjg20 May 18, 2024
9af6877
remote/exporter: Reduce the verbosity
sjg20 May 18, 2024
22b2c8a
remote/exporter: Reduce the verbosity further
sjg20 May 18, 2024
ad2d55f
remote/exporter: Indicate when the exporter is ready
sjg20 May 18, 2024
3c190f7
remote/client: Provide an option to acquire a place
sjg20 May 18, 2024
bd83e29
remote/client: Using logging for progress output
sjg20 May 18, 2024
bfa73e1
remote/client: Show the result of a failed command
sjg20 May 18, 2024
ac72fb7
remote/client: Allow releasing a target silently
sjg20 Jun 10, 2024
ca45254
remote/client: Fix environemnt typo
sjg20 Jun 10, 2024
40e312d
remote/client: Use logging when acquiring / releasing
sjg20 May 21, 2024
446a800
remote/client: Flush the console device only when needed
sjg20 Jun 10, 2024
c9f3d49
remote/client: Move initial-state code into a function
sjg20 Jun 10, 2024
2f7c40e
remote/client: Provide a way to set the strategy end-state
sjg20 Jun 10, 2024
183b935
remote/client: Allow checking if the place is acquired
sjg20 Jul 27, 2024
39e1007
remote/client: Move terminal handling into a separate file
sjg20 Jul 27, 2024
f42ca98
remote/client: Provide an internal console
sjg20 Jun 10, 2024
58b3e89
ssh: Avoid output when running rsync
sjg20 May 18, 2024
5766061
target: Add documentation
sjg20 May 18, 2024
0675bf4
target: Add documentation for get_driver()
sjg20 May 18, 2024
02ab8dd
target: Allow looking for an optional driver
sjg20 May 18, 2024
fdc8ba5
ubootdriver: Support collecting the version string
sjg20 Jun 10, 2024
f542f30
ubootdriver: Provide a way to collect output
sjg20 Jun 10, 2024
2ef12a9
strategy: Show the U-Boot version when booting
sjg20 May 18, 2024
3072993
strategy: Add a new state to start U-Boot
sjg20 May 18, 2024
72c10f2
strategy: Allow a board to be bootstrapped
sjg20 May 18, 2024
a8bab0d
strategy: Allow sending U-Boot over USB
sjg20 Apr 13, 2024
4553def
strategy: Show console output on failure
sjg20 May 21, 2024
2bf120f
strategy: Support boards which need a recovery button
sjg20 May 21, 2024
0b99f75
strategy: Support lab mode
sjg20 Jun 10, 2024
3686c0a
contrib: Provide some useful scripts for U-Boot
sjg20 May 19, 2024
6d3b4a0
Add an example lab
sjg20 Aug 28, 2024
8fbcc19
doc: Add documentation for U-Boot integration [v2]
sjg20 May 21, 2024
dc97a27
WIP: Updates to incorporate
sjg20 Nov 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions contrib/u-boot/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console_*
47 changes: 47 additions & 0 deletions contrib/u-boot/_ub-bisect-try
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/bin/bash

# ** INTERNAL SCRIPT - do not use directly - use ub-bisect instead **
# Boot U-Boot on a particular target and run the smoke test
# This is intended to be used by 'git bisect run'
# The special return codes 129 and 130 are returned when there is an internal
# failure, unrelated to the target

# Requires variables to eb set up by ub-bisect

mydir=$(dirname $0)

commit="$1"

echo "Revision $(git rev-parse HEAD), target ${target}"

if [ -n "${commit}" ]; then
if ! git cherry-pick "${commit}"; then
echo "cherry-pick failed"
exit 129
fi
fi

cd ${mydir}

if ! labgrid-client -p ${target} acquire; then
exit 1
fi

ret=0
pytest --lg-env "${LG_ENV}" --lg-coordinator="${LG_COORDINATOR}" \
--lg-log --lg-colored-steps --lg-target ${target} \
${lg_vars} \
-k test_uboot_smoke || ret=$?

if ! labgrid-client -p ${target} release; then
exit $?
fi

if [ -n "${commit}" ]; then
if ! git reset --hard HEAD~; then
echo "reset failed"
exit 130
fi
fi

exit $ret
21 changes: 21 additions & 0 deletions contrib/u-boot/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from pexpect.exceptions import TIMEOUT
import pytest
import subprocess
import sys

@pytest.fixture
def u_boot(target, strategy):
try:
strategy.transition("uboot")
except subprocess.CalledProcessError as exc:
# Show any build failures
print(f"Command failure: {' '.join(exc.cmd)}")
for line in exc.output.splitlines():
print(line.decode('utf-8'))
except TIMEOUT:
# Show any console output when things fail
console = target.get_active_driver('ConsoleProtocol')
output = console.read_output()
sys.stdout.buffer.write(output)
raise
return strategy.uboot
Loading
Loading