“pmem.c”错误为android编译linux源代码

发布于 2024-10-24 17:17:44 字数 1199 浏览 2 评论 0原文

我正在为android模拟器编译linux源代码。当我执行 make 命令(用于构建和交叉编译 linux 源代码)时,我收到以下错误“pmem.c”文件。

root@ubuntu:~/common# make
 CHK     include/linux/version.h
 CHK     include/linux/utsrelease.h
 SYMLINK include/asm -> include/asm-x86
 CALL    scripts/checksyscalls.sh
 CHK     include/linux/compile.h
 CC      drivers/misc/pmem.o
 drivers/misc/pmem.c:441: error: conflicting types for ‘phys_mem_access_prot’
 /home/preetam/common/arch/x86/include/asm/pgtable.h:383: note: previous declaration of         ‘phys_mem_access_prot’ was here
 drivers/misc/pmem.c: In function ‘flush_pmem_file’:
 drivers/misc/pmem.c:805: error: implicit declaration of function ‘dmac_flush_range’
 drivers/misc/pmem.c: In function ‘pmem_setup’:
 drivers/misc/pmem.c:1265: error: implicit declaration of function ‘ioremap_cached’
 drivers/misc/pmem.c:1266: warning: assignment makes pointer from integer without a cast
 make[2]: *** [drivers/misc/pmem.o] Error 1 
 make[1]: *** [drivers/misc] Error 2
 make: *** [drivers] Error 2
root@ubuntu:~/common# 

如何解决此错误。看来“pmem.c”文件中可能存在一些问题,我必须选择不同的 git 存储库。但这将是一件非常复杂的事情,因为现在我已经完成了到目前为止的大部分事情。我可能需要查看该文件的正确版本。请有人告诉我该怎么办?

如何解决这个错误。

请帮忙..谢谢!

I am compiling linux source code for android emulator. When i execute make command(for building and cross-compiling the linux source) i get the following error "pmem.c" file.

root@ubuntu:~/common# make
 CHK     include/linux/version.h
 CHK     include/linux/utsrelease.h
 SYMLINK include/asm -> include/asm-x86
 CALL    scripts/checksyscalls.sh
 CHK     include/linux/compile.h
 CC      drivers/misc/pmem.o
 drivers/misc/pmem.c:441: error: conflicting types for ‘phys_mem_access_prot’
 /home/preetam/common/arch/x86/include/asm/pgtable.h:383: note: previous declaration of         ‘phys_mem_access_prot’ was here
 drivers/misc/pmem.c: In function ‘flush_pmem_file’:
 drivers/misc/pmem.c:805: error: implicit declaration of function ‘dmac_flush_range’
 drivers/misc/pmem.c: In function ‘pmem_setup’:
 drivers/misc/pmem.c:1265: error: implicit declaration of function ‘ioremap_cached’
 drivers/misc/pmem.c:1266: warning: assignment makes pointer from integer without a cast
 make[2]: *** [drivers/misc/pmem.o] Error 1 
 make[1]: *** [drivers/misc] Error 2
 make: *** [drivers] Error 2
root@ubuntu:~/common# 

how to resolve this error. It seems that there may some problems in the "pmem.c" file and i'll have to choose different git repository. but that would be a very complex thing, as now i have already done most of the things till here. I might have to see correct version of this file. please someone tell what should i do?

how to solve this errors.

please help..thankyou!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

如梦亦如幻 2024-10-31 17:17:44

您粘贴的消息中有几个错误,包括冲突类型和隐式声明。您可能想要验证的三件事:

  1. 您是否选择了正确的处理器架构(ARCH)以及交叉编译器定义,
  2. 所选架构是否混合在来自另一个架构的文件中(这很难检查,但您可以从检查错误消息中提到的文件)
  3. 检查这些文件本身,看看这是一个错误(非常不可能,但你永远不知道)并且你实际上必须更改一些代码

There are several errors in the message you pasted, both conflicting types and implicit declarations. Three things that you might want to verify:

  1. did you choose the correct processor architecture (ARCH) and cross compiler definition
  2. does the chosen architecture mix in files from another arch (this is difficult to check, but you can start by checking the location of the files that are mentioned in the error message)
  3. check these files themselves, to see it this is a bug (very unlikely, but you never know) and that you actually have to change some code
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文