$I[f] := \int_0^1 \|f''(t)\|^2 \ \mathrm dt$ with constraints $f(0)=x_0$, $f'(0)=v_0$, $f(1)=x_1$, $f'(1)=v_1$
$I[f+\delta f] - I[f] = \int_0^1 2 (f'') (\delta f'') \ \mathrm dt = \int_0^1 2 (\delta f) f'''' \ \mathrm dt$ so the functional derivative of $I$ is $f''''$