cancel
Showing results for 
Search instead for 
Did you mean: 

Compiling Android from source, patch error

Mikalaj Karhin
Associate III
$ stm32mp1setup 
[1/3]: Apply patches
Apply patches based on required configuration
ERROR: not possible to apply kernel-headers/0001-stm32mp1-Align-kernel-headers-to-CK-4.19.17 on external/kernel-headers
[2/3]: Load graphics libraries
  => Extracting data to device/stm/stm32mp1/graphics
  => Extracting data to device/stm/stm32mp1-kernel/gcnano-driver
  => Applying required patches to device/stm/stm32mp1-kernel/gcnano-driver
[3/3]: Load op-tee user module sources

When I try to build kernel:

$ load_kernel
 
Start loading the kernel source (Linux)
ERROR: Not possible to apply patch .../build/device/stm/stm32mp1-kernel/source/patch/4.19/0001-ARM-stm32mp1-r2-MACHINE.patch, please review android_kernel.config

When I try to make:

$ make -j
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=9
TARGET_PRODUCT=aosp_eval
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=cortex-a7
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.15.0-64-generic-x86_64-Ubuntu-18.04.3-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=PQ3A.190801.002
OUT_DIR=out
============================================
[1/1] out/soong/.minibootstrap/minibp out/soong/.bootstrap/build.ninja
[1/1] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
FAILED: out/soong/build.ninja 
out/soong/.bootstrap/bin/soong_build -t -l out/.module_paths/Android.bp.list -b out/soong -n out -d out/soong/build.ninja.d -o out/soong/build.ninja Android.bp
error: device/stm/stm32mp1/peripheral/composer/Android.bp:15:1: "hwcomposer.drm_stm32mp1" depends on undefined module "hwcomposer.drm_defaults"
ninja: build stopped: subcommand failed.
16:07:31 soong bootstrap failed with: exit status 1

---

Also, I found a typo in the documentation:

PC $> lunch aosp-<BoardId>-userdebug

5 REPLIES 5
Christophe Guibout
ST Employee

Hi @Mikalaj Karhin​ ,

If the patches don't apply automatically, could you please try to do it manually to get the returned error and also check on which kernel-headers

and kernel SHA1 they are applied ?

Regarding the typo in the Wiki, <BoardId> is a variable : put your mouse cursor on it to get its values : as you work on Eval board, <BoardId>=eval.

BR,

Christophe

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

lunch aosp-<BoardId>-userdebug

Should be:

lunch aosp_<BoardId>-userdebug

OK, modified, need to wait next synchro to see the result.

thanks !

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

How to manually apply patches and get a more informative log?

I don't see any options in "applypatch".

Oh, sorry for the fake report. I didn't set git config (email, name) on a dev server. Everything is ok, now.

I think applypatch script should show more informative log at these cases :)