HassOS for custom board (hardware)

Hi,

I am developing custom base hardware for home automation and would like use Hass on it. I know I can install any linux with Docker or Python env, and then put Hass on them, but then I lose Supervisor, easy updates, and Addons Store, which I would like to have.
I think using HassOS would be the best option, but to do this I need some informations about HassOS structure, and how extend or rebuild this system. I need this informations because probably I will have to “adjust” kernel, device tree and drivers to demands of my base board.

Of course, I don’t demand full guidance on how create a whole custom linux distribution. Mainly I need to know how modify existing HassOS or how looks integration Hass Core with Supervisor and Addons Store, how it is done, and what I should do, to create HassOS system but for my own device.

I would be very thankful for help.

2 Likes

You can also install HA Supervised on top of a generix linux install (only Debian is “officially” supported), this way you get add-ons, snapshots, etc., but you don’t need to build your own OS.

Take a lool here for the different install methods.

You will likely find that the ‘NUC’ image of HAOS will run on whatever x86 based system you try. If you already have some sort of hardware in mind it’s worth a test run.

VDRainer Great thanks, It looks like very promising. I don’t know why I didn’t immediately think about searching the HA github.

Burningstone This is what I actually trying, but have a problem with installation script because the script demand to pass “MACHINE” type, and due I use an uncommon board with ARM architecture, then I have a problem what value of MACHINE variable should I use - qemuarm?
And thanks for the link, finally place where everything is clear what is possible with which type of installation method. This table should be attached to official documentation.

sparkydave I use ARM architecture, so unfortunately use ready HASOS images won’t work :slight_smile:

Which script?

I haven’t installed HA Supervised for a long time, but I don’t see any mention of MACHINE in the community guideline here. Can you elaborate?

“supervised-installer.sh” script which is run from command

curl -sL "https://raw.githubusercontent.com/Kanga-Who/home-assistant/master/supervised-installer.sh" | bash -s

In github repository is information about “Supported machine types”:

In community guideline there is no info about machine type becuause, I guess, guide is for x86 architecture which in default has defined Machine variable value. On other platforms user must pass machine type, otherwise installer throw “Please set machine for …” or "Unknown machine type" if you set unknown machine type.
Look at fragment of installation script:

# Generate hardware options
case $ARCH in
    "i386" | "i686")
        MACHINE=${MACHINE:=qemux86}
        HASSIO_DOCKER="$DOCKER_REPO/i386-hassio-supervisor"
    ;;
    "x86_64")
        MACHINE=${MACHINE:=qemux86-64}
        HASSIO_DOCKER="$DOCKER_REPO/amd64-hassio-supervisor"
    ;;
    "arm" |"armv6l")
        if [ -z $MACHINE ]; then
            error "Please set machine for $ARCH"
        fi
        HASSIO_DOCKER="$DOCKER_REPO/armhf-hassio-supervisor"
    ;;
    "armv7l")
        if [ -z $MACHINE ]; then
            error "Please set machine for $ARCH"
        fi
        HASSIO_DOCKER="$DOCKER_REPO/armv7-hassio-supervisor"
    ;;
    "aarch64")
        if [ -z $MACHINE ]; then
            error "Please set machine for $ARCH"
        fi
        HASSIO_DOCKER="$DOCKER_REPO/aarch64-hassio-supervisor"
    ;;
    *)
        error "$ARCH unknown!"
    ;;
esac

if [[ ! "${MACHINE}" =~ ^(intel-nuc|odroid-c2|odroid-n2|odroid-xu|qemuarm|qemuarm-64|qemux86|qemux86-64|raspberrypi|raspberrypi2|raspberrypi3|raspberrypi4|raspberrypi3-64|raspberrypi4-64|tinker)$ ]]; then
    error "Unknown machine type ${MACHINE}!"
fi

Wouldn’t it only work with x86 systems that use exactly the same hardware as used in an Intel NUC? It’s my understanding the image contains drivers (video, network, USB, etc) specifically for the NUC platform.

You would need an x86 machine that’s a clone of an Intel NUC.

To be honest I’m not really sure. It was a comment mentioned by someone else in another thread. I figured it would be worth testing…

It’s similar to assuming the disk image for Raspberry Pi, which has an ARM-based architecture, will work on any other single-board computer (SBC) that uses the same CPU architecture. For that to be true, the other SBC will (minimally) need the same peripheral hardware as in an RPi (in other words, it’s an RPi clone).

Like I say, it was info from someone else. That said I believe people have used the NUC image on the cheap Chinese mini computers… are they supposed to be NUC clones?