`

《Linux Kernel and Driver Development Training》笔记

 
阅读更多

附件是一篇介绍linux内核和驱动的英文slides,简明扼要,相比厚重的书籍更能突出重点,以下是基于该slides的一些笔记

 

linux内核源码查看(参考P59-P62)

1. 客户端方式:可利用Ubuntu12.04及之后版本自带的Kscope工具

2. Web方式:使用lxr(linux cross reference),登录http://lxr.free-electrons.com可直接使用而无需自行配置lxr。

 

linux内核配置(参考P71-P77):

1. make xconfig,图形化配置,支持全局搜索和将缺失依赖项的item显示为灰色,使用需安装libqt4-dev g++

2. make gconfig,图形化配置,不支持搜索功能,使用需安装libglade2-dev

3. make menuconfig,使用需安装libncurses-dev

注:使用上述命令配置完成之后,都会自动生成一个.config.old文件,其作用是当新的配置不正确时,可通过cp .config.old .config命令来恢复之前的配置。但是,如果是手动方式更改的.config文件,就需要自行调用make oldconfig命令来生成.config.old文件

 

根文件系统中的内核相关文件(参考P93-P95)

1.内核默认配置文件在内核源码中的arch/<arch>/configs/,生成后的配置文件在根文件系统中的位置为/boot/config-<version>

2. 生成后的内核镜像在根文件系统中的位置为/boot/vmlinuz-<version>

3. 在内核配置时选择以module方式编译的,其在根文件系统中的位置为/lib/modules/<version>/

4. 内核源码在根文件系统中的位置为/usr/src/<version>

 

编译模块时,使用“make -C (KDIR) M=$(PWD)”脚本,其中KDIR为内核源码目录,该脚本实际是借助了KDIR里的Makefile,并通过M参数让内核知晓其为模块,该内核必须是经过配置的,且还需调用make modules_param为模块编译做好准备(参考P127-P128)

 

借助内核版本X编译出的模块不能再内核版本Y的系统上运行,否则会报错“Invalid module format”(参考P129)

分享到:
评论

相关推荐

    Linux Kernel and Driver Development Training

    1. **Linux内核开发的介绍**:文档标题“Linux Kernel and Driver Development Training”表明了培训内容的重点在于Linux内核及其驱动开发。内核是操作系统的心脏部分,负责管理硬件资源,提供系统服务,实现软件与...

    Linux kernel and driver development training

    Linux内核和驱动开发培训是针对需要深入理解Linux操作系统内核以及开发内核模块和驱动的开发者提供的专业培训课程。该课程专注于实践实验室,提供了动手实践的机会,使参与者能够通过实际操作加深对Linux内核和驱动...

    Embedded Linux Kernel and Driver Development.pdf

    嵌入式Linux内核与驱动开发是Linux操作系统在嵌入式系统领域的应用技术,它涉及到对Linux内核的定制、编译和内核模块(即驱动程序)的开发。在深入理解嵌入式Linux内核与驱动开发的过程中,我们可以从中了解到以下几...

    Linux Kernel and Driver Development Training.pdf

    processors (PRUs) and lots of peripherals. ▶ 512 MB of RAM ▶ 4 GB of on-board eMMC storage ▶ Ethernet, USB host and USB device, microSD, micro HDMI ▶ 2 x 46 pins headers, with access to many ...

    Embedded Linux kernel and driver development

    ### 嵌入式Linux内核与驱动开发 嵌入式Linux系统因其高效性、灵活性以及开源特性,在工业控制、消费电子、通信设备等多个领域得到了广泛的应用。本篇文档主要聚焦于嵌入式Linux内核及驱动开发的核心知识点,旨在为...

    Embedded Linux Kernel and Driver Development-200605-Free Electrons.pdf

    根据提供的文件信息,我们可以推断出这是一本关于嵌入式Linux内核与驱动开发的书籍,由Michael Opdenacker撰写,并遵循Creative Commons Attribution-ShareAlike 2.0许可协议发布。本书主要面向嵌入式Linux系统的...

    Linux Kernel Development完美版

    ### Linux Kernel Development: 关键知识点概述 #### 一、引言 在《Linux Kernel Development: 完美版》这份文档中,作者Randy Dunlap详细介绍了Linux内核开发的相关知识和实践经验。作为一份全面深入的技术指南,...

    Linux Driver Development for Embedded Processors - Second Edition

    Linux Driver Development for Embedded Processors – Second Edition 版本: Learn to develop Linux embedded drivers with kernel 4.9 LTS The flexibility of Linux embedded, the availability of powerful, ...

    Linux Kernel Development 2nd ed.

    That is why Sams is excited to bring you the latest Linux kernel development information from a Novell insider in the second edition of Linux Kernel Development. This authoritative, practical guide ...

    Packt.Mastering.Linux.Kernel.Development

    Mastering Linux Kernel Development looks at the Linux kernel, its internal arrangement and design, and various core subsystems, helping you to gain significant understanding of this open source marvel...

    Embedded Linux Kernel And Driver

    ### 嵌入式Linux内核与驱动开发详解 #### 一、嵌入式Linux内核与驱动开发概述 在嵌入式系统领域,Linux因其开放性、灵活性以及丰富的资源支持,成为了许多开发者首选的操作系统之一。《嵌入式Linux内核与驱动开发...

    Linux-kernel-and-driver-development.zip_linux kernel

    本资料"Linux-kernel-and-driver-development.zip"聚焦于Linux内核及驱动程序的开发,旨在为学习者提供全面而深入的知识体系。 Linux内核是操作系统的核心,负责管理硬件资源、调度进程、处理中断以及实现系统调用...

    Linux Kernel Development

    Linux Kernel Development details the design and implementation of the Linux kernel, presenting the content in a manner that is beneficial to those writing and developing kernel code, as well as to ...

    Embedded Linux Kernel And Drivers development

    嵌入式Linux内核与驱动开发:深入理解与实践 标题和描述中提及的“嵌入式Linux内核与驱动开发”是IT领域中的一个重要主题,尤其在物联网、智能设备和工业自动化等领域有着广泛的应用。嵌入式系统是指用于执行特定...

Global site tag (gtag.js) - Google Analytics