  We study the end-point map of a control-linear system in a neighborhood of an
arbitrarily chosen trajectory. In particular, we want to calculate the $k$-th
order derivative of this map in a given direction. A priori it is a solution of
a quite complicated ODE depending on all derivatives of order less or equal
$k$. We prove that there exists a special coordinate system adapted to the
geometry of the problem, which changes the system of ODEs describing all
derivatives of the end-point map up to order $k$ to equations of a
control-affine (non-autonomous control-linear) system, with the direction of
derivation playing the role of the new control. As an application we study
controllability criteria for this system, obtaining first and second-order
necessary optimality conditions of sub-Riemannian geodesics. In particular, for
the case of an abnormal minimizer we can interpret \emph{Goh conditions} as
non-controllability conditions of this control-affine system for $k=2$. We make
a hypothesis that for higher $k$'s its non-controllability corresponds to
recently obtained higher-order analogs of the Goh conditions [Boarotto, Monti,
Palmurella, 2020], [Boarotto, Monti, a Socionovo, 2022].
