Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => A20 => Topic started by: gvi70000 on September 18, 2014, 09:31:31 PM

Title: Build android image
Post by: gvi70000 on September 18, 2014, 09:31:31 PM
    Hi, when i run build.sh i get the following error

    LD [M] drivers/net/wireless/bcm4330/bcm4330.ko
    arm-linux-gnueabi-ld: warning: drivers/net/wireless/bcm4330/bcm4330.mod.o uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
    LD [M] drivers/net/wireless/rtl8188eu/8188eu.ko
    LD [M] drivers/net/wireless/rtl8189es/8189es.ko
    LD [M] drivers/net/wireless/rtl8192cu/8192cu.ko
    LD [M] drivers/net/wireless/rtl8723as/8723as.ko
    LD [M] drivers/net/wireless/rtl8723au/8723au.ko
    LD [M] drivers/scsi/scsi_wait_scan.ko
    LD [M] drivers/video/sun7i/disp/disp.ko
    LD [M] drivers/video/sun7i/lcd/lcd.ko
    ERROR: build kernel Failed

    Do you have any idea why?
Title: Re: Build android image
Post by: dave-at-axon on September 19, 2014, 06:38:16 AM
Which board is this building for?

Did you build the kernel first? I assume you did as there is modules being copied.

Did you run the extract-bsp command before you build?

The errors from the build system can be confusing at times but this looks like it can't find the kernel image.
Title: Re: Build android image
Post by: gvi70000 on September 19, 2014, 09:01:15 AM
Hello Dave,

It is a A20 with NAND and i have followd the steps from this post http://axonjakarta.wordpress.com/2014/02/14/olimex-a20-android-building-4/ (http://axonjakarta.wordpress.com/2014/02/14/olimex-a20-android-building-4/) (your blog)
everything is ok until
cd lichee
./build.sh -psun7i_android

and as you can see near the end i get a warning (a saw that this is the same for cubieboard) and the the error.

QuoteDid you run the extract-bsp command before you build?
no, i did not. How do i do this?
I want to make a new image in order to enable the USB RTL8188EUC dongle.

Thank you for your support

PS I use Ubuntu 14.04 x64
Title: Re: Build android image
Post by: dave-at-axon on September 19, 2014, 10:08:06 AM
Ah ok. It's the kernel build.

Did you make changes to the build by going into the linux3.4 directory and typing?:

make ARCH=arm menuconfig

There is an 8188eu.ko module that is already part of the build. You may just need to insmod it from the init.sun7i.rc file if that is the correct driver?
Title: Re: Build android image
Post by: gvi70000 on September 19, 2014, 12:32:56 PM
Hi Dave,

I didn't do any changes, just downloaded the tar.gz from Olimex then follow your steps.
Actually as you can see i got stuck at first important one ./build.sh -psun7i_android

I think the driver is the good one, i have read post on Cubie forums and for them is working.

QuoteYou may just need to insmod it from the init.sun7i.rc file
if you have the time, can you please provide more details?


Where in the steps below i have to
Quotemake ARCH=arm menuconfig
?
Google Setup Instructions - done


Android 4.2 and Linux 3.4 - done

mkrdir android
cd android
mkdir olimex-a20
Copy the source files you downloaded into this directory and then use tar to extract them.

All done

tar zxvf android4.2.tar.gz
tar zxvf lichee-v2.0.tar.gz

All done


PATH=$PATH:$HOME/android/olimex-a20/android4.2/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin
PATH=$PATH:$HOME/android/olimex-a20/android4.2/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/

All done

cd lichee - done
./build.sh -psun7i_android  - fail near finish
Title: Re: Build android image
Post by: adinu on September 19, 2014, 12:56:24 PM
It doesn't seem to be an error with the 8188eu.ko module. You're getting a warning for the bcm4330.ko module, then it loads a bunch of other modules and suddenly stops. Are you not getting any other error messages?

Quotemake ARCH=arm menuconfig
If you open a shell, navigate to the lichee folder and type this command you get a menu where you can configure the linux kernel by activating/deactivating a bunch of options. You can enable/diable drivers from there.

