0

To enable I2C and SPI interfaces and deactivate the serial console, you can use the raspi-config tool which works as expected.

As far as I am informed, for SPI and I2C activation, the tool is just adding the required lines to the /etc/modules file. This could be achieved by a very simple script in order to do this programatically. Is there anything else the config tool does when activating SPI or I2C which needs to be taken into account when writing an own activation script?

What does the tool do when deactivating the console on the serial port?

3
  • Who informed you it made changes to /etc/modules? – joan Jun 18 '20 at 21:44
  • @joan: Sorry, I think I got this wrong. I meant /boot/config.txt instead of /etc/modules. I just had a look at the raspi-config source code which seems to edit only /boot/config.txt. In addition, eLinux' explanation states the same. – albert Jun 18 '20 at 22:01
  • 1
    Have you looked at the code on GITHUB? The software is freely available there as a bash script. The key thing to understand is this is valid at the time you read it - it may change with any release update... – user115418 Jun 18 '20 at 22:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.