[PATCH v4 8/8] scripts/gen_compile_commands: fix usage message

2023-10-01 Thread Joao Marcos Costa
Replace mentions to 'kernel' by 'U-Boot' to avoid confusion. Signed-off-by: Joao Marcos Costa --- scripts/gen_compile_commands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/gen_compile_commands.py b/scripts/gen_compile_commands.py index aa52e88e18

[PATCH v4 7/8] doc: add ide_integration.rst to doc/develop

2023-10-01 Thread Joao Marcos Costa
Add 'Integration with IDEs' chapter. For now, this chapter is mostly a reference to the documentation of gen_compile_commands, in doc/build, but it can be futurely used as a guide for other IDE-friendly features. Signed-off-by: Joao Marcos Costa --- doc/develop/ide_integration.rst | 12

[PATCH v4 6/8] doc: add documentation for gen_compile_commands.py

2023-10-01 Thread Joao Marcos Costa
it a/scripts/gen_compile_commands.py b/scripts/gen_compile_commands.py index 1a9c49b34a..aa52e88e18 100755 --- a/scripts/gen_compile_commands.py +++ b/scripts/gen_compile_commands.py @@ -5,6 +5,7 @@ # # Author: Tom Roeder # Ported and modified for U-Boot by Joao Marcos Costa +# Briefly documen

[PATCH v4 5/8] .gitignore: add compile_commands.json

2023-10-01 Thread Joao Marcos Costa
Add Clang's compilation database file (i.e. compile_commands.json) to .gitignore, at the root of the repository. Signed-off-by: Joao Marcos Costa --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 002f95de4f..261a1d6754 100644 --- a/.gitignore

[PATCH v4 4/8] scripts/gen_compile_commands.py: add acknowledgments

2023-10-01 Thread Joao Marcos Costa
Add acknowledgments for porting and modifying the script. Of course, the license, author, and copyright notice remain the same as in the original script. Signed-off-by: Joao Marcos Costa --- scripts/gen_compile_commands.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts

[PATCH v4 3/8] scripts/gen_compile_commands.py: fix docstring

2023-10-01 Thread Joao Marcos Costa
The referred tool is now in U-Boot. Replace "the Linux kernel" by "U-Boot" to make the docstring coherent. Signed-off-by: Joao Marcos Costa --- scripts/gen_compile_commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gen_compile_c

[PATCH v4 2/8] scripts/gen_compile_commands.py: adapt _LINE_PATTERN

2023-10-01 Thread Joao Marcos Costa
For U-Boot's context, the regular expression defined by _LINE_PATTERN should be adapted. Replace 'savedcmd' by 'cmd'. Signed-off-by: Joao Marcos Costa --- scripts/gen_compile_commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gen_compile_commands.py b

[PATCH v4 1/8] scripts: Port Linux's gen_compile_commands.py to U-Boot

2023-10-01 Thread Joao Marcos Costa
will be added in a follow-up commit. Signed-off-by: Joao Marcos Costa --- scripts/gen_compile_commands.py | 228 1 file changed, 228 insertions(+) create mode 100755 scripts/gen_compile_commands.py diff --git a/scripts/gen_compile_commands.py b/scripts

[PATCH v4 0/8] Port gen_compile_commands.py from Linux to U-Boot

2023-10-01 Thread Joao Marcos Costa
Changes in v2: - Add compile_commands.json to gitignore - Add documentation Joao Marcos Costa (8): scripts: Port Linux's gen_compile_commands.py to U-Boot scripts/gen_compile_commands.py: adapt _LINE_PATTERN scripts/gen_compile_commands.py: fix docstring scripts/gen_compile_commands.py:

[PATCH v1] doc: Update path to source_file_format.rst

2023-09-07 Thread Joao Marcos Costa
Previously, the file extension was .txt, and it referenced the uImage.FIT directory, which no longer exists. This commit updates the path accordingly. Signed-off-by: Joao Marcos Costa --- doc/usage/fit/howto.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/usage/fit

[PATCH v3 6/7] doc: add documentation for gen_compile_commands.py

2023-09-02 Thread Joao Marcos Costa
/scripts/gen_compile_commands.py +++ b/scripts/gen_compile_commands.py @@ -5,6 +5,7 @@ # # Author: Tom Roeder # Ported and modified for U-Boot by Joao Marcos Costa +# Briefly documented at doc/build/gen_compile_commands.rst # """A tool for generating compile_commands.json in U-Boot.""" -- 2.41.0

[PATCH v3 7/7] doc: add new section to build/tools

2023-09-02 Thread Joao Marcos Costa
Add 'Integration with IDEs' section. For now, this section is mostly a reference to the documentation of gen_compile_commands, also in doc/build, but it can be futurely used as a guide for other IDE-friendly features. Signed-off-by: Joao Marcos Costa --- doc/build/gen_compile_commands.rst | 1

[PATCH v3 4/7] scripts/gen_compile_commands.py: add acknowledgments

2023-09-02 Thread Joao Marcos Costa
Add acknowledgments for porting and modifying the script. Of course, the license, author, and copyright notice remain the same as in the original script. Signed-off-by: Joao Marcos Costa --- scripts/gen_compile_commands.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts

[PATCH v3 3/7] scripts/gen_compile_commands.py: fix docstring

2023-09-02 Thread Joao Marcos Costa
The referred tool is now in U-Boot. Replace "the Linux kernel" by "U-Boot" to make the docstring coherent. Signed-off-by: Joao Marcos Costa --- scripts/gen_compile_commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gen_compile_c

[PATCH v3 5/7] .gitignore: add compile_commands.json

2023-09-02 Thread Joao Marcos Costa
Add Clang's compilation database file (i.e. compile_commands.json) to .gitignore, at the root of the repository. Signed-off-by: Joao Marcos Costa --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 002f95de4f..261a1d6754 100644 --- a/.gitignore

[PATCH v3 2/7] scripts/gen_compile_commands.py: adapt _LINE_PATTERN

2023-09-02 Thread Joao Marcos Costa
For U-Boot's context, the regular expression defined by _LINE_PATTERN should be adapted. Replace 'savedcmd' by 'cmd'. Signed-off-by: Joao Marcos Costa --- scripts/gen_compile_commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gen_compile_commands.py b

[PATCH v3 1/7] scripts: Port Linux's gen_compile_commands.py to U-Boot

2023-09-02 Thread Joao Marcos Costa
will be added in a follow-up commit. Signed-off-by: Joao Marcos Costa --- scripts/gen_compile_commands.py | 228 1 file changed, 228 insertions(+) create mode 100755 scripts/gen_compile_commands.py diff --git a/scripts/gen_compile_commands.py b/scripts

[PATCH v3 0/7] Port gen_compile_commands.py from Linux to U-Boot

2023-09-02 Thread Joao Marcos Costa
issues - Add reference to documentation in doc/build/tools Changes in v2: - Add compile_commands.json to gitignore - Add documentation Joao Marcos Costa (7): scripts: Port Linux's gen_compile_commands.py to U-Boot scripts/gen_compile_commands.py: adapt _LINE_PATTERN scripts

[PATCH v2 6/6] doc: add documentation for gen_compile_commands.py

2023-09-01 Thread Joao Marcos Costa
This documentation briefly explains what is a compilation database, and how to use the script to generate one. This is not a portage, as there was no original documentation in the Linux sources. Acknowledge the documentation in the script's header. Signed-off-by: Joao Marcos Costa --- doc

[PATCH v2 5/6] .gitignore: add compile_commands.json

2023-09-01 Thread Joao Marcos Costa
Add Clang's compilation database file (i.e. compile_commands.json) to .gitignore, at the root of the repository. Signed-off-by: Joao Marcos Costa --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 002f95de4f..261a1d6754 100644 --- a/.gitignore

[PATCH v2 4/6] scripts/gen_compile_commands.py: add acknowledgments

2023-09-01 Thread Joao Marcos Costa
Add acknowledgments for porting and modifying the script. Of course, the license, author, and copyright notice remain the same as in the original script. Signed-off-by: Joao Marcos Costa --- scripts/gen_compile_commands.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts

[PATCH v2 3/6] scripts/gen_compile_commands.py: fix docstring

2023-09-01 Thread Joao Marcos Costa
The referred tool is now in U-Boot. Replace "the Linux kernel" by "U-Boot" to make the docstring coherent. Signed-off-by: Joao Marcos Costa --- scripts/gen_compile_commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gen_compile_c

[PATCH v2 2/6] scripts/gen_compile_commands.py: adapt _LINE_PATTERN

2023-09-01 Thread Joao Marcos Costa
For U-Boot's context, the regular expression defined by _LINE_PATTERN should be adapted. Replace 'savedcmd' by 'cmd'. Signed-off-by: Joao Marcos Costa --- scripts/gen_compile_commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gen_compile_commands.py b

[PATCH v2 1/6] scripts: Port Linux's gen_compile_commands.py to U-Boot

2023-09-01 Thread Joao Marcos Costa
will be added in a follow-up commit. Signed-off-by: Joao Marcos Costa --- scripts/gen_compile_commands.py | 228 1 file changed, 228 insertions(+) create mode 100755 scripts/gen_compile_commands.py diff --git a/scripts/gen_compile_commands.py b/scripts

[PATCH v2 0/6] Port gen_compile_commands.py from Linux to U-Boot

2023-09-01 Thread Joao Marcos Costa
documentation Joao Marcos Costa (6): scripts: Port Linux's gen_compile_commands.py to U-Boot scripts/gen_compile_commands.py: adapt _LINE_PATTERN scripts/gen_compile_commands.py: fix docstring scripts/gen_compile_commands.py: add acknowledgments .gitignore: add compile_commands.json doc: add

[PATCH v1 4/4] scripts/gen_compile_commands.py: add acknowledgments

2023-08-20 Thread Joao Marcos Costa
Add acknowledgments for porting and modifying the script. Of course, the license, author, and copyright notice remain the same as in the original script. Signed-off-by: Joao Marcos Costa --- scripts/gen_compile_commands.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts

[PATCH v1 3/4] scripts/gen_compile_commands.py: fix docstring