QuoteYou may just need to insmod it from the init.sun7i.rc file
This file is located in android4.2/device/softwinner/olinuxino-a20 and you can add a line like:
insmod /vendor/modules/8188eu.ko to automatically install a module every time you boot the system
Title: Re: Build android image
Post by: gvi70000 on September 19, 2014, 01:39:49 PM
Hi, i did not said that i have problems with 8188EUC, i get only the ERROR: build kernel Failed right after LD [M] drivers/video/sun7i/lcd/lcd.ko.
I want to enable 8188 driver so tat i can use my dongle and have internet on the device.
Title: Re: Build android image
Post by: adinu on September 19, 2014, 01:57:08 PM
Oh, ok, my bad. Have you succefully built an image? (without the 8188 dr8ver). If not, you need to focus on that first. I would suggest you start with dave's sources from this thread (I believe?): https://www.olimex.com/forum/index.php?topic=2475.30. Maybe he can confirm it. He has a lot of things fixed and it will be easier for you.

I can also tell you that I'm using an Edimax wifi dongle.(https://www.google.es/search?q=edimax+wifi+dongle&oq=edimax+wifi+don&aqs=chrome.1.69i57j0l5.7889j0j7&sourceid=chrome&es_sm=122&ie=UTF-8)
It's very compact and you can just plug it in and it works, no kernel headaches. You could even use the olimex OS image.
Title: Re: Build android image
Post by: gvi70000 on September 19, 2014, 02:39:17 PM
Right now i use the default Olimex Android image but i want to have wireless using http://www.tp-link.com/lk/products/details/?model=TL-WN725N (is V1 model 8188EUC) but it dosen't work with the default image
Title: Re: Build android image
Post by: dave-at-axon on September 19, 2014, 03:29:55 PM
I've not tried building under Ubuntu 14 yet. I have only managed to get it working under 12.04. Actually a Virtual PC running under Windows 7 x64

Google does mention that certain versions are not tested.

It might be related to the build environment. Which GCC compiler is it building with?

Can you do a clean and then build again and pipe the output to a text file, zip it and attach it here. We can look at the build status from that.

Similar issue here.

http://www.cubieforums.com/index.php?topic=1328.0
Title: Re: Build android image
Post by: gvi70000 on September 20, 2014, 12:54:51 AM
Tried Ubuntu 12.04 with gcc4.4 - same thing. I will try alo on debian
Title: Re: Build android image
Post by: dave-at-axon on September 20, 2014, 08:55:44 AM
In my Android Linux build, the toolchain is 4.6

It's locate here.

lichee/out/android/common/buildroot/external-toolchain/arm-linux-gnueabi

Which version of the kernel are you builing? I am building 3.4

If you want to grab the build I am using, it's here.

https://drive.google.com/folderview?id=0BwKBcHR31e97ZWtTV2p3SWhhMmM&usp=sharing
Title: Re: Build android image
Post by: gvi70000 on September 20, 2014, 10:27:01 AM
Hi Dave,
I am building the 3.4 kernel

I will switch to toolchain 4.6 and i will try your your build, thank you for sharing. I hope this time will work.
Title: Re: Build android image
Post by: gvi70000 on September 21, 2014, 08:20:48 PM
hi,

I have tested the build on Ubuntu 12.04 and on Debian. At first i had the same issue but i saw that many are using java 6, so here are the extra steps

1. sudo apt-get update
2. JDK1.6 https://gist.github.com/senthil245/6093389

3. sudo apt-get install git gnupg flex bison gperf build-essential \
  zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
  libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
  libgl1-mesa-dev g++-multilib mingw32 tofrodos \
  python-markdown libxml2-utils xsltproc zlib1g-dev:i386

did not work / had to install one by one sudo apt-get install zlib1g
4. Install gcc 4.6 and set (sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get install g++-4.6)

5. sudo apt-get install gcc-arm-linux-gnueabi

6. sudo apt-get install u-boot-tools

INFO: build u-boot OK.
INFO: build rootfs ...
INFO: skip make rootfs for android
INFO: build rootfs OK.
INFO: build lichee OK.

then - for Android 4.2

7. sudo apt-get install bison
8. sudo apt-get install flex
9. sudo apt-get install xsltproc
10. sudo apt-get install gperf
11. sudo apt-get install libswitch-perl
12. sudo apt-get install libxml2-utils

