从0开始运行主线Linux内核
本博客以Xunlong Orangepi Zero为例,运行最新Linux 4.11.0-rc4内核。
[Mainline U-Boot & Mainline Kernel & Rootfs Howto]
Mainline U-Boot
# 克隆u-boot仓库
git clone git://git.denx.de/u-boot.git
# 编译配置
make orangepi_zero_defconfig
# 交叉编译
make V=s -j8 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-
编译完成在源码根目录出现目标文件:
- u-boot-sunxi-with-spl.bin
Mainline Kernel
# 克隆kernel仓库
git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
# 编译配置
make ARCH=arm sunxi_defconfig
# 交叉编译
make V=s -j8 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-
编译完成在源码目录出现目标文件:
- zImage (arch/arm/boot/zImage)
- sun8i-h2-plus-orangepi-zero.dtb (arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dtb)
Rootfs
1\ busybox
# 克隆busybox仓库
git clone git://git