[OpenWrt-Devel] Remove ralink_default_fw_size_xxx variables

Adrian Schmutzler mail at adrianschmutzler.de
Mon Jul 22 12:31:35 EDT 2019


I've recently made an effort to check and fix IMAGE_SIZE variables in ramips target:


The target has four predefined variables ralink_default_fw_size_4M, ralink_default_fw_size_8M, ralink_default_fw_size_16M, ralink_default_fw_size_32M.

When checking/fixing IMAGE_SIZEs, I've encountered many cases where the IMAGE_SIZE was just set to a predefined $(ralink_default_fw_size_xxx) roughly matching the flash size, no matter what the actual firmware partition size was.
I've felt the same when looking at some recent PRs adding devices.

The more I think about this topic and the more I look at recent pull requests, the bigger my desire grows to remove ralink_default_fw_size_xxx variables completely. If they are not based on some inherent board property, but just on frequent choice of partitioning (and that's how it looks to me), it might be better to remove them.
This way the user is not tricked into assuming he can just put a variable without thinking.

Replacing variables by numbers is an easy sed job, so each device bears its IMAGE_SIZE in kiB (unless there is some common definition).

I've already done that in the second-to-last patch of my linked PR ("ramips: Remove ralink_default_fw_size_xxx variables").

Does anyone have an opposite opinion on this one?


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20190722/b892f06f/attachment.sig>
-------------- next part --------------
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list