rockchip的sdk编译时出现Error:Chip is invalid!

rockchip的sdk编译时出现Error:Chip is invalid!

  1. 完整的log如下
********rkImageMaker ver 2.23********
Error:Chip is invalid!
ERROR: Running /root/work/LinuxSDK-v1.1/device/rockchip/common/scripts/mk-updateimg.sh - build_updateimg failed!
ERROR: exit code 254 from line 94:
    "$RK_PACK_TOOL_DIR/rkImageMaker" -$TAG MiniLoaderAll.bin update.raw.img update.img -os_type:androidos
ERROR: call stack:
    mk-updateimg.sh: build_updateimg(94)
    mk-updateimg.sh: post_build_hook(167)
    mk-updateimg.sh: main(178)
ERROR: Running /root/work/LinuxSDK-v1.1/device/rockchip/common/build-hooks/99-all.sh - build_all failed!
ERROR: exit code 254 from line 42:
    "$SCRIPTS_DIR/mk-updateimg.sh"
ERROR: call stack:
    99-all.sh: build_all(42)
    99-all.sh: build_allsave(112)
    99-all.sh: build_hook(137)
    build-helper: try_func(63)
    build-helper: try_hook(95)
    build-helper: source(173)
    99-all.sh: main(147)
ERROR: Running /root/work/LinuxSDK-v1.1/device/rockchip/common/build-hooks/99-all.sh - try_func build_hook allsave failed!
ERROR: exit code 254 from line 67:
    build_hook
ERROR: call stack:
    build-helper: try_func(67)
    build-helper: try_hook(95)
    build-helper: source(173)
    99-all.sh: main(147)
ERROR: Running ./build.sh - run_hooks build allsave failed!
ERROR: exit code 254 from line 195:
    /root/work/LinuxSDK-v1.1/device/rockchip/common/build-hooks/99-all.sh build allsave
ERROR: call stack:
    build.sh: run_hooks(195)
    build.sh: run_build_hooks(214)
    build.sh: main(495)
    build.sh: main(510)
ERROR: Running ./build.sh - run_build_hooks build allsave failed!
ERROR: exit code 254 from line 217:
    build
ERROR: call stack:
    build.sh: run_build_hooks(217)
    build.sh: main(495)
    build.sh: main(510)
  1. 查到代码出错在如下代码

    位于<sdk_path>/device/rockchip/common/scripts/mk-updateimg.sh
  2. 在93行之前加打印检查变量,发现TAG为‘RK’
  3. 在文件<sdk_path>/tools/linux/Linux_Pack_Firmware/rockdev/rk3588-mkupdate.sh也使用了该工具,由此可以初步推测出TAG这个变量本来应该是芯片名称,结果却是‘RK’
    在这里插入图片描述
  4. 查到TAG是在如下代码之中赋值的
TAG=RK$(hexdump -s 21 -n 4 -e '4 "%c"' MiniLoaderAll.bin | rev)
  1. 关键是hexdump和MiniLoaderAll.bin,MiniLoaderAll.bin这个是二进制,我们使用hex工具查看,可以发现该文件之中确实有rk3588的字符串,所以问题应该不是处在该文件之中,而是出在hexdump上
    在这里插入图片描述
  2. 运行hexdump读取,“hexdump -s 21 -n 4 -e ‘4 “%c”’ MiniLoaderAll.bin”,提示报错为“zsh: command not found: hexdump”
  3. 安装hexdump
sudo apt install bsdmainutils
  1. 再次使用build.sh,成功编译
    在这里插入图片描述
  • 13
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值