Change partition size for the gateway Yocto build

Document created by Dhvanil Patel on Jul 25, 2017Last modified by Dhvanil Patel on Sep 3, 2017
Version 2Show Document
  • View in full screen mode

There might be some use cases where a modular gateway user wants to add more packages to the gateway image. And there are chances that this requires larger rootfs partition size than the current partition scheme for the modular gateway.


This post provides some useful information on how to serve this purpose.


  • Current gateway image with the OTA update support allows the partition to be as large as 2515968 KB (2457 MB).
  • If a user wants to update this partition limit in the default IDEx gateway image, it is required to change the existing SD card partition table and also required to increase the rootfs filesystem size. Due to this, the final SD card image generated for the gateway will not fit in an 8GB SD card.


There are two options to solve this purpose.

  1. Use the 8 GB card and disable some features to make space.
    • Turn off the OTA feature to make room for the increased rootfs partition size.
      1. Remove the layers for the OTA support from the "build-x11/conf/bblayers.conf" file.
        Comment out two lines as mentioned below.
        #BBLAYERS += " ${BSPDIR}/sources/meta-volansys-gw-ota "
        #BBLAYERS += " ${BSPDIR}/sources/meta-swupdate "
      2. Re-build the full gateway image using below steps.
        1. Clean the state of current build for the gateway.
          $ bitbake -f -c cleansstate volansys-image-gw
        2. Build the gateway image again.
          $ bitbake volansys-image-gw
  2. Use the 16GB SD Card and extend the size keeping all the current features.
    • Increase the rootfs partition size and build a gateway SD card image which would fit in a 16 GB card.
      1. Update the following variables in the meta-volansys-gw-ota/recipes-fsl/images/

        Below example increases rootfs partition size from 2457 MB to 4000 MB.
        Current configuration:

        #Rootfile size 2457 MB [in KiB]
        #User data size 8192 MB [in kiB]]

        Updated configuration:

        #Rootfile size 4000 MB [in KiB]
        #User data size 4000 MB [in kiB]]

        Note: On the first boot of the gateway image, the User data partition(last in the partition table) will be expanded to fill the unallocated space of the SD card.