2023-08-20 Thread Joao Marcos Costa
The referred tool is now in U-Boot. Replace "the Linux kernel" by "U-Boot" to make the docstring coherent. Signed-off-by: Joao Marcos Costa --- scripts/gen_compile_commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gen_compile_c

[PATCH v1 2/4] scripts/gen_compile_commands.py: adapt _LINE_PATTERN

2023-08-20 Thread Joao Marcos Costa
For U-Boot's context, the regular expression defined by _LINE_PATTERN should be adapted. Replace 'savedcmd' by 'cmd'. Signed-off-by: Joao Marcos Costa --- scripts/gen_compile_commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gen_compile_commands.py b

[PATCH v1 1/4] scripts: Port Linux's gen_compile_commands.py to U-Boot

2023-08-20 Thread Joao Marcos Costa
will be added in a follow-up commit. Signed-off-by: Joao Marcos Costa --- scripts/gen_compile_commands.py | 228 1 file changed, 228 insertions(+) create mode 100755 scripts/gen_compile_commands.py diff --git a/scripts/gen_compile_commands.py b/scripts

[PATCH v1 0/4] Port gen_compile_commands.py from Linux to U-Boot

2023-08-20 Thread Joao Marcos Costa
navigation and analysis. The series consists of four patches: the initial script import and the necessary modifications for U-Boot compatibility. Your feedback on these contributions would be greatly appreciated. Best regards, Joao Marcos Costa (4): scripts: Port Linux's gen_compile_commands.py

[PATCH] MAINTAINERS: Update e-mail address

2022-07-24 Thread Joao Marcos Costa
Replace former professional address by my personal e-mail. Signed-off-by: Joao Marcos Costa --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 7f27ff4c20..1b859194d6 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1267,7 +1267,7

[PATCH v3 3/3] test/py: rewrite sqfsls command test suite

2021-06-30 Thread Joao Marcos Costa
Add more details to test cases by comparing each expected line with the command's output. Add new test cases: - sqfsls at an empty directory - sqfsls at a sub-directory Signed-off-by: Joao Marcos Costa --- .../test_fs/test_squashfs/test_sqfs_ls.py | 140 +++--- 1 file changed

[PATCH v3 2/3] test/py: rewrite sqfsload command test suite

2021-06-30 Thread Joao Marcos Costa
cases: files at a sub-directory and non-existent file. Signed-off-by: Joao Marcos Costa --- .../test_fs/test_squashfs/test_sqfs_load.py | 168 ++ 1 file changed, 138 insertions(+), 30 deletions(-) diff --git a/test/py/tests/test_fs/test_squashfs/test_sqfs_load.py b/test/py/tests

[PATCH v3 1/3] test/py: rewrite common tools for SquashFS tests

2021-06-30 Thread Joao Marcos Costa
Remove the previous OOP approach, which was confusing and incomplete. Add more test cases by making SquashFS images with various options, concerning file fragmentation and its compression. Add comments to properly document the code. Signed-off-by: Joao Marcos Costa --- .../test_fs/test_squashfs

[PATCH v3 0/3] test/py: Rewrite SquashFS commands test suite

2021-06-30 Thread Joao Marcos Costa
since V1: - Leave the copyright year as it was (2020) instead of changing it to 2021 - Remove spurious comments and print statements - Fix the style issues pointed by pylint3 Best regards, Joao Joao Marcos Costa (3): test/py: rewrite common tools for SquashFS tests test/py: rewrite sqfsload

[PATCH v2 3/3] test/py: rewrite sqfsls command test suite

2021-05-29 Thread Joao Marcos Costa
Add more details to test cases by comparing each expected line with the command's output. Add new test cases: - sqfsls at an empty directory - sqfsls at a sub-directory Signed-off-by: Joao Marcos Costa --- .../test_fs/test_squashfs/test_sqfs_ls.py | 138 +++--- 1 file changed

[PATCH v2 2/3] test/py: rewrite sqfsload command test suite

2021-05-29 Thread Joao Marcos Costa
cases: files at a sub-directory and non-existent file. Signed-off-by: Joao Marcos Costa --- .../test_fs/test_squashfs/test_sqfs_load.py | 166 ++ 1 file changed, 136 insertions(+), 30 deletions(-) diff --git a/test/py/tests/test_fs/test_squashfs/test_sqfs_load.py b/test/py/tests

[PATCH v2 1/3] test/py: rewrite common tools for SquashFS tests

2021-05-29 Thread Joao Marcos Costa
Remove the previous OOP approach, which was confusing and incomplete. Add more test cases by making SquashFS images with various options, concerning file fragmentation and its compression. Add comments to properly document the code. Signed-off-by: Joao Marcos Costa --- .../test_fs/test_squashfs

[PATCH v2 0/3] test/py: Rewrite SquashFS commands test suite

2021-05-29 Thread Joao Marcos Costa
Marcos Costa (3): test/py: rewrite common tools for SquashFS tests test/py: rewrite sqfsload command test suite test/py: rewrite sqfsls command test suite .../test_fs/test_squashfs/sqfs_common.py | 237 +- .../test_fs/test_squashfs/test_sqfs_load.py | 166

[PATCH 3/3] test/py: rewrite sqfsls command test suite

