The FIT Image size can be reduced using the following methods:
- Launch the root file system configuration menu using the
$ cd <plnx-proj-root> $ petalinux-config -c rootfs
- Select File System
Under this submenu, you can find the list of options corresponding to the root file system packages. If your requirement does not need some of these packages, you can shrink the size of the root file system image by disabling them.
- Launch the kernel configuration menu using the following
$ cd <plnx-proj-root> $ petalinux-config -c kernel
- Select General
Under this sub-menu, you can find options to set the
configitems. Any item that is not mandatory to have in the system can be disabled to reduce the kernel image size. For example,
CONFIG_SYSVIPC. For more details, see the Linux kernel documentation.Note: Note that disabling of some
configitems may lead to unsuccessful boot. It is expected that you have the knowledge of
configitems before disabling them.
Including extra configuration items and file system packages lead to increase in the kernel image size and the root file system size respectively.
If the kernel or the root file system size increases and is greater than 128 MB, make the following changes in bsp.cfg:
Any U-Boot configuration and environment variables that are added to bsp.cfg are included in the U-Boot build.
- Mention the Bootm length in <plnx-proj-root>/project-spec/meta-user/recipes-bsp/u-boot/files/bsp.cfg.
#define CONFIG_SYS_BOOTM_LEN <value greater than image size>