Error building Android ramdisk on 32-bit system

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Error building Android ramdisk on 32-bit system

1,541 Views
NathanJozwiak
Contributor III

Hi all,

 

I am trying to bring-up Android on the i.MX53 QSB and am having an issue building the ramdisk. I downloaded the board support package from the Adeneo website and have followed the instructions in the "Adeneo_i.MX53QSB_Android_Gingerbread_User_Guide_v4.0.doc", but when building the ramdisk, I am receiving the following error:

 

[njozwiak@calvin scripts]$ ./build_android.sh imx53_qsb android

################################################

Building:  BUILD_UBOOT=0 

BUILD_KERNEL=0 

BUILD_ANDROID=1

Using: 

CPUS=4 

CPUS_ANDROID=1

################################################

============================================

PLATFORM_VERSION_CODENAME=REL

PLATFORM_VERSION=2.3.3

TARGET_PRODUCT=imx53_loco

TARGET_BUILD_VARIANT=eng

TARGET_SIMULATOR=

TARGET_BUILD_TYPE=release

TARGET_BUILD_APPS=

TARGET_ARCH=arm

HOST_ARCH=x86

HOST_OS=linux

HOST_BUILD_TYPE=release

BUILD_ID=GRI40

============================================

Checking build tools versions...build/core/main.mk:76:

************************************************************

build/core/main.mk:77: You are attempting to build on a 32-bit system.

build/core/main.mk:78: Only 64-bit build environments are supported beyond froyo/2.2.build/core/main.mk:79:

************************************************************

build/core/main.mk:80: *** stop.  Stop./opt/freescale/imx53/adeneo-bsp/android-gingerbread

mkimage: Can't open ./ramdisk.img: No such file or directory

[njozwiak@calvin scripts]$

 

I do not receive any errors building U-Boot or the kernel, just Android. The Adeneo user guide warns of using 32-bit machines to build, but provides a patch (that I ran) to allow for it:

"By default, the Gingerbread build-system now requires a 64-bit machine. The sources can be patched to build Android on 32-bit machines. Only run this command if this is the case for you (tested on Ubuntu 10.10):

$ ./fix_android.sh"

 

Has anyone else experienced this behavior working on a 32-bit system before? Any insight would be appreciated. My system information is below.

 

Thanks,
Nate 

 

Fedora 15

[njozwiak@calvin scripts]$ uname -a

Linux calvin 2.6.38.6-27.fc15.i686 #1 SMP Sun May 15 17:57:13 UTC 2011 i686 i686 i386 GNU/Linux

Labels (1)
0 Kudos
6 Replies

1,236 Views
UlfPalmacr
Contributor I

Hi,

I successfully built Gingerbread (i.MX53-QSB-Android-Gingerbread-Release4.1) from source on 32-bit ubuntu 11.10.

The built code runs fine on i.MX53 QSB

However, it is not enough to run the provided patch for 32-bit, fix_android_32bit.sh

For me there were 2 build errors.

Fortunately the solution could be googled,

See: http://e-xiao.blogspot.com/2011/10/resolve-build-errors-for-android-234.html

#1: In frameworks/base/libs/utils/Android.mk
Change the line:
LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS)
To:
LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) –fpermissive

#2:In build/core/combo/HOST_linux-x86.mk ,line 61 as following.
-HOST_GLOBAL_CFLAGS += -D_FORTIFY_SOURCE=0
+HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0

Regards,

Ulf Palmér

0 Kudos

1,236 Views
NathanJozwiak
Contributor III

Thanks for your input guys. Remi, it looks like your last message got cut off, but instead of trying to get this working I am just going to move to a 64-bit environment. 

 

Thanks again for your help.

0 Kudos

1,236 Views
rlorriaux
Contributor I

Nathan,

I have not seen this error during my test builds. The patch should apply correctly so I suggest you start from scratch to make sure we are on the same page.

 

Tak,

The patch that builds Gingerbread on Ubuntu 10.10 32bit is more of a hack than anything (it does not work on another 10.04). It clearly is not meant to be supported in the long term.

0 Kudos

1,236 Views
TakAsami
Contributor I

Hi Remi:

I do understand that Android development went to 64-bit after froyo (android 2.2). To build ginberbread and beyond require 64-bit system, and I mean the host. Not the target. The key issue here is that supplied library modules are formatted 64-bit and incompatible with the 32-bit gcc linker. Nothing you can do at source level. So you have a choice of focusing on froyo (which I am doing for the time being), or upgrade your development host to 64-bit (and running 64-bit Ubantu or something).

Your patch_android_sh log, while looks like problem, is pretty similar to what I got. They are OK, I think,. You just needed to move down to froyo (adeneo release 9.4, I think).

Take care, 

Tak

0 Kudos

1,236 Views
NathanJozwiak
Contributor III

Hi Remi,

Thanks for the response. I tried executing 'patch_android.sh' before 'fix_android.sh' and got the following:

...
warning: squelched 20 whitespace errors
warning: 25 lines add whitespace errors.
error: include/asm-arm/arch: already exists in working directory
Error! Fail to apply patch from /opt/freescale/imx53/adeneo-bsp/android-r10.2/install/imx-android-r10.2/code/r10.2/platform/bootable/bootloader/uboot-imx.git to /opt/freescale/imx53/adeneo-bsp/android-r10.2/src/bootable/bootloader/uboot-imx. Stop
[njozwiak@calvin scripts]$ ./fix_android.sh
[njozwiak@calvin scripts]$ ./build_android.sh imx53_qsb android
################################################
Building: BUILD_UBOOT=0 BUILD_KERNEL=0 BUILD_ANDROID=1
Using:
CPUS=4 CPUS_ANDROID=1
################################################
build/core/product_config.mk:203: *** No matches for product "imx53_loco". Stop.
/opt/freescale/imx53/adeneo-bsp/android-r10.2
mkimage: Can't open ./ramdisk.img: No such file or directory
[njozwiak@calvin scripts]$

 

// I know I got the error in the patch_android.sh script. I just continued executing the fix and the build after for the results to post here. 

Remi Lorriaux said:

You actually want to use fix_android.sh after ./patch_android.sh because applying the latter actually reverts the android sources back to 64 bit. You do not need to reinstall the whole thing, just run fix_android.sh.

I will update the release notes in the next releases to fix that. Thanks for your feedback.

0 Kudos

1,236 Views
rlorriaux
Contributor I

You actually want to use fix_android.sh after ./patch_android.sh because applying the latter actually reverts the android sources back to 64 bit. You do not need to reinstall the whole thing, just run fix_android.sh.

I will update the release notes in the next releases to fix that. Thanks for your feedback.

0 Kudos