旅游网站开发项目策划书,扫码员在哪个网站可以做,wordpress 不要动态链接,永久网站域名注册项目场景#xff1a;
提示#xff1a;这里简述项目相关背景#xff1a;
编译开源的rk3566代码squashfs报错#xff0c;tspi_linux_sdk_repo_20240131.tar.gz
下之前先读我
1.tspi_linux_sdk_20230916.tar.gz这个是之前老的没有git和repo的版本#xff0c;后面会删除掉大家…项目场景
提示这里简述项目相关背景
编译开源的rk3566代码squashfs报错tspi_linux_sdk_repo_20240131.tar.gz
下之前先读我
1.tspi_linux_sdk_20230916.tar.gz这个是之前老的没有git和repo的版本后面会删除掉大家可以不用下载
2.tspi_linux_sdk_repo_20240131.tar.gz repo版本推荐大家使用这个
下载完成后可以看看校验是否正常
md5sum tspi_linux_sdk_repo_20240131.tar.gz
看一下这个值是否和tspi_linux_sdk_repo_20240131_md5sum.txt内容一致
解压
tar -xzf tspi_linux_sdk_repo_20240131.tar.gz
解压完成后只有.repo目录我们还需要把代码同步出来.repo/repo/repo sync -l -j883.buildroot_dl_4c7c9df616fb.tar.gz 这是是buildroot相关库如果你的网络比较差很有可能编译的时候自动下载失败报错
下载完成后可以看看校验是否正常
md5sum buildroot_dl_4c7c9df616fb.tar.gz
看一下这个值是否和buildroot_dl_4c7c9df616fb_md5sum.txt内容一致
解压
把压缩包放在.repo同目录在解压最终会解压到buildroot/dl目录
tar -xzf buildroot_dl_4c7c9df616fb.tar.gz
4.接下来可以参考编译教程进行编译了
教程网址
https://wiki.lckfb.com/zh-hans/tspi-rk3566/sdk-compilation/linux-compilation.html问题描述
提示这里描述项目中遇到的问题
报错内容 fwriter_buffer bwriter_buffer重定义
2025-08-25T21:58:54 /usr/bin/gcc -L/scode/rk_source/buildroot/output/rockchip_rk3566/host/lib -Wl,-rpath,/scode/rk_source/buildroot/output/rockchip_rk3566/host/lib unsquashfs.o unsquash-1.o unsquash-2.o unsquash-3.o unsquash-4.o swap.o compressor.o unsquashfs_info.o gzip_wrapper.o lzma_xz_wrapper.o xz_wrapper.o lzo_wrapper.o lz4_wrapper.o read_xattrs.o unsquashfs_xattr.o -lpthread -lm -lz -llzma -llzma -llzo2 -llz4 -o unsquashfs
2025-08-25T21:58:55 /usr/bin/gcc -L/scode/rk_source/buildroot/output/rockchip_rk3566/host/lib -Wl,-rpath,/scode/rk_source/buildroot/output/rockchip_rk3566/host/lib mksquashfs.o read_fs.o action.o swap.o pseudo.o compressor.o sort.o progressbar.o read_file.o info.o restore.o process_fragments.o caches-queues-lists.o gzip_wrapper.o lzma_xz_wrapper.o xz_wrapper.o lzo_wrapper.o lz4_wrapper.o xattr.o read_xattrs.o -lpthread -lm -lz -llzma -llzma -llzo2 -llz4 -o mksquashfs
2025-08-25T21:58:55 /usr/bin/ld: read_fs.o:(.bss0x0): multiple definition of fwriter_buffer; mksquashfs.o:(.bss0x400bf0): first defined here
2025-08-25T21:58:55 /usr/bin/ld: read_fs.o:(.bss0x8): multiple definition of bwriter_buffer; mksquashfs.o:(.bss0x400bf8): first defined here
2025-08-25T21:58:55 /usr/bin/ld: action.o:(.bss0x0): multiple definition of fwriter_buffer; mksquashfs.o:(.bss0x400bf0): first defined here
2025-08-25T21:58:55 /usr/bin/ld: action.o:(.bss0x8): multiple definition of bwriter_buffer; mksquashfs.o:(.bss0x400bf8): first defined here
2025-08-25T21:58:55 /usr/bin/ld: sort.o:(.bss0x100000): multiple definition of fwriter_buffer; mksquashfs.o:(.bss0x400bf0): first defined here
2025-08-25T21:58:55 /usr/bin/ld: sort.o:(.bss0x100008): multiple definition of bwriter_buffer; mksquashfs.o:(.bss0x400bf8): first defined here
2025-08-25T21:58:55 /usr/bin/ld: info.o:(.bss0x10): multiple definition of bwriter_buffer; mksquashfs.o:(.bss0x400bf8): first defined here
2025-08-25T21:58:55 /usr/bin/ld: info.o:(.bss0x8): multiple definition of fwriter_buffer; mksquashfs.o:(.bss0x400bf0): first defined here
2025-08-25T21:58:55 /usr/bin/ld: restore.o:(.bss0x0): multiple definition of fwriter_buffer; mksquashfs.o:(.bss0x400bf0): first defined here
2025-08-25T21:58:55 /usr/bin/ld: restore.o:(.bss0x8): multiple definition of bwriter_buffer; mksquashfs.o:(.bss0x400bf8): first defined here
2025-08-25T21:58:55 /usr/bin/ld: process_fragments.o:(.bss0x0): multiple definition of fwriter_buffer; mksquashfs.o:(.bss0x400bf0): first defined here
2025-08-25T21:58:55 /usr/bin/ld: process_fragments.o:(.bss0x8): multiple definition of bwriter_buffer; mksquashfs.o:(.bss0x400bf8): first defined here
2025-08-25T21:58:55 /usr/bin/ld: xattr.o:(.bss0x8): multiple definition of fwriter_buffer; mksquashfs.o:(.bss0x400bf0): first defined here
2025-08-25T21:58:55 /usr/bin/ld: xattr.o:(.bss0x10): multiple definition of bwriter_buffer; mksquashfs.o:(.bss0x400bf8): first defined here
2025-08-25T21:58:55 collect2: error: ld returned 1 exit status
2025-08-25T21:58:55 make[2]: *** [Makefile:248: mksquashfs] Error 1
2025-08-25T21:58:55 make[1]: *** [package/pkg-generic.mk:231: /scode/rk_source/buildroot/output/rockchip_rk3566/build/host-squashfs-3de1687d7432ea9b302c2db9521996f506c140a3/.stamp_built] Error 2
2025-08-25T21:58:55 make: *** [/scode/rk_source/buildroot/output/rockchip_rk3566/Makefile:16: _all] Error 2原因分析提示这里填写问题的分析squashfs-tools$ vim mksquashfs.h
mksquashfs.h中定义的fwriter_buffer bwriter_buffer 没有加extern解决方案提示这里填写该问题的具体解决方案mksquashfs.h中定义的fwriter_buffer bwriter_buffer 加上extern
并修改成patch放到 buildroot/package/squashfs/ 目录下
修改内容
lxtlxt-ubuntu:/scode/rk_source$ cat buildroot/package/squashfs/0001-fix-multiple-definition.patch
diff --git a/squashfs-tools/mksquashfs.h b/squashfs-tools/mksquashfs.h
index 55708a3..cd84bfd 100644
--- a/squashfs-tools/mksquashfs.hb/squashfs-tools/mksquashfs.h-133,7 133,7 struct append_file {#define BLOCK_OFFSET 2extern struct cache *reader_buffer, *fragment_buffer, *reserve_cache;
-struct cache *bwriter_buffer, *fwriter_buffer;
extern struct cache *bwriter_buffer, *fwriter_buffer;extern struct queue *to_reader, *to_deflate, *to_writer, *from_writer,*to_frag, *locked_fragment, *to_process_frag;extern struct append_file **file_mapping;
lxtlxt-ubuntu:/scode/rk_source$