Tools: Simply manifest templates

The templates have some logics and validations.
Those codes in jinja2 are not easy to write and understand.

Also the script throws errors earlier than template generated source
codes.

This patch moves amounts of those codes into the python script where
logic and calculation codes are much easier to write and read.

Change-Id: I4e9149b675123ed401fc182b30381ef105d628a7
Signed-off-by: Kevin Peng <kevin.peng@arm.com>
4 files changed