Now the new problem is that i can't pack the image, below is the pack.log file
argc = 2
input name sys_config.fex
Script 1 source file Path=/home/gvi/android/olimex-a20/lichee/tools/pack/out/sys_config.fex
Script 1 bin file Path=/home/gvi/android/olimex-a20/lichee/tools/pack/out/sys_config.bin
parser 1 file ok
----------
argc = 2
input name sys_partition.fex
Script 1 source file Path=/home/gvi/android/olimex-a20/lichee/tools/pack/out/sys_partition.fex
Script 1 bin file Path=/home/gvi/android/olimex-a20/lichee/tools/pack/out/sys_partition.bin
parser 1 file ok
----------
mbr count = 4

partitation file Path=/home/gvi/android/olimex-a20/lichee/tools/pack/out/sys_partition.bin
mbr_name file Path=/home/gvi/android/olimex-a20/lichee/tools/pack/out/sunxi_mbr.fex
download_name file Path=/home/gvi/android/olimex-a20/lichee/tools/pack/out/dlinfo.fex

mbr size = 16384
mbr magic softw411
disk name=bootloader
disk name=env
disk name=boot
disk name=system
disk name=data
disk name=misc
disk name=recovery
disk name=cache
disk name=databk
disk name=private
disk name=UDISK
this is not a partition key
crc 0 = bc368294
crc 1 = 298bd3c9
crc 2 = 4c3d266f
crc 3 = d9807732
update mbr file ok
----------
storage_type=0

boot0 file Path=/home/gvi/android/olimex-a20/lichee/tools/pack/out/boot0_nand.bin
script file Path=/home/gvi/android/olimex-a20/lichee/tools/pack/out/sys_config.bin

script update boot0 ok
----------
storage_type=1

boot0 file Path=/home/gvi/android/olimex-a20/lichee/tools/pack/out/boot0_sdcard.fex
script file Path=/home/gvi/android/olimex-a20/lichee/tools/pack/out/sys_config.bin

script update boot0 ok
----------

uboot file Path=/home/gvi/android/olimex-a20/lichee/tools/pack/out/boot1_nand.fex
script file Path=/home/gvi/android/olimex-a20/lichee/tools/pack/out/sys_config.bin

boot1 length = 5c000
total length = 6c000
checksum=f8860866
----------

uboot file Path=/home/gvi/android/olimex-a20/lichee/tools/pack/out/boot1_sdcard.fex
script file Path=/home/gvi/android/olimex-a20/lichee/tools/pack/out/sys_config.bin

boot1 length = 3c000
total length = 4c000
checksum=f7a96522
----------
disk : c
CopyRootToFS(/home/gvi/android/olimex-a20/lichee/tools/pack/out/bootfs)

c:\os_show

c:\linux
c:\magic.bin
find magic !!
RealLen=0x617C00
CPlugin Free lib
CPlugin Free lib
----------
/home/gvi/android/olimex-a20/lichee/tools/pack/pctools/linux/eDragonEx/
/home/gvi/android/olimex-a20/lichee/tools/pack/out
Begin Parse sys_partion.fex
Add partion bootloader.fex BOOTLOADER_FEX00
Add partion very bootloader.fex BOOTLOADER_FEX00
FilePath: bootloader.fex
FileLength=617c00 FileSizeHigh=0
Add partion env.fex ENV_FEX000000000
Add partion very env.fex ENV_FEX000000000
FilePath: env.fex
FileLength=20000 FileSizeHigh=0
Add partion boot.fex BOOT_FEX00000000
Add partion very boot.fex BOOT_FEX00000000
FilePath: boot.fex
CreateFile failed 2
Add partion system.fex SYSTEM_FEX000000
Add partion very system.fex SYSTEM_FEX000000
FilePath: system.fex
CreateFile failed 2
Add partion recovery.fex RECOVERY_FEX0000
Add partion very recovery.fex RECOVERY_FEX0000
FilePath: recovery.fex
CreateFile failed 2
Add partion diskfs.fex DISKFS_FEX000000
The file boot.fex length = 0
BuildImg 400
Dragon execute image.cfg Failed ! ArgCnt = 3, 400
----------



and the terminal

