What Iceberg said.
But... you'd need a lot of knowhow, a lot of time on your hands, and probably a bunch of Nokia N97s to brick in the process.
The biggest problem would be writing your own drivers for all of the Nokia N97 hardware - CPU, Screen, Sound, Memory access, storage access, input...