Skip to content

Commit

Permalink
blueos_startup_update: add step for symlinking i2c3 to i2c4 on Pi5
Browse files Browse the repository at this point in the history
  • Loading branch information
Williangalvani authored and patrickelectric committed Nov 29, 2024
1 parent 8dad272 commit 5083dd7
Showing 1 changed file with 14 additions and 0 deletions.
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

0 comments on commit 5083dd7

Please sign in to comment.