gvi@gvi:~/android/olimex-a20/android4.2$ pack
--------release version, donnot have uart printf-------------
INFO: Packing for android
>>> script_parse 0.9.1
>>> check sys_config line format
>>> done.
>>> check partition config
>>> done.
>>> script_parse 0.9.1
>>> check sys_config line format
>>> done.
>>> check mainkey unique
>>> done.
>>> check module rule
>>> not implement yet
cp /home/gvi/android/olimex-a20/lichee/out/android/common/u-boot.bin bootfs/linux/ [OK]
script sys_config.fex [OK]
script sys_partition.fex [OK]
update_mbr sys_partition.bin 4 [OK]
update_boot0 boot0_nand.bin sys_config.bin NAND [OK]
update_boot0 boot0_sdcard.fex sys_config.bin SDMMC_CARD [OK]
update_boot1 boot1_nand.fex sys_config.bin NAND  [Uncheck]
update_boot1 boot1_sdcard.fex sys_config.bin SDMMC_CARD  [Uncheck]
fsbuild bootfs.ini split_xxxx.fex [OK]
dragon image.cfg sys_partition.fex [Failed]

refer to out/pack.log for detail information.

ERROR: Packing Failed.
/home/gvi/android/olimex-a20/android4.2
gvi@gvi:~/android/olimex-a20/android4.2$
Title: Re: Build android image
Post by: dave-at-axon on September 22, 2014, 06:51:58 AM
You are missing files from the build.

On my machine system.fex is a symbolic link to system.img

Look in these locations and see if they exist?

lichee/tools/pack/out/system.fex

android4.2/out/target/product/olinuxino-a20/system.img
Title: Re: Build android image
Post by: gvi70000 on September 22, 2014, 07:53:31 AM
in
/home/gvi/android/olimex-a20/lichee/tools/pack/out
i have the file
system.fex
but in
android4.2/out/target/product/olinuxino-a20/system.img

system.img dosent exists.

if i right click on the first file i get

This link cannot be used because its target "/home/gvi/android/olimex-a20/android4.2/out/target/product/olinuxino-a20/system.img" doesn't exist.


is it normat that after ./build.sh -psun7i_android

i get INFO: skip make rootfs for android ??

INFO: build u-boot OK.
INFO: build rootfs ...
INFO: skip make rootfs for android
INFO: build rootfs OK.
INFO: build lichee OK.


Title: Re: Build android image
Post by: dave-at-axon on September 22, 2014, 09:23:12 AM
Did you manage to build the Android source? Did you run envsetup, lunch, extract-bsp and make -j4

The missing system.img would indicate that it is not done yet.

The ./build.sh is just to build the Android Linux kernel.
Title: Re: Build android image
Post by: gvi70000 on September 22, 2014, 12:46:38 PM
QuoteDid you manage to build the Android source? Did you run envsetup, lunch, extract-bsp and make -j4
yes, i did. I was wondering if is normat that after ./build.sh -psun7i_android to get INFO: skip make rootfs for android
Title: Re: Build android image
Post by: dave-at-axon on September 22, 2014, 04:49:28 PM
I just did a build on the Linux kernel and I get the same as you are seeing.

INFO: build u-boot OK.
INFO: build rootfs ...
INFO: skip make rootfs for android
INFO: build rootfs OK.
INFO: build lichee OK.
Title: Re: Build android image
Post by: gvi70000 on September 22, 2014, 05:37:10 PM
Ok, so that's normal.

I will make a clean install of 12.04 and apply all that i have found and learn. If it will not work then i will have the following to sell with a discount

1x Olimex A20 with 4Gb NAND
2x 7" LCD with adapter included (lcd connector on adapter changed to a quality one)
Title: Re: Build android image
Post by: dave-at-axon on September 22, 2014, 06:41:31 PM
Good luck with it. If you have the right environment setup and all the files that Google dev says you should have then it will work as long as you have added the missing files from Olimex if you are using their source.
Title: Re: Build android image
Post by: gvi70000 on September 22, 2014, 07:11:27 PM
Thanks,

I am using your archives, right now i am building...

I will post the results
Title: Re: Build android image
Post by: dave-at-axon on September 22, 2014, 08:05:18 PM
Cool. You'll need to make a few small changes to use the resistive touch LCD from Olimex but it's not too complex to work out.

Give me a shout if you need any help with it.

The main thing is to get it to build and once that is building without errors you can start to make changes and add or remove what you need.
Title: Re: Build android image
Post by: gvi70000 on September 22, 2014, 08:44:48 PM
Hi,
The LCD itself is not from Olimex...

Here are the steps i detail that i followed

1. Update SO sudo apt-get update

