The soldiers were prepared to die for their homeland.
Literal
Soldiers [topic-は] homeland [purpose-のために] die resolve [subject-が] was-ready.
覚悟ができていた follows the same pattern as 準備ができている but in past tense — 'the resolve was in a state of being formed.' ~のために marks purpose: 'for the sake of their homeland.' A sentence with emotional weight unusual in this military set.