-
Notifications
You must be signed in to change notification settings - Fork 14
tools: Flashpack - a tool to flash vamOS #94
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
Open
mpurnell1
wants to merge
45
commits into
commaai:master
Choose a base branch
from
mpurnell1:flash
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 35 commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
5e59f76
add web-based flash page for vamOS
mpurnell1 a1b1d3d
Temporarily allow flash pushes to trigger pages builds
mpurnell1 a200f06
fix: load qdl.js from GitHub via esm.sh
mpurnell1 7d6147a
vendor qdl.js bundle to fix MIME type error
mpurnell1 cfbd7e4
manifest-driven flash with CORS proxy
mpurnell1 04e42f4
rewrite flash page as bun project in tools/flash
mpurnell1 88d6986
add bun lockfile for tools/flash
mpurnell1 94baeb9
Update gitignore
mpurnell1 55015b8
manifest-driven FlashManager ported from flash repo
mpurnell1 f2782cf
add Cloudflare Worker CORS proxy for release assets
mpurnell1 af53a99
fix: correct Cloudflare Worker URL
mpurnell1 4f14161
skip partitions not found on device
mpurnell1 4d2e4a4
rename to flashpack
mpurnell1 fd531b3
update lockfile for flashpack rename
mpurnell1 36b086e
rename tools/flash to tools/flashpack
mpurnell1 5809fb3
switch flashpack to raw.githubusercontent.com, remove Cloudflare proxy
mpurnell1 02ba014
update flashpack for new manifest format
mpurnell1 4aa249f
Revert "update flashpack for new manifest format"
mpurnell1 d983928
fetch manifest from versioned branch
mpurnell1 08bee7c
fix: close writable stream after chunked download
mpurnell1 fea48ee
add device picker, port diagrams, and conditional unbind step
mpurnell1 c4a07ff
fix: keep CLI flash scripts in tools/flash/
mpurnell1 16c461a
add stepper navigation to go back to previous steps
mpurnell1 ab14a39
add Windows Zadig step, fix stepper navigation between devices
mpurnell1 ee8e1a8
named stepper labels, preserve selection when going back
mpurnell1 5295598
update README.md
greatgitsby b94729e
build: enable multithreading for erofs compression (#95)
robin-reckmann 91a6748
Revert CI images in GitHub (#101)
greatgitsby bd69c46
ci: fix PR comment for fork PRs (#102)
greatgitsby ba7b198
ci: fix profile workflow race with build-system check (#105)
greatgitsby e00514b
ci: publish images to vamos-images repo (#104)
greatgitsby c5998a5
Fix redirect
mpurnell1 f1c2264
Remove test trigger
mpurnell1 c56341e
Merge branch 'master' into flash
mpurnell1 eb84daf
Add option to set custom domain in the future
mpurnell1 9b578ad
Enable test deploys again
mpurnell1 613ab60
Make suggested changes from review
mpurnell1 354bf5e
Don't build flash commits
mpurnell1 bb75bb5
Remove init status
mpurnell1 e16dd2b
Make callbacks public
mpurnell1 400c04d
Flash -> flashpack
mpurnell1 3246779
bump deploy version to address Node 20 deprecation warnings
mpurnell1 3feabe2
Update other deprecated actions
mpurnell1 d046975
Update final package using Node 20
mpurnell1 ecff0f9
Merge branch 'master' into flash
mpurnell1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| name: deploy pages | ||
|
|
||
| on: | ||
| push: | ||
| branches: [master] | ||
| paths: | ||
| - 'tools/flashpack/**' | ||
| - '.github/workflows/pages.yml' | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pages: write | ||
| id-token: write | ||
|
|
||
| concurrency: | ||
| group: pages | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| deploy: | ||
| runs-on: ubuntu-latest | ||
| environment: | ||
| name: github-pages | ||
| url: ${{ steps.deployment.outputs.page_url }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: oven-sh/setup-bun@v2 | ||
|
|
||
| - name: build | ||
| working-directory: tools/flashpack | ||
| run: | | ||
| bun install | ||
| bun run build | ||
|
|
||
| # To deploy to a custom domain (e.g. flashpack.comma.ai), | ||
| # uncomment this step and configure DNS to point to GitHub Pages | ||
| # - name: set custom domain | ||
| # run: echo "flashpack.comma.ai" > tools/flashpack/dist/CNAME | ||
|
|
||
| - name: configure pages | ||
| uses: actions/configure-pages@v5 | ||
|
|
||
| - name: upload artifact | ||
| uses: actions/upload-pages-artifact@v3 | ||
| with: | ||
| path: tools/flashpack/dist | ||
|
|
||
| - name: deploy to github pages | ||
| id: deployment | ||
| uses: actions/deploy-pages@v4 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,4 +4,7 @@ | |
| **/.DS_Store | ||
| **/*.tar.xz | ||
|
|
||
| __pycache__/ | ||
| __pycache__/ | ||
|
|
||
| tools/flashpack/dist | ||
| tools/flashpack/node_modules | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| const build = await Bun.build({ | ||
| entrypoints: ["./src/index.html"], | ||
| outdir: "./dist", | ||
| sourcemap: "linked", | ||
| minify: true, | ||
| }); | ||
|
|
||
| if (!build.success) { | ||
| for (const log of build.logs) console.error(log); | ||
| process.exit(1); | ||
| } | ||
|
|
||
| const outputs = build.outputs.map(({ path, kind, size }) => ({ | ||
| path, | ||
| kind, | ||
| "size (KiB)": (size / 1024).toFixed(1), | ||
| })); | ||
| console.table(outputs); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| { | ||
| "name": "flashpack", | ||
| "type": "module", | ||
| "scripts": { | ||
| "dev": "bun run serve.ts", | ||
| "build": "bun run build.ts" | ||
| }, | ||
| "dependencies": { | ||
| "@commaai/qdl": "github:commaai/qdl.js" | ||
| }, | ||
| "devDependencies": { | ||
| "@types/bun": "latest", | ||
| "typescript": "^5.0.0" | ||
| }, | ||
| "trustedDependencies": [ | ||
| "@commaai/qdl" | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| import index from "./src/index.html"; | ||
|
|
||
| const server = Bun.serve({ | ||
| static: { | ||
| "/": index, | ||
| }, | ||
| development: true, | ||
| fetch() { | ||
| return new Response("404!"); | ||
| }, | ||
| }); | ||
| console.info(`Running on http://${server.hostname}:${server.port}`); |
|
mpurnell1 marked this conversation as resolved.
Outdated
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| #!/usr/bin/env bash | ||
| set -e | ||
|
|
||
| sudo tee /etc/udev/rules.d/99-qualcomm-edl.rules > /dev/null <<'EOF' | ||
| SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", ATTR{idProduct}=="9008", MODE="0666" | ||
| SUBSYSTEM=="usb", ATTR{idVendor}=="3801", ATTR{idProduct}=="9008", MODE="0666" | ||
| EOF | ||
|
|
||
| sudo udevadm control --reload-rules | ||
| sudo udevadm trigger | ||
|
|
||
| for d in /sys/bus/usb/drivers/qcserial/*-* | ||
| do | ||
| [ -e "$d" ] && echo -n "$(basename $d)" | sudo tee /sys/bus/usb/drivers/qcserial/unbind > /dev/null | ||
| done | ||
|
|
||
| echo "Done. Unplug and replug your device." |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.