AOSP-错误:对 在构建期间]的未定义引用>

问题描述 投票:2回答:1

我需要另一个有个好眼睛的人来告诉我我在这里做错了。

我必须在我的设备上升级U-boot引导加载程序,自然地,我不得不重新安装好一切。但是目前我无法像以前那样构建AOSP系统。我将从错误消息开始,并写下我的思考过程:

target Symbolic: fw_printenv (out/target/product/board/symbols/system/bin/fw_printenv)
target Strip: fw_printenv (out/target/product/board/obj/EXECUTABLES/fw_printenv_intermediates/fw_printenv)
Install: out/target/product/board/system/bin/fw_printenv
target Executable: test_executer (out/target/product/board/obj/EXECUTABLES/test_executer_intermediates/LINKED/test_executer)
external/utils/production/set_display_orientation.cpp:81: error: undefined reference to 'fw_printenv(int, char**, int, env_opts*)'
external/utils/production/set_display_orientation.cpp:57: error: undefined reference to 'fw_setenv(int, char**, env_opts*)'
external/utils/production/set_display_orientation.cpp:65: error: undefined reference to 'fw_printenv(int, char**, int, env_opts*)'
collect2: error: ld returned 1 exit status

因此出现链接器错误。而且我的代码找不到其他模块中定义的功能。因此,让我们看一下负责[[set_display_orientation.cpp

Android.mk文件。LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := test_executer LOCAL_SRC_FILES := test_executer.cpp \ TestSequences.cpp \ buzzer_test.cpp \ rtc_test.cpp \ AudioTests.cpp \ rs485_test.cpp \ rs232.cpp \ set_display_orientation.cpp \ gpio.cpp \ gpio_helper.c \ ping.cpp \ usb.cpp \ mmc.cpp \ display.cpp \ touchscreen.cpp \ productionSector.cpp \ psoc_uart3.cpp \ ../../tslib/tests/fbutils.c LOCAL_MODULE_TAGS := optional LOCAL_STATIC_LIBRARIES += libfw libeeprom libpsoc_helper LOCAL_SHARED_LIBRARIES += libts libc libcutils LOCAL_C_INCLUDES += bootable/bootloader/uboot-imx/tools/env \ external/tslib \ external/tslib/tests \ external/tslib/src \ external/utils/eeprom \ external/utils/PSoCUpdate ifneq ($(PTEST_VERSION),) LOCAL_CFLAGS := -DPTEST_VERSION=$(PTEST_VERSION) endif LOCAL_CFLAGS += -DUSE_HOSTCC \ -DANDROID \ -isystem bootable/bootloader/uboot-imx/include/ \ -isystem bootable/bootloader/uboot-imx/arch/arm/include/ include $(BUILD_EXECUTABLE)
现在错误消息说有一个

对fw_printenv(),fw_setenv()和fw_printenv()的未定义引用

。但是这些功能在bootable / bootloader / uboot-imx / tools / env中定义,这些功能包含在LOCAL_C_INCLUDES += bootable/bootloader/uboot-imx/tools/env中,它们是LOCAL_STATIC_LIBRARIES += libfw的一部分。为了完整起见,我还将包括负责[[libfw
Android.mk文件,它是U-Boot的一部分。LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE_TAGS := optional LOCAL_MODULE := fw_printenv LOCAL_SRC_FILES := fw_env_main.c LOCAL_C_INCLUDES += fw_env.h LOCAL_STATIC_LIBRARIES := libfw LOCAL_CFLAGS := -DUSE_HOSTCC \ -DANDROID \ -isystem$(LOCAL_PATH)/../../include/ \ -isystem$(LOCAL_PATH)/../../arch/arm/include/ include $(BUILD_EXECUTABLE) include $(CLEAR_VARS) LOCAL_MODULE_TAGS := optional LOCAL_MODULE:= libfw LOCAL_SRC_FILES := fw_env.c \ ctype.c \ crc32.c \ env_attr.c \ env_flags.c \ aes.c #since alot of duplicated Header files exist in uboot-imx/include/ we use -isystem here #to search for the correct Headers in bionic first LOCAL_CFLAGS := -DUSE_HOSTCC \ -DANDROID \ -isystem$(LOCAL_PATH)/../../include/ \ -isystem$(LOCAL_PATH)/../../arch/arm/include/ LOCAL_C_INCLUDES += fw_env.h \ external/mtd-utils/new-utils/include/ include $(BUILD_STATIC_LIBRARY) 有人可以指出我在哪里出问题了。我已经阅读了在线文档(https://developer.android.com/ndk/guides/android_mk),以及上,下stackoverflow。我真的迷失了这个。
我需要另一个有个好眼睛的人来告诉我我在这里做错了什么。我必须在我的设备上升级U-boot引导加载程序,自然地,我不得不再次使事情变得合适。但是目前我...
c++ linker android-source android.mk
1个回答
2
投票
© www.soinside.com 2019 - 2024. All rights reserved.