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

Added raspberrypi5-64 option... #345

Merged
merged 1 commit into from
Feb 12, 2024
Merged

Conversation

sdotter
Copy link
Contributor

@sdotter sdotter commented Dec 27, 2023

No description provided.

@sdotter
Copy link
Contributor Author

sdotter commented Dec 27, 2023

Nevermind; DISABLE_JEMALLOC needs to be set to true to work with RPI 5

@voron
Copy link

voron commented Dec 27, 2023

I ended up by building supervisor with extra DISABLE_JEMALLOC env var and using raspberrypi4-64 as platform during dpkg configuration

@frenck
Copy link
Member

frenck commented Dec 27, 2023

Nevermind; DISABLE_JEMALLOC needs to be set to true to work with RPI 5

This is fixed in our base images, but not available in the main images yet.

@Naturalien Naturalien mentioned this pull request Jan 13, 2024
@HonzaJaros
Copy link

I ended up by building supervisor with extra DISABLE_JEMALLOC env var and using raspberrypi4-64 as platform during dpkg configuration

where is this DISABLE_JEMALLOC supposed to be?

@sdotter
Copy link
Contributor Author

sdotter commented Jan 17, 2024

I ended up by building supervisor with extra DISABLE_JEMALLOC env var and using raspberrypi4-64 as platform during dpkg configuration

where is this DISABLE_JEMALLOC supposed to be?

In docker compose yaml
But I did alternative fix

Add to /boot/firmware/config.txt:

kernel=kernel8.img

I run supervised home assistant with z2m + gpio dht22 sensor and some other stuff.
Runs awesome 👍

@HonzaJaros
Copy link

HonzaJaros commented Jan 17, 2024 via email

@voron
Copy link

voron commented Jan 17, 2024

Too difficult, I don’t have the img anyway. But still can’t find the Jemalloc, can you be specific pls.

You'll need to build supervisor container image yourself with the following patch

diff --git a/supervisor/docker/homeassistant.py b/supervisor/docker/homeassistant.py
index 0502420a..87279d26 100644
--- a/supervisor/docker/homeassistant.py
+++ b/supervisor/docker/homeassistant.py
@@ -174,6 +174,7 @@ class DockerHomeAssistant(DockerInterface):
                 ENV_TIME: self.sys_timezone,
                 ENV_TOKEN: self.sys_homeassistant.supervisor_token,
                 ENV_TOKEN_OLD: self.sys_homeassistant.supervisor_token,
+                "DISABLE_JEMALLOC": "true",
             },
             tmpfs={"/tmp": ""},
             oom_score_adj=-300,

And then use this image in your compose.yml instead of official one. It expects you to run HA supervisor via docker compose.yml, and supervisor will manage the rest. Here is my compose.yml

version: '3'
services:
  supervisor:
    container_name: hassio_supervisor
      #image: "ghcr.io/home-assistant/aarch64-hassio-supervisor:2023.12.0"
    image: "supervisor:0"
    volumes:
      - /run/supervisor:/run/os:rw
      - /run/udev:/run/udev:ro
      - /etc/machine-id:/etc/machine-id:ro
      - /usr/share/hassio:/data:rw,slave
      - /run/docker.sock:/run/docker.sock:rw
      - /run/systemd-journal-gatewayd.sock:/run/systemd-journal-gatewayd.sock:rw
      - /run/dbus:/run/dbus:ro
    restart: no
    privileged: true
    environment:
      SUPERVISOR_SHARE: /usr/share/hassio
      SUPERVISOR_NAME: hassio_supervisor
      SUPERVISOR_MACHINE: raspberrypi4-64
    security_opt:
      - "apparmor:hassio-supervisor"

@IanW6374
Copy link

@voron Sorry fairly new to docker build so getting a few argument errors when trying to build the modified supervisor ... Can you elaborate on the docker build command you are using?

@voron
Copy link

voron commented Feb 8, 2024

@voron Sorry fairly new to docker build so getting a few argument errors when trying to build the modified supervisor ... Can you elaborate on the docker build command you are using?

It's not required anymore, raspberrypi4-64-homeassistant:2024.2.0 works fine with stock aarch64-hassio-supervisor

@frenck frenck self-assigned this Feb 8, 2024
@ikifar2012 ikifar2012 merged commit c255def into home-assistant:main Feb 12, 2024
1 check passed
@IanW6374
Copy link

@sdotter After selecting the rpi5-64 option I still need to add "lsm=apparmor" into /boot/firmware/cmdline.txt

Is this intentional?

@sdotter
Copy link
Contributor Author

sdotter commented Feb 14, 2024

@sdotter After selecting the rpi5-64 option I still need to add "lsm=apparmor" into /boot/firmware/cmdline.txt

Is this intentional?

Yeah that isnt really something specific for just only raspberry pi 5 but also necessary for like rpi 4 etc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants