How to build STM32MPU distribution for Android

Revision as of 12:49, 8 August 2019 by Registered User


1. Article purpose


This article is intended for Distribution Package users (see Which Package better suits your needs for more information).

This page explains how to change build the STM32MPU distribution.

2. Prerequisites

The environment must be installed using the Distribution Package adapted to your selected microprocessor device, STM32MP1 Distribution Package for Android. You should also follow the PC prerequisites dedicated to Android to ensure all necessary packages to use the environment are present.

3. Build

Before doing anything you should launch the command:

 source ./build/envsetup.sh

This will set all the necessary environment variables needed to execute every script and to work in the distribution environment. It is mandatory to start with this command as soon as you are in a new terminal.

The command:

 hmm 

will list some interested aliases created by envsetup.sh.

If you have never set up an environment to build Android continue to read. Otherwise you can directly go to Choosing a build target

3.1. Setup


This setup needs to be executed only once.

 <SocId>setup

This will apply specific patches link with your <SocId> to customize Android and load the necessary libraries and modules.


 bspsetup
Warning white.png Warning
bspsetup will be remove in the future


3.2. Choosing a build target

You need to choose your target device to set up the build environment. Launch the command

 lunch aosp_<board>-<build_type>


Available board values are

  • disco
  • eval

Available build_type values:

  • user: to generate an end-user production image;
  • userdebug: similar to an user build but with root access and debug capabilities;
  • eng: development configuration with additional debugging tools.

3.3. Generating the image

You are now ready to compile. Just do:

 make -j

{{ReviewsComments| N. Louboutin: mention more generic duration: can take several hours} This command can take more than 3 hours, depending on your computer settings and on whether this is your first build.