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

adafruit-pitft.py boot_dir #338

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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: 8 additions & 2 deletions adafruit-pitft.py
Original file line number Diff line number Diff line change
Expand Up @@ -743,8 +743,14 @@ def success():
if shell.isdir(user_homedir):
target_homedir = user_homedir

boot_dir = shell.get_boot_config()
if boot_dir is None:
boot_dir = "/boot/firmware" if shell.isdir("/boot/firmware") else "/boot"

# If neither directory is valid, use shell.get_boot_config()
if not shell.isdir(boot_dir):
boot_dir = shell.get_boot_config()

# Final safeguard: Ensure boot_dir is actually a directory and not a file path
if boot_dir is None or not shell.isdir(boot_dir):
shell.bail("Unable to find boot directory")

if shell.get_raspbian_version() == "bullseye":
Expand Down