@@ -113,3 +113,41 @@ echo_green "Enable SPI interface on Orange Pi SBC's ... DONE!"
113
113
echo_green " Remove 'unattended-upgrades' service ..."
114
114
sudo apt-get remove --purge --yes unattended-upgrades
115
115
# # END Step 7
116
+
117
+ # # Step 8: Disable OTG serial console on "bananapim2zero"
118
+ if [[ " $( is_board_type) " == " bananapim2zero" ]] \
119
+ && [[ " ${ARMBIAN_CONFIG_BPI2ZERO_OTG_SERIAL} " == " true" ]]; then
120
+ echo_green " Disable OTG Serial console for 'bananapim2zero' SBC's ..."
121
+ if [[ ! -d /etc/modprobe.d ]]; then
122
+ mkdir -p /etc/modprobe.d
123
+ fi
124
+ if [[ -d /etc/modprobe.d ]]; then
125
+ echo " blacklist serial_g" >> /etc/modprobe.d/blacklist.conf
126
+ fi
127
+ echo_green " Disable OTG Serial console for 'bananapim2zero' SBC's ... [DONE]"
128
+ fi
129
+ # # END Step 8
130
+
131
+ # # Step 9: Enable spi and/or UART3 on BananaPi M2 Zero
132
+ # ## Enable both
133
+ if [[ " $( is_board_type) " == " bananapim2zero" ]] \
134
+ && [[ " ${ARMBIAN_CONFIG_BPI2ZERO_ENABLE_UART3} " == " true" ]] \
135
+ && [[ " ${ARMBIAN_CONFIG_BPI2ZERO_ENABLE_SPI} " == " true" ]]; then
136
+ echo_green " Enable UART3 and SPI for 'bananapim2zero' SBC ..."
137
+ echo " overlays=uart3 spi-spidev" >> " ${ARMBIAN_CONFIG_TXT_FILE} "
138
+ fi
139
+ # ## UART3 only
140
+ if [[ " $( is_board_type) " == " bananapim2zero" ]] \
141
+ && [[ " ${ARMBIAN_CONFIG_BPI2ZERO_ENABLE_UART3} " == " true" ]] \
142
+ && [[ " ${ARMBIAN_CONFIG_BPI2ZERO_ENABLE_SPI} " != " true" ]]; then
143
+ echo_green " Enable UART3 for 'bananapim2zero' SBC ..."
144
+ echo " overlays=uart3" >> " ${ARMBIAN_CONFIG_TXT_FILE} "
145
+ fi
146
+ # ## SPI only
147
+ if [[ " $( is_board_type) " == " bananapim2zero" ]] \
148
+ && [[ " ${ARMBIAN_CONFIG_BPI2ZERO_ENABLE_UART3} " == " true" ]] \
149
+ && [[ " ${ARMBIAN_CONFIG_BPI2ZERO_ENABLE_SPI} " != " true" ]]; then
150
+ echo_green " Enable SPI for 'bananapim2zero' SBC ..."
151
+ echo " overlays=uart3" >> " ${ARMBIAN_CONFIG_TXT_FILE} "
152
+ fi
153
+ # # END Step 9
0 commit comments