Building LeMaker Android 4.2 from Source

129 45122
dlanor  
ChrisP replied at Mon Jan 26, 2015 16:39
Hi dlanor, I'll make a new thread to list the various sources available.

But the one we were talkin ...

Thanks for the info (both here and in the other thread). I've added your top-level gitub URL to my browser bookmarks for future reference.
I too am leaning towards using the branch merged by Liab, though I hope he can provide us with some more info about it (in that other thread).

Best regards: dlanor

so what would one need to do to add a lcd 5 inch, i.e. other then changing the fex

e7763  
Edited by e7763 at Thu Jan 29, 2015 15:05

on banana PI work USB WEB cameras type UVC., including in images  android_for_bananapi_4.2.2.img and Android_For_BananaPi_v2_0.img. A list of cameras shows http://www.ideasonboard.org/uvc/#devices. Keep the camera running in the images android_for_bananapi_4.2.2.img and Android_For_BananaPi_v2_0.img, you must uncomment the line insmod /system/vendor/modules/uvcvideo.ko  in the file init.sun7i.rc.

Blaster  
All
I have a project to attach a Banana Pro onto the back of a GeChic touch screen monitor. However the current Android load from Lemaker does not contain the drivers for the USB touch screen. GeChic sent me the driver files for the touch screen, so I thought i'd try to build a version of Android that supports the touch screen.

I am new at building Android and I am having some issues.
I am compiling on a Banana Pro runing the Lemaker Lubuntu.
I followed the instructions listed to make an android image and had the following issues.
1) make not installed. Had to apt-get make
2) gcc not installed. Had to apt-get gcc.

The latest issue I am having is the kernel does not build. I'll paist the build print out below. Can anyone help?

root@lemaker:/home/bananapi/Lemaker_Android_4.2/scripts# ./build.sh

mkscript current setting:
        Chip: sun7i
    Platform: android
       Board:
  Output Dir: /home/bananapi/Lemaker_Android_4.2/lichee/out/android/common

INFO: build lichee ...
INFO: build buildroot ...
external toolchain has been installed
INFO: build buildroot OK.
INFO: build kernel ...
INFO: prepare toolchain ...
Building kernel
build standby
make: Entering directory `/home/bananapi/Lemaker_Android_4.2/lichee/linux-3.4/arch/arm/mach-sun7i/pm/standby'
rm -rf *.o ../*.o dram/*.o
arm-linux-gnueabi-gcc -I. -I/home/bananapi/Lemaker_Android_4.2/lichee/linux-3.4/include -I/home/bananapi/Lemaker_Android_4.2/lichee/linux-3.4/arch/arm/mach-sun7i/include  -g -c -nostdlib -march=armv7-a -marm -D__STANDBY_MODULE__ -fno-unwind-tables -fno-asynchronous-unwind-tables -mlittle-endian -O0 --min_array_alignment=4 --no_unaligned_access -D DRAM_USE_VA_ADDR common.c           -o common.o
/home/bananapi/Lemaker_Android_4.2/lichee/out/android/common/buildroot/external-toolchain/bin/arm-linux-gnueabi-gcc: 1: /home/bananapi/Lemaker_Android_4.2/lichee/out/android/common/buildroot/external-toolchain/bin/arm-linux-gnueabi-gcc: Syntax error: "(" unexpected
make: *** [standby] Error 2
make: Leaving directory `/home/bananapi/Lemaker_Android_4.2/lichee/linux-3.4/arch/arm/mach-sun7i/pm/standby'
ERROR: build kernel Failed
including device/asus/grouper/vendorsetup.sh
including device/asus/tilapia/vendorsetup.sh
including device/generic/armv7-a-neon/vendorsetup.sh
including device/generic/armv7-a/vendorsetup.sh
including device/generic/mips/vendorsetup.sh
including device/generic/x86/vendorsetup.sh
including device/samsung/maguro/vendorsetup.sh
including device/samsung/manta/vendorsetup.sh
including device/samsung/toroplus/vendorsetup.sh
including device/samsung/toro/vendorsetup.sh
including device/softwinner/common/vendorsetup.sh
including device/softwinner/sugar-evb/vendorsetup.sh
including device/softwinner/sugar-lemaker/vendorsetup.sh
including device/softwinner/sugar-ref001/vendorsetup.sh
including device/softwinner/sugar-standard/vendorsetup.sh
including device/softwinner/wing-evb-v10/vendorsetup.sh
including device/ti/panda/vendorsetup.sh
including sdk/bash_completion/adb.bash
build/core/envsetup.mk:83: *** Unable to determine HOST_ARCH from uname -sm: Linux armv7l!.  Stop.
including device/asus/grouper/vendorsetup.sh
including device/asus/tilapia/vendorsetup.sh
including device/generic/armv7-a-neon/vendorsetup.sh
including device/generic/armv7-a/vendorsetup.sh
including device/generic/mips/vendorsetup.sh
including device/generic/x86/vendorsetup.sh
including device/samsung/maguro/vendorsetup.sh
including device/samsung/manta/vendorsetup.sh
including device/samsung/toroplus/vendorsetup.sh
including device/samsung/toro/vendorsetup.sh
including device/softwinner/common/vendorsetup.sh
including device/softwinner/sugar-evb/vendorsetup.sh
including device/softwinner/sugar-lemaker/vendorsetup.sh
including device/softwinner/sugar-ref001/vendorsetup.sh
including device/softwinner/sugar-standard/vendorsetup.sh
including device/softwinner/wing-evb-v10/vendorsetup.sh
including device/ti/panda/vendorsetup.sh
including sdk/bash_completion/adb.bash
build/core/envsetup.mk:83: *** Unable to determine HOST_ARCH from uname -sm: Linux armv7l!.  Stop.

