2127 Commits

Author SHA1 Message Date
dependabot[bot]
8d8327801f
Bump docker/login-action from 2.2.0 to 3.0.0 (#2757)
Bumps [docker/login-action](https://github.com/docker/login-action) from 2.2.0 to 3.0.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v2.2.0...v3.0.0)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-19 10:02:18 +02:00
dependabot[bot]
b7e958d498
Bump docker/build-push-action from 4.2.1 to 5.0.0 (#2758)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4.2.1 to 5.0.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v4.2.1...v5.0.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-19 09:56:34 +02:00
dependabot[bot]
3e173ca77e
Bump docker/setup-buildx-action from 2.10.0 to 3.0.0 (#2759)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2.10.0 to 3.0.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v2.10.0...v3.0.0)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-19 09:55:24 +02:00
Stefan Agner
f8f2e61967
Delete Bluetooth device cache regularly (#2751)
* Delete Bluetooth device cache regularly

Delete stale Bluetooth devices from the BlueZ device cache every week.
This makes sure that the overlay partition doesn't run out of inodes
which has happened in real world scenarios where many new Bluetooth
devices are discovered.

BlueZ maintains these files on a best effort base. So removing them
while BlueZ is running should be safe.

An alternative considered  was to lower BlueZ GATT caching (e.g. by
using Cache=yes instead of always, to cache only paired devices).
However, this would hurt performance and battery lifetime of Bluetooth
devices due to additional unnecessary GATT attributes reads. This is in
particular true for Bluetooth 5.1 devices which support the Database
Hash charactristic. Caching has also helped reliability with
intermittent connections (see
https://github.com/bluez/bluez/issues/191).

More importantly, besides the GATT attribute cache the same files are
also used to cache the device names as well. This is independent of the
above mentioned GATT cache configuration (see device_store_cached_name
in BlueZ). So disabling the GATT caching alone wouldn't solve the
particular problem we are facing.

See also: https://github.com/home-assistant/supervisor/issues/4490

* Use access timestamp instead of modification timestamp

The modification timestamp gets updated regularly (on each connect) it
seems. However, using access timestamp might be more accurate, as it
seems to preserves slightly more cache files. This additional devices
might be devices we don't regularly connect but are still around (and
therefor we shouldn't reread the GATT attributes regularly).

So deleting cache entries with access time older than 7 days. Which
essentially deletes all the entries of devices which haven't been seen
the last 7 days.
2023-09-14 23:13:40 +02:00
Stefan Agner
26dd95cb03
Linux: Update kernel 6.1.53 (#2750) 2023-09-13 22:40:13 +02:00
Stefan Agner
0125e32ca6
Bump buildroot (#2749)
* buildroot da1eff0b0d...8ea671337e (1):
  > package/go: bump to v1.19.13
2023-09-13 22:36:57 +02:00
dependabot[bot]
3d7a17c59f
Bump docker/build-push-action from 4.1.1 to 4.2.1 (#2748)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4.1.1 to 4.2.1.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v4.1.1...v4.2.1)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-11 22:35:32 +02:00
Stefan Agner
bf327c968a
Don't combine GitHub action caches (#2745)
It turns out that the way concurrency works in GitHub action doesn't
allow to queue up multiple pending jobs. As soon as a second job gets
pending, the previous pending jobs get cancelled. So this does not allow
to sequentially run all cache combine jobs as we hoped for.

Let's use a single download cache and per board build cache for now.
2023-09-08 08:16:21 +02:00
Stefan Agner
ff1e4d2c31
Bump buildroot to revert containerd to v1.6.21 (#2744)
* buildroot 89d71acd74...da1eff0b0d (1):
  > Revert "package/containerd: bump version to v1.6.22"
2023-09-08 08:15:39 +02:00
Stefan Agner
25545b609e
Combine downloads and compile cache in GitHub Action cache (#2743)
This combines all caches in a single cache to save space (assumption is
that quite some files are duplicated otherwise). With this we shouold
end up with 4 relevant cache files (build cache for each architecture
plus download cache).
2023-09-08 00:14:08 +02:00
Stefan Agner
98da692882
Linux: Update kernel 6.1.52 (#2740) 2023-09-08 00:13:39 +02:00
Stefan Agner
52a455c6ca
Execute stale workflow only once a day (#2739) 2023-09-07 08:59:25 +02:00
Stefan Agner
cdfde693c7
Bump buildroot to 2023.02.4 (#2737)
* buildroot a3dced0daf...89d71acd74 (1):
  > Merge tag '2023.02.4' into 2023.02.x-haos
2023-09-06 12:06:45 +02:00
Stefan Agner
079bf06aa7
Enable ECC memory support via EDAC (#2708) (#2736) 2023-09-05 22:20:23 +02:00
Stefan Agner
de2d443cda
Bump buildroot to update openvmtools (#2733) (#2735)
* buildroot 1ba9746c5a...a3dced0daf (1):
  > package/openvmtools: bump version to 12.3.0
2023-09-05 21:44:34 +02:00
Stefan Agner
0b115133fe
Bump HAOS Agent to 1.6.0 (#2734) 2023-09-05 21:44:19 +02:00
Stefan Agner
41c3b6565d
Improve GitHub Action caching (#2732)
Use more specific keys for GitHub Action caches to make sure we update
caches regularly. Also add board id to the downloads cache to get a
more specific cache file. This avoid redownloading large dependencies
of some boards.
2023-09-05 21:44:11 +02:00
Stefan Agner
79050fb820
Separate build step when loading container images (#2731)
Separate fetching the current release and loading the container image
into separate build steps. This allows to manually later the version
json file for testing.
2023-09-04 23:17:31 +02:00
Stefan Agner
e83f264e8c
Improve LED representation in Home Assistant Green device tree (#2730) 2023-09-04 23:17:17 +02:00
dependabot[bot]
516cb71df9
Bump actions/checkout from 3 to 4 (#2728)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-04 23:14:03 +02:00
dependabot[bot]
76903af864
Bump docker/login-action from 2.1.0 to 2.2.0 (#2727)
Bumps [docker/login-action](https://github.com/docker/login-action) from 2.1.0 to 2.2.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v2.1.0...v2.2.0)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-04 23:13:56 +02:00
Stefan Agner
42648b664d
Linux: Update kernel 6.1.51 (#2726) 2023-09-04 23:13:48 +02:00
Stefan Agner
d2006e9b72
Use full preemptible kernel in Home Assistant OS (#2721)
Enable fully preemptible kernel (low-latency desktop) configuration for
Home Assistant. Home Assistant can be considered as a soft real-time
system, where a lower latency is preferred over throughput.

A few tests using the rt_test development add-on didn't show measurable
improvements, but this could be due to rather synthetic test.

Currently some platform use voluntary preemptible kernel, and some fully
preemptible. So besides improving latency, this also aims to synchronize
the settings across all platforms.

Also make sure that debugging is not enable as it can have high runtime
overhead according to Kconfig.
2023-09-01 10:13:02 +02:00
Viacheslav Bocharov
2756709f4a
Remove checkout twice in dev build workflow (#2719) 2023-09-01 10:12:54 +02:00
Stefan Agner
a2760f1d67
Linux: Update kernel 6.1.50 (#2716) 2023-08-30 23:19:18 +02:00
Stefan Agner
8297bc0e30
Bump buildroot (#2715)
* buildroot 005b88359c...1ba9746c5a (1):
  > package/{bluez5_utils, bluez5_utils-headers}: bump to version 5.69
2023-08-30 23:19:09 +02:00
Stefan Agner
fcf615614e
Use proper fix for Bluetooth LE advertisement stall (#2598) (#2714)
Instead of reverting the new hci_sync based BLE scan disable logic
use the fix proposed by Luiz:
https://lore.kernel.org/linux-bluetooth/CABBYNZ+5RMqNVMyYKi+gOVaV+K6k8Z-C37KnfGa=qRUORc3dWg@mail.gmail.com/

This fix avoids BLE stalls just like the revert.
2023-08-30 23:19:02 +02:00
Stefan Agner
60ea200b88
configs: Enable LTO if available (#2713)
The BR2_GCC_ENABLE_LTO config used to enable LTO on compiler level. That
config symbol doesn't exist anymore. Instead, LTO is enabled by default
with GCC.

However, there is a new flag named BR2_ENABLE_LTO which enables LTO in
packages. So far it doesn't look like that packages we are using support
the flag, but that might get added in the feature. Opt-in already today.
2023-08-30 23:18:53 +02:00
Stefan Agner
d7dccf423a
Linux: Update kernel 6.1.49 (#2711) 2023-08-29 18:30:43 +02:00
Stefan Agner
111eebfb49
GitHub action improvements and cleanup (#2710)
* Determine git reference in prepare step

We can determin the git reference used once in the prepare step.

* Build HAOS builder in prepare step

Instead of building the build container multiple times, simply build it
once in the prepare step. This saves some GitHub Runner time (as we only
need to create the builder once).

* Drop per PR builds

Drop the per PR builds which are based on pull_request_target. These
make things more complicated with the recent changes requiring two
deployment approvals since we use the environment in for the prepare
and build job now. It will also interfere with future expansions.

We should consider readding the feature using `pull_request` and
subsequent `workflow_run` trigger, as suggested by
https://securitylab.github.com/research/github-actions-preventing-pwn-requests/.

* Simplify board filter
2023-08-29 18:30:28 +02:00
Stefan Agner
02d85d73ef
Create builder group only if required (#2709)
In case a group with the same id as used outside the container already
exists, do not create a group inside the container.

It seems that GitHub Action runners started to use primary group id 999
which is the default group id used by the Docker daemon.
2023-08-28 09:52:45 +02:00
Stefan Agner
c41cf9ad17
Linux: Update kernel 6.1.47 (#2703) 2023-08-27 23:11:00 +02:00
Stefan Agner
23237a0676
Linux: Update kernel 6.1.46 (#2697) 2023-08-23 19:52:03 +02:00
Stefan Agner
9253b7361b
Add tools for SPI NOR flash storage (#2696)
Home Assistant Green uses a SPI NOR flash storage. One can use dd to
write to the SPI NOR flash, but this is problematic if a unit has bad
blocks. Add MTD tools, specifically flashcp, to enable SPI NOR
flashing support.
2023-08-23 19:51:54 +02:00
Stefan Agner
68c74db9d2
Update U-Boot patches and configuration (#2694)
Update U-Boot board configuration for Home Assistant Green. This moves
all Green specific board configuration into the U-Boot source code
patches. The "sf probe" command now picks up the correct SPI bus by
default.
2023-08-21 10:51:11 +02:00
Stefan Agner
e8da915a46
Add board support (#2687)
* Initial commit of Home Assistant Green board support

* Add Home Assistant Green boot files

* HA Green board configs

* board/nabucasa: Unsupport rtc rk808

* Use odroid-m1 as Supervisor machine for now

* Green: linux: pmic: set set PWRON_LP_OFF_TIME 12s

* green: Update U-Boot to 2023.07.02

* green: supports usb boot

* green: uboot-boot.ush use rk3566-ha-green.dtb

* green: spinor supports uboot

* green: use U-Boot provided devtype as boot device type

* green: Fix polarity of power key

The power key is low active. Add patch to avoid accidential long press
being reported to user space.

* green: uboot: eeprom: add CONFIG_ENV_OVERWRITE

* green: uboot: eerprom: add mac read

* green: fix-cpufreq null issue

* green: board aliases ethernet0

* green: uboot mac set ethernet0

* green: uboot add serial-number read

* green: Update kernel 6.1.39

* green: add green to the build matrix

* green: fix 339d13 & 9b9416 can not boot from usb

* green: changfe sd mode, change led default state

* green: uboot add board.c to read eeprom info

* green: enable uboot to read eeprom info

* green: delete boot.scr read eeprom function

* green: change spl loader uboot order:sd-emmc-spi_nor

* green: serialnum change to 18 bytes

* green: Update kernel 6.1.43

* green: use hwrng support from ODROID-M1

* green: Use latest Rockchip BL31/DDR binaries

* change led_act polarity

* green: Disable watchdog

The watchdog on Green seems to not reliably reset the system. For now
disable the driver to avoid systemd making use of it.

* green: Update kernel 6.1.44

* green: Fix Supervisor Machine

Use odroid-m1 for now as Supervisor machine (used to download the
landing page).

* green: emmc use hs200 to increase speed

* green: use green as Supervisor machine

* green: Update kernel 6.1.45

* green: add Green to the kernel documentation

---------

Co-authored-by: Zhangqun Ming <north_sea@qq.com>
Co-authored-by: syan <syan.cham@gmail.com>
2023-08-14 16:55:16 +02:00
Stefan Agner
23f857fcb4
Add USB serial console support (#2683) (#2686) 2023-08-14 11:45:53 +02:00
Stefan Agner
fd4a05d708
Linux: Update kernel 6.1.45 (#2685) 2023-08-14 11:45:45 +02:00
Stefan Agner
eba7099adc
Use the correct Supervisor machine during build (#2681)
This makes sure the correct landing page gets installed during build so
the landing page container image doesn't need to get downloaded at first
boot.
2023-08-10 18:25:31 +02:00
Stefan Agner
61f473432e
Use Docker 23.05 to install initial containers (#2680)
Use the same Docker version as deployed in Home Assistant OS (23.05
currently).
2023-08-10 18:25:17 +02:00
Stefan Agner
1836f04a87
Disable watchdog on ODROID-XU4 (#2675) (#2679)
In current Linux 6.1 kernel, the watchdog leads to a system freeze
instead of a reboot.
2023-08-09 12:17:12 +02:00
Stefan Agner
6ba07710e8
Disable watchdog on ODROID-M1 (#2675) (#2678)
In current Linux 6.1 kernel, the watchdog leads to a system freeze
instead of a reboot.
2023-08-09 12:17:04 +02:00
Stefan Agner
a160c674d6
Linux: Update kernel 6.1.44 (#2677) 2023-08-09 12:16:56 +02:00
Stefan Agner
4db2aa1a67
Use Rockchip binaries from official repository (#2673)
Use the official rkbin repository for Rockchip binaries. Use the
binaries from an older git hash which provide the very same binaries
(by hash). This makes sure we use the same DDR version as currently used
by the Hardkernel in their SPI flash bootloader (DDR v1.09).
2023-08-07 09:48:27 +02:00
Stefan Agner
ed6ef90fa1
Linux: Update kernel 6.1.43 (#2666) 2023-08-03 15:10:57 +02:00
Stefan Agner
f0015ba645
Support partial dev builds via Workflow dispatch (#2664) 2023-08-03 15:10:48 +02:00
Stefan Agner
65a17296f5
Linux: Update kernel 6.1.42 (#2660) 2023-07-31 15:22:14 +02:00
Darren Freimuth
f967485c75
Include the RTW8821ce driver module to support WiFi on the AK1 PRO micro PC (#2659)
* Including the RTW8821ce driver module to support Wifi on the KAMRUI AK1 PRO micro PC. It is a low-cost Intel Celeron N5105 that I think should work well for Home Assistant. However, it does not use Intel radios, it needs Realtek drivers.

* also need the firmware for the rtl8821ce
2023-07-31 15:22:03 +02:00
Stefan Agner
1f7185c913
Allow dev builds in forks (#2651)
Do not try to bump Home Assistant OS dev channel version in forks. This
allows to use the dev pipeline in forks.
2023-07-21 12:03:56 +02:00
Stefan Agner
8f3624382b
Linux: Update kernel 6.1.39 (#2649) 2023-07-20 19:45:34 +02:00