OpenWRT needs to compile and run on devices with only 4MB of flash storage, and they have a guide for slimming down the kernel here: https://openwrt.org/docs/guide-user/additional-software/savi...
I would be surprised if the resulting kernel is any bigger than a floppy disk.