Only setup settings,andsec partitions if available

Change-Id: Iafedcec9e6ba368e29e32ab7a92d774cdd3f64e1