I hope you are doing well.
Zlib source code is present at
/lib/zlib in u-boot-imx
Zlib is used by various filesystems(squashfs,btrfs,ubifs, etc... ), gzip decompression, and bootm command in u-boot.
Zlib is enabled in the default config.
It is not recommended to remove it.
can I remove it and how to remove it?
=> One can add CONFIG_ZLIB=n in u-boot configuration file.
Thanks & Regards,
Sanket Parekh