2021-05-23 Thread Joao Marcos Costa
Add more details to test cases by comparing each expected line with the command's output. Add new test cases: - sqfsls at an empty directory - sqfsls at a sub-directory Signed-off-by: Joao Marcos Costa --- .../test_fs/test_squashfs/test_sqfs_ls.py | 80 ++- 1 file changed

[PATCH 2/3] test/py: rewrite sqfsload command test suite

2021-05-23 Thread Joao Marcos Costa
cases: files at a sub-directory and non-existent file. Signed-off-by: Joao Marcos Costa --- .../test_fs/test_squashfs/test_sqfs_load.py | 99 +-- 1 file changed, 69 insertions(+), 30 deletions(-) diff --git a/test/py/tests/test_fs/test_squashfs/test_sqfs_load.py b/test/py/tests

[PATCH 1/3] test/py: rewrite common tools for SquashFS tests

2021-05-23 Thread Joao Marcos Costa
Remove the previous OOP approach, which was confusing and incomplete. Add more test cases by making SquashFS images with various options, concerning file fragmentation and its compression. Add comments to properly document the code. Signed-off-by: Joao Marcos Costa --- .../test_fs/test_squashfs

[PATCH 0/3] test/py: Rewrite SquashFS commands test suite

2021-05-23 Thread Joao Marcos Costa
: fix reading of fragmented files) is not applied, so this patch series depends on it. Best regards, Joao Joao Marcos Costa (3): test/py: rewrite common tools for SquashFS tests test/py: rewrite sqfsload command test suite test/py: rewrite sqfsls command test suite .../test_fs/test_squashfs

[PATCH] fs/squashfs: fix reading of fragmented files

2021-05-17 Thread Joao Marcos Costa
. I tested this patch by comparing the MD5 checksum of a few fragmented files with the respective md5sum output in sandbox, considering both compressed and uncompressed fragments. Signed-off-by: Joao Marcos Costa --- fs/squashfs/sqfs.c | 16 ++-- 1 file changed, 6 insertions(+), 10

[PATCH] fs/squashfs: Fix Coverity Scan defects

2020-09-11 Thread Joao Marcos Costa
Fix control flow issues and null pointer dereferences. Signed-off-by: Joao Marcos Costa --- fs/squashfs/sqfs.c | 20 +--- fs/squashfs/sqfs_dir.c | 3 +-- fs/squashfs/sqfs_inode.c | 5 - 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/fs/squashfs

[PATCH 1/1] fs/squashfs: Fix Coverity Scan defects

2020-08-19 Thread Joao Marcos Costa
Fix defects such as uninitialized variables and untrusted pointer operations. Most part of the tainted variables and the related defects actually comes from Linux's macro get_unaligned_le**, extensively used in SquashFS code. Add sanity checks for those variables. Signed-off-by: Joao Marcos Costa

[PATCH 0/1] fs/squashfs: Fix Coverity Scan defects

2020-08-19 Thread Joao Marcos Costa
for these tainted values. Please do not hesitate to report any remaining issues. Best regards, Joao Joao Marcos Costa (1): fs/squashfs: Fix Coverity Scan defects fs/squashfs/sqfs.c | 40 +--- fs/squashfs/sqfs_dir.c | 3 +++ fs/squashfs/sqfs_inode.c

[PATCH v4 5/5] test/py: Add tests for LZO and ZSTD

2020-08-18 Thread Joao Marcos Costa
Improve SquashFS tests architecture. Add 'Compression' class. LZO algorithm may crash if the file is fragmented, so the fragments are disabled when testing LZO. Signed-off-by: Joao Marcos Costa --- Changes in v4: - No changes since the last version. Changes in v3: - No changes

[PATCH v4 3/5] fs/squashfs: add support for ZSTD decompression

2020-08-18 Thread Joao Marcos Costa
Add call to ZSTD's ZSTD_decompressDCtx(). In this use case, the caller can upper bound the decompressed size, which will be the SquashFS data block (or metadata block) size, so there is no need to use streaming API. Add ZSTD's worskpace to squashfs_ctxt structure. Signed-off-by: Joao Marcos Costa

[PATCH v4 2/5] fs/squashfs: replace sqfs_decompress() parameter

2020-08-18 Thread Joao Marcos Costa
Replace 'u16 comp_type' by a reference to squashfs_ctxt structure. Signed-off-by: Joao Marcos Costa --- Changes in v4: - This patch was not present in the previous version. fs/squashfs/sqfs.c | 25 + fs/squashfs/sqfs_decompressor.c | 5 +++-- fs

[PATCH v4 1/5] fs/squashfs: Add init and clean-up functions to decompression

2020-08-18 Thread Joao Marcos Costa
. This structure is passed to sqfs_decompressor_init() and sqfs_decompressor_cleanup(), so it can no longer be local to sqfs.c. Signed-off-by: Joao Marcos Costa --- Changes in v4: - Undo changes from v3 in squashfs_ctxt instance scope. Changes in v3: - Remove memory leak from

[PATCH v4 4/5] fs/squashfs: add support for LZO decompression

2020-08-18 Thread Joao Marcos Costa
Signed-off-by: Joao Marcos Costa --- Changes in v4: - No changes since the last version. Changes in v3: - Change commit message. Changes in v2: - Change commit message. fs/squashfs/sqfs_decompressor.c | 25 + 1 file changed, 25 insertions(+) diff

[PATCH v4 0/5] fs/squashfs: Add new decompression algorithms

2020-08-18 Thread Joao Marcos Costa
() and sqfs_decompress_cleanup() to SquashFS support. Joao Marcos Costa (5): fs/squashfs: Add init and clean-up functions to decompression fs/squashfs: replace sqfs_decompress() parameter fs/squashfs: add support for ZSTD decompression fs/squashfs: add support for LZO decompression test/py

Re: [PATCH v3 2/4] fs/squashfs: add support for ZSTD decompression

2020-08-18 Thread Joao Marcos Costa
On Tue, 18 Aug 2020 16:35:27 +0200 Thomas Petazzoni wrote: > Hello, > > On Tue, 18 Aug 2020 16:31:16 +0200 > Joao Marcos Costa wrote: > > > +#if IS_ENABLED(CONFIG_ZSTD) > > +static int sqfs_zstd_decompress(void *dest, unsigned long dest_len, > > +

[PATCH v3 0/4] fs/squashfs: Add new decompression algorithms

2020-08-18 Thread Joao Marcos Costa
. - Skip compression algorithms unsupported by the host's squashfs-tools version. - Add sqfs_decompress_init() and sqfs_decompress_cleanup() to SquashFS support. Joao Marcos Costa (4): fs/squashfs: Add init. and clean-up functions to decompression fs/squashfs: add

[PATCH v3 1/4] fs/squashfs: Add init. and clean-up functions to decompression

2020-08-18 Thread Joao Marcos Costa
. This structure is passed to sqfs_decompressor_init() and sqfs_decompressor_cleanup(), so it can no longer be local to sqfs.c. Signed-off-by: Joao Marcos Costa --- Changes in v3: - Remove memory leak from sqfs_zstd_decompress() - Rename structure in sqfs.c and remove the 'static' so

[PATCH v3 2/4] fs/squashfs: add support for ZSTD decompression

2020-08-18 Thread Joao Marcos Costa
Add call to ZSTD's ZSTD_decompressDCtx(). In this use case, the caller can upper bound the decompressed size, which will be the SquashFS data block (or metadata block) size, so there is no need to use streaming API. Add ZSTD's worskpace to squashfs_ctxt structure. Signed-off-by: Joao Marcos Costa

[PATCH v3 4/4] test/py: Add tests for LZO and ZSTD

2020-08-18 Thread Joao Marcos Costa
Improve SquashFS tests architecture. Add 'Compression' class. LZO algorithm may crash if the file is fragmented, so the fragments are disabled when testing LZO. Signed-off-by: Joao Marcos Costa --- Changes in v3: - No changes since the last version. Changes in v2: - This patch

[PATCH v3 3/4] fs/squashfs: add support for LZO decompression

2020-08-18 Thread Joao Marcos Costa
Signed-off-by: Joao Marcos Costa --- Changes in v3: - Change commit message. Changes in v2: - Change commit message. fs/squashfs/sqfs_decompressor.c | 25 + 1 file changed, 25 insertions(+) diff --git a/fs/squashfs/sqfs_decompressor.c b/fs/squashfs/sqfs_deco

[PATCH v2 4/4] test/py: Add tests for LZO and ZSTD

2020-08-18 Thread Joao Marcos Costa
Improve SquashFS tests architecture. Add 'Compression' class. LZO algorithm may crash if the file is fragmented, so the fragments are disabled when testing LZO. Signed-off-by: Joao Marcos Costa --- Changes in v2: - This patch was not present in the previous version. .../test_fs

[PATCH v2 3/4] fs/squashfs: Add init. and clean-up functions to decompression

2020-08-18 Thread Joao Marcos Costa
() and sqfs_decompressor_cleanup(), so it can no longer be local to sqfs.c. Signed-off-by: Joao Marcos Costa --- Changes in v2: - This patch was not present in the previous version. fs/squashfs/sqfs.c | 15 ++ fs/squashfs/sqfs_decompressor.c | 52

[PATCH v2 1/4] fs/squashfs: add support for LZO decompression

2020-08-18 Thread Joao Marcos Costa
option can be passed to mksquashfs. Signed-off-by: Joao Marcos Costa --- Changes in v2: - Changed commit message. fs/squashfs/sqfs_decompressor.c | 21 +++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/fs/squashfs/sqfs_decompressor.c b/fs/squashfs/sqfs_deco

[PATCH v2 2/4] fs/squashfs: add support for ZSTD decompression

2020-08-18 Thread Joao Marcos Costa
Add call to ZSTD's ZSTD_decompressDCtx(). In this use case, the caller can upper bound the decompressed size, which will be the SquashFS data block (or metadata block) size, so there is no need to use streaming API. Signed-off-by: Joao Marcos Costa --- Changes in v2: - No changes since

[PATCH v2 0/4] fs/squashfs

