Skip to content

Commit

Permalink
Fix bullseye support
Browse files Browse the repository at this point in the history
  • Loading branch information
miklschmidt committed Jan 16, 2023
1 parent 93009d8 commit f8d4f0c
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 37 deletions.
9 changes: 3 additions & 6 deletions build-pi32.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,9 @@ cat "./config/default" >> ./src/config
cat "./config/raspberry/default" >> ./src/config
cat "./config/raspberry/rpi32" >> ./src/config
source ./src/config
IMG_FILENAME=$(basename $DOWNLOAD_URL_CHECKSUM)
if [[ ! -f $IMG_FILENAME ]]; then
echo "Image not found. Downloading..."
aria2c -d ./src/image --seed-time=0 $DOWNLOAD_URL_IMAGE
fi
# echo "Downloading image..."
# aria2c -d ./src/image --seed-time=0 $DOWNLOAD_URL_IMAGE
pushd ./src
sudo bash -x ./build_dist
popd
rm "./src/config.local"
rm "./src/config"
8 changes: 4 additions & 4 deletions site/docs/manual-firmware-compilation.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ Now navigate to the klipper directory:
cd ~/klipper
```

The configuration klipper needs to compile the firmware for your board is stored in `~/klipper_config/config/boards/[BOARD_NAME]/firmware.config`. To list the board names execute the following command:
The configuration klipper needs to compile the firmware for your board is stored in `~/printer_data/config/RatOS/boards/[BOARD_NAME]/firmware.config`. To list the board names execute the following command:

```bash
ls -la ~/klipper_config/config/boards
ls -la ~/printer_data/config/RatOS/boards
```

Let's say we need to compile the firmware for the octopus. We then need to copy the configuration file from `~/klipper_config/config/boards/btt-octopus-11/firmware.config`
Let's say we need to compile the firmware for the octopus. We then need to copy the configuration file from `~/printer_data/config/RatOS/boards/btt-octopus-11/firmware.config`

```bash
cp -f ~/klipper_config/config/boards/btt-octopus-11/firmware.config ~/klipper/.config
cp -f ~/printer_data/config/RatOS/boards/btt-octopus-11/firmware.config ~/klipper/.config
```

Now we're ready to compile the firmware!
Expand Down
1 change: 0 additions & 1 deletion src/image/legacy-raspios-lite-latest.zip.sha256

This file was deleted.

12 changes: 9 additions & 3 deletions src/modules/node/start_chroot_script
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ set -xe
source /common.sh
install_cleanup_trap

curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/yarnkey.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
if [[ ! -d /tmp ]]; then
mkdir /tmp
fi

chmod 777 /tmp

curl -fsSL https://deb.nodesource.com/setup_16.x | bash - &&\
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | tee /usr/share/keyrings/yarnkey.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | tee /etc/apt/sources.list.d/yarn.list
apt update && apt install nodejs yarn -y
2 changes: 1 addition & 1 deletion src/modules/ratos/config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[ -n "$RATOS_CONFIG_SHIP" ] || RATOS_CONFIG_SHIP=https://github.com/Rat-OS/RatOS-configuration.git
[ -n "$RATOS_CONFIG_BRANCH" ] || RATOS_CONFIG_BRANCH=v2.x
[ -n "$RATOS_CONFIG_BRANCH" ] || RATOS_CONFIG_BRANCH=ft-bullseye
[ -n "$RATOS_THEME_SHIP" ] || RATOS_THEME_SHIP=https://github.com/Rat-OS/RatOS-theme.git
[ -n "$RATOS_THEME_BRANCH" ] || RATOS_THEME_BRANCH=v2.x
[ -n "$RATOS_CONFIGURATOR_SHIP" ] || RATOS_CONFIGURATOR_SHIP=https://github.com/Rat-OS/RatOS-configurator.git
Expand Down
2 changes: 1 addition & 1 deletion src/modules/ratos/end_chroot_script
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# Source error handling, leave this in place
set -xe

sudo -u ${BASE_USER} /home/${BASE_USER}/klipper_config/config/scripts/ratos-post-install.sh
sudo -u ${BASE_USER} /home/${BASE_USER}/printer_data/config/RatOS/scripts/ratos-post-install.sh

# Stop the configurator

Expand Down
27 changes: 8 additions & 19 deletions src/modules/ratos/start_chroot_script
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ install_cleanup_trap

echo_green "Installing RatOS"

pushd /home/${BASE_USER}/klipper_config
pushd /home/${BASE_USER}/printer_data/config

gitclone RATOS_CONFIG config
gitclone RATOS_CONFIG RatOS
gitclone RATOS_THEME .theme
pushd /home/${BASE_USER}
gitclone RATOS_CONFIGURATOR ratos-configurator
Expand All @@ -23,6 +23,9 @@ popd

unpack /filesystem/root /

# Set default git merge strategy
sudo -u pi git config --global pull.ff only

# Create release file
if [ -f "/etc/ratos_version" ]; then
sudo rm -f /etc/ratos_version
Expand All @@ -35,28 +38,14 @@ echo "${DIST_NAME} v${DIST_VERSION} ($(get_parent))" > /etc/${DIST_NAME,,}-relea
# Install RatOS Configurator
sudo -u pi bash /home/${BASE_USER}/ratos-configurator/scripts/setup.sh

# Symlink printer data dirs
if [ -d "/home/${BASE_USER}/printer_data" ]; then
echo "Deleting printer data config, database, gcodes and logs directories.."
rm -rf /home/${BASE_USER}/printer_data/config
rm -rf /home/${BASE_USER}/printer_data/database
rm -rf /home/${BASE_USER}/printer_data/gcodes
rm -rf /home/${BASE_USER}/printer_data/logs
else
mkdir /home/${BASE_USER}/printer_data
fi

echo "Symlinking printer data config, database, gcodes and logs directories.."
ln -s /home/${BASE_USER}/klipper_config /home/${BASE_USER}/printer_data/config
ln -s /home/${BASE_USER}/.moonraker_database /home/${BASE_USER}/printer_data/database
ln -s /home/${BASE_USER}/gcode_files /home/${BASE_USER}/printer_data/gcodes
ln -s /home/${BASE_USER}/klipper_logs /home/${BASE_USER}/printer_data/logs
echo "Symlinking printer data config directory, until ratos-configuration and configurator is updated"
ln -s /home/${BASE_USER}/printer_data/config /home/${BASE_USER}/klipper_config

# Start the configurator so extensions can access the API
echo "Starting RatOS Configurator"
pushd /home/${BASE_USER}/ratos-configurator
sudo -u ${BASE_USER} yarn start &
popd
# Install RatOS Configuration
sudo -u pi bash /home/${BASE_USER}/klipper_config/config/scripts/ratos-install.sh
sudo -u pi bash /home/${BASE_USER}/printer_data/config/RatOS/scripts/ratos-install.sh
sudo update-rc.d ratos defaults
4 changes: 2 additions & 2 deletions src/modules/rpi_mcu/start_chroot_script
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ echo_green "Installing RPI MCU service"

pushd /home/pi/klipper
echo "flashing rpi-mcu"
cp -f /home/pi/klipper_config/config/boards/rpi/firmware.config /home/pi/klipper/.config
cp -f /home/pi/printer_data/config/RatOS/boards/rpi/firmware.config /home/pi/klipper/.config
make olddefconfig
make clean
make flash
Expand All @@ -25,4 +25,4 @@ popd


# Reset ownership
chown pi:pi -R /home/pi/klipper
chown pi:pi -R /home/pi/klipper

0 comments on commit f8d4f0c

Please sign in to comment.