Skip to content

filetype: Some size reduction patches

Sascha Hauer barebox 1 version Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am 20250318-filetype-size-reduction-v1-0-4f463ffae7d0@pengutronix.de change-id 20250318-filetype-size-reduction-0cbf74281e2e

Versions newest first

  1. v1 Latest7 patches 5 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/7filetype: add file_detect_compression_type()common/filetype.c include/filetype.h lib/uncompress.c+35 -180 replies
2/7filetype: add file_detect_fs_type()common/filetype.c include/filetype.h+41 -192 replies
3/7filetype: add function pointer to file_name_detect_type_offset()common/filetype.c fs/fs.c include/filetype.h+9 -50 replies
4/7filetype: let cdev_detect_type() only detect filesystemscommon/filetype.c+1 -10 replies
5/7filetype: make file type strings optionalcommon/Kconfig common/filetype.c+23 -00 replies
6/7ARM: am33xx: myirtech-myd: add MLO specific device treearch/arm/boards/myirtech-x335x/lowlevel.c arch/arm/dts/Makefile arch/arm/dts/am335x-myirtech-myd-mlo.dts+15 -30 replies
7/7ARM: am335x_mlo_defconfig: disable file type stringsarch/arm/configs/am335x_mlo_defconfig+1 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/7] filetype: Some size reduction patches

The am335x_mlo_defconfig is very size constrained and doesn't build within these constraint anymore for some time. The filetype detection code has become quite big and offers some opportunities for size reduction. Specifically file_detect_type() is quite big, but many callers are only interested in some specific file types like supported file systems or supported compressed binary formats. This series introduces some more specific smaller file detection functions so that we can get rid of the big file_detect_type() in the binary.

Also included some patches for the myirtech-mid board to use a stripped down device tree for the MLO. The same is already done for the other boards supported in am335x_mlo_defconfig

---
Sascha Hauer (7):
filetype: add file_detect_compression_type()
filetype: add file_detect_fs_type()
filetype: add function pointer to file_name_detect_type_offset()
filetype: let cdev_detect_type() only detect filesystems
filetype: make file type strings optional
ARM: am33xx: myirtech-myd: add MLO specific device tree
ARM: am335x_mlo_defconfig: disable file type strings

 arch/arm/boards/myirtech-x335x/lowlevel.c |   6 +-
 arch/arm/configs/am335x_mlo_defconfig     |   1 +
 arch/arm/dts/Makefile                     |   2 +-
 arch/arm/dts/am335x-myirtech-myd-mlo.dts  |  10 +++
 common/Kconfig                            |   8 ++
 common/filetype.c                         | 132 +++++++++++++++++++++---------
 fs/fs.c                                   |   3 +-
 include/filetype.h                        |   5 +-
 lib/uncompress.c                          |   4 +-
 9 files changed, 125 insertions(+), 46 deletions(-)

---
base-commit: a0ba27e06535570e8e4653f5f92a607f8b99022e
change-id: 20250318-filetype-size-reduction-0cbf74281e2e

Best regards,

Signature · 1 line
Sascha Hauer <[email protected]>