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,恭喜自己吧。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM