I once saw a 386dx/25MHz/4MB with total HD space (including swap) of 40MB
compile its own kernel (a 1.2.13 I think). It took less than two days.
You have to delete some parts of the kernel sources to make some room. I
believe it would still work with 2.1.65, if you keep only the needed
sources.
A friend of mine tried to compile a kernel on a 2MB machine. It never
went beyond the first stage of "make dep". I believe the total compile
time would exceed the harddisk life-time.
--Thomas Pornin