Commit eb89445
committed
doc: Add documentation for U-Boot integration [v2]
Cover the drivers, scripts, pytest and the Gitlab information.
Note: This implementation is the result of working through what is
needed in Labgrid to support U-Boot labs. I did initially file quite
a few issues[1] but there has not been a lot of traction and I got
feedback that I have overwhelmed people with too many. So I have
stopped filing issues on the things I hit along the way. I have carried
on with the implementation in the hope that this can be a better basis
for discussion.
Note that all of these patches are work-in-progress. Feedback on any or
all may change the implementation and documentation substantially.
Changes in v5:
- Rebase on latest grpc branch
- Fix pylint errors and warnings
Changes in v4:
- Support for Beagleplay, which needs files from two separate U-Boot
builds
- Support for a 'recovery' button needed to boot the image
- Tidy up the internal-console support
- Fix pytest behaviour with an unpatched U-Boot (that doesn't have lab
mode)
Changes in v3:
- Rebase on top of grpc branch
- Don't mess with terminal setting unless stdin is a terminal
- Don't show an error if there are no resources when auto-acquiring
- Support QEMU in UBootWriter
Some changes in v2:
- Rationalise the flags for the U-Boot scripts
- Support tracing with em100
- Support an internal terminal instead of microcom
- Add a -D flag for debugging
- Support send-only boards
- Add a way to build the U-Boot config
- Add a control for buildman's process-limit
- allow the build-dir to be specified in a variable
- add documentation about U-Boot-pytest integration
- add source_dir and config_file to UBootProviderDriver
- add an internal terminal
- expand the U-Boot scripts
- significantly improve the U-Boot-pytest integration
The approximate diffstat is:
contrib/sync-places.py | 23 +-
contrib/u-boot/.gitignore | 1 +
contrib/u-boot/_ub-bisect-try | 47 ++
contrib/u-boot/conftest.py | 21 +
contrib/u-boot/get_args.sh | 128 +++++
contrib/u-boot/index.rst | 232 +++++++++
contrib/u-boot/lg-client | 11 +
contrib/u-boot/lg-env | 10 +
contrib/u-boot/test_smoke.py | 3 +
contrib/u-boot/ub-bisect | 44 ++
contrib/u-boot/ub-cli | 39 ++
contrib/u-boot/ub-int | 41 ++
contrib/u-boot/ub-pyt | 69 +++
contrib/u-boot/ub-smoke | 48 ++
doc/configuration.rst | 611 ++++++++++++++++++++++-
doc/usage.rst | 288 +++++++++++
labgrid/driver/__init__.py | 10 +-
labgrid/driver/common.py | 11 +
labgrid/driver/consoleexpectmixin.py | 7 +
labgrid/driver/powerdriver.py | 29 ++
labgrid/driver/qemudriver.py | 84 ++--
labgrid/driver/recoverydriver.py | 25 +
labgrid/driver/resetdriver.py | 7 +
labgrid/driver/servodriver.py | 157 ++++++
labgrid/driver/sfemulatordriver.py | 102 ++++
labgrid/driver/ubootdriver.py | 27 +-
labgrid/driver/ubootproviderdriver.py | 323 ++++++++++++
labgrid/driver/ubootwriterdriver.py | 160 ++++++
labgrid/driver/usbhidrelay.py | 7 +-
labgrid/driver/usbloader.py | 170 ++++++-
labgrid/driver/usbstoragedriver.py | 18 +-
labgrid/factory.py | 4 +-
labgrid/protocol/__init__.py | 1 +
labgrid/protocol/bootstrapprotocol.py | 8 +-
labgrid/protocol/recoveryprotocol.py | 14 +
labgrid/protocol/resetprotocol.py | 12 +
labgrid/pytestplugin/fixtures.py | 21 +-
labgrid/pytestplugin/hooks.py | 8 +
labgrid/remote/client.py | 351 ++++++++-----
labgrid/remote/config.py | 7 +-
labgrid/remote/exporter.py | 122 ++++-
labgrid/resource/__init__.py | 6 +
labgrid/resource/remote.py | 24 +
labgrid/resource/servo.py | 485 ++++++++++++++++++
labgrid/resource/sfemulator.py | 33 ++
labgrid/resource/suggest.py | 6 +
labgrid/resource/udev.py | 33 ++
labgrid/strategy/ubootstrategy.py | 151 +++++-
labgrid/target.py | 120 ++++-
labgrid/util/helper.py | 220 ++++----
labgrid/util/ssh.py | 3 +-
labgrid/util/term.py | 184 +++++++
labgrid/var_dict.py | 8 +
man/labgrid-client.1 | 6 +
man/labgrid-client.rst | 4 +
man/labgrid-device-config.5 | 4 +
56 files changed, 4267 insertions(+), 321 deletions(-)
[1] https://github.com/labgrid-project/labgrid/issues/created_by/sjg20
Signed-off-by: Simon Glass <sjg@chromium.org>1 parent d5bbfd7 commit eb89445
2 files changed
Lines changed: 288 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2021 | 2021 | | |
2022 | 2022 | | |
2023 | 2023 | | |
| 2024 | + | |
| 2025 | + | |
2024 | 2026 | | |
2025 | 2027 | | |
2026 | 2028 | | |
| |||
2064 | 2066 | | |
2065 | 2067 | | |
2066 | 2068 | | |
| 2069 | + | |
| 2070 | + | |
| 2071 | + | |
| 2072 | + | |
| 2073 | + | |
2067 | 2074 | | |
2068 | 2075 | | |
2069 | 2076 | | |
| |||
2115 | 2122 | | |
2116 | 2123 | | |
2117 | 2124 | | |
| 2125 | + | |
| 2126 | + | |
2118 | 2127 | | |
2119 | 2128 | | |
2120 | 2129 | | |
| |||
3875 | 3884 | | |
3876 | 3885 | | |
3877 | 3886 | | |
| 3887 | + | |
| 3888 | + | |
3878 | 3889 | | |
3879 | 3890 | | |
3880 | 3891 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
883 | 883 | | |
884 | 884 | | |
885 | 885 | | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
0 commit comments