适用于mediatek,65xx智能机系列
先看一个已有的系统调用
(1) 系统调用号
//./include/linux/syscalls.h
./kernel/include/linux/unistd.h -->#include <asm/unistd.h>
./kernel/arch/arm/include/asm/unistd.h
#define __NR_restart_syscall (__NR_SYSCALL_BASE+ 0)
#define __NR_exit (__NR_SYSCALL_BASE+ 1)
#define __NR_fork (__NR_SYSCALL_BASE+ 2)
#define __NR_read (__NR_SYSCALL_BASE+ 3)
#define __NR_write
在Mediatek ARM设备上添加自定义系统调用

本文介绍了如何在Mediatek 65xx智能机系列上添加新的系统调用。首先,查看现有的系统调用号定义在`<asm/unistd.h>`中,接着修改`calls.S`的系统调用表,然后在特定驱动文件中实现新系统调用的函数。通过编译内核、烧录boot.img,最后在用户空间通过C++程序调用新系统调用并验证其功能。
最低0.47元/天 解锁文章
1541

被折叠的 条评论
为什么被折叠?



