How to reduce the Linux image size

Hi, community.

Currently, the reference image size is 190MB.(tdx-reference-minimal-image)
I want to reduce the reference image size.(Target value is 64MB)
I don’t need the multimedia feature, GUI, Wi-Fi and so on.

Do you have any hints ?

Build Configuration:
BB_VERSION = “1.46.0”
BUILD_SYS = “x86_64-linux”
TARGET_SYS = “aarch64-tdx-linux”
MACHINE = “verdin-imx8mp”
DISTRO = “tdx-xwayland”
DISTRO_VERSION = “5.4.0-devel-20220217071703+build.0”
TUNE_FEATURES = “aarch64”
meta-toradex-nxp = “HEAD:c2de495bfbd1ce09f06e41ed0feb9f7041b8c65c”
meta-freescale = “HEAD:12c3eed6a90b436565126d8ba6934f794b816e25”
meta-freescale-3rdparty = “HEAD:537cb85e4db17d1f6b356a92112b32ae2e39b235”
meta-toradex-tegra = “HEAD:8658abd984d327037eeaa601aa1472c4bf7b02df”
meta-toradex-bsp-common = “HEAD:789e231008c7fd1ca2b2535ea0ac1ee3c29f3233”
meta-python = “HEAD:85f8047c71047d93cf79a954142157f85079968d”
meta-freescale-distro = “HEAD:5d882cdf079b3bde0bd9869ce3ca3db411acbf3b”
meta-toradex-demos = “HEAD:f99619b2135ff939b6370be8116d66a10bc84836”
meta-qt5 = “HEAD:b4d24d70aca75791902df5cd59a4f4a54aa4a125”
meta-toradex-distro = “HEAD:9f52ce166e8e3c10fa0935f55b3f403085f64fa2”
meta-poky = “HEAD:eb6e625d72fb49a707b0782e55530b3551f2396f”
meta = “HEAD:ce78c16409363741d59a2f787aca66077bec93cd”

Best regards,

Hi @deepimpact , welcome back.

Yeah, there are several things you can do like reduce the kernel and the rootfs from things you don’t need but probably the best you can do is to switch to the Poky Tiny distro and get a <10MB distro and a <1s boot time :slight_smile:

I think there is a better support on Poky compared to before. Try changing the DISTRO to “poky-tiny” and see where that gets you. Probably you will have to remove or change some dependencies but shouldn’t be super complicated. Probably the most annoying thing would be the change of GLIBC to the smaller uclibc as it might have some impact on your application.

We have this info that is a bit old but still summarizes pretty well some steps to speed up the boot (by reducing the size and removing unneeded components):

(We actually translated it to Japanese some time ago). Hope this helps!

Kind regards,

Hi, alvaro-san.

Thank you for the useful information!!
I’ll try it right away.
and, Thank you for the translation into Japanese. This is very helpful.

get a <10MB distro and a <1s boot time


Best regards,