orangepiZero2内核编译

1.下载orangepi-build

地址:https://github.com/orangepi-xunlong/orangepi-build.git
1.下载后上传到PC机上 PC的系统必须为Ubuntu18.04
2.解压
unzip orangepi-build-main.zip
3.进入orangepi-build-main文件夹

2.编译U-boot

1.在编译之前要换成清华大学的源否则会出错 虚拟机硬盘空间至少要在25G以上否则容量会不足。
2.sudo ./build.sh
选择uboot package->orangepiZero2->legacy old stable
3.vim userpatches/config-default.conf
修改IGNORE_UPDATES=“yes”
4.cd output/debs/u-boot
5.打开开发板并切换到root用户
在PC机上scp linux-u-boot-legacy-orangepizero2_2.2.2_arm64.deb [email protected]:/root
6.登陆开发板卸载deb包
apt purge -y linux-u-boot-orangepizero2-legacy
7.安装新的deb包
dpkg -i /root/linux-u-boot-legacy-orangepizero2_2.2.2_arm64.deb
orangepiZero2内核编译_第1张图片
回车
orangepiZero2内核编译_第2张图片
回车
orangepiZero2内核编译_第3张图片
回车
reboot重启开发版

3.编译内核

1.cd orangepi-build-main
2.sudo ./build.sh
选择kernel package->orangepizero2->legacy old stable
orangepiZero2内核编译_第4张图片
回车
orangepiZero2内核编译_第5张图片
回车
orangepiZero2内核编译_第6张图片
进入
orangepiZero2内核编译_第7张图片
选择save回车
orangepiZero2内核编译_第8张图片
选择 ok回车
3。查看内核产生的deb包
ls output/debs/linux-*
在这里插入图片描述
4.cd output/debs/
mkdir test
cp linux-image-legacy-sun50iw9_2.2.2_arm64.deb test/
cd test
dpkg -x linux-image-legacy-sun50iw9_2.2.2_arm64.deb .
cd …
5.登录开发板切换到root用户
在pc上scp linux-image-legacy-sun50iw9_2.2.2_arm64.deb [email protected]:/root
回到开发板
apt purge -y linux-image-legacy-sun50iw9
dpkg -i /root/linux-image-legacy-sun50iw9_2.2.2_arm64.deb

你可能感兴趣的:(orangePi,Zero2,linux,运维,服务器)