Saturday 14 May 2016

On Android Marshmallow build on Wandboard Dual

This post will be edited as and when I have progress. The final post will be structured for easy reading.

I have upgraded my Ubuntu to 16.04 (Xenial) and I am having a host of problems compiling Marshmallow and the earlier Lollipop.

In Marshmallow I was getting the "Unsupported reloc error 42". The fix for this is provided here https://android-review.googlesource.com/#/c/223100/

Update the makefile as above and build the kernel. Apart from that try to build using a smaller parallel job option i.e. -j5 for a quad core. I seemed to get the "JACK server could not start" which might be because of high memory usage. Also increasing the swap memory helps. I used to have a 1GB of swap for my 4GB laptop and I used to compiler errors because of out of memory. When multiple instances of JACK starts running there would almost 2GB + of swap memory usage!

There is a problem with the SPL loader when the code is compiled using make. The board refuses to boot up. If the code is compiled manually i.e. ARCH=arm CROSS_COMPILE=prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/arm-eabi- make wandboard_defconfig etc. and I flash the SPL loader it boots. So this means there is something wrong with the compiler options used. Looking at the Makefile I find at line 974: BOOTLOADER_CROSS_TOOLCHAIN := `pwd`/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-

The problem above is that the toolchain used is wrong. This is why it refused to boot. Changing it to what I was doing normally the board booted up.

If you are using the OpenJDK 8 and you get Guava error as follows:

external/guava/guava/src/com/google/common/reflect/Types.java:317:
error: TypeVariableImpl is not abstract and does not override abstract 
method getAnnotatedBounds() in TypeVariable
 private static final class 
TypeVariableImpl<D extends GenericDeclaration>

The following updated code by google offers the solution.
https://android.googlesource.com/platform/external/guava/+/1bc06418bcf6355136e8f774092eac49805623b6%5E%21/#

Git clone it and checkout the commit id present in the link. Copy the Types.java file to the relevant place and start the compile.

Partitioning

Partitioning is same as lollipop. In the first boot partition we have the following files:
  • u-boot.img
  • zImage
  • imx6q-wandboard.dtb
  • imx6dl-wandboard.dtb
  • uenv.txt
  • uramdisk.img

The difference between lollipop and marshmallow for the wandboard is that the above files should be present in then root partition and not inside a separate /boot directory in the sdb1 partition.

The above can be easily changed but since we are talking about the stock kernel from wandboard I will not deviate.

No comments:

Post a Comment