
Hi Thomas,
On Thu, Aug 24, 2017 at 8:58 AM, Thomas Petazzoni thomas.petazzoni@free-electrons.com wrote:
Hello,
While adding support for new platforms, I found out that many, many platforms define pretty much the same values for:
CONFIG_SYS_CBSIZE CONFIG_SYS_PBSIZE CONFIG_SYS_MAXARGS CONFIG_SYS_BARGSIZE
with just a few platforms deviating from the values that have clearly been copy/pasted over and over again all over the place.
In this patch series, I propose to have U-Boot define some sane defaults for those 4 configuration options, and cleanup all the board configuration files that were using the default values. This leads to the removal of 1300+ lines.
Of course, this is all open for discussion, and at this point, I have only done minimal build testing, as my goal is to get the discussion started.
Open questions:
Do we really need to have all those remaining boards with custom/arbitrary values for those configuration options?
Does it really makes sense for those configuration options to be customized in board configuration files? For example, the size of the kernel command line is not at all tied to the underlying hardware, but rather how much arguments the user wants to pass to the kernel. Ditto for the maximum number of arguments passed to U-Boot commands. Perhaps we want to remove those options entirely from the .h files, and simply have a Kconfig option instead?
Also, let me know if I have missed some existing work in this area.
This might be considered a step along the way but these could become Kconfig options instead. The same concept exist of having the Kconfig specify a sane default and board configs being able to set a value different to the default. The process is pretty well automated with tools/moveconfig.py.