Zynq ZC706 传统方式移植Linux -- 编译u-boot

我用的是zc706不是zed

基本思路是:

1.安装交叉编译工具(见  https://www.cnblogs.com/idyllcheung/p/10532654.html

2.下载xilinx uboot源码 git clone https://github.com/xilinx/u-boot-xlnx.git

3.编译

make zynq_zc706_defconfig

make CROSS_COMPILE=arm-xilinx-linux-gnueabi-

出现如下错误:

*** Your GCC is older than 6.0 and is not supported
arch/arm/config.mk:66: recipe for target 'checkgcc6' failed
make: *** [checkgcc6] Error 1

修改以下部分:

vim ./arch/arm/config.mk

64行左右:

############# old ##############

else
archprepare: checkgcc6
endif

checkgcc6:
    @if test "$(call cc-name)" = "gcc" -a
            "$(call cc-version)" -lt "0600"; then
        echo '*** Your GCC is older than 6.0 and is not supported';
        false;
    fi
############# old ##############

改为:

########### new ###############
#else
#archprepare: checkgcc6
endif

#checkgcc6:
#    @if test "$(call cc-name)" = "gcc" -a
#            "$(call cc-version)" -lt "0600"; then
#        echo '*** Your GCC is older than 6.0 and is not supported';
#        false;
#    fi
########### new ###############

就是将checkgcc6目标去除,和交叉编译器版本有关

make CROSS_COMPILE=arm-xilinx-linux-gnueabi-

将u-boot.elf拷贝出来,并不是u-boot

然后在sdk中生成BOOT.bin(BOOT.bin可以直接烧到qspi中,不需要BOOT.mcs

从SDK中将上述fsbl.elf、硬件的.bit文件、u-boot.elf打包成BOOT.bin。

拷贝到sd卡里,将启动方式设置为sd卡启动,上电后就可以看到u-boot命令行,hooray,恭喜自己吧。

原文地址:https://www.cnblogs.com/idyllcheung/p/10535072.html