Hivemapper / hdc_firmware

The firmware that runs the OpenDashcam
https://github.com/hivemapper/odc
Apache License 2.0
0 stars 3 forks source link

Make odc-api build from source in firmware builds. #229

Closed mazar-farran closed 3 months ago

mazar-farran commented 4 months ago

Ticket: #225

mazar-farran commented 3 months ago

Verified this works. Tested an image built using this on HDC and was able to get /info

Update: it did not work. I was grabbing an old 'dashcam-api.js'. The compiled node binary does not work and has dependency issues.

mazar-farran commented 3 months ago

It worked after changes, but there are some caveats.

1) We can't build node_sqlite3.node from source, we need to still use the overlay binary for that. Thankfully this binary doesn't really ever change. 2) As a direct consequence, the build process is platform-dependent. If we change our host platform or architecture, $(ARCH_STRING) will be invalid and the build will fail. We need some way of deriving $(ARCH_STRING) to make this more robust.

mazar-farran commented 3 months ago

make clean && make worked. I'm pretty confident now that this method works