2. DOWNLOAD and INSTALL jdk-6u24-linux-x64.bin from oracle download page
cd ~/Downloads/
chmod +x jdk-6u24-linux-x64.bin
./jdk-6u24-linux-x64.bin
sudo mkdir /usr/lib/jvm
sudo mv jdk1.6.0_24 /usr/lib/jvm
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.6.0_24/bin/java" 1
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.6.0_24/bin/javac" 1
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.6.0_24/bin/javaws" 1
sudo update-alternatives --config java
sudo update-alternatives --config javac
sudo nano /etc/environment
# add this line at file tail
JAVA_HOME="/usr/lib/jvm/jdk1.6.0_24"
source /etc/environment

3. sudo apt-get install git gnupg flex bison gperf build-essential \
  zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
  libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
  libgl1-mesa-dev g++-multilib mingw32 tofrodos \
  python-markdown libxml2-utils xsltproc zlib1g-dev:i386

Doesent work for all, some have to be installed manual - see point 5 - i think the order is not right

4. sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get install g++-4.6
sudo apt-get install gcc-arm-linux-gnueabi

or

sudo apt-get install gcc-4.6 g++-4.6 g++-4.6-multilib gcc-4.6-multilib

5. sudo apt-get install
bison
flex
xsltproc
gperf
libswitch-perl
libxml2-utils
git
gnupg
build-essential
zip
curl
libc6-dev
libncurses5-dev:i386
x11proto-core-dev
libx11-dev:i386
libreadline6-dev:i386
libglapi-mesa:i386
libgl1-mesa-glx:i386
libgl1-mesa-dev
g++-multilib
mingw32
tofrodos
python-markdown
libxml2-utils
xsltproc
zlib1g-dev:i386
u-boot-tools


6. sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so

7. sudo nano /etc/udev/rules.d/51-android.rules

The recommended approach is to create a file /etc/udev/rules.d/51-android.rules (as the root user) and to copy the following lines in it. <username> must be replaced by the actual username of the user who is authorized to access the phones over USB.
# adb protocol on passion (Nexus One)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e12", MODE="0600", OWNER="<username>"
# fastboot protocol on passion (Nexus One)
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0fff", MODE="0600", OWNER="<username>"
# adb protocol on crespo/crespo4g (Nexus S)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e22", MODE="0600", OWNER="<username>"
# fastboot protocol on crespo/crespo4g (Nexus S)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e20", MODE="0600", OWNER="<username>"
# adb protocol on stingray/wingray (Xoom)
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", ATTR{idProduct}=="70a9", MODE="0600", OWNER="<username>"
# fastboot protocol on stingray/wingray (Xoom)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="708c", MODE="0600", OWNER="<username>"
# adb protocol on maguro/toro (Galaxy Nexus)
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", ATTR{idProduct}=="6860", MODE="0600", OWNER="<username>"
# fastboot protocol on maguro/toro (Galaxy Nexus)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e30", MODE="0600", OWNER="<username>"
# adb protocol on panda (PandaBoard)
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d101", MODE="0600", OWNER="<username>"
# adb protocol on panda (PandaBoard ES)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="d002", MODE="0600", OWNER="<username>"
# fastboot protocol on panda (PandaBoard)
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d022", MODE="0600", OWNER="<username>"
# usbboot protocol on panda (PandaBoard)
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d00f", MODE="0600", OWNER="<username>"
# usbboot protocol on panda (PandaBoard ES)
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d010", MODE="0600", OWNER="<username>"
# adb protocol on grouper/tilapia (Nexus 7)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e42", MODE="0600", OWNER="<username>"
# fastboot protocol on grouper/tilapia (Nexus 7)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e40", MODE="0600", OWNER="<username>"
# adb protocol on manta (Nexus 10)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee2", MODE="0600", OWNER="<username>"
# fastboot protocol on manta (Nexus 10)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee0", MODE="0600", OWNER="<username>"

7. Setting up ccache
Go in Home folder
Press CTRL+H and edit the file .bashrc
export USE_CCACHE=1

since we are in this file...add 2 more lines

PATH=$PATH:$HOME/android/olimex-a20/android4.2/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin
PATH=$PATH:$HOME/android/olimex-a20/android4.2/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/

****
read this
http://axonjakarta.wordpress.com/2014/02/14/olimex-a20-android-building-4/
****

8. In Home folder create
android and then olimex-a20
so the final structure will look like /home/<username>/android/olimex-a20

9. download from
http://dl.linux-sunxi.org/users/tsvetan/ANDROID-4.2.2-SDK2.0-KERNEL-3.4/
Android 4.2, Linux 3.4 and olinuxino-a20

