building android image...where is the problem?

Started by carlos61, January 26, 2013, 12:20:22 AM

Previous topic - Next topic

carlos61

Hi, I try to build the android image using the instructions given by the topic "Build Android Image - need help" on January 06, 2013.

I install on HP PC, with a AMD Athlon II (3.2GHz) and 2GB RAM, a Ubuntu 10.04 for AMD64bit. Then I install the Java JDK 1.6.0_38 and I set the path environment to point the /bin dircetory.

At this point I run in the Terminal with superuser access the apt-get install ... (all OK, downloads, updates and others).

I unpack the A13.tar.gz, with the gunzip, finally I extract all the files using the tar -xf a13.tar.

I move all to the /exdroid/ directory, then I run the command "build.sh -p a13_nuclear -k 3.0" from the /exdroid/lichee directory. Wow! ten minutes of hard working with tens of warnings!!! it is normal? ???

I change the working directory to /exdroid/android4.0 and I type the command "source build/envsetup.sh", then I type the command "lunch" and I select the nuclear_evb-eng option, and finally I run the "extract-bsp". All is OK and no errors or warnings present.

At this point I run the "make -i -j8" command, and I wait about two hours the end of this hard process...nothing to do! hundreds and hundreds of warning messages, then the computer seems to be locked, the mouse cursor is locked and the harddisk is working such a swap memory. Why? what happens?

To end this process I type a ^C twice...I try more times and the result is the same. :'(

Maybe I have to install Windows CE into olinuxino? :o

Regards,
Carlos

jwischka

Android takes a LONG time to build, especially with only 2GB of ram - there are reports of ICS taking 25+ minutes to build on a machine with 24GB of ram, so I wouldn't be surprised if a) you aren't giving it enough time, and b) don't have anywhere near enough memory to complete the build in a reasonable amount of time.

Quote from: carlos61 on January 26, 2013, 12:20:22 AM
Hi, I try to build the android image using the instructions given by the topic "Build Android Image - need help" on January 06, 2013.

I install on HP PC, with a AMD Athlon II (3.2GHz) and 2GB RAM, a Ubuntu 10.04 for AMD64bit. Then I install the Java JDK 1.6.0_38 and I set the path environment to point the /bin dircetory.

At this point I run in the Terminal with superuser access the apt-get install ... (all OK, downloads, updates and others).

I unpack the A13.tar.gz, with the gunzip, finally I extract all the files using the tar -xf a13.tar.

I move all to the /exdroid/ directory, then I run the command "build.sh -p a13_nuclear -k 3.0" from the /exdroid/lichee directory. Wow! ten minutes of hard working with tens of warnings!!! it is normal? ???

I change the working directory to /exdroid/android4.0 and I type the command "source build/envsetup.sh", then I type the command "lunch" and I select the nuclear_evb-eng option, and finally I run the "extract-bsp". All is OK and no errors or warnings present.

At this point I run the "make -i -j8" command, and I wait about two hours the end of this hard process...nothing to do! hundreds and hundreds of warning messages, then the computer seems to be locked, the mouse cursor is locked and the harddisk is working such a swap memory. Why? what happens?

To end this process I type a ^C twice...I try more times and the result is the same. :'(

Maybe I have to install Windows CE into olinuxino? :o

Regards,
Carlos

Bernd

Just for getting Android, you can also use the pre-built images:

https://www.olimex.com/wiki/A13-OLinuXino#A13-SDK_Android_4.0.3_ICS

This should be somewhat faster. :)

olimex

we never succeed to build Android on Ubuntu as it doesn't support properly Java development kit
so after you build the kernel you will be stuck with Java on Ubuntu
The Android images in the wiki were buit using Debian 64 bit

carlos61

Ok, now is clear. I need to install a very large RAM, then I try to make Android with an Debian 64 bit OS.
Many thanks for the explanations. ;D

murerten

I can build on my laptop with Ubuntu 12.04 64 bit and 8GB ram, 50 GB empty space. Look at the first post for instructions.
https://www.olimex.com/forum/index.php?topic=57.0

