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 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
command:
$ cd <plnx-proj-root> $ petalinux-config -c kernel
- Select General
Setup.
Under this sub-menu, you can find options to set the
config
items. Any item that is 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: Note that disabling of someconfig
items may lead to unsuccessful boot. It is expected that you have the knowledge ofconfig
items 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>
- Undef
CONFIG_SYS_BOOTMAPSZ
in <plnx-proj-root>/project-spec/meta-user/recipes-bsp/u-boot/files/bsp.cfg.