The FIT Image size can be reduced using the following methods:
- Launch the root file system configuration menu using the
following
command:
cd <plnx-proj-root> petalinux-config -c rootfs
- Select File System
Packages.
Under this sub-menu, 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
command:
cd <plnx-proj-root> petalinux-config -c kernel
- Select General
Setup.
Under this submenu, you can find options to set the
config
items. Any item not mandatory to have in the system can be disabled to reduce the kernel image size. For example,CONFIG_SHMEM
,CONFIG_AIO
,CONFIG_SWAP
,CONFIG_SYSVIPC
. For more details, see the Linux kernel documentation.Note: Disabling someconfig
items can lead to an unsuccessful boot. You should be aware of knowledge ofconfig
items before disabling them.Including extra configuration items and file system packages lead to increases the kernel image size and the root file system sizes, 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 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>
- Undef
CONFIG_SYS_BOOTMAPSZ
in <plnx-proj-root>/project-spec/meta-user/recipes-bsp/u-boot/files/bsp.cfg.
Note: Changes made to bsp.cfg for MicroBlaze do not reflect. Update the configurations directly through petalinux-config -c u-boot-xlnx.