linux 使用swupdate时提示可用空间不足

kmpatx3s  于 2023-05-16  发布在  Linux
关注(0)|答案(1)|浏览(161)

我在使用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的空间。但还是一样的暗示。请让我知道你的想法。

w3nuxt5m

w3nuxt5m1#

这是因为归档文件首先被解压缩到tmp目录,然后再安装。你可以在一个步骤中做到这一点:尝试在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";
                    }
            }

相关问题