emb: build the example apps for embedded Linux - #1
Open
jwinarske wants to merge 2 commits into
Open
Conversation
Adds one emb manifest covering all six example apps, plus the patches needed to build the Firebase C++ SDK they link against. The apps run on the ivi-homescreen embedder, whose Firebase plugins are backed by the Firebase C++ SDK. `emb cross <ivi-homescreen> --app <example>` builds the embedder from that project and the app from here; the project owns the board profile every app on a board shares, and this states only what these apps add on top. That is the same for all six -- they differ in Dart code, not in native dependencies -- so each example carries a `.emb` symlink to one manifest rather than a copy, and there is a single place to change when the SDK version or the plugin set moves. .emb/base.emb.yaml turns the Firebase plugins on and declares the SDK as an augment: there is no distro package for it, so it is built from source against the same profile as the embedder and staged into the prefix the embedder searches. .emb/raspberry-pi.emb.yaml adds what a Pi needs on top -- libsecret for the SDK's secure storage, libuuid for its installation id, and the platform Abseil that Firestore's gRPC and protobuf link against. Five patches against firebase-cpp-sdk v13.12.0, applied by emb to its own fetched tarball so the checkout stays pristine. 0001 disables compiler options clang rejects. 0002, 0003 and 0005 are upstream bugs or gaps rather than local policy and are worth sending upstream: leveldb inheriting another dependency's patch file, the pinned dependencies not building with a current toolchain, and the SDK not recognizing arm on desktop Linux. 0004 adds install rules, which the SDK ships none of -- consumers are expected to reach into a source tree and a build tree, which a cross build cannot do. Building takes the better part of an hour the first time, because the SDK fetches and compiles its own boringssl, curl, zlib, libuv, flatbuffers and, for Firestore, the firebase-ios-sdk core with gRPC and protobuf. emb skips it afterwards once pkg-config finds the installed firebase-cpp-sdk.pc. Verified on a Raspberry Pi 5 (trixie, drm-kms-egl) and on an x86_64 host (wayland-egl): all six apps build, and the auth example initializes Firebase and signs in on both. Signed-off-by: Joel Winarske <joel.winarske@linux.com>
DefaultFirebaseOptions threw UnsupportedError for TargetPlatform.linux, so every example died at startup on an embedded-Linux embedder. Linux here means ivi-homescreen, whose Firebase plugins are backed by the Firebase C++ SDK -- the same client the android entry describes: an api key, an app id and a project id, with no store listing involved. Group linux with the existing android case, which windows already shares for the same reason. This is the edit ivi-homescreen-plugins documents for every firebase plugin's example app. Signed-off-by: Joel Winarske <joel.winarske@linux.com>
Author
|
Dependency satisfied: toyota-connected/ivi-homescreen-plugins#267 merged Re-verified against the merged No unhandled exceptions. This is ready to merge on its own now. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Builds the six example apps for embedded Linux with
emb, against the ivi-homescreen
embedder and the Firebase C++ SDK its plugins are backed by.
Two commits:
emb: build the example apps for embedded Linux— the manifests and thefirebase-cpp-sdk patch series.
example: use the android options on Linux— one platform case perexample app.
The manifest
emb cross <ivi-homescreen> --app <example>builds the embedder from thatproject and the app from here. The project owns the board profile every app on a
board shares; this states only what these apps add on top — and that is the same
for all six, since they differ in Dart code, not in native dependencies.
So there is one manifest and each example carries a
.embsymlink to it,rather than six copies to keep in step:
There is no distro package for the Firebase C++ SDK on any target, so it is
built from source against the same profile as the embedder and staged into the
prefix the embedder searches. That takes the better part of an hour the first
time — the SDK fetches and compiles its own boringssl, curl, zlib, libuv,
flatbuffers and, for Firestore, the firebase-ios-sdk core with gRPC and
protobuf. emb skips it afterwards once pkg-config finds the installed
firebase-cpp-sdk.pc.The patches
Five, against firebase-cpp-sdk v13.12.0, applied by emb to its own fetched
tarball so the checkout stays pristine.
-Werroron warnings newer than the pins, libstdc++ transitive includes)0002, 0003 and 0005 are upstream bugs or gaps rather than local policy and are
worth sending to firebase/firebase-cpp-sdk.
The platform case
DefaultFirebaseOptionsthrewUnsupportedErrorforTargetPlatform.linux, soevery example died at startup. Linux here means ivi-homescreen, whose Firebase
plugins are backed by the Firebase C++ SDK — the same client the android entry
describes: an api key, an app id and a project id, no store listing involved. So
linux joins the existing android case, which windows already shares for the same
reason. This is the edit ivi-homescreen-plugins documents for every firebase
plugin's example app.
Testing
All six apps build for both targets. The auth example was deployed and run:
No unhandled exceptions on either. The listener counts are firebase_ui_auth's
own, so the Dart-to-C++ boundary is live rather than merely linked.
Depends on
toyota-connected/ivi-homescreen-plugins#267, which brings the plugins' generated
pigeon up to the platform-interface versions these apps resolve. Without it the
apps build and then fail at the first channel call.
Notes
org.freedesktop.secrets, so the SDK cannot persistcredentials across restarts — sign-in works, it just does not survive a
restart until a keyring is present.
firebase_ui_database's example builds, but ivi-homescreen-plugins ships nofirebase_databaseplugin, so its database calls have no backing at runtime.