you might want to tell what you did, i.e. copy past or delete, in order to add new drivers..... btw mayb just load the drivers from the init.rc file?

ChrisP  
Blaster replied at Sat Jan 31, 2015 00:52
All
I have a project to attach a Banana Pro onto the back of a GeChic touch screen monitor. However  ...

What distribution do you use for compiling ?

The reference distribution to build this distribution is Ubuntu 12.04 LTS, or with the adapted install script ubuntu 14.0

If you are using another distro, you may have additionnal work to align the prereq packages.

Blaster  
ChrisP replied at Sat Jan 31, 2015 04:59
What distribution do you use for compiling ?

The reference distribution to build this distributio ...

Thanks for the responses.
I am using the Lemaker Lubuntu image:
Lubuntu For BananaPro v1412
Version:         v1412
Release date:         2014-12-26
Default login:         bananapi/bananapi & root/bananapi
Kernel version:         3.4.103

I thought building on the same hardware that Android would be runing on would nake the libraries line up better, but perhaps not.

I have not tried building in the new drivers yet. I wanted to see if I could compile the stock load first.
Just FYI, the drivers consist of an H file, a C file and some instructions for where to put them and some settings to tweak. After I get the stock load to compile, I'll try building in the drivers.

What platform do you use to compile the Android load? I saw a refrance to a VM platform for compiling.

Thanks again

liab  
Blaster replied at Sat Jan 31, 2015 12:17
Thanks for the responses.
I am using the Lemaker Lubuntu image:
Lubuntu For BananaPro v1412

I don't belief it's a good idea to compile it on a bpi. To compile android with success a 64 bit linux is absolutely necessary.

dlanor  
Blaster replied at Sat Jan 31, 2015 12:17
Thanks for the responses.
I am using the Lemaker Lubuntu image:
Lubuntu For BananaPro v1412
What platform do you use to compile the Android load? I saw a refrance to a VM platform for compiling.
I have successfully used VMs under both VirtualBox and VMware, with these VMs running 64-bit versions of Ubuntu 12.04, or Ubuntu 14.04.
Note that some of the lib installs change depending on which operating system you use, and as far as I know only those two Ubuntu versions have been used successfully.

So I agree with liab that you're almost certainly wasting your time trying to do the work entirely on a BPi. Not only will a full system build be horribly slow to complete (takes hours even on a good PC), but the end result will probably include tons of errors due to insufficient/lacking libs.

It's obviously possible to use other Linux distros than Ubuntu too, but then the lib install and build instruction may need considerable changes.
I  know I had to perform rather extensive experiments to find a working set of libs for Ubuntu 14.04 (before that only Ubuntu 12.04 could be used).

If you search the forums you'll find several different descriptions of how to build Android using Ubuntu, including complete step-by-step guides.
But you will have to modify the parts that describe the source repos to load, since those have changed since those guides were written.

The current repos are best described in a post by ChrisP in one of his most recent threads on this topic, which you can reach through this link.

Best regards: dlanor

Blaster  
Thanks so much for the input. Sounds like I'll need to punt on trying to compile Android on the Bpro hardware and re-group on a VM image.
While I am still climbing the learning curve, anyone else want to try and include the GeChic touch screen drivers? I can e-mail the zip file to any interested individuals.

Thanks again

You have to log in before you can reply Login | Sign Up

Points Rules