在一台機器上寫好這樣的Makefile用以編譯modules

obj-m:=hello.o

CURRENT_PATH:=$(shell pwd)
VERSION_NUM:=$(shell uname -r)
LINUX_PATH:=/usr/src/linux-$(VERSION_NUM)
all :
  make -C $(LINUX_PATH) M=$(CURRENT_PATH) modules
clean:
  make -C $(LINUX_PATH) M=$(CURRENT_PATH) clean

  

直接複製貼上,到新的機器上竟然不成功。

必須要自己把上面那兩個make用backspace拉到開頭再按一次tab

千萬別用space

[心得]編寫Linux kernel modules時惱人的Makefile的更多相关文章

  1. Linux Kernel basics

    Linux内核作用: The Linux kernel is the heart of the operating system. It is the layer between the user w ...

  2. How to compile and install Linux Kernel 5.1.2 from source code

    How to compile and install Linux Kernel 5.1.2 from source code Compiling a custom kernel has its adv ...

  3. Linux kernel 2.6下的modules编译与KBuild

    转载:http://blog.sina.com.cn/s/blog_602f87700100dq1u.html Sam之前在Linux kernel 2.4下写过一些driver.但自从转到kerne ...

  4. Linux Kernel 排程機制介紹

    http://loda.hala01.com/2011/12/linux-kernel-%E6%8E%92%E7%A8%8B%E6%A9%9F%E5%88%B6%E4%BB%8B%E7%B4%B9/ ...

  5. linux kernel笔记

    文章目录 关于linux内核中的__attribute__关键字 Linux kernel启动参数 gdt / ldt PCB 关于linux内核中的__attribute__关键字 part I: ...

  6. Linux kernel make 常用选项介绍

    Linux kernel 编译方法大全记录 一.这是一个我自己写的自动make脚本: #!/bin/sh export ARCH=arm export CROSS_COMPILE=arm-linux- ...

  7. archlinux 传统方法编译内核linux kernel 3.3.7

    From: http://hi.baidu.com/flashgive/item/eaef6326b5eb73d3a417b662 archlinux中传统方法编译内核 1)下载内核以及补丁并解压: ...

  8. Linux kernel develop -- Hello World

    hello.c: #include <linux/init.h> #include <linux/module.h> #include <linux/kernel.h&g ...

  9. Linux LSM(Linux Security Modules) Hook Technology

    目录 . 引言 . Linux Security Module Framework Introduction . LSM Sourcecode Analysis . LSMs Hook Engine: ...

随机推荐

  1. 使用js实现图片轮滑效果

    经常在购物网站,看到那种图片轮滑的效果,所以看到有人实现了,所以我也就学习下了. 首先贴出html代码: <!DOCTYPE html> <html lang="en&qu ...

  2. ubuntu下安装c man文档

    http://www.mirrorservice.org/sites/sourceware.org/pub/gcc/libstdc%2b%2b/doxygen/ 下载 http://www.mirro ...

  3. docker运行模式图

    docker运行模式图:

  4. NodeJs初相识

    一.nodeJs简介 1.Node 是一个服务器端 JavaScript 解释器. 2.Node 的目标是帮助程序员构建高度可伸缩的应用程序,编写能够处理数万条同时连接到一个物理机的连接代码.处理高并 ...

  5. WPF 几种常用控件样式的总结

    这里把wpf中几种常用样式总结一下,后期可以直接拷贝使用,呵呵 一.Button <ResourceDictionary xmlns="http://schemas.microsoft ...

  6. 返回结果的 HTTP 状态 码

    2xx 200:表示从客户端发来的请求在服务器端被正常处理了.   204:该状态码代表服务器接收的请求已成功处理,但在返回的响应报文中 不含实体的主体部分.另外,也不允许返回任何实体的主体.   2 ...

  7. python 绘制三国人物关系图

    author:weizhendong data:2019.12.19 func:绘制三国演义人物关系图 """ import codecs import jieba.po ...

  8. 【leetcode】126. Word Ladder II

    题目如下: 解题思路:DFS或者BFS都行.本题的关键在于减少重复计算.我采用了两种方法:一是用字典dic_ladderlist记录每一个单词可以ladder的单词列表:另外是用dp数组记录从star ...

  9. webpack打包工具简单案例

    目录结构: 入口文件:main.js 把项目所有的依赖文件都放进main.js //1.使用CommonJs的模块化规范 const {add, mul} = require('./mathUtil. ...

  10. SpringMvc中乱码问题的解决

    一:如果是前台传递的数据有问题. 在tomcat的service.xml中加上: URIEncoding="UTF-8" <Connector URIEncoding=&qu ...