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

blueos_startup_update: add step for symlinking i2c3 to i2c4 on Pi5 #3014

Merged
merged 1 commit into from
Nov 29, 2024
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
14 changes: 14 additions & 0 deletions core/tools/blueos_startup_update/blueos_startup_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,19 @@ def update_cgroups() -> bool:
return True


def update_i2c4_symlink() -> bool:
logger.info("Running i2c4 symlink update..")
i2c4_symlink = "/dev/i2c-4"
i2c4_device = "/dev/i2c-3"
if os.path.exists(i2c4_symlink):
return False
if not os.path.exists(i2c4_device):
return False
command = f"sudo ln -s {i2c4_device} {i2c4_symlink}"
run_command(command, False)
return False # This patch doesn't require restart to take effect


def update_dwc2() -> bool:
logger.info("Running dwc2 update..")

Expand Down Expand Up @@ -473,6 +486,7 @@ def main() -> int:
[
update_cgroups,
update_dwc2,
update_i2c4_symlink,
]
)
if host_os == HostOs.Bookworm:
Expand Down