Skip to content

Commit 2c80f55

Browse files
authored
migrate flash scripts from edl to qdl.js (#544)
1 parent b14ff7b commit 2c80f55

File tree

6 files changed

+22
-66
lines changed

6 files changed

+22
-66
lines changed

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,4 @@ qcom_xbl/
1515

1616
.vscode
1717

18-
edl_config.json
19-
tools/edl_repo/
20-
2118
edk2_tici/

flash_all.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
55
cd $DIR
66

77
for part in aop abl xbl xbl_config devcfg; do
8-
tools/edl w ${part}_a $DIR/firmware/$part.img
9-
tools/edl w ${part}_b $DIR/firmware/$part.img
8+
tools/qdl flash ${part}_a $DIR/firmware/$part.img
9+
tools/qdl flash ${part}_b $DIR/firmware/$part.img
1010
done
1111

1212
./flash_kernel.sh

flash_kernel.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
55
cd $DIR
66

77
echo "Checking active slot..."
8-
ACTIVE_SLOT=$(tools/edl getactiveslot | grep "Current active slot:" | awk '{print $NF}')
8+
ACTIVE_SLOT=$(tools/qdl getactiveslot)
99

1010
if [[ "$ACTIVE_SLOT" != "a" && "$ACTIVE_SLOT" != "b" ]]; then
1111
echo "Invalid active slot: '$ACTIVE_SLOT'"
@@ -14,6 +14,6 @@ fi
1414

1515
echo "Active slot: $ACTIVE_SLOT"
1616
echo "Flashing boot_$ACTIVE_SLOT..."
17-
tools/edl w boot_$ACTIVE_SLOT $DIR/output/boot.img
17+
tools/qdl flash boot_$ACTIVE_SLOT $DIR/output/boot.img
1818

1919
echo "Flashed boot_$ACTIVE_SLOT!"

flash_system.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
55
cd $DIR
66

77
echo "Checking active slot..."
8-
ACTIVE_SLOT=$(tools/edl getactiveslot | grep "Current active slot:" | awk '{print $NF}')
8+
ACTIVE_SLOT=$(tools/qdl getactiveslot)
99

1010
if [[ "$ACTIVE_SLOT" != "a" && "$ACTIVE_SLOT" != "b" ]]; then
1111
echo "Invalid active slot: '$ACTIVE_SLOT'"
@@ -14,8 +14,8 @@ fi
1414

1515
echo "Active slot: $ACTIVE_SLOT"
1616
echo "Flashing system_$ACTIVE_SLOT..."
17-
tools/edl w system_$ACTIVE_SLOT $DIR/output/system.img
17+
tools/qdl flash system_$ACTIVE_SLOT $DIR/output/system.img
1818

19-
tools/edl reset
19+
tools/qdl reset
2020

2121
echo "Flashed system_$ACTIVE_SLOT!"

tools/edl

Lines changed: 0 additions & 56 deletions
This file was deleted.

tools/qdl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
4+
if ! command -v bun &> /dev/null; then
5+
echo "Installing bun..." >&2
6+
curl -fsSL https://bun.sh/install | bash >&2
7+
export PATH="$HOME/.bun/bin:$PATH"
8+
fi
9+
10+
QDL="bunx --bun commaai/qdl.js"
11+
12+
# preload package so bunx output doesn't pollute stdout on first run
13+
$QDL --help > /dev/null 2>&1 || true
14+
15+
exec $QDL "$@"

0 commit comments

Comments
 (0)