android on cubieboard

3,904 views
Skip to first unread message

Gabe Rowe

unread,
Nov 3, 2012, 1:37:57 AM11/3/12
to cubie...@googlegroups.com
Anybody have android running on their cubieboard that was compiled from source?

Mind sharing some details on how you did it, or if there is some tutorial you see?

Thanks,
Gabe

Alejandro Mery

unread,
Nov 3, 2012, 5:59:07 AM11/3/12
to cubie...@googlegroups.com
in the sunxi-bsp[1] there is a wip `make android` thing (CM10 based)
that roughly applies to any A10 device. to adjust the resut to the CB
there is still some more work to do.

[1] https://github.com/linux-sunxi/sunxi-bsp

Gabe Rowe

unread,
Nov 3, 2012, 7:30:01 PM11/3/12
to cubie...@googlegroups.com
Oh cool I'll check it out and see if I can make some fixes if I see anything that I can help on.

Is it possible to use nearly the same kernel from the other builds for lichee, ubuntu, etc that many people are using? Seems like Android mostly differs by what runs on top of the kernel, right? I guess there a probably some specific modules in the kernel that are necessary for the various android elements like dalvik to run, probably especially the graphics core needs to work in a specific way with android. 

Just curious on that subject of what really makes android different than the other flavors of linux when it comes to running on the A10..

Thanks! 

Gabe

Gabe Rowe

unread,
Nov 3, 2012, 8:50:56 PM11/3/12
to cubie...@googlegroups.com
when doing make android, it fails (I guess this is why you say it is work in progress?)
-------
Archive:  ./vendor/cm/proprietary/Term.apk
  inflating: ./vendor/cm/proprietary/lib/armeabi/libjackpal-androidterm4.so  
