-
Notifications
You must be signed in to change notification settings - Fork 412
[Android Things] Using a local version of Mraa to build Upm for Android Things
This wiki is an step-by-step guide on how to modify the default Docker image that builds Upm for Android Things, in order to use a local version of Mraa.
Note: for the example, this wiki will use some specific folders, you should change them to your proper folders to make this work.
The Docker image that builds Android Things has an Mraa repository in it. This Mraa repository is also built for Android Things, so Upm can just use that to build. But if for any reason you need to use a local version of Mraa to build Upm Android Things Packages, you can do:
-
Clone the Mraa repository in i.e /home/user/mraa
-
Modify scripts/build-android.sh, use -DCMAKE_INSTALL_PREFIX=/home/user/mraa/install
-
Build Mraa for Android Things: docker-compose run android
-
You will have mraa installed in /home/user/mraa/install
-
Clone the Upm repository in /home/user/upm
-
Change docker-compose.yaml: mount your local Mraa repository into the container:
volumes:
- .:${UPM_SRC_DIR:-/usr/src/app}
- /home/user/mraa:/opt/mraa
- Build Upm for Android Things: docker-compose run android
So now, a development workflow could look like this:
- Modify a source file in Mraa repository
- Build Mraa for Android Things with the new changes: docker-compose run android
- Build Upm for Android Things with the new Mraa version: docker-compose run android