Secure boot related fixes Fix some issues (mostly build system) from the secure boot implementation Also refactor the way submodule checks are applied to make them more reliable. See merge request !207