Compare commits

..

42 Commits
2.0 ... 1.5

Author SHA1 Message Date
Pascal Vizeli
0002d570d7 Fix boot menu (#94)
* Fix boot menu

* Update action
2018-07-10 12:57:22 +00:00
Pascal Vizeli
0a018c6c45 Bump version 1.5 2018-07-10 08:22:03 +00:00
Pascal Vizeli
173596eec5 Update bluetooth docs & add udev rules (#92)
* Update bluetooth docs

* add udev rules

* Add cmp to build

* Create bluetooth.md
2018-07-10 08:20:30 +00:00
Pascal Vizeli
bf69f2e974 Native bluetooth support (#91)
* Add bluez

* rpi firmware

* add rpi support

* Make packages from rpi

* Fix build

* Fix target

* persistent

* fix package

* Auto enable

* Fix parameter

* Fix rpi

* Fix done
2018-07-10 08:20:21 +00:00
Pascal Vizeli
6ddf29045e Check simlink (#90) 2018-07-08 12:20:28 +00:00
Pascal Vizeli
2d8aba9b37 Bump verison 1.4 2018-07-07 22:45:33 +00:00
Pascal Vizeli
aa7858ae44 Fix time on overlay (#88)
* Fix time on overlay

* Fix rights

* Fix timesync
2018-07-07 22:45:00 +00:00
Pascal Vizeli
0b05afb194 Add powersave config to network manager (#86)
* Add powersave config to network manager

* Update network.md
2018-07-07 08:46:47 +00:00
Pascal Vizeli
ab60a8bc55 Bump version to 1.3 / production 2018-07-06 21:58:06 +00:00
Pascal Vizeli
450826b6bd Some cleanup (#84) 2018-07-06 21:54:38 +00:00
Pascal Vizeli
14f406ad6a Reset if we can't boot (#83)
* Update uboot-boot.sh

* Update uboot-boot.sh
2018-07-06 21:54:17 +00:00
Pascal Vizeli
1d74fcb91d Use wait on network to delay the startup (#81)
* Use wait on network to delay the startup

* Update nm.conf

* Create nm.conf

* Update hassos-supervisor.service

* Rename hassos.conf to docker.conf

* Create hassos.conf

* Create hassos.conf

* Update hassos.conf

* aply patch

* Mark only failed

* Fix start order
2018-07-06 21:53:58 +00:00
Pascal Vizeli
13d0aaac0e Update supervisor 115 (#82) 2018-07-06 21:53:43 +00:00
Pascal Vizeli
1e1f36f275 Update CLI / Supervisor (#71) 2018-07-06 21:53:37 +00:00
Pascal Vizeli
36251114d8 Use dhcp client / avahi after NM (#75)
* Use dhcp client / avahi after NM

* Store networkmanager

* Add default connection

* cleanup

* cleanup lease

* faster boot

* Cleanup

* Fix permission
2018-07-06 21:51:41 +00:00
Gabriel Oliveira
5e10559144 Fix config documentation closing tags (#80) 2018-07-06 21:51:25 +00:00
Pascal Vizeli
0e7f516730 Fix /usr/sbin/hassos-cli is not in /etc/shells (#78)
* Update rootfs-layer.sh

* Update rootfs-layer.sh

* Update rootfs-layer.sh
2018-07-06 21:51:07 +00:00
cogneato
b75fc91f8b Update configuration.md (#50)
* Update configuration.md

Clearing up documentation, grammar fixes.

* changed known_hosts to authorized_keys

* Update configuration.md
2018-07-03 06:02:40 +00:00
cogneato
1b4d33d37d Update network.md (#51)
* Update network.md

Clearing up network documentation, grammar

* Update network.md
2018-07-03 06:02:35 +00:00
Pascal Vizeli
6fdd892aaf Fix persistent log (#70) 2018-07-02 22:01:35 +00:00
Pascal Vizeli
90dc5b54c0 Change chmod of network connection files from fat32 (#69) 2018-07-02 21:04:01 +00:00
Pascal Vizeli
5b68cf097a Fix update script with uptime (#68) 2018-07-02 20:52:33 +00:00
Pascal Vizeli
b50df06358 Bump version 1.2 2018-07-02 21:54:41 +02:00
Pascal Vizeli
84500a88d1 Fix docker warning on rpi (#67) 2018-07-02 19:53:12 +00:00
Pascal Vizeli
854202a1b8 Fix label name in test script (#66)
* Fix label name in test script

* Update hassos-config
2018-07-02 19:53:03 +00:00
Pascal Vizeli
e51a0811a1 Fix spell in journald script (#65) 2018-07-02 19:52:52 +00:00
Pascal Vizeli
15fc1f447e Make logs persistent over reboot and cleanup (#61)
* Create hassos-persists-journald

* Create hassos-persists-journald.service

* Set ln & permission

* Enable persists journald

* Update hassos-persists-journald
2018-07-02 19:52:40 +00:00
Pascal Vizeli
26b5f910b5 Map /etc/machine-id into supervisor/cli (#60)
* Map /etc/machine-id into supervisor/cli

* Update hassos-cli

* Update hassos-supervisor
2018-07-02 19:52:30 +00:00
Pascal Vizeli
5cc352bb44 Add lost persistent ssh folder (#58)
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
2018-06-30 22:40:45 +00:00
Pascal Vizeli
3315f6d9c4 Use wpa_supplicant with NetworkManager (#57) 2018-06-30 22:40:32 +00:00
Pascal Vizeli
0f1c8dbf56 Use CONFIG as label for config partition (#56)
* Use CONFIG as label for config partition

* Update configuration.md

* Update hassos-config
2018-06-30 22:40:21 +00:00
Pascal Vizeli
f5df6e18a8 Bump version to REL-1 build 1 2018-06-30 10:00:49 +00:00
Pascal Vizeli
ba78c80b97 Set hassos supervisor to rauc (#55)
* Set hassos supervisor to rauc

* Update post-install

* Update hassos-config
2018-06-30 09:59:46 +00:00
Pascal Vizeli
38bc2b4f91 Fix authorized_keys keys (#53)
* Fix authorized_keys keys

* Update hassos.conf

* Update configuration.md

* Update hassos-config

* Update hassos-config
2018-06-30 09:59:36 +00:00
Pascal Vizeli
69af4b3819 Fix hassos-conf label (#48)
* Update mnt-config.mount

* Update configuration.md

* Update configuration.md

* Update mnt-config.mount

* Update configuration.md
2018-06-30 09:59:24 +00:00
Pascal Vizeli
14de047663 Update ova.md (#47) 2018-06-27 11:57:23 +00:00
Pascal Vizeli
a310232e2c We publish now the vmdk and not OVA/OVF (#46)
* Update upload-rel.sh

* Create ova.md
2018-06-27 11:36:09 +00:00
Pascal Vizeli
93ea56d0ea Improve the documentation (#44)
* Create network.md

* Update configuration.md

* Update network.md

* Update network.md
2018-06-26 20:25:56 +00:00
Pascal Vizeli
83dabb2842 Add script for github upload (#43)
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
2018-06-26 20:25:48 +00:00
Pascal Vizeli
bf05e66ae8 Include ota script into board image (#42) 2018-06-26 11:29:05 +00:00
Pascal Vizeli
e1fb61e8a8 Fix build script for new layout (#40) 2018-06-26 11:28:53 +00:00
Pascal Vizeli
480c11535d Bump version (#39) 2018-06-26 10:34:30 +02:00
26 changed files with 164 additions and 6 deletions

View File

@@ -0,0 +1,12 @@
# Bluetooth
We support `bluetoothctl` on host. Later we want also support bluetooth trought UI.
All pairs and settings are persistent over reboots and updates.
If you want setup bluetooth on host, use the *bluetoothctl* utility.
## Scan devices
```
[bluetooth]# scan on
```

View File

@@ -1,3 +1,4 @@
source "$BR2_EXTERNAL_HASSOS_PATH/package/hassos/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/libapparmor/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/apparmor/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/bluetooth-bcm43xx/Config.in"

View File

@@ -1,3 +1,5 @@
#!/bin/sh
global linux.bootargs.bootchooser="bootchooser.active=A"
boot system0

View File

@@ -1,3 +1,5 @@
#!/bin/sh
global linux.bootargs.bootchooser="bootchooser.active=B"
boot system1

View File

@@ -398,7 +398,7 @@ CONFIG_SHOWKEY=y
CONFIG_AWK=y
CONFIG_FEATURE_AWK_LIBM=y
CONFIG_FEATURE_AWK_GNU_EXTENSIONS=y
# CONFIG_CMP is not set
CONFIG_CMP=y
# CONFIG_DIFF is not set
# CONFIG_FEATURE_DIFF_LONG_OPTIONS is not set
# CONFIG_FEATURE_DIFF_DIR is not set

View File

@@ -40,6 +40,8 @@ BR2_PACKAGE_AVAHI=y
# BR2_PACKAGE_AVAHI_AUTOIPD is not set
BR2_PACKAGE_AVAHI_DAEMON=y
BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY=y
BR2_PACKAGE_BLUEZ5_UTILS=y
BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y
BR2_PACKAGE_DHCP=y
BR2_PACKAGE_DHCP_CLIENT=y
BR2_PACKAGE_DROPBEAR=y

View File

@@ -48,6 +48,8 @@ BR2_PACKAGE_AVAHI=y
# BR2_PACKAGE_AVAHI_AUTOIPD is not set
BR2_PACKAGE_AVAHI_DAEMON=y
BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY=y
BR2_PACKAGE_BLUEZ5_UTILS=y
BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y
BR2_PACKAGE_DHCP=y
BR2_PACKAGE_DHCP_CLIENT=y
BR2_PACKAGE_DROPBEAR=y
@@ -94,3 +96,4 @@ BR2_PACKAGE_HASSOS_CLI_ARGS="--network=hassio --add-host hassio:172.30.32.2"
BR2_PACKAGE_HASSOS_CLI_PROFILE="docker-default"
BR2_PACKAGE_HASSOS_APPARMOR_DIR="supervisor/apparmor"
BR2_PACKAGE_APPARMOR=y
BR2_PACKAGE_BLUETOOTH_BCM43XX=y

View File

@@ -47,6 +47,8 @@ BR2_PACKAGE_AVAHI=y
# BR2_PACKAGE_AVAHI_AUTOIPD is not set
BR2_PACKAGE_AVAHI_DAEMON=y
BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY=y
BR2_PACKAGE_BLUEZ5_UTILS=y
BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y
BR2_PACKAGE_DHCP=y
BR2_PACKAGE_DHCP_CLIENT=y
BR2_PACKAGE_DROPBEAR=y

View File

@@ -35,8 +35,8 @@ BR2_PACKAGE_JQ=y
BR2_PACKAGE_E2FSPROGS=y
BR2_PACKAGE_E2FSPROGS_RESIZE2FS=y
BR2_PACKAGE_SQUASHFS=y
BR2_PACKAGE_RPI_WIFI_FIRMWARE=y
BR2_PACKAGE_RPI_FIRMWARE=y
BR2_PACKAGE_RPI_WIFI_FIRMWARE=y
BR2_PACKAGE_GPTFDISK=y
BR2_PACKAGE_GPTFDISK_SGDISK=y
BR2_PACKAGE_UBOOT_TOOLS=y
@@ -48,6 +48,8 @@ BR2_PACKAGE_AVAHI=y
# BR2_PACKAGE_AVAHI_AUTOIPD is not set
BR2_PACKAGE_AVAHI_DAEMON=y
BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY=y
BR2_PACKAGE_BLUEZ5_UTILS=y
BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y
BR2_PACKAGE_DHCP=y
BR2_PACKAGE_DHCP_CLIENT=y
BR2_PACKAGE_DROPBEAR=y
@@ -94,3 +96,4 @@ BR2_PACKAGE_HASSOS_CLI_ARGS="--network=hassio --add-host hassio:172.30.32.2"
BR2_PACKAGE_HASSOS_CLI_PROFILE="docker-default"
BR2_PACKAGE_HASSOS_APPARMOR_DIR="supervisor/apparmor"
BR2_PACKAGE_APPARMOR=y
BR2_PACKAGE_BLUETOOTH_BCM43XX=y

View File

@@ -35,8 +35,8 @@ BR2_PACKAGE_JQ=y
BR2_PACKAGE_E2FSPROGS=y
BR2_PACKAGE_E2FSPROGS_RESIZE2FS=y
BR2_PACKAGE_SQUASHFS=y
BR2_PACKAGE_RPI_WIFI_FIRMWARE=y
BR2_PACKAGE_RPI_FIRMWARE=y
BR2_PACKAGE_RPI_WIFI_FIRMWARE=y
BR2_PACKAGE_GPTFDISK=y
BR2_PACKAGE_GPTFDISK_SGDISK=y
BR2_PACKAGE_UBOOT_TOOLS=y
@@ -48,6 +48,8 @@ BR2_PACKAGE_AVAHI=y
# BR2_PACKAGE_AVAHI_AUTOIPD is not set
BR2_PACKAGE_AVAHI_DAEMON=y
BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY=y
BR2_PACKAGE_BLUEZ5_UTILS=y
BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y
BR2_PACKAGE_DHCP=y
BR2_PACKAGE_DHCP_CLIENT=y
BR2_PACKAGE_DROPBEAR=y
@@ -94,3 +96,4 @@ BR2_PACKAGE_HASSOS_CLI_ARGS="--network=hassio --add-host hassio:172.30.32.2"
BR2_PACKAGE_HASSOS_CLI_PROFILE="docker-default"
BR2_PACKAGE_HASSOS_APPARMOR_DIR="supervisor/apparmor"
BR2_PACKAGE_APPARMOR=y
BR2_PACKAGE_BLUETOOTH_BCM43XX=y

View File

@@ -47,6 +47,8 @@ BR2_PACKAGE_AVAHI=y
# BR2_PACKAGE_AVAHI_AUTOIPD is not set
BR2_PACKAGE_AVAHI_DAEMON=y
BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY=y
BR2_PACKAGE_BLUEZ5_UTILS=y
BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y
BR2_PACKAGE_DHCP=y
BR2_PACKAGE_DHCP_CLIENT=y
BR2_PACKAGE_DROPBEAR=y

View File

@@ -1,7 +1,7 @@
VERSION_MAJOR=2
VERSION_BUILD=0
VERSION_MAJOR=1
VERSION_BUILD=5
HASSOS_NAME="HassOS"
HASSOS_ID="hassos"
DEPLOYMENT="development"
DEPLOYMENT="production"

View File

@@ -1,5 +1,8 @@
#!/bin/sh
##
# Hooks
# Handle boot hocks
if [ "${RAUC_SLOT_CLASS}" = "boot" ]; then
if [ "${1}" = "slot-post-install" ]; then
@@ -9,4 +12,12 @@ if [ "${RAUC_SLOT_CLASS}" = "boot" ]; then
fi
fi
##
# Fixups
# timesyncd
if [ -L /var/lib/systemd/timesync ]; then
rm -f /var/lib/systemd/timesync
fi
exit 0

View File

@@ -0,0 +1,6 @@
config BR2_PACKAGE_BLUETOOTH_BCM43XX
bool "bluetooth bcm43xx"
depends on BR2_PACKAGE_BLUEZ5_UTILS_CLIENT
select BR2_PACKAGE_BLUEZ5_UTILS_DEPRECATED
help
Install bluetooth for bcm43xx.

View File

@@ -0,0 +1,18 @@
#!/bin/sh
HCIATTACH=/usr/bin/hciattach
SERIAL=`cat /proc/device-tree/serial-number | cut -c9-`
B1=`echo $SERIAL | cut -c3-4`
B2=`echo $SERIAL | cut -c5-6`
B3=`echo $SERIAL | cut -c7-8`
BDADDR=`printf b8:27:eb:%02x:%02x:%02x $((0x$B1 ^ 0xaa)) $((0x$B2 ^ 0xaa)) $((0x$B3 ^ 0xaa))`
if [ "$(cat /proc/device-tree/aliases/uart0)" = "$(cat /proc/device-tree/aliases/serial1)" ] ; then
if [ "$(wc -c /proc/device-tree/soc/gpio@7e200000/uart0_pins/brcm\,pins | cut -f 1 -d ' ')" = "16" ] ; then
$HCIATTACH /dev/serial1 bcm43xx 3000000 flow - $BDADDR
else
$HCIATTACH /dev/serial1 bcm43xx 921600 noflow - $BDADDR
fi
else
$HCIATTACH /dev/serial1 bcm43xx 460800 noflow - $BDADDR
fi

View File

@@ -0,0 +1,32 @@
################################################################################
#
# Bluetooth BCM43xx
#
################################################################################
BLUETOOTH_BCM43XX_VERSION = 1.0.0
BLUETOOTH_BCM43XX_LICENSE = Apache License 2.0
BLUETOOTH_BCM43XX_LICENSE_FILES = $(BR2_EXTERNAL_HASSOS_PATH)/../LICENSE
BLUETOOTH_BCM43XX_SITE = $(BR2_EXTERNAL_HASSOS_PATH)/package/bluetooth-bcm43xx
BLUETOOTH_BCM43XX_SITE_METHOD = local
define BLUETOOTH_BCM43XX_BUILD_CMDS
curl -o $(@D)/BCM43430A1.hcd https://raw.githubusercontent.com/RPi-Distro/bluez-firmware/master/broadcom/BCM43430A1.hcd
curl -o $(@D)/BCM4345C0.hcd https://raw.githubusercontent.com/RPi-Distro/bluez-firmware/master/broadcom/BCM4345C0.hcd
endef
define BLUETOOTH_BCM43XX_INSTALL_TARGET_CMDS
mkdir -p $(TARGET_DIR)/etc/systemd/system/hassos-hardware.target.wants
cp -f $(@D)/bluetooth-bcm43xx $(TARGET_DIR)/usr/sbin/
cp -f $(@D)/bluetooth-bcm43xx.service $(TARGET_DIR)/usr/lib/systemd/system/
ln -fs /usr/lib/systemd/system/bluetooth-bcm43xx.service $(TARGET_DIR)/etc/systemd/system/hassos-hardware.target.wants/
mkdir -p $(TARGET_DIR)/lib/firmware/brcm
cp -f $(@D)/BCM43430A1.hcd $(TARGET_DIR)/lib/firmware/brcm/
cp -f $(@D)/BCM4345C0.hcd $(TARGET_DIR)/lib/firmware/brcm/
mkdir -p $(TARGET_DIR)/etc/udev/rules.d
cp -f $(@D)/bluetooth-bcm43xx.rules $(TARGET_DIR)/etc/udev/rules.d/
endef
$(eval $(generic-package))

View File

@@ -0,0 +1,22 @@
KERNEL=="ttyAMA[01]", PROGRAM="/bin/sh -c '\
ALIASES=/proc/device-tree/aliases; \
if cmp -s $ALIASES/uart0 $ALIASES/serial0; then \
echo 0;\
elif cmp -s $ALIASES/uart0 $ALIASES/serial1; then \
echo 1; \
else \
exit 1; \
fi\
'", SYMLINK+="serial%c"
KERNEL=="ttyS0", PROGRAM="/bin/sh -c '\
ALIASES=/proc/device-tree/aliases; \
if cmp -s $ALIASES/uart1 $ALIASES/serial0; then \
echo 0; \
elif cmp -s $ALIASES/uart1 $ALIASES/serial1; then \
echo 1; \
else \
exit 1; \
fi \
'", SYMLINK+="serial%c"

View File

@@ -0,0 +1,12 @@
[Unit]
Description=Bluetooth for BCM43xx
Before=bluetooth.service
After=dev-ttyAMA0.device
ConditionPathIsDirectory=/proc/device-tree/soc/gpio@7e200000/bt_pins
[Service]
Type=forking
ExecStart=/usr/sbin/bluetooth-bcm43xx
[Install]
WantedBy=hassos-hardware.target

View File

@@ -0,0 +1,2 @@
[Policy]
AutoEnable=true

View File

@@ -0,0 +1 @@
/usr/lib/systemd/system/var-lib-bluetooth.mount

View File

@@ -0,0 +1 @@
/usr/lib/systemd/system/hassos-hardware.target

View File

@@ -0,0 +1,2 @@
[Unit]
RequiresMountsFor=/var/lib/systemd

View File

@@ -0,0 +1,2 @@
[Service]
DynamicUser=no

View File

@@ -0,0 +1,3 @@
[Unit]
Description=HassOS hardware targets
Documentation=man:systemd.target(5)

View File

@@ -0,0 +1,14 @@
[Unit]
Description=Bluetooth persistent state
Requires=mnt-overlay.mount
After=mnt-overlay.mount
Before=bluetooth.service
[Mount]
What=/mnt/overlay/var/lib/bluetooth
Where=/var/lib/bluetooth
Type=None
Options=bind
[Install]
WantedBy=hassos-bind.target