Linux_H6_Orangepi3LTS

Linux_H6_Orangepi3LTS

目录

  • Linux_.H6_Orangepi3LTS
    • Headers
      • hello
      • linux-headers-next-sun50iw6_3.0.4_arm64.deb

常用命令

1
2
sudo poweroff 	#关机
sudo reboot #重启

Headers

Headers 的安装

使用Orangepi 编译

直接安装

1
dpkg -i linux-headers-next-sun50iw6_3.0.4_arm64.deb

使用X86 编译

设置头文件目录

运行hello程序

编译

1
make

安装卸载驱动和

1
2
insmod hello.ko
rmmod hello

内核驱动信息打印

1
2
3
dmesg | grep "Hello"
dmesg | grep "embeded_platform"
dmesg

Git

1
2
git config --global user.name "Nuozhihui"
git config --global user.email 1285574579@qq.com

linux_driver目录

hello world

修改DTS,Linux内核文件

路径

1
cd /home/jinchang/桌面/oPI/SDK/orangepi-build/kernel/orange-pi-5.16-sunxi64/arch/arm64/boot/dts

image-20230112003424995

插入DTS

注意位置!!

image-20230112035621576

一、查看 deb 信息的命令:

1
2
查看deb 信息命令内核
dpkg --get-selections| grep linux

image-20230112060355289

1
2
3
4
5
6
卸载DTS的包(对应)----需要更改什么就卸载什么
sudo apt-get remove --purge linux-dtb-next-sun50iw6

安装新的DTS的包(对应)
sudo dpkg -i linux-dtb-next-sun50iw6_3.0.8_arm64.deb

查看是否挂载

1
ls proc/device-tree/ | grep test_demo

image-20230113004415496