From 8936b0414ade91b6256cf15707e06e9f9c0913b9 Mon Sep 17 00:00:00 2001 From: joaobarros Date: Sat, 25 Feb 2023 02:15:36 +0000 Subject: [PATCH] Remove incorrect SPI setting from BoardEnv.txt The correct way to have SPI is setting "overlays=spidev1_2" and that is already present as an option n othe file. The script was also setting "overlays" at the end of BardoEnv.txt which would smash any "overlays" definition before in the file. It also removes the unnecessary creationof a backup file. --- src/modules/opiconfig/start_chroot_script | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/modules/opiconfig/start_chroot_script b/src/modules/opiconfig/start_chroot_script index f942f657f..9cf79e1f3 100644 --- a/src/modules/opiconfig/start_chroot_script +++ b/src/modules/opiconfig/start_chroot_script @@ -16,16 +16,3 @@ fi # shellcheck disable=SC1091 source /common.sh install_cleanup_trap - -echo_green "Enable SPI interface on Orange Pi SBC's ..." - -# Step 1: Copy default config to backup file -cp "${OPICONFIG_CONFIG_TXT_FILE}" "${OPICONFIG_CONFIG_BAK_FILE}" - -# Step 2: Enable SPI -echo "overlays=spi" >> "${OPICONFIG_CONFIG_TXT_FILE}" -echo "spidevparam_spidev_spi_bus=1" >> "${OPICONFIG_CONFIG_TXT_FILE}" -echo "param_spidev_spi_cs=1" >> "${OPICONFIG_CONFIG_TXT_FILE}" -echo "param_spidev_max_freq=1000000" >> "${OPICONFIG_CONFIG_TXT_FILE}" - -echo_green "Enable SPI interface on SB1 ... DONE!" \ No newline at end of file