Enable more commands and writable environment support on almost all supported devices, excluding D-Link DIR-505.
On rest devices, we will store environment variables in second FLASH sector, at offset 0x9F01EC00 and limit environment block size to 4 KB (should be enough, can be extended with reduced U-Boot image size).
Simple map of new FLASH organization for TP-Link/GS-Oolite/GL.iNet devices:
0x9F000000 Start of FLASH, start of U-Boot image, 1st 64 KB FLASH sector
..........
0x9F010000 Start of 2nd 64 KB FLASH sector
..........
0x9F01EC00 End of U-Boot image (up to 123 KB), start of 4 KB environment variables block
..........
0x9F01FC00 End of environment variables block, start of 1 KB block with MAC address, model number, WPS pin
..........
0x9F020000 End of MAC block, start of 3rd 64 KB FLASH sector, start of firmware image
..........
D-Link DIR-505 has ART data in second sector, starting from 0x9F011000, which gives us only 4 KB of additional space.
Maybe we can fit environment variables block in the same sector where is stored MAC address, but first we need to find more space for U-Boot image.