Init scripts executed at startup

Hello,
I need to execute some commands every time device start (export GPIO, load kernel modules atc). I can compile swi-linux and also legato. What’s the best place for startup commands?

Regads,
Gianmaria

You can run an unsandboxed legato app to call your script by system() api during boot up

Placed my commands in /etc/init.d/ creating a .sh script. It worked.
Thanks.