From where does the uboot get the information about flash, RTC, RAM in uboot/kernal development
That is spread throughout the u-boot source tree. A more specific question would probably get you a better answer.
If you're looking for board specific things check .../include/configs/yourboard.h