深圳尼高网站建设,网站建设公司需要什么资质,多多搜索推广,无锡做食品网站的公司哪家好目录 前言
一、现象描述
二、解决方案
三、tar解压缩.gz文件 总结 前言 本文主要介绍全志T113-S3平台官方SDK#xff0c;buildroot文件系统tar不支持.gz文件解压缩的问题以及如何配置buildroot文件系统解决该问题的方法介绍。 一、现象描述 在buildroot文件系统中#xff…
目录 前言
一、现象描述
二、解决方案
三、tar解压缩.gz文件 总结 前言 本文主要介绍全志T113-S3平台官方SDKbuildroot文件系统tar不支持.gz文件解压缩的问题以及如何配置buildroot文件系统解决该问题的方法介绍。 一、现象描述 在buildroot文件系统中使用tar -xzf UpdateShImage.tgz命令解压UpdateShImage.tgz压缩包报错tar: invalid option -- z如提示所示表示tar不支持使用带z参数解压如下所示
# tar -xzf UpdateShImage.tgz
tar: invalid option -- z
BusyBox v1.29.3 (2023-08-30 11:23:50 CST) multi-call binary.Usage: tar c|x|t [-hvokO] [-f TARFILE] [-C DIR] [-T FILE] [-X FILE] [--exclude PATTERN]... [FILE]...Create, extract, or list files from a tar filec Createx Extractt List-f FILE Name of TARFILE (- for stdin/out)-C DIR Change to DIR before operation-v Verbose-O Extract to stdout-o Dont restore user:group-k Dont replace existing files-h Follow symlinks-T FILE File with names to include-X FILE File with glob patterns to exclude--exclude PATTERN Glob pattern to exclude
#二、解决方案 进入buildroot编译输出目录对busybox进行配置如下步骤所示 1、进入buildroot编译输出目录
cftccftc-ubuntu:t113-s3_V1.1-V2.1$ cd out/t113/evb1_auto/longan/buildroot/
cftccftc-ubuntu:buildroot$
cftccftc-ubuntu:buildroot$
cftccftc-ubuntu:buildroot$ pwd
/home/cftc/workspace/QZ/t113-s3_V1.1-V2.1/out/t113/evb1_auto/longan/buildroot
cftccftc-ubuntu:buildroot$
cftccftc-ubuntu:buildroot$2、终端输入busybox配置命令 make busybox-menuconfig进入Archival Utilities ---
[*] Make tar, rpm, modprobe etc understand .gz data 按空格键选中 .gz data该项即可如下图所示 3、busybox配置保存。输入make busybox-update-config即可保存配置文件如下图所示
cftccftc-ubuntu:buildroot$
cftccftc-ubuntu:buildroot$
cftccftc-ubuntu:buildroot$
cftccftc-ubuntu:buildroot$ make busybox-update-config
cp -f /home/cftc/workspace/QZ/t113-s3_V1.1-V2.1/out/t113/evb1_auto/longan/buildroot/build/busybox-1.29.3/.config package/busybox/busybox.config
cftccftc-ubuntu:buildroot$
cftccftc-ubuntu:buildroot$三、tar解压缩.gz文件 使用tar -czf / tar -xzf解压缩文件如下所示
liubinCompileServer:~/workspace/UpdateShImage/RA1000$
liubinCompileServer:~/workspace/UpdateShImage/RA1000$ tar -czf UpdateShImage.tgz UpdateShImage/
liubinCompileServer:~/workspace/UpdateShImage/RA1000$
liubinCompileServer:~/workspace/UpdateShImage/RA1000$
liubinCompileServer:~/workspace/UpdateShImage/RA1000$ ls -l
total 10568
drwxr-xr-x 2 liubin liubin 4096 10月 23 16:14 UpdateShImage
-rw-rw-r-- 1 liubin liubin 10815835 10月 25 23:01 UpdateShImage.tgz
liubinCompileServer:~/workspace/UpdateShImage/RA1000$
liubinCompileServer:~/workspace/UpdateShImage/RA1000$
liubinCompileServer:~/workspace/UpdateShImage/RA1000$
liubinCompileServer:~/workspace/UpdateShImage/RA1000$ rm -rf UpdateShImage
liubinCompileServer:~/workspace/UpdateShImage/RA1000$
liubinCompileServer:~/workspace/UpdateShImage/RA1000$
liubinCompileServer:~/workspace/UpdateShImage/RA1000$ tar -zxf UpdateShImage.tgz
liubinCompileServer:~/workspace/UpdateShImage/RA1000$
liubinCompileServer:~/workspace/UpdateShImage/RA1000$
liubinCompileServer:~/workspace/UpdateShImage/RA1000$ ls -l
total 10568
drwxr-xr-x 2 liubin liubin 4096 10月 23 16:14 UpdateShImage
-rw-rw-r-- 1 liubin liubin 10815835 10月 25 23:01 UpdateShImage.tgz
liubinCompileServer:~/workspace/UpdateShImage/RA1000$
liubinCompileServer:~/workspace/UpdateShImage/RA1000$总结 修改之后的固件tar会多出一个参数z (De)compress using gziptar zcvf 或tar cvf都可以压缩执行tar xvf 或者tar zxvf 都可以解压不要带z也可以解压缩可能是config里面有CONFIG_FEATURE_TAR_AUTODETECTy会自动检测。