由于 uboot 会使用到一些经过编译才会生成的文件,因此,我们在分析 uboot的时候,需要先编译一下 uboot 源码工程。
这里所用的开发板是 nand-flash 版本。
本文学习续上一篇文章,如下:
IMX6ULL移植篇-uboot源码目录表_凌肖战的博客-CSDN博客
编译后的 uboot 源码目录如下:
wangtian@wangtian-virtual-machine:~/zhengdian_Linux/linux/uboot/alientek_uboot/uboot-imx-rel_imx_4.1.15_2.1.0_ga_alientek$ ls
api examples load.imx tools
arch fs MAINTAINERS u-boot
board imx6ull_alientek_nand.sh MAKEALL u-boot.bin
cmd imxdownload Makefile u-boot.cfg
common imxdownload.c net uboot.code-workspace
config.mk imxdownload.h post u-boot.imx
configs include README u-boot.lds
disk Kbuild scripts u-boot.map
doc Kconfig snapshot.commit u-boot-nodtb.bin
drivers lib System.map u-boot.srec
dts Licenses test u-boot.sym
这个文件夹里面存放着和架构有关的文件。
I.MX6ULL 使用的 Cortex-A7 内核,Cortex-A7 属于 armv7,所以我们要关心 “armv7” 这个文件夹。
arch/arm/cpu/目录下的 u-boot.lds 就是整个 uboot 的链接脚本,即ARM 芯片所使用的 u-boot 链接脚本文件!
uboot的根目录下也有 u-boot.lds文件,这两个文件是一样的。根目录下的u-boot.lds文件是由 “arch/arm/cpu” 目录下的 u-boot.lds生成的。
board 文件夹就是和具体的板子有关的,使用的 I.MX 系列以前属于 freescale,只是 freescale 后来被 NXP 收购了。
所以,我们可以找到名为 “freescale” 的文件夹。在里面找到和 mx6u(I.MX6UL/ULL)有 关的文件夹。
如下图所示:
drwxrwxr-x 2 wangtian wangtian 4096 5月 25 2019 mx6ul_14x14_ddr3_arm2
drwxrwxr-x 2 wangtian wangtian 4096 9月 6 16:44 mx6ull_alientek_emmc
drwxrwxr-x 2 wangtian wangtian 4096 9月 6 17:22 mx6ull_alientek_nand
drwxrwxr-x 2 wangtian wangtian 4096 5月 25 2019 mx6ull_ddr3_arm2
drwxrwxr-x 2 wangtian wangtian 4096 1月 2 2020 mx6ullevk
这 5 个文件夹对应 5 种板子,以“mx6ul”开头的表示使用 I.MX6UL 芯片的板子,以 mx6ull 开头的表示使用 I.MX6ULL 芯片的板子。
mx6ullevk 是 NXP 官方的I.MX6ULL开发板,正点原子的ALPHA开发板就是在这个基础上开发的,这里本人推测出 mx6ull_alientek_nand文件可能是 nand-flash版的 IMX6ULL开发板使用的文件。
mx6ull_14x14_ddr3_arm2_defconfig
mx6ull_14x14_ddr3_arm2_emmc_defconfig
mx6ull_14x14_ddr3_arm2_epdc_defconfig
mx6ull_14x14_ddr3_arm2_nand_defconfig
mx6ull_14x14_ddr3_arm2_qspi1_defconfig
mx6ull_14x14_ddr3_arm2_spinor_defconfig
mx6ull_14x14_ddr3_arm2_tsc_defconfig
mx6ull_alientek_emmc_defconfig
mx6ull_alientek_nand_defconfig
make mx6ull_14x14_ddr512_emmc_defconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- mx6ull_alientek_nand_defconfig
下一篇继续说明 uboot的主要的一些目录或文件作用。