  In this paper, we study the action of diamond operators on Hilbert modular
forms with coefficients in a general commutative ring. In particular, we
generalize a result of Chai on the surjectivity of the constant term map for
Hilbert modular forms with nebentypus to the setting of group ring valued
modular forms. As an application, we construct certain Hilbert modular forms
required for Dasgupta-Kakde's proof of the Brumer-Stark conjecture at odd
primes. Since the forms required for the Brumer-Stark conjecture live on the
non-PEL Shimura variety associated to the reductive group $G =
Res_{F/Q}(GL_2)$, as opposed to the PEL Shimura variety associated to the
subgroup $G^* \subset G$ studied by Chai, we give a detailed explanation of
theory of algebraic diamond operators for $G$, as well as how the theory of
toroidal and minimal compactifications for $G$ may be deduced from the
analogous theory for $G^*$.