2020-08-18 Thread Joao Marcos Costa
sqfs_decompress_init() and sqfs_decompress_cleanup() to SquashFS support. Joao Marcos Costa (4): fs/squashfs: add support for LZO decompression fs/squashfs: add support for ZSTD decompression fs/squashfs: Add init. and clean-up functions to decompression test/py: Add tests for LZO

Error when decompressing with LZO

2020-08-17 Thread Joao Marcos Costa
Hello, I had an error when decompressing an SquashFS file fragment while running the tests in test/py. The error code is -6 (LZO_E_LOOKBEHIND_OVERRUN). The SquashFS image was generated with mksquashfs (squashfs-tools) latest version. After some research, I found this thread:

Re: [PATCH 0/2] fs/squashfs: Add new decompression algorithms

2020-08-12 Thread Joao Marcos Costa
On Tue, 11 Aug 2020 11:13:41 -0400 Tom Rini wrote: > On Tue, Aug 11, 2020 at 03:17:53PM +0200, Joao Marcos Costa wrote: > > > Hello, > > > > Following the SquashFS support, this series adds support for LZO > > and ZSTD algorithms. The only compression type enab

Re: [PATCH 0/2] fs/squashfs: Add new decompression algorithms

2020-08-11 Thread Joao Marcos Costa
On Tue, 11 Aug 2020 11:13:41 -0400 Tom Rini wrote: > On Tue, Aug 11, 2020 at 03:17:53PM +0200, Joao Marcos Costa wrote: > > > Hello, > > > > Following the SquashFS support, this series adds support for LZO > > and ZSTD algorithms. The only compression type enab

Re: [PATCH 2/2] fs/squashfs: add support for ZSTD decompression

2020-08-11 Thread Joao Marcos Costa
On Tue, 11 Aug 2020 15:29:51 +0200 Thomas Petazzoni wrote: > On Tue, 11 Aug 2020 15:17:55 +0200 > Joao Marcos Costa wrote: > > > +#if IS_ENABLED(CONFIG_ZSTD) > > +static int sqfs_zstd_decompress(void *dest, unsigned long dest_len, > > +

[PATCH 2/2] fs/squashfs: add support for ZSTD decompression

2020-08-11 Thread Joao Marcos Costa
Add call to ZSTD's ZSTD_decompressDCtx(). In this use case, the caller can upper bound the decompressed size, which will be the SquashFS data block (or metadata block) size, so there is no need to use streaming API. Signed-off-by: Joao Marcos Costa --- fs/squashfs/sqfs_decompressor.c | 39

[PATCH 1/2] fs/squashfs: add support for LZO decompression

2020-08-11 Thread Joao Marcos Costa
Add call to lzo's lzo1x_decompress_safe() and rename source length parameter from 'lenp' to 'src_len'. Signed-off-by: Joao Marcos Costa --- fs/squashfs/sqfs_decompressor.c | 21 +++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/fs/squashfs/sqfs_decompressor.c

[PATCH 0/2] fs/squashfs: Add new decompression algorithms

2020-08-11 Thread Joao Marcos Costa
Hello, Following the SquashFS support, this series adds support for LZO and ZSTD algorithms. The only compression type enabled by default is ZLIB, so LZO and ZSTD need to be manually selected. Joao Marcos Costa (2): fs/squashfs: add support for LZO decompression fs/squashfs: add support

[PATCH] test/py: fix SquashFS tests

2020-08-10 Thread Joao Marcos Costa
Use "cons.config.build_dir" instead of writing to the source directory (read-only). This will fix the test failures in Azure. Signed-off-by: Joao Marcos Costa --- test/py/tests/test_fs/test_squashfs/sqfs_common.py | 12 ++-- .../py/tests/test_fs/test_squashfs/test_sqfs_lo

Re: [PATCH v4 6/6] test/py: Add tests for the SquashFS commands

2020-08-10 Thread Joao Marcos Costa
Hello! On Sat, 8 Aug 2020 10:41:38 -0400 Tom Rini wrote: > On Sat, Aug 08, 2020 at 08:31:06AM -0400, Tom Rini wrote: > > On Thu, Jul 30, 2020 at 03:33:52PM +0200, Joao Marcos Costa wrote: > > > > > Add Python scripts to test 'ls' and 'load' commands. The scripts &

[PATCH v4 1/6] fs/squashfs: new filesystem

2020-07-30 Thread Joao Marcos Costa
Add support for SquashFS filesystem. Right now, it does not support compression but support for zlib will be added in a follow-up commit. Signed-off-by: Joao Marcos Costa --- Changes in v4: - Fix issues that happenned while resolving symlinks - Add missing endianness convertions

[PATCH v4 3/6] include/u-boot, lib/zlib: add sources for zlib decompression

2020-07-30 Thread Joao Marcos Costa
Add zlib (v1.2.11) uncompr() function to U-Boot. SquashFS depends on this function to decompress data from a raw disk image. The actual support for zlib into SquashFS sources will be added in a follow-up commit. Signed-off-by: Joao Marcos Costa --- Changes in v4: - Add new config

[PATCH v4 4/6] fs/squashfs: add support for zlib decompression

2020-07-30 Thread Joao Marcos Costa
Add call to zlib's 'uncompress' function. Add function to display the right error message depending on the decompression's return value. Signed-off-by: Joao Marcos Costa --- Changes in v4: - Add preprocessor directives to check if a given compression option is enabled, starting