carlos61

Thank you murerten for the instructions.

I try again installing Debian 6.0.6 (64 bit)

I download the Java jdk1.6.0_38 and install it:

$ chmod u+x jdk-6u38-linux-x64.bin
$ ./jdk-6u38-linux-x64.bin
$ sudo mkdir -p /usr/lib/jvm
$ sudo mv jdk1.6.0_38 /usr/lib/jvm/
$ sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.6.0_38/bin/java" 1
$ sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.6.0_38/bin/javac" 1
$ sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jre1.6.0_38/bin/javaws" 1

$ sudo update-alternatives --config java
$ sudo update-alternatives --config javac
$ sudo update-alternatives --config javaws

I add to PATH in /etc/environment the string:
/usr/lib/jvm/jdk1.6.0_38/bin

then I download gcc4.4 and others doing:

  sudo apt-get install git-core gnupg flex bison gperf build-essential
  sudo apt-get install zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs
  sudo apt-get install x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev
  sudo apt-get install libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown
  sudo apt-get install libxml2-utils xsltproc uboot-mkimage
  sudo apt-get install gcc-4.4 g++-4.4 g++-4.4-multilib

I unpack the a13.tar.gz:

  gunzip a13.tar.gz
  tar -xf a13.tar

I create the /exdroid directory and I move all the a13 contents into it (lichee and android4.0), then:

  cd /exdroid/lichee
  ./build.sh -p a13_nuclear -k 3.0 > build_log.txt

and I trap all "warnings" into a file: buil_error_log.txt

There is normal to have few warnings? I think that there is an incompatible compiler (too older or newer), or simply I'm doing something wrong.

I don't attach the files because I don't know if it is possible, but there is all warnings:
(in any case the process is terminated with a: "compile success")

