Compile android-hikey-linaro-4.1 & android 6.0

Hello,
I was compile android-hikey-linaro-4.1 and android6.0 successfull for Hikey board. But I used fastboot with
$ sudo fastboot flash ptable ptable-aosp-8g.img (release by CE AOSP RPB HiKey 15.12 Build)
$ sudo fastboot flash boot boot_fat.uefi.img (compile by me.)
$ sudo fastboot flash cache cache.img (release by CE AOSP RPB HiKey 15.12 Build)
$ sudo fastboot flash system system.img (release by CE AOSP RPB HiKey 15.12 Build)
$ sudo fastboot flash userdata userdata.img (release by CE AOSP RPB HiKey 15.12 Build)

kernel:
android cannot normal running. I found compile kernel link(https://github.com/96boards/documentation/wiki/Latest-Snapshot---Getting-Started-Guild-for-kernel-4.1). It used kernel_config and KCFLAGS="-fno-pic", But I don’t known that how to used kernel_config.

android:
I was compile android 6.0 cann’t create out/target/product/hikey folder. I was programed out/target/product/generic/system.img cache.img and userdata.img. But bootloader report these invalid formate.

I was copile android 6.0 with root user, it can create hikey folder but compile failed. Could you please give some advices?

Hi,

Which toolchain did you use? Can you also list the specific commands you used for your builds?
Or you can refer to http://source.android.com/source/requirements.html for guides on building the kernel and aosp.

Hi,
Android toolchain is openjdk-7. Comamnd list:

repo init -u git clone platform/manifest - Git at Google -b android-6.0.0_r260
cd .repo/
git clone https://github.com/96boards/android_manifest -b android-6.0 local_manifests
cd …/
repo sync -j16
Download and extract the Mali vendor binaries in the above directory: http://builds.96boards.org/snapshots/hikey/linaro/binaries/20150706/vendor.tar.bz2

source build/envsetup.sh
lunch hikey-userdebug
make droidcore -j8
cd out/target/product/hikey

Do complie commands, only root user can created out/target/product/hikey and compile failed. Error report:

target C++: libdeqp <= external/deqp/modules/gles31/functional/es31fSSBOArrayLengthTests.cpp
target C++: libdeqp <= external/deqp/modules/gles31/functional/es31fSSBOLayoutCase.cpp
target C++: libdeqp <= external/deqp/modules/gles31/functional/es31fSSBOLayoutTests.cpp
target C++: libdeqp <= external/deqp/modules/gles31/functional/es31fStencilTexturingTests.cpp
target C++: libdeqp <= external/deqp/modules/gles31/functional/es31fSynchronizationTests.cpp
make: *** [out/target/product/hikey/obj/SHARED_LIBRARIES/libdeqp_intermediates/modules/gles3/functional/es3fShaderOperatorTests.o] Killed
make: *** Waiting for unfinished jobs…
make: *** [out/target/product/hikey/obj/SHARED_LIBRARIES/libdeqp_intermediates/modules/gles3/functional/es3fTextureSpecificationTests.o] Killed
make: *** [out/target/product/hikey/obj/SHARED_LIBRARIES/libdeqp_intermediates/modules/gles31/functional/es31fOpaqueTypeIndexingTests.o] Killed
make: *** [out/target/product/hikey/obj/SHARED_LIBRARIES/libdeqp_intermediates/modules/gles2/functional/es2fShaderStructTests.o] Killed
make: *** [out/target/product/hikey/obj/SHARED_LIBRARIES/libdeqp_intermediates/modules/gles3/functional/es3fShaderStructTests.o] Killed
make: *** [out/target/product/hikey/obj/SHARED_LIBRARIES/libdeqp_intermediates/modules/gles3/functional/es3fShaderTextureFunctionTests.o] Killed
make: *** [out/target/product/hikey/obj/SHARED_LIBRARIES/libdeqp_intermediates/modules/gles31/functional/es31fDebugTests.o] Killed
make: *** [out/target/product/hikey/obj/SHARED_LIBRARIES/libdeqp_intermediates/modules/gles31/functional/es31fGeometryShaderTests.o] Killed
make: *** [out/target/product/hikey/obj/SHARED_LIBRARIES/libdeqp_intermediates/modules/gles31/functional/es31fIntegerStateQueryTests.o] Killed
make: *** [out/target/product/hikey/obj/SHARED_LIBRARIES/libdeqp_intermediates/modules/gles31/functional/es31fPrimitiveBoundingBoxTests.o] Killed
make: *** [out/target/product/hikey/obj/SHARED_LIBRARIES/libdeqp_intermediates/modules/gles31/functional/es31fProgramInterfaceDefinitionUtil.o] Killed
make: *** [out/target/product/hikey/obj/SHARED_LIBRARIES/libdeqp_intermediates/modules/gles31/functional/es31fProgramInterfaceQueryTestCase.o] Killed
Killed

make failed to build some targets (05:47:29 (hh:mm:ss))

Hi,

For building the kernel, you need to ensure that a prebuilt toolchain is in your path:
https://source.android.com/source/building-kernels.html#downloading-a-prebuilt-gcc

For the android build, I’m having trouble trying to reproduce the error. Are the instructions you pasted really the ones you used? They contain typos and are old/outdated. E.g. in “repo init -u git clone platform/manifest - Git at Google -b android-6.0.0_r260”, “git clone” should be removed, and “r260” should be “r26”. Also, http://builds.96boards.org/snapshots/hikey/linaro/binaries/20150706/vendor.tar.bz2 does not exist anymore. How did you get past these to run your build? Did you not get any errors? Did you maybe downloaded all the sources and binaries some time ago?

I’d suggest trying the instructions below, but replace the branches with the versions you want as necessary.
https://source.android.com/source/building-kernels.html
https://source.android.com/source/devices.html

Hi,
I have same promble with the http://www.96boards.org/forums/topic/select-version-of-android-for-hikey/#gsc.tab=0. I was modified like the link. Android can compile successfull. But cannot running successfull.
Could you give me adives please? Thank you.

Step:
$repo init -u platform/manifest - Git at Google -b android-6.0.1_r10 -g “default,-device,hikey”
$ cd .repo/
$ git clone https://github.com/96boards/android_manifest -b android-5.0 local_manifests(I was modify the linar.xml)
$ cd –
$ repo sync -j24
$ source build/envsetup.sh
$ lunch hikey-userdebug
$ make -j32
$ cd out/target/product/hikey

linaro.xml is:
<?xml version=“1.0” encoding=“UTF-8”?>
<manifest>
<!-- Repositories →
<!-- Linaro Repositories →
<remote name=“linaro-android”
fetch=“git://android.git.linaro.org/”
review=“review.android.git.linaro.org” />

<remote name=“github” fetch=“http://github.com/96boards” />
<remote name=“linaro-other” fetch=“git://git.linaro.org/” />
<!-- Linaro Device Configs →
<project path=“device/linaro/hikey” name=“android_device_linaro_hikey” revision=“android-6.0” remote=“github” groups=“device,hikey” />
<project path=“device/linaro/build” name=“device/linaro/common” revision=“linaro-lollipop-experimental” remote=“linaro-android” groups=“default” />
<project path=“android-patchsets” name=“android-patchsets” revision=“master” remote=“linaro-android” groups=“default” />

<!-- Linaro Kernels →
<project path=“kernel/linaro/hisilicon” name=“linux” revision=“hikey” remote=“github” groups=“default” />

<project path=“packages/apps/UsbSpeedSwitch” name=“android_packages_apps_UsbSpeedSwitch” revision=“master” remote=“github” groups=“device,hikey” />
</manifest>

Is the xml file right? If not, could you give me a demo with android6.0? Thanks!

The android-5.0 branch might be a bit outdated since it uses 3.18 kernel. Can you try below? It has 4.1 kernel.

$repo init -u platform/manifest - Git at Google -b android-6.0.1_r10 -g “default,-device,hikey”
$ cd .repo/
$ git clone https://github.com/96boards/android_manifest -b android-5.0 local_manifests
$ cd local_manifests
$ git checkout d3709bd0dab2d7a0f83f7d9e4bcd4c11a12ff13b
$ cd …/…/
$ repo sync -j24
$ source build/envsetup.sh
$ lunch hikey-userdebug
$ make -j32
$ cd out/target/product/hikey

Again, all above won’t work without vendor.tar.bz2. Another option, if you can consider, is to rebuild your old apps for the latest aosp instead of rebuilding an old aosp for your app. It might be easier.

Hi again,

I asked a few Android experts and found a possibly better option for you.

Download linaro_android_build_cmds.sh and pinned-manifest.xml from http://builds.96boards.org/releases/reference-platform/aosp/hikey/15.12 and run:
$ ./linaro_android_build_cmds.sh -m pinned-manifest.xml -o
http://snapshots.linaro.org/android/binaries/hikey/20150623/vendor.tar.bz2

This will build a 4.1 kernel + aosp 6.0 so hopefully it works for you.

Hi,
I was do next command:
mkdir Hikey_1512
cd HiKey_1512
cp /share/* ./
./linaro_android_build_cmds.sh -m pinned-manifest.xml -o http://snapshots.linaro.org/android/binaries/hikey/20150623/vendor.tar.bz2

But have an error: ERROR: no source overlay provided. Please download from http://snapshots.linaro.org/android/binaries/hikey/20150623/vendor.tar.bz2. This must be done from a browser that accepts cookies.

So I download http://snapshots.linaro.org/android/binaries/hikey/20150623/vendor.tar.bz2 and copy the vendor to Hikey_1512 and do:
./linaro_android_build_cmds.sh -m pinned-manifest.xml -o vendor.tar.bz2
have another error:

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a “bundle”
of Certificate Authority (CA) public keys (CA certs). If the default
bundle file isn’t adequate, you can specify an alternate file
using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
the bundle, the certificate verification probably failed due to a
problem with the certificate (it might be expired, or the name might
not match the domain name in the URL).
If you’d like to turn off curl’s verification of the certificate, use
the -k (or --insecure) option.

Above error, I think maybe need creat repo. But I can found download information in pinned-manifest.xml. Could you give me some advices? Thanks!

There’s a problem with the certificate on the system you’re on, not on the server’s end. Google the error for more info.

Easiest way out of this is as the above message indicated, use the -k option to curl, but just be aware that the cert will not verified and hence insecure.

Hi,
I was retry the command
./linaro_android_build_cmds.sh -m pinned-manifest.xml -o vendor.tar.bz2

But have a problem:
curl repo.git -
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2959 0 2959 0 0 4125 0 --:–:-- --:–:-- --:–:-- 4126
./repo init -u git://android-git.linaro.org/platform/manifest.git -b android-6.0.0_r26 -m default.xml --repo-url=git://android-git.linaro.org/tools/repo -g default,-device,-non-default,hikey
./repo: line 1: syntax error near unexpected token newline' ./repo: line 1: <!DOCTYPE html>’

Have people said that repo was not correct. Could you please give me some advices? Thanks!

Your copy of repo is corrupt. Ref: Redirecting to Google Groups</ti
Seems like you have many network issues. Are you behind some kind of firewall?