copy the files in to the folder /home/<username>/android/olimex-a20

10.
cd /home/<username>/android/olimex-a20
tar zxvf android4.2.tar.gz
tar zxvf lichee-v2.0.tar.gz

11. Check

gcc -v
sudo update-alternatives --config java
sudo update-alternatives --config javac

12.
cd /home/<username>/android/olimex-a20/lichee
./build.sh -psun7i_android

13. Wait for the build to end and you will get

INFO: build u-boot OK.
INFO: build rootfs ...
INFO: skip make rootfs for android
INFO: build rootfs OK.
INFO: build lichee OK.

14.
copy olinuxino-a20.tgz in the folder below
cd /home/<username>/android/olimex-a20/android4.2/device/softwinner/
tar zxfv olinuxino-a20.tgz
cd ../../

now you are in /home/<username>/android/olimex-a20/android4.2

source build/envsetup.sh

you get

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/olinuxino-a20/vendorsetup.sh
including device/softwinner/wing-k70/vendorsetup.sh
including device/softwinner/wing-nck70/vendorsetup.sh
including device/ti/panda/vendorsetup.sh
including sdk/bash_completion/adb.bash

lunch

select olinuxino-a20_eng option 15

you get

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.2.2
TARGET_PRODUCT=olinuxino_a20
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
HOST_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-3.13.0-35-generic-x86_64-with-Ubuntu-12.04-precise
HOST_BUILD_TYPE=release
BUILD_ID=JDQ39
OUT_DIR=out
============================================

extract-bsp

/home/<username>/android/olimex-a20/android4.2/device/*/olinuxino-a20/bImage copied!
/home/<username>/android/olimex-a20/android4.2/device/*/olinuxino-a20/modules copied!

make -j4

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.2.2
TARGET_PRODUCT=olinuxino_a20
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
HOST_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-3.13.0-35-generic-x86_64-with-Ubuntu-12.04-precise
HOST_BUILD_TYPE=release
BUILD_ID=JDQ39
OUT_DIR=out
============================================
Checking build tools versions...
external/bluetooth/bluedroid/Android.mk:8: NO BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR, using only generic configuration
CEDARX_PRODUCTOR: GENERIC
find: `../../vendor/unbundled_google/libs/gcm/gcm-client/src': No such file or directory
find: `../../vendor/unbundled_google/libs/gcm/gcm-server/src': No such file or directory
find: `../../vendor/unbundled_google/libs/gcm/gcm-client/src': No such file or directory
find: `../../vendor/unbundled_google/libs/gcm/gcm-server/src': No such file or directory
find: `src': No such file or directory

.
.
.


Now i got a new error

Import includes file: out/target/product/olinuxino-a20/obj/STATIC_LIBRARIES/libgtest_main_intermediates/import_includes
Import includes file: out/target/product/olinuxino-a20/obj/STATIC_LIBRARIES/libgtest_intermediates/import_includes
Import includes file: out/target/product/olinuxino-a20/obj/STATIC_LIBRARIES/libtestUtil_intermediates/import_includes
Export includes file: system/extras/tests/binder/benchmarks/Android.mk -- out/target/product/olinuxino-a20/obj/EXECUTABLES/binderAddInts_intermediates/export_includes
Import includes file: out/target/product/olinuxino-a20/obj/EXECUTABLES/dalvik-vm-unit-tests_intermediates/import_includes
make: *** No rule to make target `device/softwinner/olinuxino-a20/modules/modules/fusion_F0710A.ko', needed by `out/target/product/olinuxino-a20/fusion_F0710A.ko'.  Stop.
make: *** Waiting for unfinished jobs....
Export includes file: dalvik/unit-tests/Android.mk -- out/target/product/olinuxino-a20/obj/EXECUTABLES/dalvik-vm-unit-tests_intermediates/export_includes

that before was not an issue

I tried win m, y and n when i have to choose the F0710A but the result is the same


Title: Re: Build android image
Post by: dave-at-axon on September 23, 2014, 05:54:43 AM
This should be easy enough to fix. This will happen because your Linux kernel build did not include the Fusion driver.

As you don't have that Fusion LCD, we should remove it from the build.

Open the file olinuxino_a20.mk in the /device/softwinner/olinuxino_a20 directory.

Go to line 24 and comment out the line that loads the fusion_F0710A.ko file. Remove the \ from the preceding line.

