您的位置:首页 > 产品设计 > UI/UE

记编译Android uboot的bug-There are some error(s) while building uboot, please use command make to check.

2018-03-21 10:27 651 查看

bug描述

在Ubuntu12.0.4下编译开发板(itop4412)的引导程序时,./create_uboot.sh出现了无法编译的情况:



There are some error(s) while building uboot, please use command make to check.


好嘛,就vi 编译文件create_uboot.sh看看到底写的啥,代码如下(可跳过直接看解决方案):

#!/bin/sh

option1="tc4_ubuntu"

sec_path="../CodeSign4SecureBoot/"
CPU_JOB_NUM=$(grep processor /proc/cpuinfo | awk '{field=$NF};END{print field+1}')
ROOT_DIR=$(pwd)
CUR_DIR=${ROOT_DIR##*/}

case "$1" in
clean)

echo make clean
make mrproper
;;
*)

if [ ! -d $sec_path ]
then
echo "**********************************************"
echo "[ERR]please get the CodeSign4SecureBoot first"
echo "**********************************************"
return
fi

#make itop_4412_android_config
if [ -z $1 ]
then
make itop_4412_android_config

elif [ $1 = $option1 ]
then
make itop_4412_android_ubuntu_config
else
make itop_4412_android_config
fi

make -j$CPU_JOB_NUM

if [ ! -f checksum_bl2_14k.bin ]
then
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo "There are some error(s) while building uboot, please use command make to check."
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
exit 0
fi

cp -rf checksum_bl2_14k.bin $sec_path
cp -rf u-boot.bin $sec_path
rm checksum_bl2_14k.bin

cd $sec_path
#./codesigner_v21 -v2.1 checksum_bl2_14k.bin BL2.bin.signed.4412 Exynos4412_V21.prv -STAGE2

# gernerate the uboot bin file support trust zone
cat E4412.S.BL1.SSCR.EVT1.1.bin E4412.BL2.TZ.SSCR.EVT1.1.bin all00_padding.bin u-boot.bin E4412.TZ.SSCR.EVT1.1.bin > u-boot-iTOP-4412.bin

mv u-boot-iTOP-4412.bin $ROOT_DIR

rm checksum_bl2_14k.bin
#rm BL2.bin.signed.4412
rm u-boot.bin

echo
echo
;;

esac


这个bug是.sh文件自己echo出来的。根据语法
if [ ! -f checksum_bl2_14k.bin ]
了解到这个叫做
checksum_bl2_14k.bin
的文件有问题。

好的,多方查找资料无果后,灵机一动,重新解压缩一下所有源码。于是出现了:



what??两个一样的itop4412的Folder?Ubuntu文件系统被我玩坏了?直接在控制台cd进去。居然没有出错。控制台运行./create_uboot.sh

好的成功生成了我所需要的bin文件。。。

解决方案

所以解决方案是:重新解压源码!!这次文件系统bug坑死我了。

欢迎关注我的微信公众号,了解更多有趣的事情~

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