  We consider surface states in semiconductors with inverted-band structures,
such as $\alpha$-Sn and HgTe. The main interest is the interplay of the effect
of a strain of an arbitrary sign and that of the sample finite size. We clarify
the origin of various transitions which happen at a given strain with the
change of the sample thickness, in particular the transition between the Dirac
semimetal and quasi-3D (quantized) topological insulator. We compare our
results with the ones recently published in the literature.
  For the k-p Kane model we derive effective boundary conditions in the case
when the direct band materials form high barriers for the carriers of the inner
inverted-band semiconductor (for example, CdTe/HgTe/CdTe and
CdTe/$\alpha$-Sn/CdTe cases). We show that in this case the BCs have an
universal and simple form which does not depend on the order of different
non-commuting operators in the Hamiltonian. Even in the limit of very high
barriers the BCs do not reduce to the trivial zero form, but contain the
information about the asymmetry of the offsets in the conduction and valence
bands. These boundary conditions allow to investigate the realistic case of
finite mass of the heavy hole band, and to compare the results obtained within
the Kane and the Luttinger models.
