Skip to content

Commit df6dea9

Browse files
committed
edl: fix comma four
1 parent 2d37418 commit df6dea9

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

tools/edl

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,31 @@ if [ ! -d "$EDL_PATH" ]; then
1515
fi
1616

1717
pushd $EDL_PATH > /dev/null
18-
python3 -m venv venv
18+
19+
NEED_INSTALL=0
20+
if [ ! -d venv ]; then
21+
python3 -m venv venv
22+
NEED_INSTALL=1
23+
fi
1924
source venv/bin/activate
2025

2126
if [ "$(< .git/HEAD)" != "$VERSION" ]; then
2227
echo "updating edl..."
2328
git fetch origin $VERSION
2429
git checkout $VERSION
2530
git submodule update --depth=1 --init --recursive
31+
NEED_INSTALL=1
32+
fi
33+
34+
if [ "$NEED_INSTALL" -eq 1 ]; then
2635
pip3 install -r requirements.txt
2736
fi
37+
38+
# patch in comma four USB id (https://github.com/commaai/agnos-builder/issues/533)
39+
if ! grep -q '0x3801' $EDL_PATH/edlclient/Config/usb_ids.py; then
40+
sed -i '/\[0x05c6, 0x9008, -1\]/a\ [0x3801, 0x9008, -1], # comma four' $EDL_PATH/edlclient/Config/usb_ids.py
41+
fi
42+
2843
popd > /dev/null
2944

3045
$EDL_PATH/edl "$@"

0 commit comments

Comments
 (0)