- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我正在尝试编译一个模块并将其插入到我的内核中,但我一直收到此错误:
insmod: error inserting 'hello.ko': -1 Invalid module format
我在这里按照本教程中描述的步骤操作:http://www.cyberciti.biz/tips/compiling-linux-kernel-module.html .一切似乎都有意义并且有效。我编译了我的示例模块,但有一条警告可能是导致这件事失败的重要原因。警告是这样的:
WARNING: Symbol version dump /usr/src/linux-3.0.0/Module.symvers is missing; modules will have no dependencies and modversions.
坦率地说,我不知道为什么没有 Module.symvers 文件。 /usr/src/linux-3.0.0 目录及其所有内容都是我在使用以下命令下载源代码后创建的:
apt-get source linux-image-$(uname -r)
事实上,那是该教程中我没有遵循的唯一步骤,因为我无法找到我的内核 (3.0.0-32-generic) 的确切来源,并认为 aptitude 工具会解决这个问题我。
顺便说一句,我在 64 位机器上运行 Ubuntu,这是 uname -a 输出:
Linux vega 3.0.0-32-generic #51-Ubuntu SMP Thu Mar 21 15:50:59 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
关于接下来要尝试什么有什么建议吗?有什么推荐读物吗?
PS1。经过更多研究后,我确认我正在运行 3.0.0-32-generic。更新 grub 返回:
Found linux image: /boot/vmlinuz-3.0.0-32-generic
但是在发出 sudo make oldconfig 并检查生成的 .config 文件后,我得到了这个有趣的行:
CONFIG_VERSION_SIGNATURE="Ubuntu 3.0.0-32.51-generic 3.0.69"
这是否符合不匹配的条件?
PS2。 dmesg 输出这个:
[ 5.869900] ADDRCONF(NETDEV_UP): eth1: link is not ready
[ 6.144304] EXT4-fs (dm-1): re-mounted. Opts: errors=remount-ro
[ 6.368936] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
[ 6.433919] vesafb: mode is 640x480x32, linelength=2560, pages=0
[ 6.433921] vesafb: scrolling: redraw
[ 6.433923] vesafb: Truecolor: size=8:8:8:8, shift=24:16:8:0
[ 6.435424] vesafb: framebuffer at 0xb0000000, mapped to 0xffffc90012800000, using 1216k, total 1216k
[ 6.435516] Console: switching to colour frame buffer device 80x30
[ 6.443104] EXT4-fs (dm-2): mounted filesystem with ordered data mode. Opts: (null)
[ 6.450198] fb0: VESA VGA frame buffer device
[ 8.884523] e1000e: eth1 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx
[ 8.885845] ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[ 12.611236] init: ssh main process (762) terminated with status 255
[ 12.624381] init: failsafe main process (752) killed by TERM signal
[ 12.634739] type=1400 audit(1373412287.107:8): apparmor="STATUS" operation="profile_load" name="/usr/sbin/tcpdump" pid=852 comm="apparmor_parser"
[ 12.634873] type=1400 audit(1373412287.107:9): apparmor="STATUS" operation="profile_replace" name="/sbin/dhclient" pid=851 comm="apparmor_parser"
[ 12.635180] type=1400 audit(1373412287.107:10): apparmor="STATUS" operation="profile_replace" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=851 comm="apparmor_parser"
[ 12.635403] type=1400 audit(1373412287.107:11): apparmor="STATUS" operation="profile_replace" name="/usr/lib/connman/scripts/dhclient-script" pid=851 comm="apparmor_parser"
[ 19.390991] eth1: no IPv6 routers present
[ 576.758697] hello: no symbol version for module_layout
最佳答案
您当前的内核版本是 3.0.0-32-generic转到 cd/lib/modules/3.0.0-32-gereric/
目录并检查构建目录是否存在。如果存在,那么您可以使用以下命令直接编译您的模块
make -C /lib/modules/3.0.0-32-generic/build M=$(PWD) modules
如果你想用你下载的内核编译你的模块,那么请按照以下步骤操作:
cd /usr/src/linux-3.0.0/
make menuconfig
make -j5
make modules
sudo make modules_install
sudo make install
sudo reboot
然后使用 linux-3.0.0 内核启动您的系统,并使用以下命令编译您的模块:
make -C /lib/modules/3.0.0/build M=$(PWD) modules
关于ubuntu - insmod 无法插入一个非常简单的模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17560989/
我最近在我的机器上安装了 cx_Oracle 模块,以便连接到远程 Oracle 数据库服务器。 (我身边没有 Oracle 客户端)。 Python:版本 2.7 x86 Oracle:版本 11.
我想从 python timeit 模块检查打印以下内容需要多少时间,如何打印, import timeit x = [x for x in range(10000)] timeit.timeit("
我盯着 vs 代码编辑器上的 java 脚本编码,当我尝试将外部模块包含到我的项目中时,代码编辑器提出了这样的建议 -->(文件是 CommonJS 模块;它可能会转换为 ES6 模块。 )..有什么
我有一个 Node 应用程序,我想在标准 ES6 模块格式中使用(即 "type": "module" in the package.json ,并始终使用 import 和 export)而不转译为
我正在学习将 BlueprintJS 合并到我的 React 网络应用程序中,并且在加载某些 CSS 模块时遇到了很多麻烦。 我已经安装了 npm install @blueprintjs/core和
我需要重构一堆具有这样的调用的文件 define(['module1','module2','module3' etc...], function(a, b, c etc...) { //bun
我是 Angular 的新手,正在学习各种教程(Codecademy、thinkster.io 等),并且已经看到了声明应用程序容器的两种方法。首先: var app = angular.module
我正在尝试将 OUnit 与 OCaml 一起使用。 单元代码源码(unit.ml)如下: open OUnit let empty_list = [] let list_a = [1;2;3] le
我在 Angular 1.x 应用程序中使用 webpack 和 ES6 模块。在我设置的 webpack.config 中: resolve: { alias: { 'angular':
internal/modules/cjs/loader.js:750 return process.dlopen(module, path.toNamespacedPath(filename));
在本教程中,您将借助示例了解 JavaScript 中的模块。 随着我们的程序变得越来越大,它可能包含许多行代码。您可以使用模块根据功能将代码分隔在单独的文件中,而不是将所有内容都放在一个文件
我想知道是否可以将此代码更改为仅调用 MyModule.RED 而不是 MyModule.COLORS.RED。我尝试将 mod 设置为变量来存储颜色,但似乎不起作用。难道是我方法不对? (funct
我有以下代码。它是一个 JavaScript 模块。 (function() { // Object var Cahootsy; Cahootsy = { hello:
关闭。这个问题是 opinion-based 。它目前不接受答案。 想要改进这个问题?更新问题,以便 editing this post 可以用事实和引文来回答它。 关闭 2 年前。 Improve
从用户的角度来看,一个模块能够通过 require 加载并返回一个 table,模块导出的接口都被定义在此 table 中(此 table 被作为一个 namespace)。所有的标准库都是模块。标
Ruby的模块非常类似类,除了: 模块不可以有实体 模块不可以有子类 模块由module...end定义. 实际上...模块的'模块类'是'类的类'这个类的父类.搞懂了吗?不懂?让我们继续看
我有一个脚本,它从 CLI 获取 3 个输入变量并将其分别插入到 3 个变量: GetOptions("old_path=s" => \$old_path, "var=s" =
我有一个简单的 python 包,其目录结构如下: wibble | |-----foo | |----ping.py | |-----bar | |----pong.py 简单的
这种语法会非常有用——这不起作用有什么原因吗?谢谢! module Foo = { let bar: string = "bar" }; let bar = Foo.bar; /* works *
我想运行一个命令: - name: install pip shell: "python {"changed": true, "cmd": "python <(curl https://boot
我是一名优秀的程序员,十分优秀!