arch/arm/kernel/return_address.c:62:2: warning: #warning "TODO: return_address should use unwind tables"
arch/arm/kernel/return_address.c:62:2: warning: #warning "TODO: return_address should use unwind tables"
arch/arm/mm/alignment.c: In function 'do_alignment':
arch/arm/mm/alignment.c:720:21: warning: 'offset.un' may be used uninitialized in this function
arch/arm/kernel/head.S:85:2: warning: #warning "chip id: 1125"
kernel/async.c: In function 'async_synchronize_cookie_domain':
kernel/async.c:270:10: warning: 'starttime.tv64' may be used uninitialized in this function
kernel/async.c: In function 'async_run_entry_fn':
kernel/async.c:122:10: warning: 'calltime.tv64' may be used uninitialized in this function
kernel/power/console.c:16:12: warning: 'orig_fgconsole' defined but not used
kernel/power/console.c:16:28: warning: 'orig_kmsg' defined but not used
net/ipv4/tcp.c: In function 'tcp_nuke_addr':
net/ipv4/tcp.c:3355:18: warning: 'in' may be used uninitialized in this function
net/ipv4/tcp.c:3357:19: warning: 'in6' may be used uninitialized in this function
drivers/media/video/sun5i_csi/csi0/sun5i_drv_csi.c: In function 'csi_clk_get':
drivers/media/video/sun5i_csi/csi0/sun5i_drv_csi.c:312:6: warning: unused variable 'ret'
net/netfilter/xt_qtaguid.c: In function 'account_for_uid':
net/netfilter/xt_qtaguid.c:1268:19: warning: 'new_tag_stat' may be used uninitialized in this function
drivers/misc/sunxi-dbgreg.c: In function 'sunxi_reg_init':
drivers/misc/sunxi-dbgreg.c:142:20: warning: ignoring return value of 'sysfs_create_group', declared with attribute warn_unused_result
drivers/mmc/core/sdio_irq.c:201:13: warning: 'sdio_single_irq_set' defined but not used
drivers/power/axp_power/axp20-regu.c:187:2: warning: initialization from incompatible pointer type
drivers/power/axp_power/axp20-regu.c:199:2: warning: initialization from incompatible pointer type
drivers/power/axp_power/axp20-regu.c:242:2: warning: initialization from incompatible pointer type
drivers/power/axp_power/axp-sply.h:409:16: warning: 'coulomb_flag' defined but not used
drivers/power/axp_power/axp-sply.h:411:12: warning: 'Total_Cap' defined but not used
drivers/power/axp_power/axp-sply.h:412:12: warning: 'Cap_Index' defined but not used
drivers/power/axp_power/axp-sply.h:414:12: warning: 'Bat_Cap_Buffer' defined but not used
drivers/power/axp_power/axp-sply.h:415:12: warning: 'counter' defined but not used
drivers/rtc/alarm.c:531:2: warning: initialization from incompatible pointer type
In file included from drivers/usb/host/ehci-hcd.c:124:0:
drivers/usb/host/ehci.h:746:20: warning: function declaration isn't a prototype
drivers/net/wireless/rtxx7x/os/linux/usb_main_dev.c: In function 'rt2870_suspend':
drivers/net/wireless/rtxx7x/os/linux/usb_main_dev.c:450:2: warning: ISO C90 forbids mixed declarations and code
WARNING: modpost: Found 3 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
arm-none-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
Makefile:42: /exdroid/lichee/linux-3.0/modules/mali/DX910-SW-99002-r2p4-02rel0/src/devicedrv/ump/Module.symvers
Makefile:57: Found LINUXVER=3.0.8
Makefile:58: Found LINUXDIR=/exdroid/lichee/linux-3.0
Makefile:57: Found LINUXVER=3.0.8
Makefile:58: Found LINUXDIR=/exdroid/lichee/linux-3.0
/exdroid/lichee/linux-3.0/modules/wifi/usi-bcm4329/v4.218.248.15/open-src/src/dhd/linux/../../dhd/linux/Makefile:57: Found LINUXVER=3.0.8
/exdroid/lichee/linux-3.0/modules/wifi/usi-bcm4329/v4.218.248.15/open-src/src/dhd/linux/../../dhd/linux/Makefile:58: Found LINUXDIR=/exdroid/lichee/linux-3.0
bootm.c: In function 'do_boota_linux':
bootm.c:213:2: warning: implicit declaration of function 'NAND_Exit'
bootm.c:217:2: warning: implicit declaration of function 'sr32'
board.c: In function 'reset_cpu':
board.c:148:2: warning: implicit declaration of function 'sunxi_nand_flush_opts'
board.c:149:2: warning: implicit declaration of function 'sunxi_reset'
key.c: In function 'sunxi_key_init':
key.c:37:2: warning: passing argument 1 of 'sr32' makes integer from pointer without a cast
/exdroid/lichee/u-boot/include/asm/arch/sys_proto.h:28:6: note: expected 'u32' but argument is of type 'u32 *'
key.c:38:2: warning: passing argument 1 of 'sr32' makes integer from pointer without a cast
/exdroid/lichee/u-boot/include/asm/arch/sys_proto.h:28:6: note: expected 'u32' but argument is of type 'u32 *'
key.c:39:2: warning: passing argument 1 of 'sr32' makes integer from pointer without a cast
/exdroid/lichee/u-boot/include/asm/arch/sys_proto.h:28:6: note: expected 'u32' but argument is of type 'u32 *'
key.c:40:2: warning: passing argument 1 of 'sr32' makes integer from pointer without a cast
/exdroid/lichee/u-boot/include/asm/arch/sys_proto.h:28:6: note: expected 'u32' but argument is of type 'u32 *'
key.c:41:2: warning: passing argument 1 of 'sr32' makes integer from pointer without a cast
/exdroid/lichee/u-boot/include/asm/arch/sys_proto.h:28:6: note: expected 'u32' but argument is of type 'u32 *'
sunxi_dma.c: In function 'DMA_Setting':
sunxi_dma.c:163:9: warning: dereferencing type-punned pointer will break strict-aliasing rules
sunxi_dma.c:186:9: warning: dereferencing type-punned pointer will break strict-aliasing rules
cmd_fastboot.c: In function 'save_block_values':
cmd_fastboot.c:195:3: warning: zero-length gnu_printf format string
cmd_fastboot.c:199:3: warning: zero-length gnu_printf format string
cmd_fastboot.c: In function 'write_to_ptn':
cmd_fastboot.c:576:7: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'unsigned char *'
cmd_fastboot.c:638:7: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'unsigned char *'
cmd_fastboot.c:671:4: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'unsigned char *'
cmd_fastboot.c: In function 'rx_handler':
cmd_fastboot.c:763:5: warning: passing argument 1 of 'memset' discards qualifiers from pointer target type
/exdroid/lichee/u-boot/include/linux/string.h:67:15: note: expected 'void *' but argument is of type 'const unsigned char *'
cmd_fastboot.c:882:6: warning: too many arguments for format
cmd_fastboot.c:1088:5: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'struct image_header_t *'
cmd_fastboot.c:1398:7: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'unsigned char *'
cmd_fastboot.c: At top level:
cmd_fastboot.c:1741:1: warning: initialization from incompatible pointer type
cmd_mem.c: In function 'do_mem_mtest':
cmd_mem.c:665:3: warning: suggest parentheses around '+' inside '<<'
cmd_nand.c: In function 'get_part':
cmd_nand.c:173:2: warning: implicit declaration of function 'sunxi_nand_getpart_info_byname'
cmd_nand.c: In function 'do_nand':
cmd_nand.c:575:3: warning: implicit declaration of function 'sunxi_nand_erase_opts'
cmd_nand.c:621:5: warning: implicit declaration of function 'sunxi_nand_read_opts'
cmd_nand.c:625:5: warning: implicit declaration of function 'sunxi_nand_write_opts'
nand.c: In function 'nand_init_chip':
nand.c:75:3: warning: implicit declaration of function 'NAND_GetDiskSize'
env_nand_sunxi.c: In function 'env_relocate_spec':
env_nand_sunxi.c:60:2: warning: implicit declaration of function 'sunxi_nand_getpart_offset_byname'
env_nand_sunxi.c:65:2: warning: implicit declaration of function 'sunxi_nand_getpart_size_byname'
env_nand_sunxi.c:72:2: warning: pointer targets in passing argument 4 of 'sunxi_nand_read_opts' differ in signedness
env_nand_sunxi.c:44:12: note: expected 'u_char *' but argument is of type 'char *'
fat_write.c: In function 'do_fat_write':
fat_write.c:1153:3: warning: implicit declaration of function 'LML_FlushPageCache'
nand_drv/nand_for_uboot.c: In function 'nand_init_uboot':
nand_drv/nand_for_uboot.c:122:27: warning: assignment from incompatible pointer type
nand_drv/nand_fspart.c: In function 'sunxi_nand_getpart_offset_byname':
nand_drv/nand_fspart.c:113:3: warning: pointer targets in passing argument 2 of 'strcmp' differ in signedness
/exdroid/lichee/u-boot/include/linux/string.h:36:12: note: expected 'const char *' but argument is of type 'unsigned char *'
nand_drv/nand_fspart.c: In function 'sunxi_nand_getpart_size_byname':
nand_drv/nand_fspart.c:129:3: warning: pointer targets in passing argument 2 of 'strcmp' differ in signedness
/exdroid/lichee/u-boot/include/linux/string.h:36:12: note: expected 'const char *' but argument is of type 'unsigned char *'
src/format/nand_format.c: In function '_SearchZoneTbls':
src/format/nand_format.c:2226:34: warning: implicit declaration of function 'malloc'
src/format/nand_format.c:2240:13: warning: implicit declaration of function 'free'
src/logic/logic_cache.c: In function 'NAND_CacheOpen':
src/logic/logic_cache.c:391:3: warning: implicit declaration of function 'malloc'
src/logic/logic_cache.c: In function 'NAND_CacheClose':
src/logic/logic_cache.c:413:3: warning: implicit declaration of function 'free'
src/logic/logic_ctl.c: In function 'LML_Init':
src/logic/logic_ctl.c:1364:5: warning: implicit declaration of function 'malloc'
src/logic/logic_ctl.c: In function 'LML_Exit':
src/logic/logic_ctl.c:1425:5: warning: implicit declaration of function 'free'
src/logic/mapping.c: In function 'PMM_InitMapTblCache':
src/logic/mapping.c:99:9: warning: implicit declaration of function 'malloc'
src/logic/mapping.c: In function 'PMM_ExitMapTblCache':
src/logic/mapping.c:154:9: warning: implicit declaration of function 'free'
src/physic/nand_phy.c: In function 'PHY_FreePageCheck':
src/physic/nand_phy.c:1205:2: warning: implicit declaration of function 'malloc'
src/physic/nand_phy.c:1221:2: warning: implicit declaration of function 'free'
src/physic/nand_simple_r.c: In function 'PHY_ChangeMode':
src/physic/nand_simple_r.c:584:3: warning: implicit declaration of function 'malloc'
src/physic/nand_simple_r.c: In function 'PHY_Exit':
src/physic/nand_simple_r.c:635:3: warning: implicit declaration of function 'free'
src/scan/nand_scan.c: In function 'NAND_SetValidBlkRatio':
src/scan/nand_scan.c:62:5: warning: implicit declaration of function 'OSAL_IrqLock'
src/scan/nand_scan.c:64:5: warning: implicit declaration of function 'OSAL_IrqUnLock'
a13-evb.c:76:5: warning: function declaration isn't a prototype

