How to build STM32MPU distribution for Android

Revision as of 15:09, 5 August 2019 by Registered User

1. Article purpose

This article is intended to a Distribution Package user (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 have follow the PC prerequisites dedicated to Android to ensure all necessary package are present.

3. Build

Before doing anything you should launch the command:

source ./build/envsetup.sh

This will set all necessary environment variables needed to execute every script. It's mandatory to start with this command as soon as you are in a new terminal.

hmm

Will list some interested aliases created by envsetup.sh

If you never setup your environment to build Android continue to read. Overwise you can directly go to Choose a target

3.1. Setup

This setp needs to be executed only on time.

stm32mp1setup

It will apply dedicated patches to customize Android, load necessary libraries and modules.

bspsetup

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


3.2. Choose a target

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

load aosp_<board>-<build_type>

Available board values:

  • disco
  • eval

Available build_type values:

  • user: to get production image
  • userdebug: like user but with root access and debug capability
  • eng: development configuration with additional debugging tools

3.3. Generate

You are now ready to compile. Just do:

make -j

If it's your first build and depending on your computer settings it can take more than 3h.