本文参考自openeuler/raspberrypi的官方文档
https://gitee.com/openeuler/raspberrypi/tree/master/documents
本文用的是Ubuntu18.04镜像,需要配置环境
sudo apt-get install gcc
sudo apt-get install g++
sudo apt install make
sudo apt install make-guile
sudo apt-get install libncurses5-dev
sudo apt install bison flex
sudo apt install libelf-dev
sudo apt install libssl-dev
如果是Openeuler环境需要配置
sudo yum install flex bison
一、交叉编译内核
环境1
操作系统:ubuntu16.04
架构:x86_64
1. 安装依赖软件
apt-get install build-essential gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu bc libssl-dev -y
2. 下载内核源码
根据内核不同版本,需要下载不同仓库的不同分支:
5.10 内核:
openEuler 21.09 :git clone git@gitee.com:openeuler/raspberrypi-kernel.git -b openEuler-21.09 && cd raspberrypi-kernel
openEuler 21.09 :git clone git@gitee.com:openeuler/kernel.git -b openEuler-21.03 && cd kernel
4.19 内核:
openEuler 20.03 LTS:git clone git@gitee.com:openeuler/raspberrypi-kernel.git -b openEuler-20.03-LTS && cd raspberrypi-kernel
openEuler 20.09:git clone