The reason code space is limited to the first 1M is that only 1M of flash may be mapped into CPU address space at a time. Therefore for modules with flash chip size above 1M, we keep lower 1M for code and everything above that for file system.
So for 2M device the only layout which makes sense is 1M code + 1M FS, for 4M device it's 1M code + 3M FS.
Edit:
Also please note that values in boards.txt (like max. upload size, FS size and offset) do not affect compilation. They are only provided to be passed to other tools (like mkspiffs). Values which do affect compilation are defined in linker scripts.