kernel

全面认识Android OS

↘锁芯ラ 提交于 2020-01-10 14:01:01
全面认识Android OS 在Android刚起步的那几年(2011年前及左右),我们同时下注了Android、Intel联合几个厂商搞的Meego、还有基于Linux的嵌入式OS。那时,中移动的OMS也很火,甚至OMS搞出了一个叫播思的公司。播思里边有非常多的人才,其中很多人来自中国手机界的黄埔军校——摩托罗拉。从这个角度看,Android OS在早期也是看不准,没人觉得它一定会成。 Android最终还是成功了,我个人感觉这个不全是技术的因素,但有几个关键因素还是和技术有关: 使用Java作为开发语言绝对是很关键的因素之一——毕竟,迎合开发者非常重要。Java终归是比C++/C要简单,容易上手。 另外,Android底层是Linux,这一块就把绝大部分做外设的厂商吸引过来了。它们本来就为Linux开发驱动或者相关模块,迁移到Android没太大工作量。 最后,还有关键的芯片厂商——高通的支持。如果当时只有Intel一家做芯片的话,Meego保不齐还能多蹦跶几年。 以前CSDN《程序员》杂志里经常有一位作者的投稿,我看他的个人介绍就很有意思,说是要为Linux摇旗呐喊。所以,Android之所以成功,就在于太多人为它摇旗呐喊了。搞软硬件开发的,搞培训的…真是人心齐泰山移呀! Android彻底占据市场之后,基于H5的OS又来了一波小高潮。2013

STM32H743 RCC时钟部分

对着背影说爱祢 提交于 2020-01-10 07:45:38
摘要 通过输入时钟和输出时钟解析STM32H743的时钟树,并为最小系统程序、PLL动态调整、CPU的外设分配、外设在低功耗模式下的运行、CPU频率的动态调整提供了参考依据。 目录 1 术语 1.1 外设Peripherals 1.2 总线bus和桥bridges 1.3 锁相环PLL 1.4 核心时钟 Kernel clcock 1.5 RCC 1.6 单词/其他 2 输入时钟 2.1 内部震荡器 2.1.1 HSE 2.1.2 HSI 2.2 外部振荡器 2.3 锁相环 3 输出时钟[7.5.1] 3.1 核心时钟 Kernel clcock 3.2 系统时钟 SYS_CK 4 外设分配 4.1 外设分配与核心时钟 4.2 通常情况下的外设分配(CRun): 4.3 低功耗设计:CSleep模式下的外设分配 4.4 低功耗设计:CStop模式下的外设分配 5 本文未说明的功能 6 参考文件 1 术语 1.1 外设Peripherals 手册中的外设分片内外设和片外外设,外设的“外”是相对于CPU而言的。其中片外外设可以是通过SPI和UART连接的传感器芯片。片内外设由可分为两类,一类是如定时器和DMA那样可以仅仅在MCU内部运行,无需与片外外设交互的单元(虽然它们也能和片外外设交互),另一类指如SPI那样的芯片内部用于与外部设备连接的接口电路和总线 [4] 。按我这样的分类方式

如何升级Linux内核(RHEL/Fedora/CentOS升级内核 & Debian/Ubuntu升级内核)

不问归期 提交于 2020-01-10 07:29:24
转载来源: https://www.cyberciti.biz/faq/linux-kernel-upgrade-howto/ 如何升级Linux内核 升级我的Linux内核?我想升级内核而不从源代码编译,即二进制升级。如何在Linux中执行内核的实际升级? 只有在以下情况下才需要编译内核: =>您需要为特定任务(如嵌入式内核)定制内核。 =>应用第三方安全补丁。 =>您需要将特定补丁应用于Linux 在Red Hat企业Linux版本<= 4.x中升级内核 如果您的系统已在Red Hat Network(RHN)中注册,则可以按如下方式 使用up2date 命令: # up2date -f kernel 对于SMP内核(多核或多CPU),使用命令: # up2date -f kernel-smp 在Fedora Linux / CentOS / RHEL 5中升级内核 使用yum命令升级内核: # yum update kernel 如果您已下载RPM文件,请使用 rpm命令 : # rpm -ivh kernel* 在Debian或Ubuntu Linux中升级内核 使用 apt-get命令 。首先找到你的内核版本: $ uname -r 接下来找到可用的内核映像: $ apt-cache search linux-image 现在通过显式指定版本号来安装内核: # apt

Learning Kernel Programming [closed]

本秂侑毒 提交于 2020-01-10 06:14:08
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I want to learn lLinux Kernel programming. What would be the starting points for that? What could be some of the simpler problems to target? 回答1: Try to get hold of Robert Love's book on Linux Kernel Programming. Its very concise and easy to follow. After that or along with that, you may want to take a look at

Receiving SIGINT and exception Handles in Linux

