Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FirmwareFlasher] verify that no one is attempting to flash cartographer directly on cr… #218

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions scripts/firmware.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env python3

import os
import os.path
import re
import subprocess
import argparse
Expand Down Expand Up @@ -2445,6 +2446,15 @@ def install(self) -> None:
choices=[e.value for e in FlashMethod], # Use FlashMethod values
type=lambda s: FlashMethod(s.upper()), # Convert string to FlashMethod enum
)

if os.path.isfile('/etc/os-release'):
with open('/etc/os-release') as f:
release_info = f.read()
if 'ID=buildroot' in release_info:
print("\nFlashing is not currently supported on Build Root OS such as Creality OS. Exiting...")
pellcorp marked this conversation as resolved.
Show resolved Hide resolved
print("Please follow this https://github.com/pellcorp/creality/wiki/Flashing-Carto-Firmware-on-Ubuntu")
exit(1)

try:
args = parser.parse_args(namespace=FirmwareNamespace())
Utils.configure_logging()
Expand Down
Loading