
kernel
洪大宇
CODE CODE DAY DAY UP
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
SD boot 引导部分
zynqmp sd boot 部分原创 2023-06-05 10:23:55 · 136 阅读 · 0 评论 -
netlink
…原创 2023-03-19 21:15:45 · 91 阅读 · 0 评论 -
退出 qemu -nograph
... ...原创 2023-03-13 00:32:09 · 249 阅读 · 0 评论 -
gcc-12 kernel 5.15.x 编译错误修改
... ...原创 2023-03-12 22:41:21 · 416 阅读 · 0 评论 -
buildroot 构建 文件系统和cross-chain
... ...原创 2023-02-23 00:50:44 · 125 阅读 · 0 评论 -
脱离petalinux 最后一步,自己构建 交叉编译工具
... ...原创 2023-02-22 11:29:45 · 426 阅读 · 0 评论 -
Kernel gpio mdio
... ...原创 2023-02-19 18:18:33 · 158 阅读 · 0 评论 -
stap必要配置
.. ....原创 2023-02-19 15:19:43 · 298 阅读 · 0 评论 -
img 常用 脚本
... ...原创 2023-02-19 14:43:27 · 123 阅读 · 0 评论 -
qemu 启动 img命令注解
... ...原创 2023-02-19 12:21:13 · 629 阅读 · 0 评论 -
内核I2C 时序
。。。原创 2022-10-10 21:10:22 · 493 阅读 · 0 评论 -
自定义修改网卡的时钟速率
... ...原创 2022-09-13 14:51:01 · 394 阅读 · 0 评论 -
mtd spi nor reboot error
https://patchwork.ozlabs.org/project/linux-mtd/patch/20180727183313.137943-1-computersforpeace@gmail.com/原创 2022-05-04 09:23:25 · 305 阅读 · 0 评论 -
zynqmp board kernel 和 fpga 升级脚本
#!/bin/bashloadfpga(){ cp -rf $1 /lib/firmware/ echo 0 > /sys/class/fpga_manager/fpga0/flags echo $1 > /sys/class/fpga_manager/fpga0/firmware && echo "FPGA LOAD DONE" 1>&2 || \ echo "FPGA LOAD ERROR" 1&原创 2022-03-16 09:42:28 · 712 阅读 · 0 评论 -
kernel: make tags 时的告警修改
ctags: Warning: --extra option is obsolete; use --extras instead解决方法:找到ctags的实际调用的命令的脚本grep -nr “--extra”结果如下所示:scripts/tags.sh:264: --extra=+fq --c-kinds=+px --fields=+iaS --langmap=c:+.h将“–extra” 修改为“–extras” 就可以生效...原创 2022-03-02 10:26:12 · 546 阅读 · 0 评论 -
caddr_t 与(void*)的使用区别
caddr_t 遗留的bsd 类型, 例如在struct ifconf 中的 ifc_buf 中, 就需要使用caddr_t 进行强制类型转换, 实际的意义和(void*) 是一致的(void*)现在所有的任意指针类型全是使用的是(void*), posix 标准接口是不识别caddr_t 的类型memcpy 就是(void* ) 任意类型的指定...原创 2022-02-07 14:04:41 · 1700 阅读 · 0 评论 -
vim 堪比 vscode的配置方法
Vim 配置文件set nocompatibleset rtp+=~/.vim/bundle/Vundle.vim " 加入运行时路径call vundle#begin() " 初始化" 插件列表开始Plugin 'VundleVim/Vundle.vim'Plugin 'godlygeek/tabular'Plugin 'vim-airline/vim-airline'Plugin 'vim-airline/vim-airline-them.原创 2022-02-02 21:12:36 · 1048 阅读 · 0 评论 -
2022 年最开心的事
生活开始有了盼头原创 2022-01-29 14:43:01 · 155 阅读 · 0 评论 -
Xilinx QSPI Flash 问题标注方法
bashWhat are the boot image requirements when using larger than 16MB QSPI and RSA Authentication?The BootROM uses the Linear mode to access the first 16MB of the QSPI flash to look for the boot image. There are limitations on where the boot image coul.原创 2022-01-27 17:21:34 · 800 阅读 · 0 评论 -
实用的bit 位操作
//相应BIT 位的设置#define BIT(x) (1<<(x)) //相应BIT 位的遮掩#define COVER(x,y) (~(BIT(x))&(y))原创 2022-01-25 16:16:51 · 865 阅读 · 0 评论 -
工作总结: 20220124
原创 2022-01-24 18:18:50 · 185 阅读 · 0 评论 -
axi dma cyclic mode调试完成
oh yeach原创 2022-01-23 17:35:25 · 687 阅读 · 0 评论 -
关于AXI DMA CYCLIC 调试过程中的问题
cyclic 必须是两个以上的BD 块儿而且最后的BD 不能是BD 连中的块儿原创 2022-01-23 16:21:34 · 828 阅读 · 0 评论 -
axi dma 常见的中断报错源码
// axi dma 中断判断 常见错误;这个对于排查错误很有帮助 if (status & XILINX_DMA_DMASR_ERR_IRQ) { /* * An error occurred. If C_FLUSH_ON_FSYNC is enabled and the * error is recoverable, ignore it. Otherwise flag the error. * * Only recoverable errors can be cl原创 2022-01-23 14:46:29 · 3409 阅读 · 1 评论 -
xilinx axi dma 深入开发(一)
以下为官方 axidma-proxy 源码/** * Copyright (C) 2021 Xilinx, Inc * * Licensed under the Apache License, Version 2.0 (the "License"). You may * not use this file except in compliance with the License. A copy of the * License is located at * * http://.原创 2022-01-22 20:09:03 · 2215 阅读 · 4 评论 -
周六日:休整 代码
这个设备树上面是由官方提供的示例首先明确一个概念,设备树是一个给内核传递配置的文本内核会从内存中将设备树进行解析, 然后 match plat , plat bus init plat device init palt device probe … …原创 2022-01-22 12:26:39 · 137 阅读 · 0 评论 -
kernel中测速的方法
static unsigned long long dmatest_persec(s64 runtime, unsigned int val){#define UINT_MAX (0UL) unsigned long long per_sec = 1000000; if (runtime <= 0) return 0; /* drop precision until runtime is 32-bits */ while (runtime > UINT_MAX) { r.原创 2022-01-20 15:26:55 · 285 阅读 · 0 评论 -
devicetree arm,cortex-a9-gic
"#interrupt-cells": const: 3 description: | The 1st cell is the interrupt type; 0 for SPI interrupts, 1 for PPI interrupts. The 2nd cell contains the interrupt number for the interrupt type. SPI interrupts are in the range原创 2022-01-20 15:08:14 · 232 阅读 · 0 评论 -
zynq7000 clk 设备树时钟对照表
在kernel 设备树 解析代码 中 根据 clkc 的数组 名称, 找到相应的时钟, 而这些时钟,在kernel 中有一个寄存器的,查看时钟的设置以上图的时钟设置 就是 用的标号 为15 fclk0 的 时钟配置, 而这个时钟配置 ,已经根据硬件描述, 写入 zynq_top.dtsi 中,使用读取配置...原创 2022-01-19 17:16:06 · 1022 阅读 · 4 评论 -
kernel fls
/** * fls - find last (most-significant) bit set * @x: the word to search * * This is defined the same way as ffs. * Note fls(0) = 0, fls(1) = 1, fls(0x80000000) = 32. */static __always_inline int fls(int x){ int r = 32; if (!x) return 0; if原创 2022-01-19 14:30:07 · 218 阅读 · 0 评论 -
kernel GENMASK
#define GENMASK(start,end)定义在 linux/bits.h将start ~ end 全部设置为 1原创 2022-01-19 13:40:21 · 2222 阅读 · 0 评论 -
内核ioread,iowrite volatie 的正确使用
__iomem 就是一个 很好用的 io mem 口#ifndef ioread16#define ioread16 ioread16static inline u16 ioread16(const volatile void __iomem *addr) //这样没有任何问题{ return readw(addr);}#endif原创 2022-01-19 12:09:02 · 678 阅读 · 0 评论 -
kenrel volatile关键字
为了内存的安全性和原子性,内核中的volatile 关键字,一般情况下使用都会显示是告警的状态硬件不使用volatile, 可以完成内存的实时更新吗? 这个在ioremap 后并没有发现,寄存状态无法实时更新的情况,具体的原因是未知的但是根据其他博主的描述, 使用volatile 关键字,之后, 会直接刷新内存, 改变内存中变量的数值,而且这个变量不会被cpu 缓存在 cache 中,或者其他寄存器的存储空间中...原创 2022-01-17 12:45:06 · 249 阅读 · 0 评论 -
xilinx axi dma linux 快速搭建框架
kernel axi dma 驱动 也是更具数据手册来的, 先把业务简单跑起来,然后在做到内核里,熟悉 dma engine 框架原创 2022-01-14 20:31:03 · 670 阅读 · 0 评论 -
kenrel 延时判断等待源码
#define read_poll_timeout_atomic(op, val, cond, delay_us, timeout_us, \ delay_before_read, args...) \({ \ u64 __timeout_us = (timeout_us); \ unsigned long __delay_us = (delay_us); \ ktime_t __timeout = ktime_add_us(ktime_get(), __timeout_us); \ i原创 2022-01-13 19:25:12 · 758 阅读 · 0 评论 -
AXI DMA DRIVER 阶段性 kernel driver 构建并测试(三 )
可以使用file_operators 绑定 dma 特定的操作模式 ,明天就可以加上寄存器 整体测试原创 2022-01-11 17:20:23 · 386 阅读 · 0 评论 -
ioctl kernel 构建注意事项
cmd 命令码的构建书中截图原创 2022-01-11 13:19:55 · 536 阅读 · 0 评论 -
kernel 自定义字符驱动 第一次实验
第一次创建哈, Oh yeach原创 2022-01-11 10:46:58 · 588 阅读 · 0 评论 -
Xilinx axi dma driver 驱动构建 (二)
在xilinx axi_dma 驱动 中大部分都是初始化,和分配的通道的 功能xilinx dma 的初始化驱动 完全可以采用 寄存器的方式代替; 就拿我们的业务例子来说, 是可以的功能单一简单主要问题是 dma 的 phy 地址 和 logic 地址的分配问题这个问题已经解决了, 使用 dma_alloc_coherant() 让内核分配内存并且 ,返回dma 需要用到的的物理地址 ,而这个函数返回的是一个内核中使用的虚地址mmap的问题 也已经解决了 dma_mmap_coherent() .原创 2022-01-10 21:26:38 · 1517 阅读 · 3 评论 -
Xilinx Axi Dma Userspace模式下 寄存器 +MMAP 测试程序
新上传的测试程序等kenrel的部分 完成测试没问题, 可以分享一下 框架图 (long long time)gtthub https://github.com/HongDaYuGithub/fpga_arm_driver.git邮箱: hongdayu.mars@gmail.com 有问题可以相互讨论#include <cstdio>#include "zynq7035.h"#include <string>#include "ftp.h"..原创 2022-01-08 10:40:27 · 1541 阅读 · 0 评论