三、開始編譯,一般機(jī)器采用eeepc的模式編譯。
$ cd android2.1
$ make iso_img TARGET_PRODUCT=eeepc
iso_img為打包為ISO鏡像,如果想打包為USB鏡像的話可以采用:
$ cd android2.1
$ make usb_img TARGET_PRODUCT=eeepc
錯誤修正:在編譯的過程中碰到了幾處錯誤,修改方法如下:
錯誤1、錯誤提示:
host Executable: aapt (out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/aapt)
/usr/bin/ld: out/host/linux-x86/obj/STATIC_LIBRARIES/libcutils_intermediates/libcutils.a(threads.o): in function thread_store_set:system/core/libcutils/threads.c:36: error: undefined reference to 'pthread_key_create'
/usr/bin/ld: out/host/linux-x86/obj/STATIC_LIBRARIES/libcutils_intermediates/libcutils.a(threads.o): in function thread_store_set:system/core/libcutils/threads.c:44: error: undefined reference to 'pthread_setspecific'
/usr/bin/ld: out/host/linux-x86/obj/STATIC_LIBRARIES/libcutils_intermediates/libcutils.a(threads.o): in function thread_store_get:system/core/libcutils/threads.c:27: error: undefined reference to 'pthread_getspecific'
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/aapt] 錯誤 1
錯誤3、錯誤提示:
host Executable: localize (out/host/linux-x86/obj/EXECUTABLES/localize_intermediates/localize)
/usr/bin/ld: out/host/linux-x86/obj/STATIC_LIBRARIES/libcutils_intermediates/libcutils.a(threads.o): in function thread_store_set:system/core/libcutils/threads.c:36: error: undefined reference to 'pthread_key_create'
/usr/bin/ld: out/host/linux-x86/obj/STATIC_LIBRARIES/libcutils_intermediates/libcutils.a(threads.o): in function thread_store_set:system/core/libcutils/threads.c:44: error: undefined reference to 'pthread_setspecific'
/usr/bin/ld: out/host/linux-x86/obj/STATIC_LIBRARIES/libcutils_intermediates/libcutils.a(threads.o): in function thread_store_get:system/core/libcutils/threads.c:27: error: undefined reference to 'pthread_getspecific'
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/localize_intermediates/localize] 錯誤 1