gpt4 book ai didi

android - 如何解决 W/art : Could not create image space with image file '/system/framework/boot.art' while trying to port Android Lollipop on Arndale Board?

转载 作者:太空宇宙 更新时间:2023-11-04 10:50:33 47 4
gpt4 key购买 nike

我正在尝试将 Android Lollipop 移植到 arndale 板上,但我面临以下有关 ART 崩溃 (AndroidRunTime) 的问题。

> I/art ( 2264): RelocateImage: /system/bin/patchoat
> --input-image-location=/system/framework/boot.art --output-image-file=/data/dalvik-cach6 F/libc ( 2443): No [stack] line found in "/proc/self/task/2443/maps"! F/libc ( 2443): Fatal signal 6
> (SIGABRT), code -6 in tid 2443 (patchoat) W/art ( 2702): Could not
> create image space with image file >/system/framework/boot.art.
> Attempting to fall back to imageless running

移植步骤

1.从下面的链接下载 vexpress android L 32 位代码。 http://releases.linaro.org/15.05/android

2.从http://releases.linaro.org/14.08/android/arndale下载带有3.9内核的arndale android KK 32位源代码

3.将步骤1中代码下载的Vexpress内核源替换为步骤2下载的arndale KK 3.9内核源。

4.将 Vexpress HAL (device/linaro/vexpress) 替换为 Arndale HAL (device/linaro/arndale)。

5.解决与仿生和构建环境相关的小编译问题。

闪烁图像并打开电路板电源后,我卡在了 android Logo 和内核崩溃

> >37.790000] Internal error: Oops: 5 [#1] PREEMPT SMP ARM Modules linked in: CPU: 0    Tainted: G        W     (3.9.1 #8) [   37.790000]
> CPU: 0 Tainted: G W (3.9.1 #8) PC is at
> __copy_to_user_std+0x4c/0x3a8 [ 37.790000] PC is at __copy_to_user_std+0x4c/0x3a8 LR is at 0x6c000000
> >[ 37.790000] LR is at 0x6c000000

并且 logcat 给出

> >I/art ( 2264): RelocateImage: /system/bin/patchoat --input-image-location=/system/framework/boot.art --output-image-file=/data/dalvik-cach6 F/libc ( 2443): No [stack] line found in "/proc/self/task/2443/maps"! F/libc ( 2443): Fatal signal 6
> (SIGABRT), code -6 in tid 2443 (patchoat) W/art ( 2702): Could not
> create image space with image file >/system/framework/boot.art.
> Attempting to fall back to imageless running.

确切的失败点

1.ART 从 art/runtime/thread.cc 调用 Thread::InitStackHwm。

2.上面的调用触发了 bionic/libc/bionic/pthread_attr.cpp 中的 __pthread_attr_getstack_main_thread(stack_base, stack_size) 返回 No [stack] line found in enter code here/proc/self/task/2443/maps!并且 ART 崩溃并给出 SIG_ABORT,似乎没有为 2443 线程创建堆栈,但如何解决这个问题?

如果有人能帮我解决这个问题就太好了。

谢谢,开发者

最佳答案

这是在期望 3.10 内核(不支持 arndale)的 linaro vexpress android 平台上使用 3.9 内核的副作用。

作为解决方法,在 art/runtime/thread.cc 中注释掉 InitStackHwm() 函数。

我认为如果在 3.10 内核中需要对 arndale 的支持,我们可能不需要这个解决方法,ART 可以直接工作。

    void Thread::Init(ThreadList* thread_list, JavaVMExt* java_vm) {
// This function does all the initialization that must be run by the native thread it applies to.
// (When we create a new thread from managed code, we allocate the Thread* in Thread::Create so
// we can handshake with the corresponding native thread when it's ready.) Check this native
// thread hasn't been through here already...
CHECK(Thread::Current() == nullptr);
SetUpAlternateSignalStack();
InitCpu();
InitTlsEntryPoints();
RemoveSuspendTrigger();
InitCardTable();
InitTid();
// Set pthread_self_ ahead of pthread_setspecific, that makes Thread::Current function, this
// avoids pthread_self_ ever being invalid when discovered from Thread::Current().
tlsPtr_.pthread_self = pthread_self();
CHECK(is_started_);
CHECK_PTHREAD_CALL(pthread_setspecific, (Thread::pthread_key_self_, this), "attach self");
DCHECK_EQ(Thread::Current(), this);

tls32_.thin_lock_thread_id = thread_list->AllocThreadId(this);
//InitStackHwm(); This is the workaround

tlsPtr_.jni_env = new JNIEnvExt(this, java_vm);
thread_list->Register(this);
}

关于android - 如何解决 W/art : Could not create image space with image file '/system/framework/boot.art' while trying to port Android Lollipop on Arndale Board?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31209977/

47 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com