automating "config-pin P9.28 spi" command for universal-io overlay


I am trying to automate configuring spi pins. I need to issue below commands

config-pin P9.28 spi
config-pin P9.29 spi
config-pin P9.30 spi
config-pin P9.31 spi

When I do it manually, everything works fine but when I try to automate it. This doesn’t work.

I have tried adding it to ( I am using the latest debian image wheesy)

  • /etc/rc.local
  • systemd
  • monit

for some reason, this doesn’t work. Can you please tell me where I should place these commands?


First, put the commands in a text file.
Then you run the command like this:

config-pin -f path-to-file

Put the above command in your .profile, which is in your home directory.
You could also put in a list of individual commands like you are attempting and it will work.


config-pin -h

for complete usage information.