内核版本:2.6.32.2(mini2440光盘源码) github地址:https://github.com/guanglun/mini2440_uboot_linux (for_len分支 https://github.com/guanglun/mini2440_uboot_linux/tree/for_learn) /* * linux/arch/arm/kernel/head.S * * Copyright (C) 1994-2002 Russell King * Copyright (…
在Linux中,给kernel传递参数以控制其行为总共有三种方法: 1.build kernel之时的各个configuration选项. 2.当kernel启动之时,可以参数在kernel被GRUB或LILO等启动程序调用之时传递给kernel. 3.在kernel运行时,修改/proc或/sys目录下的文件. 这里我简单讲的就是第二种方式了,kernel在grub中配置的启动参数. 首先,kernel有哪些参数呢? 在linux的源代码中,有这样的一个文档Documentation/kern…
目录 . sys_call_table:系统调用表 . 内核符号导出表:Kernel-Symbol-Table . Linux 32bit.64bit环境下系统调用入口的异同 . Linux 32bit.64bit环境下sys_call_table replace hook 1. sys_call_table:系统调用表 0x1: sys_call_table简介 sys_call_table在Linux内核中是在Linux内核中的一段连续内存的数组,数组中的每个元素保存着对应的系统调用处理函数…
/****************************************************************************** * OK335xS Linux kernel check clock 24M hacking * 声明: * 由于需要确认kernel中的时钟和引脚配置的时钟是否一致,于是需要去跟踪内核 * 中的代码是如何对引脚配置时钟进行识别,并对其进行相关配置的额. * * 2016-1-5 深圳 南山平山村 曾剑锋 ****************…
参考资料: <ARM体系结构与编程> <嵌入式Linux应用开发完全手册> Linux_Memory_Address_Mapping http://www.chinaunix.net/old_jh/4/1021226.html 更多文档参见:http://pan.baidu.com/s/1mg3DbHQ 本文针对arm linux, 从kernel的第一条指令开始分析,一直分析到进入start_kernel()函数. 我们当前以linux-2.6.19内核版本作为范例来分析,本文中…
虽然这里的Arm Linux kernel前面加上了Android,但实际上还是和普遍Arm linux kernel启动的过程一样的,这里只是结合一下Android的Makefile,讲一下bootimage生成的一个过程.这篇文档主要描述bootimage的构造,以及kernel真正执行前的解压过程. 在了解这些之前我们首先需要了解几个名词,这些名词定义在/Documentation/arm/Porting里面,这里首先提到其中的几个,其余几个会在后面kernel的执行过程中讲述: 1)ZT…
−Table of Contents Journey to the Center of the Linux Kernel: Traffic Control, Shaping and QoS 1 Introduction 2 Motivation 3 The basics of Traffic Control 3.1 First contact 3.2 Netfilter MARK 3.3 Two classes in a tree 3.4 Connecting the marks to the…
文章转载至CSDN社区罗升阳的安卓之旅,原文地址:http://blog.csdn.net/luoshengyang/article/details/6564592 在前一篇文章提到,从源代码树下载下来的最新Android源代码,是不包括内核代码的,也就是Android源代码工程默认不包含Linux Kernel代码,而是使用预先编译好的内核,也就是prebuilt/android-arm/kernel/kernel-qemu文件.那么,如何才能DIY自己的内核呢?这篇文章一一道来. 一. 首选…
https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt Introduction ------------ The configuration database is a collection of configuration options organized in a tree structure: +- Code maturity level options | +- Prompt for developme…
文章目录 关于linux内核中的__attribute__关键字 Linux kernel启动参数 gdt / ldt PCB 关于linux内核中的__attribute__关键字 part I: 原文出处:http://www.jollen.org/blog/2006/10/_gcc___attribute.html gcc 提供一種「定義函數屬性(attribute)」的語法,也就是前一篇日記我們所提到的 __attribute__標籤.__attribute__用來讓我們定義函數的行為,…
先要讲讲这个问题是怎么来的.(咱们在分析一个技术的时候,先要考虑它是想解决什么问题,或者学习新知识的时候,要清楚这个知识的目的是什么). 我在编译内核的时候,发现arch/arm/kernel目录下有一个这样的文件:vmlinux.lds.S.第一眼看上去,想想是不是汇编文件呢?打开一看,好像不是.那它是干嘛的?而且前面已经说过,make V=1的时候,发现这个文件的用处在ld命令中,即ld -T vmlinux.lds.S,好像是链接命令用的,如下所示 如arm-linux-ld -EL -p…
作者:JHJ(jianghuijun211@gmail.com)日期:2012/08/24 欢迎转载,请注明出处 引子 现在android智能手机市场异常火热,硬件升级非常迅猛,arm cortex A9 + 1GB DDR似乎已经跟不上主流配置了.虽说硬件是王道,可我们还是不禁还怀疑这么强大的硬件配置得到充分利用了吗?因此以后我都会正对ARM平台分析kernel的内容.  正文 在linux内存管理中,有两个资源非常重要,一个是虚拟地址,一个是物理地址.听起来似乎是废话,实际上内存管理主要就是…
Linux kernel coding style | Linux内核编码风格 This is a short document describing the preferred coding style for the linux kernel. Coding style is very personal, and I won't force my views on anybody, but this is what goes for anything that I have to be ab…
转自:http://www.cnblogs.com/LittleHann/p/4127096.html 目录 1. sys_call_table:系统调用表 2. 内核符号导出表:Kernel-Symbol-Table 3. Linux 32bit.64bit环境下系统调用入口的异同 4. Linux 32bit.64bit环境下sys_call_table replace hook 1. sys_call_table:系统调用表 0x1: sys_call_table简介 sys_call_t…
总听有人说 Linux kernel 拥有一团无比巨大看似杂乱无章其实有迹可循的链表,今天参考一下其他大牛的相关资料记录一下. kset 结构体 151 /** 152 * struct kset - a set of kobjects of a specific type, belonging to a specific subsystem. 153 * 154 * A kset defines a group of kobjects. They can be individually 155…
现在CPU2核以上比较普遍了,平时用linux上上网可能用不着双核甚至4核,大部分发行版内核都启用了CPU_HOTPLUG,到/sys/devices/system/cpu下可以看到文件夹cpu0.cpu1,除cpu0(这个不能关)每个文件夹下都有一个online文件,往里面写0就可以关闭核心,比如我的T7300,echo '0' >/sys/devices/system/cpu/cpu1/online 就可以关闭第二个核,不影响小型应用.要开启,往里面echo 1就行.这个操作好像要root完…
转自:http://blog.csdn.net/njuitjf/article/details/18317149 Linux kernel suspend resume学习:2.6.35与3.0.35比较 最近在学习linux kernel中suspend和resume的处理.只是一味的看代码,有点枯燥,刚好有两个项目使用了不同的内核版本,就以比较这两个间的处理差别为线索进行学习.由于列举了很多代码,为了保持连续性,整篇文章还是放到了一个blog中. 首先看看公开出去的接口,都是文件/sys/p…
In this blog post we'll go over a Linux kernel privilege escalation vulnerability I discovered which enables arbitrary code execution within the kernel. The vulnerability affected all devices based on Qualcomm chipsets (that is, based on the "msm&quo…
转载自:http://blog.csdn.net/dreamxu/article/details/6125545 http://www-900.ibm.com/developerWorks/cn/linux/kernel/l-kerconf/ 上面这篇文章针对的系统相对较老点. 后来又找到了一篇新的文章: http://blog.csdn.net/estate66/archive/2010/09/15/5886816.aspx   因为在2.6.36的内核中,已经没有config.in文件.取而…
http://blog.csdn.net/blizmax6/article/details/6747601 linux内核调试指南 一些前言 作者前言 知识从哪里来 为什么撰写本文档 为什么需要汇编级调试 ***第一部分:基础知识*** 总纲:内核世界的陷阱 源码阅读的陷阱 代码调试的陷阱 原理理解的陷阱 建立调试环境 发行版的选择和安装 安装交叉编译工具 bin工具集的使用 qemu的使用 initrd.img的原理与制作 x86虚拟调试环境的建立 arm虚拟调试环境的建立 arm开发板调试环…
## Linux kernel memory-faq.txt What is some existing documentation on Linux memory management? Ulrich Drepper (the ex-glibc maintainer) wrote an article series called "What every programmer should know about memory": Part 1: http://lwn.net/Artic…
LINUX KERNEL启动参数 在Linux中,给kernel传递参数以控制其行为总共有三种方法: 1.build kernel之时的各个configuration选项. 2.当kernel启动之时,可以参数在kernel被GRUB或LILO等启动程序调用之时传递给kernel. 3.在kernel运行时,修改/proc或/sys目录下的文件. 这里我简单讲的就是第二种方式了,kernel在grub中配置的启动参数. 首先,kernel有哪些参数呢? 在linux的源代码中,有这样的一个文档D…
Linux kernel启动选项(参数)  转载链接https://www.cnblogs.com/linuxbo/p/4286227.html 在Linux中,给kernel传递参数以控制其行为总共有三种方法: 1.build kernel之时的各个configuration选项. 2.当kernel启动之时,可以参数在kernel被GRUB或LILO等启动程序调用之时传递给kernel. 3.在kernel运行时,修改/proc或/sys目录下的文件. 这里我简单讲的就是第二种方式了,ker…
在Linux中,给kernel传递参数以控制其行为总共有三种方法: 1.build kernel之时的各个configuration选项. 2.当kernel启动之时,可以参数在kernel被GRUB或LILO等启动程序调用之时传递给kernel. 3.在kernel运行时,修改/proc或/sys目录下的文件. 这里我简单讲的就是第二种方式了,kernel在grub中配置的启动参数. 首先,kernel有哪些参数呢? 在linux的源代码中,有这样的一个文档: https://www.kern…
python/python-linux-procfs/python-linux-procfs.git - Python classes to extract information from the Linux kernel /proc files. https://git.kernel.org/pub/scm/libs/python/python-linux-procfs/python-linux-procfs.git/ #! /usr/bin/python # -*- python -*-…
Linux Kernel中所應用的數據結構及演算法 Basic Data Structures and Algorithms in the Linux kernel Links are to the source code on github. Linked list, doubly linked list, lock-free linked list. B+ Trees with comments telling you what you can't find in the textbooks…
This tutorial will outline the process to compile your own kernel for Ubuntu. It will demonstrate both the traditional process using ‘make’ and ‘make install’ as well as the Debian method, using ‘make-dpkg’. This is the detailed version of this tutor…
来自Linux kernel docs,顺便整理了一下排版 Linux Kernel Makefiles This document describes the Linux kernel Makefiles. 文章目录 Linux Kernel Makefiles 1 Overview 2 Who does what 3 The kbuild files 3.1 Goal definitions 3.2 Built-in object goals - obj-y 3.3 Loadable mod…
信号量有一个很明显的缺点,没有区分临界区的读写属性,读写锁允许多个线程进程并发的访问临界区,但是写访问只限于一个线程,在多处理器系统中允许多个读者访问共享资源,但是写者有排他性,读写锁的特性如下:允许多个读者同时访问临界区,但是同一时间不能进入:同一时刻只允许一个写者进入临界区:读者和写者不能同时进入临界区.读写锁也有关闭中断和下半部的版本. RCU:read-copy-update   .................... 问题:rcu相比读写锁,解决了什么问题? rcu的基本原理? 1.…
Linux kernel 编译方法大全记录 一.这是一个我自己写的自动make脚本: #!/bin/sh export ARCH=arm export CROSS_COMPILE=arm-linux-gnueabihf- export CHEN_DTB="chenfl.dtb" if [ 1 -eq $# ]; then if [ $1 = "dtb" ]; then make -j2 $CHEN_DTB O=out cp ~/am335x/kernel4.4.12…