【问题标题】:Prompt not enough free space when I use swupdate使用 swupdate 时提示可用空间不足
【发布时间】:2022-07-15 00:10:19
【问题描述】:

在使用yocto构建的swupdate镜像时遇到问题

Software Update started !

[network_initializer] : Software update started
[extract_file_to_tmp] : Found file
[extract_file_to_tmp] : filename sw-description
[extract_file_to_tmp] : size 303
[get_common_fields] : Version 0.1.0
[get_common_fields] : Description Firmware update for XXXXX Project
[parse_hw_compatibility] : Accepted Hw Revision : 1.0
[parse_hw_compatibility] : Accepted Hw Revision : 1.2
[parse_hw_compatibility] : Accepted Hw Revision : 1.3
[_parse_images] : Found Image: rootfs.ext4.gz in device : /dev/mmcblk2p4 for handler raw
[check_hw_compatibility] : Hardware myir Revision: 1.0
[check_hw_compatibility] : Hardware compatibility verified
[extract_files] : Found file
[extract_files] : filename rootfs.ext4.gz
[extract_files] : size 373258053 required
ERROR : Not enough free space to extract rootfs.ext4.gz (needed 373258053, got 223219712)
Image invalid or corrupted. Not installing ...
[network_initializer] : Main thread sleep again !
Waiting for requests...
ERROR : Writing to IPC fails due to Broken pipe

如图,表示空间不够,然后我用resize2fs /dev/mmcblk2p4扩大空间。现在它有 1g 的空间。但还是一样的提示。请让我知道你的想法。

【问题讨论】:

  • 你好@migu,即使我也面临类似的问题。您找到解决方案了吗?还有如何使用“resize2fs”来扩大空间?
  • 你好,我还没有找到解决办法。你可以使用“resize2fs /dev/mmcblk2p4”来扩大/dev/mmcblk2p4的空间。
  • 我为此做了一些努力,包括直接反汇编源码和调用check_free_space函数,但是得到一个随机值,无法正确读取本地块大小。
  • 你好@migu,感谢更新。你是怎么打电话给resize2fs /dev/mmcblk2p4的?它是sw-description 的一部分吗? /dev/mmcblk2p4 分区是否正在更新?
  • 这是一个 Linux 命令。直接在终端输入即可,与swupdate无关。

标签: linux stm32 yocto swupdate


【解决方案1】:

尝试在 sw-description 文件中使用 installed-directly 标志。

        files: (
            {
                    filename = "rootfs.ext4.gz";
                    sha256 = "bc57b9c737033d0d6826db51618d596da7ecf3fdc0cb48dc9986a6094f529413";
                    type = "archive";
                    path = "/path/to/extract";
                    preserve-attributes = true; 
                    installed-directly = true;  <---------- this option
                    properties: {
                            create-destination = "true";
                    }
            }

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-10-11
    • 1970-01-01
    • 2023-02-22
    • 2013-01-03
    • 2013-05-24
    相关资源
    最近更新 更多