gpt4 book ai didi

android - 如何为 OpenVPN 编译 "tun.ko"文件?

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:29:54 26 4
gpt4 key购买 nike

众所周知,android的系统更新非常频繁,每次重大更新,只要linux内核发生变化,都需要重新编译tun.ko文件。

对于 Gingerbread 的最新更新,我发现旧的 tun.ko 文件没有用,也找不到从哪里获得这样的文件(我试过 XDA 和 Google),所以我决定自己编译 tun.ko。

我确实找到了一些介绍如何编译文件的文章和博客。我有 ARM 交叉编译器和 android 内核(来自 GitHub android 镜像,因为 android 的 kernel.org 不可访问),但总是出现错误,例如:

$ ARCH=arm make modules SUBDIRS=drivers/net

ERROR: Kernel configuration is invalid. include/generated/autoconf.h or include/config/auto.conf are missing. Run 'make oldconfig && make prepare' on kernel src to fix it.

/bin/sh: /bin/false: No such file or directory

WARNING: Symbol version dump /Users/xxx/Downloads/msm/Module.symvers is missing; modules will have no dependencies and modversions.

Building modules, stage 2. /Users/xxx/Downloads/msm/scripts/Makefile.modpost:42: include/config/auto.conf: No such file or directory make[1]: * No rule to make target `include/config/auto.conf'. Stop. make: * [modules] Error 2

我无法弄清楚为什么会出现这些错误,任何人都可以帮助我摆脱困境吗?

非常感谢!

最佳答案

您需要先适当配置内核,否则无法构建任何模块。在大多数情况下,应该可以从设备中提取内核配置(应该在/proc/config.gz 中),但这是一个可选功能,因此可能会丢失。

不过,为您的内核(使用与设备相同的版本)进行一些非常通用的配置往往会奏效。

关于android - 如何为 OpenVPN 编译 "tun.ko"文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7733558/

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