including vendor/cm/vendorsetup.sh
build/core/product_config.mk:189: *** _nic.PRODUCTS.[[device/*/cubieboard/cm.mk]]: "device/*/cubieboard/cm.mk" does not exist.  Stop.
make: *** [android-build] Error 2
penguin@ubuntu:~/cubie_android/sunxi-bsp$ 
--------

I'll see if I can fix that... but is that to be expected based upon current status on the repo?

-Gabe

Emilio López

unread,
Nov 4, 2012, 4:55:22 PM11/4/12
to cubie...@googlegroups.com, Gabe Rowe
El 03/11/12 21:50, Gabe Rowe escribió:
> when doing make android, it fails (I guess this is why you say it is
> work in progress?)
> -------
> Archive: ./vendor/cm/proprietary/Term.apk
> inflating:
> ./vendor/cm/proprietary/lib/armeabi/libjackpal-androidterm4.so
> including vendor/cm/vendorsetup.sh
> build/core/product_config.mk:189: ***
> _nic.PRODUCTS.[[device/*/cubieboard/cm.mk]]: "device/*/cubieboard/cm.mk"
> does not exist. Stop.
> make: *** [android-build] Error 2
> penguin@ubuntu:~/cubie_android/sunxi-bsp$
> --------
>
> I'll see if I can fix that... but is that to be expected based upon
> current status on the repo?

Yes, it is to be expected, as there is no cubieboard device tree yet.

signature.asc

Gabe Rowe

unread,
Nov 4, 2012, 4:57:00 PM11/4/12
to cubie...@googlegroups.com
Hi Alejandro,

Which linux distribution are you using? I'm working on this sunxi-bsp code base and i think it will help if I'm on the same linux distribution as you. Are you using something like ubuntu 11.04 64bit?

thanks,

Gabe

On Saturday, November 3, 2012 2:59:30 AM UTC-7, Alejandro Mery wrote:

Alejandro Mery

unread,
Nov 4, 2012, 5:07:04 PM11/4/12
to cubie...@googlegroups.com
On 04/11/12 22:57, Gabe Rowe wrote:
> Hi Alejandro,
>
> Which linux distribution are you using? I'm working on this sunxi-bsp code
> base and i think it will help if I'm on the same linux distribution as you.
> Are you using something like ubuntu 11.04 64bit?

ubuntu 12.04/64, but as Turl just mentioned, there is no device tree for
the cubieboard yet and the bsp still doesn't know how to auto-create them.

Gabe Rowe

unread,
Nov 4, 2012, 5:46:14 PM11/4/12
to cubie...@googlegroups.com
Ok thanks. Should any of the items in the list for configure work at this moment?

For example, configure mele_a1000 starts compiling, but fails with the error related to libusb. 

-------------
mkdir -p /home/penguin/cubie_android/sunxi-bsp/output
[ ! -s boot.cmd ] || mkimage -A arm -O u-boot -T script -C none -n "boot" -d boot.cmd /home/penguin/cubie_android/sunxi-bsp/build/boot.scr
make -C sunxi-tools
make[1]: Entering directory `/home/penguin/cubie_android/sunxi-bsp/sunxi-tools'
gcc -g -O0 -Wall -Wextra -std=c99 -D_POSIX_C_SOURCE=200112L -Iinclude/ `pkg-config --cflags libusb-1.0`  -o fel fel.c  `pkg-config --libs libusb-1.0`
Package libusb-1.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libusb-1.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libusb-1.0' found
Package libusb-1.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libusb-1.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libusb-1.0' found
fel.c:21:20: fatal error: libusb.h: No such file or directory
compilation terminated.
make[1]: *** [fel] Error 1
make[1]: Leaving directory `/home/penguin/cubie_android/sunxi-bsp/sunxi-tools'
make: *** [tools] Error 2
----------------

I added that environment variable, but then it fails with 

-----------
make -C sunxi-tools
make[1]: Entering directory `/home/penguin/cubie_android/sunxi-bsp/sunxi-tools'
gcc -g -O0 -Wall -Wextra -std=c99 -D_POSIX_C_SOURCE=200112L -Iinclude/ `pkg-config --cflags libusb-1.0`  -o fel fel.c  `pkg-config --libs libusb-1.0`
/usr/bin/ld: cannot find -lusb-1.0
collect2: ld returned 1 exit status
make[1]: *** [fel] Error 1
make[1]: Leaving directory `/home/penguin/cubie_android/sunxi-bsp/sunxi-tools'
make: *** [tools] Error 2
----------------

So it looks like libusb-1.0 is not being ask to be compiled somehow before it is asked to be linked against?

Anyway, no problem if its just currently not finished yet, I totally understand. I just thought I'd check to see if this is something that needs fixing or if it should actually work and my environment isn't setup properly or something like that.

thanks!

Gabe

Tom Cubie

unread,
Nov 5, 2012, 3:01:24 AM11/5/12
to cubie...@googlegroups.com
The code we use to build android for cubieboard.

$repo init -u https://github.com/matson-hall/manifest.git -b ics-cubieboard

$cp .repo/manifests/local_manifest.xml .repo/

$repo sync

$source build/envsetup.sh

$lunch

choose 4 , cubieboard

$make -j4 # there maybe errors like to ask you "make update-api"

$chmod +x tools/pack-cm.sh

$tools/pack-cm.sh

Then you can get a image to flash with livesuite.

> --
>
>



--
Keep simple, stay foolish.

Gabe Rowe

unread,
Nov 5, 2012, 9:18:11 PM11/5/12
to cubie...@googlegroups.com
Thanks Tom, BTW, for those who haven't used repo before, you can install following these isntructions: http://source.android.com/source/downloading.html

Gabe Rowe

unread,
Nov 6, 2012, 10:34:12 AM11/6/12
to cubie...@googlegroups.com
Tom, after compiling many things I see the API deprecated error.

So I should run "make update-api"?

When android finishes, what file does it generate that the pack uses? some big .bin file in mydroid directory or something like that?

thanks,
-Gabe


On Monday, November 5, 2012 12:02:05 AM UTC-8, mr.hipboi wrote:

István Nagy

unread,
Nov 6, 2012, 5:28:05 PM11/6/12
to cubie...@googlegroups.com
Although i don't have a Cubieboard yet i've tried to compile Android from the sources described above. My little Atom box compiled it all day long but i've got stuck at this point:

target Java: Phone (out/target/common/obj/APPS/Phone_intermediates/classes)
packages/apps/Phone/src/com/android/phone/BluetoothHandsfree.java:1656: cannot find symbol
symbol  : class SpecialPDUInputHandler
location: class android.bluetooth.HeadsetBase
    void setSpecialPDUInputHandler(String stringToSend, HeadsetBase.SpecialPDUInputHandler inputHandler) {
                                                                   ^
packages/apps/Phone/src/com/android/phone/BluetoothHandsfree.java:1658: cannot find symbol
symbol  : method sendURCChars(java.lang.String)
location: class android.bluetooth.HeadsetBase
            mHeadset.sendURCChars(stringToSend);
                    ^
packages/apps/Phone/src/com/android/phone/BluetoothHandsfree.java:1660: cannot find symbol
symbol  : variable specialPDUInputHandler
location: class android.bluetooth.HeadsetBase
        mHeadset.specialPDUInputHandler = inputHandler;
                ^
packages/apps/Phone/src/com/android/phone/BluetoothSMSAccess.java:315: cannot find symbol
symbol  : class SpecialPDUInputHandler
location: class android.bluetooth.HeadsetBase
                            new HeadsetBase.SpecialPDUInputHandler() {
                                           ^

Can somebody tell me what's the problem? Does the repo cloning went wrong?

Gabe Rowe

unread,
Nov 6, 2012, 10:42:32 PM11/6/12
to cubie...@googlegroups.com
I had the same problem. I modified the two files SMSAccess and Handsfree, and the entire thing compiles. The bluetooth app most likely wont work based upon my mod. But you can modify following my mods, see attached tar file.

Replace the files at:
packages/apps/Phone/src/com/android/phone/BluetoothHandsfree.java
packages/apps/Phone/src/com/android/phone/BluetoothSMSAccess.java

with the files from the tar file.

The whole thing should compile now.

-Gabe
bluetoothjava.tar

Gabe Rowe

unread,
Nov 6, 2012, 10:48:17 PM11/6/12
to cubie...@googlegroups.com
If it compiles it should say this:
Created filesystem with 1043/16384 inodes and 37763/65536 blocks
Install system fs image: out/target/product/cubieboard/system.img

Tom Cubie

unread,
Nov 7, 2012, 12:17:35 AM11/7/12
to cubie...@googlegroups.com
On Wed, Nov 7, 2012 at 11:48 AM, Gabe Rowe <gabe...@gmail.com> wrote:
> If it compiles it should say this:
> Created filesystem with 1043/16384 inodes and 37763/65536 blocks
> Install system fs image: out/target/product/cubieboard/system.img
>

Yes, then you need to run tools/pack-cm.sh to generate a livesuite image.

Gabe Rowe

unread,
Nov 7, 2012, 12:43:38 AM11/7/12
to cubie...@googlegroups.com
I was able to build Android and flash it following your instructions, and it boots up just fine. So that is good news! I can talk to it over adb and toggle around in the android OS (after adding this board to my 51-android.rules file as usual). Probably bluetooth needs fixing, but so far things look good.


edit /etc/udev/rules.d/51-android.rules to include the line:
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1",MODE="0666"

Then do:
sudo restart udev

Then you should be able to do "adb devices" and connect to the device. 

-Gabe

Gabe Rowe

unread,
Nov 7, 2012, 1:43:54 AM11/7/12
to cubie...@googlegroups.com
Alejandro,

Not sure if its the best place, but I put up a tutorial following the android build instructions that I just verified do work (except for the bluetooth bug--we can figure out how to fix that and modify the original repo soon I'm sure).


-Gabe

Martin Wild

unread,
Nov 7, 2012, 2:37:24 AM11/7/12
to cubie...@googlegroups.com
Hi, Gabe

Is there a way you could upload your pre- created android image to a downloadserver /filehoster so I can download and try it myself ? I am really not good at compiling, and I doubt that I could create a working image myself in the near future. ;)

Regards Martin.

István Nagy

unread,
Nov 7, 2012, 4:04:20 AM11/7/12
to cubie...@googlegroups.com
Thank you :)
I've started a fresh compile with your patch. Hopefully i get an image in the evening :)

Alejandro Mery

unread,
Nov 7, 2012, 4:47:41 AM11/7/12
to cubie...@googlegroups.com
On 07/11/12 07:43, Gabe Rowe wrote:
> Alejandro,
>
> Not sure if its the best place, but I put up a tutorial following the
> android build instructions that I just verified do work (except for the
> bluetooth bug--we can figure out how to fix that and modify the original
> repo soon I'm sure).
>
> http://linux-sunxi.org/Android

thanks! but three things to consider. 1) the lichee android is not the
only way of getting android on sunxi devices. 2) don't make standalone
pages including everything sightly related. we have pages dedicated to
setup a building environment, and a page dedicated to making livesuit
images. 3) linux-sunxi.org is not the cubieboard's wiki, it's dedicated
to all sunxi devices out there so instructions need to be kept as device
agnostic as possible and tell the device specific details separated...
we don't want to have the same incomplete tutorials duplicated for every
device, for every host os, for every toolchain, etc etc etc :)

cheers,
Alejandro

Gabe Rowe

unread,
Nov 7, 2012, 12:38:27 PM11/7/12
to cubie...@googlegroups.com
Yea I see what you mean. this style of documenting won't scale well. So, what are some of the other methods to get android onto the device? I can figure out how to branch things out. 

Once I can get the sunxi-bsp stuff to compile then I can make some pages for that too. I think I should be able to get the zatab stuff to compile soon--seems like it almost works.

I have the following boards and my plan was to get various bsp's figured out on each platform. 
hackberry
mk802
mk802II (with axp209)
cubieboard
gooseberry

I completely agree that the cubieboard should not be the focus. My main goal is just to give people a way to have some early success, otherwise its easy to get discouraged. Not everybody is as comfortable around linux, git, cross-compiling for arm as you are :-). I'm much more of a hardware guy, but work on the SW side as needed. 

Hackberry and gooseberry are not very well documented, so right now I'm finding it easiest to work with the cubieboard. But hopefully there will be many other options soon, so I'll look at how to make the pages more general, then have some more details for each board that currently exists. 

-Gabe
Message has been deleted

István Nagy

unread,
Nov 7, 2012, 3:35:32 PM11/7/12
to cubie...@googlegroups.com
Compilation went fine this time, however the pack-cm.sh script gives me strange errors:

inagy@ubuntu-server-inagy:~/android2$ tools/pack-cm.sh
!!!Packing for crane!!!
`chips/sun4i/configs/crane/default/env_mmc.cfg' -> `out/env_mmc.cfg'
`chips/sun4i/configs/crane/default/env_nand.cfg' -> `out/env_nand.cfg'
`chips/sun4i/configs/crane/default/image.cfg' -> `out/image.cfg'
`chips/sun4i/configs/crane/cubieboard/sys_config1.fex' -> `out/sys_config1.fex'
`chips/sun4i/configs/crane/cubieboard/sys_config.fex' -> `out/sys_config.fex'
cp: cannot stat `/home/inagy/android2/out/u-boot.bin': No such file or directory
./pack: line 176: /home/inagy/android2/tools/pack/pctools/linux/mod_update/script: cannot execute binary file
./pack: line 177: /home/inagy/android2/tools/pack/pctools/linux/mod_update/script: cannot execute binary file
./pack: line 178: /home/inagy/android2/tools/pack/pctools/linux/mod_update/update_23: cannot execute binary file
./pack: line 179: /home/inagy/android2/tools/pack/pctools/linux/mod_update/update_23: cannot execute binary file
cp: cannot stat `sys_config1.bin': No such file or directory
cp: cannot stat `sys_config1.bin': No such file or directory
./pack: line 184: /home/inagy/android2/tools/pack/pctools/linux/mod_update/update_mbr: cannot execute binary file
mkdir: created directory `bootfs/vendor'
mkdir: created directory `bootfs/vendor/system'
mkdir: created directory `bootfs/vendor/system/media'
disk : c
CopyRootToFS(/home/inagy/android2/tools/pack/out/bootfs)

c:\sprite

c:\vendor

c:\vendor\system

c:\vendor\system\media

c:\os_show

c:\linux
c:\magic.bin
find magic !!
RealLen=0x68BC00
CPlugin Free lib
CPlugin Free lib
FileLength=68bc00 FileSizeHigh=0
FileLength=40000 FileSizeHigh=0
FileLength=447000 FileSizeHigh=0
FileLength=9175470 FileSizeHigh=0
FileLength=5ef000 FileSizeHigh=0
/home/inagy/android2/tools/pack/pctools/linux/eDragonEx//home/inagy/android2/tools/pack/outFile dlinfo.fex Not ExistBuildImg 360
Dragon execute image.cfg Failed ! 360
CPlugin Free lib
CPlugin Free lib
inagy@ubuntu-server-inagy:~/android2$

Gabe Rowe

unread,
Nov 7, 2012, 4:27:36 PM11/7/12
to cubie...@googlegroups.com
It looks like it didn't actually finish compiling... what is the final
message from your compilation process?

Gabe

On Wed, Nov 7, 2012 at 12:34 PM, István Nagy <nistv...@gmail.com> wrote:
> Compilation was went fine now, however the pack-cm.sh script gives me
> --
>
>

István Nagy

unread,
Nov 7, 2012, 4:55:57 PM11/7/12
to cubie...@googlegroups.com
Is the compile log kept anywhere? Otherwise i have to restart the whole stuff because i've run it in screen while i was doing other stuff.

Gabe Rowe

unread,
Nov 7, 2012, 6:47:15 PM11/7/12
to cubie...@googlegroups.com
Yea, just run the compile again, if it has an error, it should show
the error again.

Let me know what it says.

Gabe
> --
>
>

István Nagy

unread,
Nov 8, 2012, 3:29:25 AM11/8/12
to cubie...@googlegroups.com
I've executed "make clean" and now capturing the whole recompilation process. Will attach it here as soon as it finished.

István Nagy

unread,
Nov 8, 2012, 9:00:06 AM11/8/12
to cubie...@googlegroups.com
Attached the full build log starting from the env-setup script till the pack-cm.sh script.
I got the same error again.
Build system is an x86 Ubuntu 10.04 server machine.
android_build.zip

Itamar Reis Peixoto

unread,
Nov 8, 2012, 9:41:14 AM11/8/12
to cubie...@googlegroups.com
> --
>
>
# lunch
Which would you like? [full-eng] 4
Looking for dependencies
Dependencies file not found, bailing out.

How can I discover what Dependencies required ?

--
------------

Itamar Reis Peixoto

Gabe Rowe

unread,
Nov 9, 2012, 12:43:21 AM11/9/12
to cubie...@googlegroups.com
Looks like you need to do this:

sudo chmod +x /home/inagy/android2/tools/pack/pctools/linux/mod_update/*

Then try again.

Gabe

István Nagy

unread,
Nov 9, 2012, 6:29:30 AM11/9/12
to cubie...@googlegroups.com
I did what you adviced but it's still gaves me the same errors. :(

inagy@ubuntu-server-inagy:~/android2/tools/pack/pctools/linux/mod_update$ ls -l
total 304
-rwxr-xr-x 1 inagy inagy 23076 2012-11-07 03:14 script
-rwxr-xr-x 1 inagy inagy 36864 2012-11-07 03:14 script.exe
-rwxr-xr-x 1 inagy inagy 19280 2012-11-07 03:14 script_old
-rwxr-xr-x 1 inagy inagy 36864 2012-11-07 03:14 script_old.exe
-rwxr-xr-x 1 inagy inagy  9624 2012-11-07 03:14 u_boot_env_gen
-rwxr-xr-x 1 inagy inagy 52951 2012-11-07 03:14 update_23
-rwxr-xr-x 1 inagy inagy 45056 2012-11-07 03:14 update_23.exe
-rwxr-xr-x 1 inagy inagy 44229 2012-11-07 03:14 update_mbr
-rwxr-xr-x 1 inagy inagy 36864 2012-11-07 03:14 update_mbr.exe

Itamar Reis Peixoto

unread,
Nov 9, 2012, 9:50:42 AM11/9/12
to cubie...@googlegroups.com
On Wed, Nov 7, 2012 at 1:42 AM, Gabe Rowe <gabe...@gmail.com> wrote:
> I had the same problem. I modified the two files SMSAccess and Handsfree,
> and the entire thing compiles. The bluetooth app most likely wont work based
> upon my mod. But you can modify following my mods, see attached tar file.
>
> Replace the files at:
> packages/apps/Phone/src/com/android/phone/BluetoothHandsfree.java
> packages/apps/Phone/src/com/android/phone/BluetoothSMSAccess.java
>
> with the files from the tar file.
>
> The whole thing should compile now.
>
> -Gabe

please push this to git repository.


--
------------

Itamar Reis Peixoto
http://www.quebarato.com.br/perfil/itamarjp

Gabe Rowe

unread,
Nov 9, 2012, 11:09:29 AM11/9/12
to cubie...@googlegroups.com
Hmmm... maybe start from scratch, but do the chmod +x on those files
before running? Not sure...

Gabe
> --
>
>

Tom Cubie

unread,
Nov 10, 2012, 6:35:07 AM11/10/12
to cubie...@googlegroups.com


在 2012年11月8日星期四,István Nagy 写道:
Attached the full build log starting from the env-setup script till the pack-cm.sh script.
I got the same error again.
Build system is an x86 Ubuntu 10.04 server machine.


The pack tools(binary in mod_update folder) are 64 bits that's why it can not execute. So pack failed.
 

--
 
 

István Nagy

unread,
Nov 11, 2012, 6:04:41 AM11/11/12
to cubie...@googlegroups.com
Can we compile these tools on our own or these are not open source ones?
(I found the source repository here: https://github.com/matson-hall/allwinner-pack-tools)

Alejandro Mery

unread,
Nov 11, 2012, 6:21:43 AM11/11/12
to cubie...@googlegroups.com
On 11 November 2012 12:04, István Nagy <nistv...@gmail.com> wrote:
> Can we compile these tools on our own or these are not open source ones?
> (I found the source repository here:
> https://github.com/matson-hall/allwinner-pack-tools)

those a proprietary tools

István Nagy

unread,
Nov 12, 2012, 4:53:13 AM11/12/12
to cubie...@googlegroups.com
Is it possible to get an x86 compiled binary into that Github repository somehow? I find it a bit silly that i can't use my Atom box for building just because the final steps require an x64 runtime environment.

Does the Livesuit require x64 environment aswell?

Tom Cubie

unread,
Nov 12, 2012, 11:27:26 PM11/12/12
to cubie...@googlegroups.com


在 2012年11月12日星期一,István Nagy 写道:
Is it possible to get an x86 compiled binary into that Github repository somehow? I find it a bit silly that i can't use my Atom box for building just because the final steps require an x64 runtime environment.


We will provide 32bit pack tools.
 
Does the Livesuit require x64 environment aswell?

Currently, yes. There are 32bit livesuite for Linux and also Mac version. We will upload it.
 


On Sunday, 11 November 2012 12:22:07 UTC+1, Alejandro Mery wrote:
On 11 November 2012 12:04, István Nagy <nistv...@gmail.com> wrote:
> Can we compile these tools on our own or these are not open source ones?
> (I found the source repository here:
> https://github.com/matson-hall/allwinner-pack-tools)

those a proprietary tools 

--
 
 

István Nagy

unread,
Nov 13, 2012, 4:41:46 AM11/13/12
to cubie...@googlegroups.com
Thank you :) Please keep us updated when you push them to the repository.

Giuseppe Tafuro

unread,
Nov 19, 2012, 1:58:46 PM11/19/12
to cubie...@googlegroups.com
I try to compile the source code on a MAC OSX Lion 10.7 and get this errors, could someone help?

  CHK     include/generated/utsrelease.h
  UPD     include/generated/utsrelease.h
  Using /Volumes/android/kernel/allwinner/common as source for kernel
  CC      scripts/mod/empty.o
  HOSTCC  scripts/mod/mk_elfconfig
/Volumes/android/kernel/allwinner/common/scripts/mod/mk_elfconfig.c:4:17: error: elf.h: No such file or directory
/Volumes/android/kernel/allwinner/common/scripts/mod/mk_elfconfig.c: In function ‘main’:
/Volumes/android/kernel/allwinner/common/scripts/mod/mk_elfconfig.c:9: error: ‘EI_NIDENT’ undeclared (first use in this function)
/Volumes/android/kernel/allwinner/common/scripts/mod/mk_elfconfig.c:9: error: (Each undeclared identifier is reported only once
/Volumes/android/kernel/allwinner/common/scripts/mod/mk_elfconfig.c:9: error: for each function it appears in.)
/Volumes/android/kernel/allwinner/common/scripts/mod/mk_elfconfig.c:16: error: ‘ELFMAG’ undeclared (first use in this function)
/Volumes/android/kernel/allwinner/common/scripts/mod/mk_elfconfig.c:16: error: ‘SELFMAG’ undeclared (first use in this function)
/Volumes/android/kernel/allwinner/common/scripts/mod/mk_elfconfig.c:20: error: ‘EI_CLASS’ undeclared (first use in this function)
/Volumes/android/kernel/allwinner/common/scripts/mod/mk_elfconfig.c:21: error: ‘ELFCLASS32’ undeclared (first use in this function)
/Volumes/android/kernel/allwinner/common/scripts/mod/mk_elfconfig.c:24: error: ‘ELFCLASS64’ undeclared (first use in this function)
/Volumes/android/kernel/allwinner/common/scripts/mod/mk_elfconfig.c:30: error: ‘EI_DATA’ undeclared (first use in this function)
/Volumes/android/kernel/allwinner/common/scripts/mod/mk_elfconfig.c:31: error: ‘ELFDATA2LSB’ undeclared (first use in this function)
/Volumes/android/kernel/allwinner/common/scripts/mod/mk_elfconfig.c:34: error: ‘ELFDATA2MSB’ undeclared (first use in this function)
/Volumes/android/kernel/allwinner/common/scripts/mod/mk_elfconfig.c:9: warning: unused variable ‘ei’
make[4]: *** [scripts/mod/mk_elfconfig] Error 1
make[3]: *** [scripts/mod] Error 2
make[2]: *** [scripts] Error 2
make[1]: *** [sub-make] Error 2
make: *** [TARGET_KERNEL_BINARIES] Error 2
make: *** Waiting for unfinished jobs....

Gabe Rowe

unread,
Nov 19, 2012, 2:27:29 PM11/19/12
to cubie...@googlegroups.com
I don't think many people are compiling the source on mac, so I think
its best to setup a virtual machine with linux ubuntu 64bit on it. The
errors below looks like your build environment is not setup properly.
For example, elf.h error I think means you are missing many things.

Get vmware fusion, its like $50. Or you can install bootcamp on your
mac, then run vmware player from the windows side (its free).

Here are some instructions to setup your ubuntu virtual machine.
http://linux-sunxi.org/Instructions_to_setup_your_build_environment_using_Ubuntu

-Gabe
> --
>
>

Michal Suchanek

unread,
Nov 22, 2012, 8:07:15 AM11/22/12
to cubie...@googlegroups.com
On 19 November 2012 20:27, Gabe Rowe <gabe...@gmail.com> wrote:
> I don't think many people are compiling the source on mac, so I think
> its best to setup a virtual machine with linux ubuntu 64bit on it. The
> errors below looks like your build environment is not setup properly.
> For example, elf.h error I think means you are missing many things.
>
> Get vmware fusion, its like $50. Or you can install bootcamp on your
> mac, then run vmware player from the windows side (its free).

When it comes to that Virtualbox is $0.

Technically it should be possible to compile on a mac equally well. It
uses mostly the same toolchain as Linux. The problem is the quide
tells you to install certin Ubuntu packages and you would have to
figure out what is used out of those and how to install that on a mac.
For example elf.h would be a header of binutils or similar package
built to support elf binary format but the ones used on mac produce
mach-o hence they need not and do not install that header.

Thanks

Michal

Ulisses Montenegro

unread,
Nov 22, 2012, 8:12:23 AM11/22/12
to cubie...@googlegroups.com
I suggest Homebrew[1] for your Unix/Linux needs in OSX. They have most of the standard software packages, and quite a few unusual ones. Of course libelf is available[2].

Install it using the provided script:

ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"

Then it's just 'brew install libelf' and whatever else is missing from your system.




Michal

--
You received this message because you are subscribed to the Google Groups "cubieboard" group.
Visit this group at http://groups.google.com/group/cubieboard?hl=en.





--
“If debugging is the process of removing software bugs, then programming must be the process of putting them in.” - Edsger Dijkstra

Rhett Aultman

unread,
Dec 13, 2012, 12:38:55 AM12/13/12
to cubie...@googlegroups.com
I'm picking up this thread because I've used the instructions in here (and on the sunxi-linux wiki) to build an image from source and, rather than flashing it on a cubieboard, I'm flashing it on a Miniand Mk802.  This actually works quite well, and it does basically everything which I need it to do, with one small problem.

Basically, every time I boot the image, it's reset back to its first boot state.  If I install an app and reboot, the app is no longer installed.  If I set a preference in the settings app, that's gone after a reboot.  If I give a password for a wifi network, it forgets the password on the next boot.  Each boot seems to be somehow wiping the system...possibly the userdata?  Don't know.

I do know that I can write files into /mnt/sdcard and they survive reboots, but important stuff, like apps and settings preferences, don't.

Has anyone experienced a problem like this?

Regards,
Rhett
Message has been deleted

Rhett Aultman

unread,
Jan 14, 2013, 4:18:28 PM1/14/13
to cubie...@googlegroups.com
Here's how you get and build source:

http://linux-sunxi.org/Android

Aside with some issues related to things like re-formatting the /data
partition, it seemed pretty stable.

Regards,
Rhett

On Sun, Jan 13, 2013 at 6:07 AM, Mohammad R <khanche...@gmail.com> wrote:
> I do apologize for this question here! where did you download the android
> scource?! Does Android image work on cubieboard well? It doesn't have any
> problem like this problems you said!?
>
> Regards
> --
> You received this message because you are subscribed to the Google Groups
> "Cubieboard" group.
> To unsubscribe from this group, send email to
> cubieboard+...@googlegroups.com.
Rhett Aultman | http://about.me/rhettaultman

MRK

unread,
Jan 25, 2013, 11:35:29 AM1/25/13
to cubie...@googlegroups.com
thank you Rhett!

Stefan Boller

unread,
Mar 25, 2013, 3:06:13 PM3/25/13
to cubie...@googlegroups.com
it seems that the repo from matson-hall was deletet?
i can't repo sync:

https://github.com/matson-hall/manifest.git -b ics-cubieboard 
NOR
https://github.com/cubieboard/manifest.git -b jb-cubieboard

any suggestions?

Rhett Aultman

unread,
Mar 25, 2013, 4:18:36 PM3/25/13
to cubie...@googlegroups.com
I can certainly see the default.xml files on the Github web interface,
and the remotes they point to should still be there. You might want
to delete your .repo directory, redo the repo init step, and then send
your console log to the list.
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Cubieboard" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/cubieboard/hXv1kil9Qg0/unsubscribe?hl=en.
> To unsubscribe from this group and all its topics, send an email to
> For more options, visit https://groups.google.com/groups/opt_out.

Stefan Boller

unread,
Mar 26, 2013, 3:53:55 AM3/26/13
to cubie...@googlegroups.com
i recieve this error message:

fatal: https://github.com/matson-hall/linux-allwinner/info/refs not found: did you run git update-server-info on the server?

Rhett Aultman

unread,
Mar 26, 2013, 4:38:08 AM3/26/13
to cubie...@googlegroups.com
That doesn't appear to be a remote that appears in the default.xml for
the ics-cubieboard branch (though it does appear on the
linux-cubieboard branch). Can you attach the default.xml from your
.repo directory?

Stefan Boller

unread,
Mar 26, 2013, 5:00:26 AM3/26/13
to cubie...@googlegroups.com
Here it is. But i though that there isn´t the problem.
the only intresting in the default.xml file is:
<remote name="matson" fetch="https://github.com/matson-hall" />
isn´t it?


Am Samstag, 3. November 2012 06:37:57 UTC+1 schrieb Gabe Rowe:
default.xml

Rhett Aultman

unread,
Mar 26, 2013, 12:18:07 PM3/26/13
to cubie...@googlegroups.com
I don't know how it's choking on the "linux-allwinner" repo when that
appears nowhere in the manifest file you just sent me. Somehow, your
repo sync is getting the wrong information.

Just to make sure, I started a fresh repo:

repo init -u https://github.com/matson-hall/manifest.git -b ics-cubieboard

And did a repo sync. It's syncing right now with no errors so far.

Regards,
Rhett

Stefan Boller

unread,
Mar 26, 2013, 7:25:04 PM3/26/13
to cubie...@googlegroups.com
but i made a new folder and the typed in:
repo init -u https://github.com/cubieboard/manifest.git -b jb-cubieboard

after that a "repo sync" and thats all.
Do i have to use an specific username or emailadress?

short bevor this error a recive a "type in username and password for github" message.

Rhett Aultman

unread,
Mar 26, 2013, 7:33:37 PM3/26/13
to cubie...@googlegroups.com
So, you and I are using two different URLs in the repo init command.
You're using https://github.com/cubieboard/manifest.git and I am using
https://github.com/matson-hall/manifest.git

Looking in the default.xml for your manifest and branch, I do see a
reference to "linux-allwinner" in the default.xml, and that's your
problem.

So, one choice is to use the repo manifest URL I use.

Another thing you could try, though-- it looks like matson-hall moved
the "linux-allwinner" project to "linux-sunxi", so you could try
changing the reference in the manifest and see if that helps. The
"linux-sunxi" project does have a "jb-cubieboard" branch, so it just
might work.

Regards,
Rhett

Stefan Boller

unread,
Mar 27, 2013, 7:59:45 AM3/27/13
to cubie...@googlegroups.com
it does work. Maybe someone can add this to the tutorial :)

Rhett Aultman

unread,
Mar 27, 2013, 12:20:39 PM3/27/13
to cubie...@googlegroups.com
I have taken the liberty of issuing a pull request to the
cubieboard/manifest.git repo on Github with the necessary change.
Hopefully, they'll integrate it soon.

Thanks for reporting the problem and helping me knuckle through it.
That actually counts as my first pull request issued on Github. :)

Regards,
Rhett

Gabe Rowe

unread,
Mar 27, 2013, 1:19:47 PM3/27/13
to cubie...@googlegroups.com
So these instructions here work correctly then for JB?


Or what is the necessary change you made?

thanks,

Gabe

Rhett Aultman

unread,
Mar 27, 2013, 1:32:19 PM3/27/13
to cubie...@googlegroups.com
I'm thinking that the instructions currently will not work and you
should, if you follow them, get the errors that Stefan reported
(unless they pick up my pull request very quickly).

In that case, you should edit your .repo/manifests/default.xml file
and replace the reference of "linux-allwinner" to "linux-sunxi" and
try the repo sync again.

Regards,
Rhett

Rhett Aultman

unread,
Mar 28, 2013, 12:05:41 PM3/28/13
to cubie...@googlegroups.com
Just leaving this here for help with any future support issues on this
thread. Until the cubieboard/manifest.git repo is fixed up, people
having problems are free to use my manifest instead:

repo init -u https://github.com/roadriverrail/manifest.git -b jb-cubieboard

I'll leave my manifest repo up until my pull request to the cubieboard
repo is handled or until I otherwise catch wind that the cubieboard
manifest is fixed.

Regards,
Rhett

Rhett Aultman

unread,
Mar 31, 2013, 4:41:46 AM3/31/13
to cubie...@googlegroups.com
I just got the email that my changes to the manifest were put in the
main cubieboard repository, so it should work now without changes.

Regards,
Rhett

Jefferson Vitorino

unread,
Jul 1, 2013, 1:17:28 PM7/1/13
to cubie...@googlegroups.com

Can someone help me.
I have the following situation:

$ cd lichee
$. / build.sh-p-k 3.0 sun5i_elite
So apparently it's all right here.

cd .. / android
$ source build / envsetup.sh
$ lunch - Here select Elite-vb-eng, I selected this just to generate a sample image.

Lunch menu... pick a combo:
     1. full-eng
     2. full_x86-eng
     3. vbox_x86-eng
     4. full_stingray-userdebug
     5. full_wingray-userdebug
     6. full_crespo4g-userdebug
     7. full_crespo-userdebug
     8. full_maguro-userdebug
     9. full_toro-userdebug
     10. full_tuna-userdebug
     11. apollo_mele-eng
     12. apollo_tvdevb-eng
     13. crane_evb_v12r-eng
     14. crane_evb-eng
     15. crane_m1003h6-eng
     16. elite_evb_mmc-eng
     17. elite_evb-eng
     18. elite_nm307_v11-eng
     19. elite_nm307-eng
     20. elite_standard-eng
     21. elite_xwi8-eng
     22. nuclear_12_evb-eng
     23. nuclear_evb-eng
     24. full_panda-eng

Which would you like? [full-eng] 17
find: `device/softwinner/apollo-mele/apk': No such file or directory
find: `device/softwinner/apollo-tvdevb/apk': No such file or directory
find: `device/softwinner/elite-evb/apk': No such file or directory
find: `device/softwinner/elite-evb_mmc/apk': No such file or directory
find: `device/softwinner/elite-evb_mmc/modules/modules': No such file or directory
find: `device/softwinner/elite-nm307-v11/apk': No such file or directory
find: `device/softwinner/elite-standard/apk': No such file or directory
find: `device/softwinner/elite-xwi8/apk': No such file or directory

find: `device/softwinner/apollo-mele/apk': No such file or directory
find: `device/softwinner/apollo-tvdevb/apk': No such file or directory
find: `device/softwinner/elite-evb/apk': No such file or directory
find: `device/softwinner/elite-evb_mmc/apk': No such file or directory
find: `device/softwinner/elite-evb_mmc/modules/modules': No such file or directory
find: `device/softwinner/elite-nm307-v11/apk': No such file or directory
find: `device/softwinner/elite-standard/apk': No such file or directory
find: `device/softwinner/elite-xwi8/apk': No such file or directory
find: `device/softwinner/apollo-mele/apk': No such file or directory
find: `device/softwinner/apollo-tvdevb/apk': No such file or directory
find: `device/softwinner/elite-evb/apk': No such file or directory
find: `device/softwinner/elite-evb_mmc/apk': No such file or directory
find: `device/softwinner/elite-evb_mmc/modules/modules': No such file or directory
find: `device/softwinner/elite-nm307-v11/apk': No such file or directory
find: `device/softwinner/elite-standard/apk': No such file or directory
find: `device/softwinner/elite-xwi8/apk': No such file or directory
find: `device/softwinner/apollo-mele/apk': No such file or directory
find: `device/softwinner/apollo-tvdevb/apk': No such file or directory
find: `device/softwinner/elite-evb/apk': No such file or directory
find: `device/softwinner/elite-evb_mmc/apk': No such file or directory
find: `device/softwinner/elite-evb_mmc/modules/modules': No such file or directory
find: `device/softwinner/elite-nm307-v11/apk': No such file or directory
find: `device/softwinner/elite-standard/apk': No such file or directory
find: `device/softwinner/elite-xwi8/apk': No such file or directory
find: `device/softwinner/apollo-mele/apk': No such file or directory
find: `device/softwinner/apollo-tvdevb/apk': No such file or directory
find: `device/softwinner/elite-evb/apk': No such file or directory
find: `device/softwinner/elite-evb_mmc/apk': No such file or directory
find: `device/softwinner/elite-evb_mmc/modules/modules': No such file or directory
find: `device/softwinner/elite-nm307-v11/apk': No such file or directory
find: `device/softwinner/elite-standard/apk': No such file or directory
find: `device/softwinner/elite-xwi8/apk': No such file or directory
find: `device/softwinner/apollo-mele/apk': No such file or directory
find: `device/softwinner/apollo-tvdevb/apk': No such file or directory
find: `device/softwinner/elite-evb/apk': No such file or directory
find: `device/softwinner/elite-evb_mmc/apk': No such file or directory
find: `device/softwinner/elite-evb_mmc/modules/modules': No such file or directory
find: `device/softwinner/elite-nm307-v11/apk': No such file or directory
find: `device/softwinner/elite-standard/apk': No such file or directory
find: `device/softwinner/elite-xwi8/apk': No such file or directory
find: `device/softwinner/apollo-mele/apk': No such file or directory
find: `device/softwinner/apollo-tvdevb/apk': No such file or directory
find: `device/softwinner/elite-evb/apk': No such file or directory
find: `device/softwinner/elite-evb_mmc/apk': No such file or directory
find: `device/softwinner/elite-evb_mmc/modules/modules': No such file or directory
find: `device/softwinner/elite-nm307-v11/apk': No such file or directory
find: `device/softwinner/elite-standard/apk': No such file or directory
find: `device/softwinner/elite-xwi8/apk': No such file or directory
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.0.4
TARGET_PRODUCT=elite_evb
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_BUILD_TYPE=release
BUILD_ID=IMM76D


$extract-bsp

cp: cannot stat `/home/developer/A10s/android/../lichee/out/android/bImage': No such file or directory
/home/developer/A10s/android/device/*/elite-evb/bImage copied!
cp: cannot stat `/home/developer/A10s/android/../lichee/out/android/lib/modules/*/*': No such file or directory
/home/developer/A10s/android/device/*/elite-evb/modules copied!
chmod: cannot access `modules/modules/*': No such file or directory.

$ Make-j8

$ pack

$pack
cp: cannot stat `/home/developer/A10s/android/out/target/product/elite-evb/syste                              m/build.prop': No such file or directory
cp: cannot stat `/home/developer/A10s/android/out/target/product/elite-evb/syste                              m/media/bootanimation.zip': No such file or directory
cp: cannot stat `/home/developer/A10s/android/out/target/product/elite-evb/syste                              m/usr/keylayout/*.kl': No such file or directory
android modify tools files sun5i copied!
!!!Packing for crane!!!
./pack: line 117: cd: ../../out: No such file or directory
`chips/sun5i/configs/android/default/env.cfg' -> `out/env.cfg'
`chips/sun5i/configs/android/default/image.cfg' -> `out/image.cfg'
`chips/sun5i/configs/android/elite-evb/stamp.fex' -> `out/stamp.fex'
`chips/sun5i/configs/android/elite-evb/sys_config1.fex' -> `out/sys_config1.fex'
`chips/sun5i/configs/android/elite-evb/sys_config.fex' -> `out/sys_config.fex'
cp: will not create hard link `out/wboot/bootfs' to directory `out/bootfs'
cp: cannot stat `/home/developer/A10s/lichee/tools/pack/android/u-boot.bin': No                               such file or directory
argc = 2
input name sys_config.fex
Script 1 source file Path=/home/developer/A10s/lichee/tools/pack/out/sys_config.                              fex
Script 1 bin file Path=/home/developer/A10s/lichee/tools/pack/out/sys_config.bin
parser 1 file ok
argc = 2
input name sys_config1.fex
Script 1 source file Path=/home/developer/A10s/lichee/tools/pack/out/sys_config1                              .fex
Script 1 bin file Path=/home/developer/A10s/lichee/tools/pack/out/sys_config1.bi                              n
parser 1 file ok

update source file Path=/home/developer/A10s/lichee/tools/pack/out/sys_config1.b                              in
boot0 file Path=/home/developer/A10s/lichee/tools/pack/out/boot0.bin
boot1 file Path=/home/developer/A10s/lichee/tools/pack/out/boot1.bin

update ok

update source file Path=/home/developer/A10s/lichee/tools/pack/out/sys_config1.b                              in
boot0 file Path=/home/developer/A10s/lichee/tools/pack/out/card_boot0.fex
boot1 file Path=/home/developer/A10s/lichee/tools/pack/out/card_boot1.fex

update ok

source file Path=/home/developer/A10s/lichee/tools/pack/out/boot1.bin
script file Path=/home/developer/A10s/lichee/tools/pack/out/sys_config1.bin

script update ok
mbr count = 4
mbr size  = 16777216
download map file = /home/developer/A10s/lichee/tools/pack/out/dlinfo.fex

partitation file Path=/home/developer/A10s/lichee/tools/pack/out/sys_config.bin
mbr_name file Path=/home/developer/A10s/lichee/tools/pack/out/mbr.fex
download_name file Path=/home/developer/A10s/lichee/tools/pack/out/dlinfo.fex

update mbr: partcount = 11
update mbr file ok
fail:/home/developer/A10s/lichee/tools/pack/out/bootfs/vendor/system/usr/keylayo                              ut 0
fail:/home/developer/A10s/lichee/tools/pack/out/bootfs/vendor/system/usr 0
fail:/home/developer/A10s/lichee/tools/pack/out/bootfs/vendor/system 0
fail:/home/developer/A10s/lichee/tools/pack/out/bootfs/vendor 0
disk : c
CopyRootToFS(/home/developer/A10s/lichee/tools/pack/out/bootfs)

c:\sprite

c:\os_show

c:\linux

c:\vendor

c:\vendor\system

c:\vendor\system\usr

c:\vendor\system\usr\keylayout

c:\vendor\system\media
c:\magic.bin
find magic !!
RealLen=0x585C00
CPlugin Free lib
CPlugin Free lib
FileLength=585c00 FileSizeHigh=0
FileLength=20000 FileSizeHigh=0
 CreateFile failed 2
 CreateFile failed 2
 CreateFile failed 2
/home/developer/A10s/lichee/tools/pack/pctools/linux/eDragonEx//home/developer/A                              10s/lichee/tools/pack/outFile boot.fex Not ExistBuildImg 360
Dragon execute image.cfg Failed ! 360
CPlugin Free lib
CPlugin Free lib
/home/developer/A10s/android

Rhett Aultman

unread,
Jul 1, 2013, 1:21:00 PM7/1/13
to cubie...@googlegroups.com

Try the crane images.  Those are the only I have ever worked on.

--
You received this message because you are subscribed to a topic in the Google Groups "Cubieboard" group.

To unsubscribe from this group and all its topics, send an email to cubieboard+...@googlegroups.com.

Jefferson Vitorino

unread,
Jul 1, 2013, 1:47:20 PM7/1/13
to cubie...@googlegroups.com
thank you, for the prompt return

For Cubieboard I can generate the image.
With this device can not generate the image.



Rhett Aultman

unread,
Jul 1, 2013, 3:11:29 PM7/1/13
to cubie...@googlegroups.com
I can't vouch for a given build target working (I'm not even familiar
with those particular branches). The "no such file or directory"
issues are easy for you to follow up with; what directory tree are you
missing? You can do a "find . -name "*.mk" | grep elite_evb" to find
the file declaring that build target. You can work backwards from
what directory that file is in to figure out how the different modules
and their directories have been declared.

In general, it looks like you're missing a lot in your source repo.
"lunch" shouldn't return that many "not found" errors. Also "make
-j8" should have a ton of output, and since extract-bsp couldn't find
a bImage, I question that anything actually made in your make step

Regards,
Rhett
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Cubieboard" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/cubieboard/hXv1kil9Qg0/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> cubieboard+...@googlegroups.com.
> Visit this group at http://groups.google.com/group/cubieboard.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



Jefferson Vitorino

unread,
Jul 2, 2013, 9:45:46 AM7/2/13
to cubie...@googlegroups.com


Thank you I will follow this guidance.

Gabe Rowe

unread,
Jul 2, 2013, 10:38:15 AM7/2/13
to cubie...@googlegroups.com
As one test, you could follow the instructions I posted a while ago..I confirmed that you can build from source and then flash to the cubieboard.


The page was overwritten with newer instructions that includes using ubuntu 12.10--so I'm pointing to the older instructions I put up that work and I think are pretty easy to follow.

To setup your build toolchain:

Using the virtual machine is a good idea because having multiple build environments setup you after a while have some major disaster and you cannot figure out if you have the wrong version of java installed or something strange happening. So its good to create a fresh install of ubuntu, then make a list of all the commands that you run to get it to a good state. Then once it works, create a fresh blank virtual machine, and just run the commands--after it redownloads all files and reruns the commands you should have a full toolchain working from source code to flashing the device. Then you know you can always recover to a good working state. 

-Gabe

Jefferson Vitorino

unread,
Jul 2, 2013, 12:55:08 PM7/2/13
to cubie...@googlegroups.com
 I can generate the image to the device Cubieboard.
Now I'm with another device Olimex A10s.
I did not have the source code for the device A10s. Now I have but the method for generating the image is different.
Do I have the possibility to generate the image to the device A10s from the source code of Cubieboard by changing some files.?
Reply all
Reply to author
Forward
Message has been deleted
0 new messages