Try the build again. If this works you need to edit the init.sun7i.rc file to change to the RTP driver. You'll also need to edit the FEX file to change to the RTP driver. This is not used used during the build, only when you pack the files so you change and re-pack as needed.


Add in line 212 and comment out 215
Title: Re: Build android image
Post by: gvi70000 on September 23, 2014, 11:47:36 PM
Hi Dave,

I have tried your proposal on Ubuntu 12.04 and Debian 7.6 both x64 ant i cant compile the image

Applying the same steps on Ubuntu 14.04 works without any issues with your archives, so i have managed to compile the image.

Regarding your last post i have the following questions:

1. Changing olinuxino_a20.mk in the /device/softwinner/olinuxino_a20 directory still stops the process and ask if i want to add the driver. Ho do i remove this? i will use make ARCH=arm menuconfig?

2.
Quote
Try the build again. If this works you need to edit the init.sun7i.rc file to change to the RTP driver. You'll also need to edit the FEX file to change to the RTP driver. This is not used used during the build, only when you pack the files so you change and re-pack as needed.
can you please point the path to these files? because using search i find several.

3. In Android where do i set the default display type and resolution?

PS I can boot from SD with your image but the screen goes off in few seconds and i have no touch :)
Title: Re: Build android image
Post by: dave-at-axon on September 24, 2014, 07:32:02 AM
Quote from: gvi70000 on September 23, 2014, 11:47:36 PM
Regarding your last post i have the following questions:

1. Changing olinuxino_a20.mk in the /device/softwinner/olinuxino_a20 directory still stops the process and ask if i want to add the driver. Ho do i remove this? i will use make ARCH=arm menuconfig?

This is annoying to me too. Any changes made to the config always ask for confirmation. I have found though that if you do a clean first then menuconfig it doesn't ask me.

Quote
Quote
edit the init.sun7i.rc file
can you please point the path to these files? because using search i find several.

It's located in the device/softwinner/olimex-a20 directory.

Quote
3. In Android where do i set the default display type and resolution?

As far as I can tell, this is done in the FEX file. The settings in my archive are for the Fusion display so you may need to adjust the settings to get it to work with different resolutions.

Quote
PS I can boot from SD with your image but the screen goes off in few seconds and i have no touch :)

Ah yes, that dreaded off in a few seconds. Once you get touch working, you can change this in the settings. I've not found out the location of settings for this to set a higher default off time as part of the build.

Getting it compiled and running is a good start though. We just need now to enable your touch.

I assume you are using resistive into the processor touch interface? If yes, then changing the init.sun7i.rc should work. Another quick way for testing is to connect via the debug on UART0 and issue commands to uninstall the fusion touch driver using rmmod and then insmod the sun7i touch. The names are in the init.sun7i.rc file.

You can also try this over ADB via the USB port as I disabled the authorisation on ADB connection. :)
Title: Re: Build android image
Post by: gvi70000 on September 25, 2014, 08:00:05 AM
Hello Dave,

I have tried to compile with the files from Olimex archives but i am getting a lot of errors.
With the files from you is working fine, so i have some questions.

1. In menuconfig is it possible to select the Olimex LCD and TS driver? If yes can you tell me which are they?
2. I downloaded thate latest driver for RTL8188CUS from RTL and seems that it is the sale as the one named 8188E or 8172C from the linux-3.4, i will just mark with * and try to use. After menuconfig do i need to run make?
3. from where can i control the animation at the boot time? times to keep the logos on the screen?

Thank you
Title: Re: Build android image
Post by: dave-at-axon on September 25, 2014, 10:36:03 AM
Give me a few hours and I will sort out what you need to do to change the Olimex LCD.

I stick the details on the blog as others may need it too. I post the files there too.

The boot animation is just zip file with a series of images. There is a but more work to do the once that appears after the AllWinner on initial power up. None of the images ever appears on the HDMI though, only the LCD.

I'll stick this on the blog too if I get time.
Title: Re: Build android image
Post by: gvi70000 on September 25, 2014, 01:42:09 PM
That will be great, your blog is far far the best resource to compile the image
Title: Re: Build android image
Post by: dave-at-axon on September 25, 2014, 05:28:42 PM
I posted the stuff on how to change to the Resistive Touch Panel.

http://axonjakarta.wordpress.com/2014/09/25/using-the-default-7-lcd-from-olimex/

I'll get around to the Animation stuff this weekend.

Let me know how you get on with this?