ILD

新版本mkimage创建fit镜像失败问题
作者:Yuan Jianpeng 邮箱:yuanjp89@163.com
发布时间:2021-10-17 站点:Inside Linux Development


编译出错

$ mkimage -f fit-image.its /work/Xrouter/staging/ipq4018/image/ipq4018.itb

fit-image.its:48.12-53.5: Warning (unit_address_vs_reg): /configurations/config@1: node has a unit name, but no reg or ranges property
mkimage: verify_header failed for FIT Image support with exit code 1


查找网上的原因是,its文件中,名字里面含有@。新版本的mkimage不支持。把@改成-就可以了。


参考

https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.19.196

commit 822564cd3aa1a6a092cc227e394f31f902864b88
Author: Nathan Chancellor <nathan@kernel.org>
Date:   Fri Apr 9 12:21:28 2021 -0700

    MIPS: generic: Update node names to avoid unit addresses
    
    commit e607ff630c6053ecc67502677c0e50053d7892d4 upstream.
    
    With the latest mkimage from U-Boot 2021.04, the generic defconfigs no
    longer build, failing with:
    
    /usr/bin/mkimage: verify_header failed for FIT Image support with exit code 1
    
    This is expected after the linked U-Boot commits because '@' is
    forbidden in the node names due to the way that libfdt treats nodes with
    the same prefix but different unit addresses.
    
    Switch the '@' in the node name to '-'. Drop the unit addresses from the
    hash and kernel child nodes because there is only one node so they do
    not need to have a number to differentiate them.
    
    Cc: stable@vger.kernel.org
    Link: https://source.denx.de/u-boot/u-boot/-/commit/79af75f7776fc20b0d7eb6afe1e27c00fdb4b9b4
    Link: https://source.denx.de/u-boot/u-boot/-/commit/3f04db891a353f4b127ed57279279f851c6b4917
    Suggested-by: Simon Glass <sjg@chromium.org>
    Signed-off-by: Nathan Chancellor <nathan@kernel.org>
    Reviewed-by: Tom Rini <trini@konsulko.com>
    Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
    [nathan: Backport to 4.19, only apply to .its.S files that exist]
    Signed-off-by: Nathan Chancellor <nathan@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>



Copyright © linuxdev.cc 2017-2024. Some Rights Reserved.