From 770bcb62a0c0ad8034af26c2d34962c2dc60aa1c Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Wed, 6 May 2020 08:26:44 +0000 Subject: [PATCH] Update docs --- Documentation/getting_started_development.md | 6 +-- Documentation/partition.md | 44 ++++++++++++++++++++ README.md | 4 +- 3 files changed, 49 insertions(+), 5 deletions(-) create mode 100644 Documentation/partition.md diff --git a/Documentation/getting_started_development.md b/Documentation/getting_started_development.md index 62fa45de3..df22fcbdb 100644 --- a/Documentation/getting_started_development.md +++ b/Documentation/getting_started_development.md @@ -1,7 +1,7 @@ Getting started with Hassos development using Docker on GNU/Linux ================================================================= -First, install **docker** for your distribution - I'd advise to use your distro's provided packages, since that will make sure permissions et al. are sanely set up for what you are about to run. You're also expected to have your current user properly set up in in your sudoers policy, so that this account may elevate to root and execute arbitrary commands as UID 0 (this is required, since at some point during the build process, a new loopback device-backed filesystem image will be mounted inside a docker container - which requires a "privileged" container to run, which can only be done as root). +First, install **docker-ce** for your distribution - I'd advise to use your distro's provided packages, since that will make sure permissions et al. are sanely set up for what you are about to run. You're also expected to have your current user properly set up in in your sudoers policy, so that this account may elevate to root and execute arbitrary commands as UID 0 (this is required, since at some point during the build process, a new loopback device-backed filesystem image will be mounted inside a docker container - which requires a "privileged" container to run, which can only be done as root). Next, make sure the docker daemon is running: @@ -83,12 +83,10 @@ total 141M In order to be able to use this image file with the **qemu** hypervisor, you'll need to unpack it, and convert it to an image format that qemu can work with. Conveniently, the _hassos_ buildenv already provides all the tools we need for this conversion: ``` -root@fd292c061896:/build# gunzip release/hassos_ova-2.2.vmdk.gz -root@fd292c061896:/build# qemu-img convert -O qcow2 release/hassos_ova-2.2.vmdk release/hassos_ova-2.2.qcow2 +root@fd292c061896:/build# gunzip release/hassos_ova-2.2.qcow2.gz root@fd292c061896:/build# ls -lh release/ total 673M -rw-r--r-- 1 root root 337M Oct 10 20:25 hassos_ova-2.2.qcow2 --rw-r--r-- 1 root root 337M Oct 10 20:22 hassos_ova-2.2.vmdk ``` Now, exit the docker container's environment, and find the build artifacts in the `releases/` directory beneath your repository checkout dir. (The generated files will be owned by _root_; make sure to `chown` them to your user account, if needed.) diff --git a/Documentation/partition.md b/Documentation/partition.md new file mode 100644 index 000000000..3b06a7a29 --- /dev/null +++ b/Documentation/partition.md @@ -0,0 +1,44 @@ +# Partition + +The partition layout is a bit different on the first part. We prefere GPT every time where is possible. With SoCs they don't support GPT, we can use the hyprid GPT. More about this on [development](development.mnd) documentation. + +The system is designed to have less as possible writes on the system. Which means we have basicly just writes on the OTA update and pretty small (5-6 times per week) on the overlay part. The Data partition have real I/O which is possible to offload into a different drive. + +Basic it look like: + +``` +------------------------- +| Bootloader | +------------------------- +| Kernel A | +------------------------- +| System A | +| | +------------------------- +| Kernel B | +------------------------- +| System B | +| | +------------------------- +| Bootstate | +------------------------- +| Overlay | +| | +... + +------------------------- +| Data | +| | +------------------------- +``` + +Sometime the bootloader part can look different because there can be firmware or SPLs for boot the CPU on the SoC. + +## Data + +The data partation is the only partition with I/O. This partition can be offloaded to a different drive with the utility: +```sh +$ datactl move /dev/xxx +``` + +On next boot, the partition will be moved to the new drive. The drive need to be bigger as the old one and we own the full new drive. diff --git a/README.md b/README.md index 8bcfecaa6..f086b1b53 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,10 @@ [![Build Status](https://dev.azure.com/home-assistant/Hass.io/_apis/build/status/hassos?branchName=dev)](https://dev.azure.com/home-assistant/Hass.io/_build/latest?definitionId=13&branchName=dev) -# HassOS +# Home Assistant Operating-System Hass.io OS based on [buildroot](https://buildroot.org/). It's a hypervisor for Docker and supports various kind of IoT hardware. It is also available as virtual appliance. The whole system is optimized for embedded system and security. You can update the system simple with OTA updates or offline updates. +This is a embedded Linux which work different as a normal Linux distribution. The system is designed to run which less as possible I/O and full optimized for what is needed to be. Not more and not less. If you don't have expirence with embedded systems, that will be the point to go out of this repository. All docs are for developer with embedded background. + ## Focus - Barebox as bootloader on EFI