[PATCH v4 5/6] fs/fs.c: add symbolic link case to fs_ls_generic()

2020-07-30 Thread Joao Marcos Costa
Adds an 'else if' statement inside the loop to check for symbolic links. Signed-off-by: Joao Marcos Costa --- Changes in v4: - No changes since v3. Changes in v3: - No changes since v2. Changes in v2: - This patch was added in v2 and did not exist in the last version. fs

[PATCH v4 2/6] fs/squashfs: add filesystem commands

2020-07-30 Thread Joao Marcos Costa
Add 'ls' and 'load' commands. Signed-off-by: Joao Marcos Costa --- Changes in v4: - No changes since v3. Changes in v3: - No changes since v2. Changes in v2: - Add info. to MAINTAINERS - Add 'static' keyword to do_sqfs_*(). These functions' prototypes

[PATCH v4 6/6] test/py: Add tests for the SquashFS commands

2020-07-30 Thread Joao Marcos Costa
Add Python scripts to test 'ls' and 'load' commands. The scripts generate a SquashFS image and clean the directory after the assertions, or if an exception is raised. Signed-off-by: Joao Marcos Costa --- Changes in v4: - This patch was added in v4 and did not exist in the last version

[PATCH v4 0/6] Add support for the SquashFS filesystem

2020-07-30 Thread Joao Marcos Costa
convertions - Improve pointers management Changes in v3: - Replace CONFIG_IS_ENABLED by IS_ENABLED in fs/fs.c Changes in v2: - Replace sqfs_ls() by U-Boot's fs_ls_generic() - Add info. to MAINTAINERS - Fix build failures - Fix style problems Joao Marcos

Re: [PATCH v3 3/5] include/u-boot, lib/zlib: add sources for zlib decompression

2020-07-30 Thread Joao Marcos Costa
On Thu, 30 Jul 2020 08:17:59 -0400 Tom Rini wrote: > On Thu, Jul 30, 2020 at 02:10:03PM +0200, Joao Marcos Costa wrote: > > On Wed, 29 Jul 2020 12:54:23 -0400 > > Tom Rini wrote: > > > > > On Wed, Jul 29, 2020 at 06:00:57PM +0200, Joao Marcos Costa > > &g

Re: [PATCH v3 3/5] include/u-boot, lib/zlib: add sources for zlib decompression

2020-07-30 Thread Joao Marcos Costa
On Wed, 29 Jul 2020 12:54:23 -0400 Tom Rini wrote: > On Wed, Jul 29, 2020 at 06:00:57PM +0200, Joao Marcos Costa wrote: > > On Wed, 29 Jul 2020 11:27:45 -0400 > > Tom Rini wrote: > > > > > On Tue, Jul 21, 2020 at 11:22:57AM +0200, Joao Marcos Costa wrote: >

Re: [PATCH v3 0/5] Add support for the SquashFS filesystem

2020-07-29 Thread Joao Marcos Costa
On Wed, 29 Jul 2020 11:21:26 -0400 Tom Rini wrote: > On Wed, Jul 29, 2020 at 02:54:56PM +0200, Joao Marcos Costa wrote: > > On Tue, 21 Jul 2020 11:22:54 +0200 > > Joao Marcos Costa wrote: > > > > > Hello! > > > > > > This series adds support

Re: [PATCH v3 3/5] include/u-boot, lib/zlib: add sources for zlib decompression

2020-07-29 Thread Joao Marcos Costa
On Wed, 29 Jul 2020 11:27:45 -0400 Tom Rini wrote: > On Tue, Jul 21, 2020 at 11:22:57AM +0200, Joao Marcos Costa wrote: > > > Add zlib (v1.2.11) uncompr() function to U-Boot. SquashFS depends on > > this function to decompress data from a raw disk image. The actual &g

Re: [PATCH v3 0/5] Add support for the SquashFS filesystem

2020-07-29 Thread Joao Marcos Costa
On Tue, 21 Jul 2020 11:22:54 +0200 Joao Marcos Costa wrote: > Hello! > > This series adds support for the SquashFS filesystem. For now, zlib > is the only supported compression type. This is my first contribution > to U-Boot as well as to a major Open Source project. >

[PATCH v3 1/5] fs/squashfs: new filesystem

2020-07-21 Thread Joao Marcos Costa
Add support for SquashFS filesystem. Right now, it does not support compression but support for zlib will be added in a follow-up commit. Signed-off-by: Joao Marcos Costa --- Changes in v3: - Replace CONFIG_IS_ENABLED by IS_ENABLED in fs/fs.c Changes in v2: - Add info

[PATCH v3 5/5] fs/fs.c: add symbolic link case to fs_ls_generic()

2020-07-21 Thread Joao Marcos Costa
Adds an 'else if' statement inside the loop to check for symbolic links. Signed-off-by: Joao Marcos Costa --- Changes in v3: - No changes since v2. Changes in v2: - This patch was added in v2 and did not exist in the last version. fs/fs.c | 3 +++ 1 file changed, 3 insertions

[PATCH v3 3/5] include/u-boot, lib/zlib: add sources for zlib decompression

