[U-Boot] Purpose of Data partition in Partition Layout

Hi all,
My current default partition layout is as follow: 1) u-boot, 2) environment variables 3) kernel, 4) filesystem
I have seen in some implementations, that there is one partition of "data" after the filesystem's partition as follow: 1) u-boot, 2) environment variables 3) kernel, 4) filesystem 5) data(or rest)
What is the purpose of this data partition?
Who reads/writes there (kernel or filesystem(like jffs2)) and *How*? If kernel writes there, then do we have to change kernel configuration? If yes, then what changes are required?
What happens in case, when I don't keep that separate partition of data and only filesystem is given the rest of the flash memory(as I have used)? And How it differs from the partition layout with data as the last partition?
I don't know about this.
Please, help me understand these.

Dear Rajdeep Vaghasia,
In message CAONsvZV+jL008J_skJ=Lx-kJV6UwBs1RTG50Pn3C5BAStwde2w@mail.gmail.com you wrote:
I have seen in some implementations, that there is one partition of "data" after the filesystem's partition as follow:
- u-boot,
- environment variables
- kernel,
- filesystem
- data(or rest)
What is the purpose of this data partition?
It is a pretty common scenario to put all code and libraries and other "contant" stuff into a read-only partition and collect such data that needs to be writable in a separate, writable partition. Usually this i makes the system more robust, and often it can also be used to optimize boot imes.
Who reads/writes there (kernel or filesystem(like jffs2)) and *How*?
This depends on how you configure and use the system.
If kernel writes there, then do we have to change kernel
configuration? If yes, then what changes are required?
I have no idea what you mean here.
What happens in case, when I don't keep that separate partition of data and only filesystem is given the rest of the flash memory(as I have used)? And How it differs from the partition layout with data as the last partition?
There are many aspects that influence the choice of the file system layout and thus the partitioning of your devices. Some of these are: - available storage space - boot time requirements - target file system setup (are you running a standard distro, say Debian or Ubuntu? or are you running some self-built distro-like setup, say based on OpenEmbedded or Yocto or such? or some hand-optimized minimal-footprint system?) - strategy for software updates, if any (separate recovery system? two identical systems that get used alternatively? ...?) - reqired reliability versus cost factors versus ease of use versus ... etc. etc.
This is some part of your system design depends heavily on your actual requirements. It is not possible to give general recommendations here.
Best regards,
Wolfgang Denk
participants (2)
-
Rajdeep Vaghasia
-
Wolfgang Denk