mirror of
https://github.com/CopterExpress/clover.git
synced 2026-05-26 11:43:25 +00:00
Clean initial scripts, fix UART setup
This commit is contained in:
@@ -13,6 +13,8 @@
|
||||
# copies or substantial portions of the Software.
|
||||
#
|
||||
|
||||
# https://www.raspberrypi.com/documentation/computers/configuration.html
|
||||
|
||||
set -e # Exit immidiately on non-zero result
|
||||
|
||||
##################################################
|
||||
@@ -33,18 +35,15 @@ echo "--- Enable SPI"
|
||||
echo "--- Enable raspicam"
|
||||
/usr/bin/raspi-config nonint do_camera 0
|
||||
|
||||
echo "--- Enable UART"
|
||||
echo "--- Setup UART"
|
||||
# Temporary solution
|
||||
# https://github.com/RPi-Distro/raspi-config/pull/75
|
||||
/usr/bin/raspi-config nonint do_serial 1
|
||||
/usr/bin/raspi-config nonint set_config_var enable_uart 1 /boot/firmware/config.txt
|
||||
/usr/bin/raspi-config nonint do_serial_hw 0
|
||||
/usr/bin/raspi-config nonint do_serial_cons 1
|
||||
|
||||
echo dtoverlay=pi3-disable-bt >> /boot/firmware/config.txt
|
||||
systemctl disable hciuart.service
|
||||
|
||||
# After adding to Raspbian OS
|
||||
# https://github.com/RPi-Distro/raspi-config/commit/d6d9ecc0d9cbe4aaa9744ae733b9cb239e79c116
|
||||
#/usr/bin/raspi-config nonint do_serial 2
|
||||
|
||||
echo "--- Enable v4l2 driver"
|
||||
# http://robocraft.ru/blog/electronics/3158.html
|
||||
#echo "bcm2835-v4l2" >> /etc/modules
|
||||
|
||||
@@ -29,6 +29,7 @@ echo "${2%.*}" >> /etc/clover_origin
|
||||
echo "--- Write magic script to /etc/rc.local"
|
||||
MAGIC_SCRIPT="sudo /root/init_rpi.sh; sudo sed -i '/sudo \\\/root\\\/init_rpi.sh/d' /etc/rc.local && sudo reboot"
|
||||
sed -i "19a${MAGIC_SCRIPT}" /etc/rc.local
|
||||
# TODO: remake to oneshot systemd service
|
||||
|
||||
# It needs for autosizer.sh & maybe that is correct
|
||||
echo "--- Change boot partition"
|
||||
|
||||
Reference in New Issue
Block a user