2020-07-21 Thread Joao Marcos Costa
Add zlib (v1.2.11) uncompr() function to U-Boot. SquashFS depends on this function to decompress data from a raw disk image. The actual support for zlib into SquashFS sources will be added in a follow-up commit. Signed-off-by: Joao Marcos Costa --- Changes in v3: - No changes since v2

[PATCH v3 2/5] fs/squashfs: add filesystem commands

2020-07-21 Thread Joao Marcos Costa
Add 'ls' and 'load' commands. Signed-off-by: Joao Marcos Costa --- Changes in v3: - No changes since v2. Changes in v2: - Add info. to MAINTAINERS - Add 'static' keyword to do_sqfs_*(). These functions' prototypes are no longer needed in include/fs.h

[PATCH v3 4/5] fs/squashfs: add support for zlib decompression

2020-07-21 Thread Joao Marcos Costa
Add call to zlib's 'uncompress' function. Add function to display the right error message depending on the decompression's return value. Signed-off-by: Joao Marcos Costa --- Changes in v3: - No changes since v2. Changes in v2: - No changes since v1. fs/squashfs

[PATCH v3 0/5] Add support for the SquashFS filesystem

2020-07-21 Thread Joao Marcos Costa
: - Replace sqfs_ls() by U-Boot's fs_ls_generic() - Add info. to MAINTAINERS - Fix build failures - Fix style problems Best regards, Joao Marcos Costa Joao Marcos Costa (5): fs/squashfs: new filesystem fs/squashfs: add filesystem commands include/u-boot, lib/zlib: add

[PATCH v2 3/5] include/u-boot, lib/zlib: add sources for zlib decompression

2020-07-20 Thread Joao Marcos Costa
Add zlib (v1.2.11) uncompr() function to U-Boot. SquashFS depends on this function to decompress data from a raw disk image. The actual support for zlib into SquashFS sources will be added in a follow-up commit. Signed-off-by: Joao Marcos Costa --- Changes in v2: - Changed commit title

[PATCH v2 1/5] fs/squashfs: new filesystem

2020-07-20 Thread Joao Marcos Costa
Add support for SquashFS filesystem. Right now, it does not support compression but support for zlib will be added in a follow-up commit. Signed-off-by: Joao Marcos Costa --- Changes in v2: - Add info. to MAINTAINERS - Replace sqfs_ls() by U-Boot's fs_ls_generic

[PATCH v2 4/5] fs/squashfs: add support for zlib decompression

2020-07-20 Thread Joao Marcos Costa
Add call to zlib's 'uncompress' function. Add function to display the right error message depending on the decompression's return value. Signed-off-by: Joao Marcos Costa --- Changes in v2: - Changed commit title and message, which were wrong and/or misleading in v1. fs/squashfs

[PATCH v2 5/5] fs/fs.c: add symbolic link case to fs_ls_generic()

2020-07-20 Thread Joao Marcos Costa
Adds an 'else if' statement inside the loop to check for symbolic links. Signed-off-by: Joao Marcos Costa --- Changes in v2: - Changed commit title and message, which were wrong and/or misleading in v1. fs/fs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/fs.c b/fs

[PATCH v2 0/5] Add support for the SquashFS filesystem

2020-07-20 Thread Joao Marcos Costa
. to MAINTAINERS - Fix build failures - Fix style problems Best regards, Joao Marcos Costa Joao Marcos Costa (5): fs/squashfs: new filesystem fs/squashfs: add filesystem commands include/u-boot, lib/zlib: add sources for zlib decompression fs/squashfs: add support for zlib

[PATCH v2 2/5] fs/squashfs: add filesystem commands

2020-07-20 Thread Joao Marcos Costa
Add 'ls' and 'load' commands. Signed-off-by: Joao Marcos Costa --- Changes in v2: - Add info. to MAINTAINERS - Add 'static' keyword to do_sqfs_*(). These functions' prototypes are no longer needed in include/fs.h. - Change commit message. MAINTAINERS | 1 + cmd

Re: [PATCH 0/3] squashfs fixes

2020-07-16 Thread Joao Marcos Costa
Hello, Thomas! On Wed, 15 Jul 2020 22:11:40 +0200 Thomas Petazzoni wrote: > Hello Joao, > > As I started reviewing your patch series, I encountered a number of > build issues after applying your patches, and building on the latest > master. The following patches address the build failures I

Re: [PATCH 1/4] fs/squashfs: new filesystem

2020-07-09 Thread Joao Marcos Costa
Hello! On Thu, 9 Jul 2020 21:50:03 +0200 Rasmus Villemoes wrote: > On 09/07/2020 19.51, Joao Marcos Costa wrote: > > Add support for SquashFS filesystem. Right now, it does not support > > compression but support for zlib will be added in a follow-up > > commit

[PATCH 1/4] fs/squashfs: new filesystem

2020-07-09 Thread Joao Marcos Costa
Add support for SquashFS filesystem. Right now, it does not support compression but support for zlib will be added in a follow-up commit. Signed-off-by: Joao Marcos Costa --- common/spl/Kconfig |9 + fs/Kconfig |2 + fs/Makefile

  1   2   >