落爺英雄遲暮 提交于 2020-01-10 04:38:06
问题 Let's say we have a program in C that uses the sleep() function The program executes and goes to sleep. Then we type ctrl-c to send a SIGINT signal to the process. We know that the default action upon receipt of a SIGINT is to terminate the process, we also know that the sleep() function resume the process whenever the sleeping process receives a signal. And my textbook says in order to allow sleep() function to return, we must install a SIGINT handler like this: void handler(int sig){ return

Linux Yum命令

随声附和 提交于 2020-01-09 20:28:44
一. yum是什么 yum = Yellow dog Updater, Modified 主要功能是更方便的添加/删除/更新RPM包. 它能自动解决包的倚赖性问题. 它能便于管理大量系统的更新问题 注:为什么要使用yum而不用apt,最简单的原因,Fedora自带 二. yum特点 *可以同时配置多个资源库( Repository) *简洁的配置文件 (/etc/yum.conf) *自动解决增加或删除rpm包时遇到的倚赖性问题 *使用方便 *保持与RPM数据库的一致性 三. yum安装 Fedora自带 #rpm -ivh yum-2.0.4-2.noarch.rpm 四. yum配置 注:修改和增加配置文件中的资源库,加快下载速度和拥有更多可更新的rpm包 将/etc/yum.conf的内容全部替换为 [main] cachedir=/var/cache/yum debuglevel=2 logfile=/var/log/yum.log pkgpolicy=newest distroverpkg=fedora-release tolerant=1 exactarch=1 [fedora-us-1] name=Fedora Core 1 -- Fedora US mirror baseurl=ftp://mirrors.kernel.org/fedora.us/fedora

【kernel】内核版本添加字符和内核版本'+'解决

北城余情 提交于 2020-01-09 18:19:22
每次由于git仓库编译出来每次都带有'+', 导致都需要使用git archive单独拉出一个干净的源码出来编译,这样一方面要重新编译,耗费时间,另一方面,改动会更麻烦,可能要本地来回打patch. 于是分享下面来解决这个问题。 有个简单的办法 :无论kernel还是uboot,都可以在本地仓库的根目录下touch .scmversion空文件,然后编译即可, .config中CONFIG_LOCALVERSION_AUTO为No, CONFIG_LOCALVERSION="", 如果不配置Auto可能导致镜像用不了 1.问题描述 编译2.6.35.7 kernel版本的时候发现,“2.6.35.7“的内核版本编译成功后生成的版本号变成了“2.6.35.7+”,为什么后面会多一个加号呢?问题出现在linux的版本控制这一块: 打开Makefile我们可以在文件的最上面可以发现 VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 35 EXTRAVERSION = .7 NAME = Yokohama 这些就是告诉我们内核版本的版本号,生成出来的版本号理论上不应带+号,但为什么带+号呢? include/config/kernel.release文件是生成的带有版本号的文件,该文件由内核顶层Makefile的如下脚本处理: # Store (new)

Why can't you sleep while holding spinlock?

强颜欢笑 提交于 2020-01-09 09:08:11
问题 In the linux kernel, why can't you sleep while holding a spinlock? 回答1: Example: your driver is executing and has just taken out a lock that controls access to its device. While the lock is held, the device issues an interrupt, which causes your interrupt handler to run. The interrupt handler, before accessing the device, must also obtain the lock. Taking out a spinlock in an interrupt handler is a legitimate thing to do; that is one of the reasons that spinlock operations do not sleep. But

经典CNN网络结构

北战南征 提交于 2020-01-09 04:09:24
经典CNN网络结构 Le-Net5 网络结构 def inference ( input_tensor , train , regularizer ) : #第一层:卷积层,过滤器的尺寸为5×5,深度为6,不使用全0补充,步长为1。 #尺寸变化:32×32×1->28×28×6 with tf . variable_scope ( 'layer1-conv1' ) : conv1_weights = tf . get_variable ( 'weight' , [ 5 , 5 , 1 , 6 ] , initializer = tf . truncated_normal_initializer ( stddev = 0.1 ) ) conv1_biases = tf . get_variable ( 'bias' , [ 6 ] , initializer = tf . constant_initializer ( 0.0 ) ) conv1 = tf . nn . conv2d ( input_tensor , conv1_weights , strides = [ 1 , 1 , 1 , 1 ] , padding = 'VALID' ) relu1 = tf . nn . relu ( tf . nn . bias_add ( conv1 , conv1_biases ) )

gcc gnu assembly kernel in real mode

我怕爱的太早我们不能终老 提交于 2020-01-07 06:47:20
问题 i am trying to build a 16bit kernel in gcc gnu assembly while my bootloader is written in pure assembly but i have trouble printing out strings while single character are okay: Here is my bootloader.asm: org 0x7c00 bits 16 section .text mov ax,0x1000 mov ss,ax mov sp,0x000 mov esp,0xfffe xor ax,ax mov es,ax mov ds,ax mov [bootdrive],dl mov bh,0 mov bp,zeichen mov ah,13h mov bl,06h mov al,1 mov cx,6 mov dh,010h mov dl,01h int 10h load: mov dl,[bootdrive] xor ah,ah int 13h jc load load2: mov ax