Skip to content

Commit

Permalink
Clean initial scripts, fix UART setup
Browse files Browse the repository at this point in the history
  • Loading branch information
okalachev committed May 6, 2024
1 parent d7e8d22 commit afe46ab
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
13 changes: 6 additions & 7 deletions builder/assets/hardware_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

##################################################
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions builder/image-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit afe46ab

Please sign in to comment.