How to access hardware info?

Is there any way to access hardware info?

Like board number, cpu serial number, flash unique id.