Please be patient with me,
Many thanks,
Carlos
 




JohnS

I expect someone here will help if they are able and willing to help but maybe you'd do better on an Android forum / list.

murerten

Quote from: carlos61 on January 27, 2013, 03:42:18 PM

Please be patient with me,
Many thanks,
Carlos


No problem. I have those warnings too but it works.

jwischka

Quote from: carlos61 on January 27, 2013, 03:42:18 PM
I create the /exdroid directory and I move all the a13 contents into it (lichee and android4.0), then:

  cd /exdroid/lichee
  ./build.sh -p a13_nuclear -k 3.0 > build_log.txt

and I trap all "warnings" into a file: buil_error_log.txt

There is normal to have few warnings? I think that there is an incompatible compiler (too older or newer), or simply I'm doing something wrong.

Yeah, warnings happen. Generally they aren't a big deal. What you don't want are errors. In general, you'll have some warnings, even with code that compiles and functions properly. If you have errors, though, the code won't compile at all.

carlos61

Hello, finally I upgrade my PC to 10GB of RAM and I try to continue the work:

#cd ../android4.0
#source build/envsetup.sh
#lunch     (nuclear_evb-eng option)

and finally

#make CC=gcc-4.4 CXX=g++-4.4 -j4

after two hours the work had finished...then

#pack

Ok, the "sun5i_android_a13-evb.img" exist!!!

I try to put it into my A13 WiFi board, using the LiveSuit for Linux, but unsuccessfully: "the image is not valid". I try again with XP using LiveSuit v1.05 but nothing because can't recognise the device. Last chance, I try with LiveSuit 1.09 and finally its run OK. :D

I turn off and on the A13 board, XP says "new device Android"...ok, I install the Android USB drivers but... I don't see nothing in my VGA display. :-\ I think that the output is onto LCD connector. ::)

What should I change in the file "sys_config1.fex" to enable the VGA instead the LCD?

Please help me, thanks x1000.
Carlos

murerten

Look at the A13-OLINUXINO.pdf (the manual).

https://www.olimex.com/Products/OLinuXino/A13/A13-OLinuXino/resources/A13-OLINUXINO.pdf

You have to put the right script.bin to your device. It is explained and links given in the manual.

carlos61

Thank you murerten, I donwload the "A13_config_600x800.fex_ok" and I modify the sys_config1.fex, then:

#cd /exdroid/android4.0
#source build/envsetup.sh
#lunch (with option 6)
#pack

Now the VGA display runs OK!!! ;D
Carlos