一)环境
a)ubuntu18.04
b)arm-linux-gnueabi-gcc 7.5.0 / gcc 7.5.0
c)FriendlyArm tiny4412 标准版
二)目标
a)上电从SD卡启动u-boot
b)u-boot从SD卡启动linux
c)linux从SD卡加载根文件系统
d)使用当前最新版u-boot-2020.01.tar.bz2;下载地址:ftp://ftp.denx.de/pub/u-boot/
e)使用当前最新版busybox-1.31.1.tar.bz2,下载地址:https://busybox.net/downloads/
f)使用当前最新版linux-5.5.tar.xz,下载地址:https://mirrors.edge.kernel.org/pub/linux/kernel/v5.x/
三)步骤
a)Makefile
1)ARCH = arm
2)CROSS_COMPILE = arm-linux-gnueabi-
b)tiny4412_defconfig
1)cp arch/arm/configs/exynos_defconfig arch/arm/configs/tiny4412_defconfig
2)cp arch/arm/configs/tiny4412_defconfig .config
c)make menuconfig
1)[Kernel hacking]->[arm Debugging]->[Kernel low-level debugging functions]
2)[Kernel hacking]->[arm Debugging]->[Enable decompressor debugging via DEBUG_LL output]
3)[Kernel hacking]->[arm Debugging]->[Early printk]
d)make uImage LOADADDR=0x40007000 -j12
e)exynos4412-tiny4412.dts
1)add line "bootargs = "root=/dev/ram0 rw rootfstype=ext4 console=ttySAC0,115200 init=/linuxrc earlyprintk";" in chosen node
f)make dtbs
g)cp arch/arm/boot/uImage to SD
h)cp arch/arm/boot/dts/exynos4412-tiny4412.dtb to SD
结束语:
1)u-boot.bin, ramdisk.img,uImage,exynos4412-tiny4412.dtb已经准备完毕;
2)通过三星提供的工具烧录u-boot.bin到SD卡;
3)拷贝ramdisk.img,uImage,exynos4412-tiny4412.dtb到SD卡根目录;
4)TINY4412从SD卡启动;
5)串口0打印uboot和kernel信息,整个移植过程完成,下一步开始驱动篇.