1、安装交叉编译器arm-linux-gnueabihf-xxx,
命令:apt-cache search arm-linux-gnueabihf ,搜索后得到如下结果,安装第一个软件包,命令为:
sudo apt install binutils-arm-linux-gnueabihf
binutils-arm-linux-gnueabihf - GNU binary utilities, for arm-linux-gnueabihf target
cpp-5-arm-linux-gnueabihf - GNU C preprocessor
cpp-arm-linux-gnueabihf - GNU C preprocessor (cpp) for the armhf architecture
g++-5-arm-linux-gnueabihf - GNU C++ compiler
g++-arm-linux-gnueabihf - GNU C++ compiler for the armhf architecture
gcc-5-arm-linux-gnueabihf - GNU C compiler
gcc-5-arm-linux-gnueabihf-base - GCC, the GNU Compiler Collection (base package)
gcc-arm-linux-gnueabihf - GNU C compiler for the armhf architecture
cpp-4.7-arm-linux-gnueabihf - GNU C preprocessor
cpp-4.8-arm-linux-gnueabihf - GNU C preprocessor
cpp-4.9-arm-linux-gnueabihf - GNU C preprocessor
g++-4.7-arm-linux-gnueabihf - GNU C++ compiler
g++-4.7-multilib-arm-linux-gnueabihf - GNU C++ compiler (multilib files)
g++-4.8-arm-linux-gnueabihf - GNU C++ compiler
g++-4.8-multilib-arm-linux-gnueabihf - GNU C++ compiler (multilib support)
g++-4.9-arm-linux-gnueabihf - GNU C++ compiler
g++-4.9-multilib-arm-linux-gnueabihf - GNU C++ compiler (multilib support)
g++-5-multilib-arm-linux-gnueabihf - GNU C++ compiler (multilib support)
g++-multilib-arm-linux-gnueabihf - GNU C++ compiler for the armhf architecture
gcc-4.7-arm-linux-gnueabihf - GNU C compiler
gcc-4.7-arm-linux-gnueabihf-base - GCC, the GNU Compiler Collection (base package)
gcc-4.7-multilib-arm-linux-gnueabihf - GNU C compiler (multilib files)
gcc-4.8-arm-linux-gnueabihf - GNU C compiler
gcc-4.8-arm-linux-gnueabihf-base - GCC, the GNU Compiler Collection (base package)
gcc-4.8-multilib-arm-linux-gnueabihf - GNU C compiler (multilib support)
gcc-4.9-arm-linux-gnueabihf - GNU C compiler
gcc-4.9-arm-linux-gnueabihf-base - GCC, the GNU Compiler Collection (base package)
gcc-4.9-multilib-arm-linux-gnueabihf - GNU C compiler (multilib support)
gcc-5-multilib-arm-linux-gnueabihf - GNU C compiler (multilib support)
gcc-multilib-arm-linux-gnueabihf - GNU C compiler for the armhf architecture
gccgo-4.7-arm-linux-gnueabihf - GNU Go compiler
gccgo-4.8-arm-linux-gnueabihf - GNU Go compiler
gccgo-4.9-arm-linux-gnueabihf - GNU Go compiler
gccgo-5-arm-linux-gnueabihf - GNU Go compiler
gccgo-arm-linux-gnueabihf - Go compiler (based on GCC) for the armhf architecture
gcj-4.8-arm-linux-gnueabihf - GCJ byte code and native compiler for Java(TM)
gcj-4.9-arm-linux-gnueabihf - GCJ byte code and native compiler for Java(TM)
gcj-5-arm-linux-gnueabihf - GCJ byte code and native compiler for Java(TM)
gcj-arm-linux-gnueabihf - GNU Java compiler (based on GCC) for the armhf architecture
gdc-4.8-arm-linux-gnueabihf - GNU D compiler (version 2), based on the GCC backend
gdc-4.9-arm-linux-gnueabihf - GNU D compiler (version 2), based on the GCC backend
gdc-5-arm-linux-gnueabihf - GNU D compiler (version 2)
gdc-5-multilib-arm-linux-gnueabihf - GNU D compiler (version 2, multilib support)
gdc-arm-linux-gnueabihf - GNU D compiler (based on GCC) for the armhf architecture
gdc-multilib-arm-linux-gnueabihf - GNU D compiler (based on GCC) for the armhf architecture
gfortran-4.7-arm-linux-gnueabihf - GNU Fortran compiler
gfortran-4.7-multilib-arm-linux-gnueabihf - GNU Fortran compiler (multilib files)
gfortran-4.8-arm-linux-gnueabihf - GNU Fortran compiler
gfortran-4.8-multilib-arm-linux-gnueabihf - GNU Fortran compiler (multilib support)
gfortran-4.9-arm-linux-gnueabihf - GNU Fortran compiler
gfortran-4.9-multilib-arm-linux-gnueabihf - GNU Fortran compiler (multilib support)
gfortran-5-arm-linux-gnueabihf - GNU Fortran compiler
gfortran-5-multilib-arm-linux-gnueabihf - GNU Fortran compiler (multilib support)
gfortran-arm-linux-gnueabihf - GNU Fortran 95 compiler for the armhf architecture
gfortran-multilib-arm-linux-gnueabihf - GNU Fortran 95 compiler for the armhf architecture
gnat-5-arm-linux-gnueabihf - GNU Ada compiler
gnat-5-sjlj-arm-linux-gnueabihf - GNU Ada compiler (setjump/longjump runtime library)
gobjc++-4.7-arm-linux-gnueabihf - GNU Objective-C++ compiler
gobjc++-4.7-multilib-arm-linux-gnueabihf - GNU Objective-C++ compiler (multilib files)
gobjc++-4.8-arm-linux-gnueabihf - GNU Objective-C++ compiler
gobjc++-4.8-multilib-arm-linux-gnueabihf - GNU Objective-C++ compiler (multilib support)
gobjc++-4.9-arm-linux-gnueabihf - GNU Objective-C++ compiler
gobjc++-4.9-multilib-arm-linux-gnueabihf - GNU Objective-C++ compiler (multilib support)
gobjc++-5-arm-linux-gnueabihf - GNU Objective-C++ compiler
gobjc++-5-multilib-arm-linux-gnueabihf - GNU Objective-C++ compiler (multilib support)
gobjc++-arm-linux-gnueabihf - GNU Objective-C++ compiler for the armhf architecture
gobjc++-multilib-arm-linux-gnueabihf - GNU Objective-C++ compiler for the armhf architecture
gobjc-4.7-arm-linux-gnueabihf - GNU Objective-C compiler
gobjc-4.7-multilib-arm-linux-gnueabihf - GNU Objective-C compiler (multilib files)
gobjc-4.8-arm-linux-gnueabihf - GNU Objective-C compiler
gobjc-4.8-multilib-arm-linux-gnueabihf - GNU Objective-C compiler (multilib support)
gobjc-4.9-arm-linux-gnueabihf - GNU Objective-C compiler
gobjc-4.9-multilib-arm-linux-gnueabihf - GNU Objective-C compiler (multilib support)
gobjc-5-arm-linux-gnueabihf - GNU Objective-C compiler
gobjc-5-multilib-arm-linux-gnueabihf - GNU Objective-C compiler (multilib support)
gobjc-arm-linux-gnueabihf - GNU Objective-C compiler for the armhf architecture
gobjc-multilib-arm-linux-gnueabihf - GNU Objective-C compiler for the armhf architecture
pkg-config-arm-linux-gnueabihf - manage compile and link flags for libraries for armhf architecture
qt5-qmake-arm-linux-gnueabihf - Qt 5 qt5-qmake-arm-linux-gnueabihf Makefile generator tool
gcc-5-plugin-dev-arm-linux-gnueabihf - Files for GNU GCC plugin development.
2、从github下载rpi3的内核代码
git clone https://github.com/android-rpi/kernel_rpi.git
3、进入内核源码目录
cd kernel_rpi
4、生成config文件
ARCH=arm scripts/kconfig/merge_config.sh arch/arm/configs/bcm2709_defconfig android/configs/android-base.cfg android/configs/android-recommended.cfg
5、编译生成内核zImage
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make -j8 zImage
6、编译生成dtb
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make dtbs