摘要: 最近,公司来了一次硬件升级,开发平台从全志T3(armhf)升级到全志T527(arm64),平台迁移后,想直接使用原来动态库和应用程序从而减少开发量,用户态大部分接口都运行正常,唯独ioctl接口无法调用成功。 如果要成功移植要做到以下几点: 1. 驱动要同时实现 unlocked_ioctl 和 阅读全文
posted @ 2024-04-15 15:20 秦舒云 阅读(7) 评论(0) 推荐(0) 编辑
摘要: Linux的字符串操作API 代码路径: 头文件: https://github.com/torvalds/linux/blob/master/include/linux/string.h 实现: https://github.com/torvalds/linux/blob/master/lib/s 阅读全文
posted @ 2024-01-16 11:23 秦舒云 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 转载原文:https://www.cnblogs.com/Wangzx000/p/17488378.html 核心函数 linux\include\linux\interrupt.h static inline void tasklet_schedule(struct tasklet_struct 阅读全文
posted @ 2023-11-28 09:25 秦舒云 阅读(11) 评论(0) 推荐(0) 编辑
摘要: 1. Linux中说的设备树是什么? 对于搞Linux驱动开发和BSP的工程师来说,总是不可避免的接触到设备树,那么设备树指的是什么呢?其实通常所说的设备树是指Linux内核里面的设备树文件,以.dts结尾,也叫做设备树源文件,这个文件可以通过一个叫dtc的程序把他编译成.dtb文件,编译后的文件就 阅读全文
posted @ 2023-11-20 19:59 秦舒云 阅读(272) 评论(0) 推荐(0) 编辑
摘要: 首先需要引入nix库 官方crate地址为: https://crates.io/crates/nix 在里面可以查看文档和版本信息。 nix里面有个 nix::sys::ioctl 模块,类似于C标准库的 ioctl.h,用来进行ioctl操作。 使用方法: 修改 Cargo.toml [depe 阅读全文
posted @ 2023-10-28 17:28 秦舒云 阅读(51) 评论(0) 推荐(0) 编辑
摘要: sudo apt install make gcc bc u-boot-tools bzip2 fakeroot gawk mkbootimg busybox android-sdk-build-tools android-sdk-platform-tools 问题1: usr/bin/ld: sc 阅读全文
posted @ 2023-10-18 17:17 秦舒云 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 查看各个可操作项的情况 tinymix contents 设置某个操作项 tinymix set 10 127 播放wav声音 tinyplay didi.wav 阅读全文
posted @ 2023-10-10 17:26 秦舒云 阅读(24) 评论(0) 推荐(0) 编辑
摘要: 国内的git源 https://gitee.com/mirrors_tinyalsa/tinyalsa 编译: 修改Makefile export PREFIX ?= /usr/local/tinyalsa/ export CROSS_COMPILE := arm-linux-gnueabihf- 阅读全文
posted @ 2023-10-10 13:44 秦舒云 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 教程来源 Running Stable Diffusion WebUI Using Docker | Sygil WebUI (sygil-dev.github.io) 1. 安装运行的依赖环境 1.1 安装docker (https://docs.docker.com/engine/install 阅读全文
posted @ 2023-10-08 08:57 秦舒云 阅读(148) 评论(0) 推荐(0) 编辑
摘要: alsa-lib-1.2.10 配置与编译 下载地址 https://www.alsa-project.org/files/pub/lib/alsa-lib-1.2.10.tar.bz2 export PATH=$PATH:/opt/ext-toolchain/bin/ export CC=arm- 阅读全文
posted @ 2023-10-07 09:25 秦舒云 阅读(84) 评论(0) 推荐(0) 编辑
摘要: #include <linux/init.h> #include <linux/printk.h> #include <linux/module.h> #include <linux/miscdevice.h> #include <linux/fs.h> #include <asm/uaccess. 阅读全文
posted @ 2023-09-25 11:46 秦舒云 阅读(32) 评论(0) 推荐(0) 编辑
摘要: #include <linux/init.h> #include <linux/printk.h> #include <linux/module.h> #include <linux/miscdevice.h> #include <linux/fs.h> /* 模块信息 */ #define HI_ 阅读全文
posted @ 2023-09-22 17:11 秦舒云 阅读(31) 评论(0) 推荐(0) 编辑
摘要: tools/pack/chips/sun8iw11p1/boot-resource/boot-resource.ini tools/pack/chips/sun8iw11p1/configs/default/sys_partition_linux.fex 阅读全文
posted @ 2023-09-22 13:38 秦舒云 阅读(30) 评论(0) 推荐(0) 编辑
摘要: 1. 导入交叉编译器路径加入PATH export PATH=$PATH:/opt/ext-toolchain/bin/ 我的交叉编译工具链放在 /opt/ext-toolchain下 ls /opt/ext-toolchain arm-linux-gnueabihf bin gcc-linaro- 阅读全文
posted @ 2023-09-20 10:11 秦舒云 阅读(130) 评论(0) 推荐(0) 编辑
摘要: sudo apt-get install binfmt-support qemu qemu-user-static debootstrap sudo debootstrap --arch=armhf --foreign lunar ./lunar https://mirrors.huaweiclou 阅读全文
posted @ 2023-09-06 22:41 秦舒云 阅读(18) 评论(0) 推荐(0) 编辑
摘要: #include <linux/init.h> #include <linux/printk.h> #include <linux/module.h> #include <linux/of.h> #include <linux/platform_device.h> static const stru 阅读全文
posted @ 2023-09-05 17:23 秦舒云 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 我们创建一个目录 modules,然后创建一个文件 hello_world.c,将模块的代码拷贝进来。 如果要将hello_world.c 编译为模块,需要创建一个 Makefile文件 Makefile: SRCPATH := $(shell pwd) ARCH = arm CROSS_COMPI 阅读全文
posted @ 2023-08-25 16:04 秦舒云 阅读(35) 评论(0) 推荐(0) 编辑
摘要: 通俗一点的问题就是“如何写一个内核驱动?” 新手往往并不明白驱动的具体定义是什么,我们往往拿到一款芯片,然后要给这个芯片写一个驱动代码,但是这个驱动代码到底是什么样子的?应该怎么写?就是面临的第1个问题。其实我们通常说的驱动是一个很模糊的概念,也是很多概念的集合。狭义上的驱动就是 ”驱动操作系统上一 阅读全文
posted @ 2023-08-25 15:45 秦舒云 阅读(35) 评论(0) 推荐(0) 编辑
摘要: https://gitee.com/mirrors/Linux/blob/v6.4/include/linux/miscdevice.h 79行 结构体 miscdevice struct miscdevice { int minor; const char *name; const struct 阅读全文
posted @ 2023-08-24 14:28 秦舒云 阅读(7) 评论(0) 推荐(0) 编辑
摘要: 启动的入口代码在:platform/windows/godot_windows.cpp WinMain()->main() int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nC 阅读全文
posted @ 2023-05-08 16:15 秦舒云 阅读(106) 评论(0) 推荐(0) 编辑