I got a little further, but the cc_prebuilt_library doesn't work.
I am able to add the cc_prebuilt_binary into the device/<company>/<product>/Android.bp file and it does successfully copy the binary if I add "check_elf_files: false" so it won't check the binary.
cc_prebuilt_binary {
name: "my_sw_binary",
stem: "my_sw",
srcs: ["addons/bin/my_sw"],
proprietary: true,
vendor: true,
// shared_libs: ["libz", "libjansson", "libwebsockets", "libxml2", "libcurl", "librohc"],
check_elf_files: false,
}
If I un-comment the shared-libs attribute above and comment out the "check_elf_files" attribute, I get an error that the libraries are not defined which is expected.
Then I add the libjansson, libwebsockets, and librohc libraries like so:
cc_prebuilt_library {
name: "libjansson",
stem: "libjansson",
srcs: ["addons/lib/libjansson.so"],
vendor: true,
// relative_install_path: "atsc3pak",
}
cc_prebuilt_library {
name: "libwebsockets",
stem: "libwebsockets.so.13",
srcs: ["addons/lib/libwebsockets.so.13"],
vendor: true,
}
cc_prebuilt_library {
name: "librohc",
stem: "librohc",
srcs: ["addons/lib/librohc.so"],
vendor: true,
// relative_install_path: "atsc3pak",
}
When I do this, there is a problem with the libwebsockets.so.13 library in that the build system automatically appends a ".so" suffix to the end of libwebsockets.so.13 and I can't figure out how to prevent that from happening.
The other two libraries (libjansson, librohc) don't cause any errors at build time anymore.
Then I tried another test with "check_elf_files: false" just to see if the libraries would copy.
I commented out the libwebsockets.so.13 prebuilt library definition and just included the other two.
It builds the image correctly but when I flash it, bring the board up, and look at the directories, the libjansson.so and librohc.so files are not on the board and I don't know why?
Any ideas about these two issues?
Thanks!
Curt