Build android image

Started by gvi70000, September 18, 2014, 09:31:31 PM

Previous topic - Next topic

gvi70000

    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?

dave-at-axon

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.

gvi70000

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/ (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

dave-at-axon

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?

gvi70000

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

adinu

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

gvi70000

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.

adinu

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.

gvi70000

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

dave-at-axon

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

gvi70000

Tried Ubuntu 12.04 with gcc4.4 - same thing. I will try alo on debian

dave-at-axon

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

gvi70000

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.

gvi70000

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$

dave-at-axon

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