Compare commits

..

29 Commits
8.1 ... 8.5

Author SHA1 Message Date
Stefan Agner
cc5fe10e53 Load container images descending by size (#2054)
* Load container images descending by size

Loading container images using docker load seems to require more space
at load time (which gets freed after loading). Loading the largest
container first avoids running out of space.
2022-08-16 13:21:20 +02:00
Stefan Agner
592806872f Bump version to 8.5 2022-08-16 11:44:34 +02:00
Stefan Agner
d2a5be9406 Linux: Update kernel 5.15.60 (#2058) 2022-08-16 11:30:51 +02:00
Stefan Agner
429376c9ae Synchronize network time quicker on bootup (#2057)
Currently systemd-timesyncd tries to connect to the NTP server quite
early at boot-up. At this time the network connection has not been
established yet. This causes resolving the NTP server to fail and
a rate limit kicks in which makes systemd-timesyncd wait for 30s until
the next attempt.

Lowering the retry attempt to 10s makes systemd-timesyncd connecting
shortly after.

Note: The rate limit is 10 attempts per 10s. Because the attempts are
immediately exhausted lowering connection retry attempt below 10s
adds no benefit.

See also: https://github.com/systemd/systemd/issues/24298
2022-08-16 11:30:46 +02:00
Stefan Agner
e149149cc9 Bump buildroot (#2045)
* buildroot ad168306a4...04ac0c825d (1):
  > boot/grub2: fix build race condition
2022-08-16 11:29:24 +02:00
Stefan Agner
ae86416d89 Bump buildroot (#2044)
* buildroot 686000eee8...ad168306a4 (1):
  > Merge tag '2022.02.4' into 2022.02.x-haos
2022-08-16 11:28:57 +02:00
Stefan Agner
f62c919a76 Linux: Update kernel 5.15.59 (#2043) 2022-08-16 11:28:37 +02:00
Stefan Agner
558472baa3 Add LED control through device tree overrides (#2038) 2022-08-16 11:27:53 +02:00
Stefan Agner
a38ee172f1 Check if GRUB environment is valid (#2031) (#2036) 2022-08-16 11:25:56 +02:00
Stefan Agner
0ef46fdafa Allow to Wipe essential boot files to trigger boot from USB host (#2034)
This makes the Red+Blue Button cause the boot loader to wipe start4.elf,
which is essential for the boot loader to boot from eMMC. With the file
missing, the Raspberry Pi firmware will continue its boot flow and boot
from USB host next. This allows to run the Home Assistant OS Installer
from a USB flash drive again.
2022-08-16 11:24:22 +02:00
Stefan Agner
67ecb0fb26 Linux: Update kernel 5.15.57 (#2028) 2022-08-16 11:23:41 +02:00
Stefan Agner
2fc225752c Bump version to 8.4 2022-07-23 16:07:17 +02:00
Stefan Agner
5e23a6cc88 Linux: Update kernel 5.15.55 (#2025) 2022-07-23 16:05:31 +02:00
Stefan Agner
788e4e45e3 Bump buildroot (#2013)
* buildroot e7a881ea75...686000eee8 (1):
  > package/bluez5_utils: Fix spamming errors
2022-07-23 16:03:48 +02:00
Stefan Agner
29a754ec4f Use yellow machine yellow_defconfig (landingpage) (#2008) 2022-07-08 09:55:05 +02:00
Stefan Agner
2285b7ca04 Bump version to 8.3 2022-07-07 14:53:51 +02:00
Stefan Agner
2a7a917203 Yellow: Enable PL011 console on J11 by default (#2001) 2022-07-07 14:52:39 +02:00
Pascal Vizeli
cbbd65081e Using Yellow for HA images (landingpage) (#1992) 2022-07-07 14:52:25 +02:00
Joakim Sørensen
163ba55028 Use checkonline instead of version for connectivity check (#1991) 2022-07-07 14:52:13 +02:00
Stefan Agner
1675b65b45 Linux: Update kernel 5.15.52 (#2002) 2022-07-07 14:42:55 +02:00
Stefan Agner
f906b1ef55 Bump buildroot (#1986)
* buildroot 7995541510...e7a881ea75 (1):
  > Merge tag '2022.02.3' into 2022.02.x-haos
2022-07-07 14:41:09 +02:00
Stefan Agner
fb5851099e Set restrictive GitHub Action permissions (#1985)
* chore: Set permissions for GitHub actions

Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much.

* Remove global permissions which are set implicitly

With restrictive settings in the global GitHub Action permission settings
those permissions are given implicitly.

Co-authored-by: neilnaveen <42328488+neilnaveen@users.noreply.github.com>
Co-authored-by: Joakim Sørensen <hi@ludeeus.dev>
Co-authored-by: Stefan Agner <stefan@agner.ch>
2022-07-07 14:40:55 +02:00
Stefan Agner
da4ba283bb Bump version to 8.2 2022-06-08 22:34:41 +02:00
Stefan Agner
909b66eed3 Increase maximum socket receive and send buffer size (#1964) (#1968)
Some applications try to increase the buffers for performance reason. The
QUIC Go implementation for instance tries to request a 2048 kiB buffer
size.

The kernel default depends on skubuf size (which is architecture
dependent), but it is memory size independet and typically around 200 kiB
(see [1]).

Other network tuning guides suggest 16MiB for 1GB ethernet, as well as
changing the default as well as maximum bufffer size (see [2]). This
conservatively increases the maximum buffer size to 4MiB.

[1]: https://elixir.bootlin.com/linux/v5.15.45/source/include/net/sock.h#L2742
[2]: https://nateware.com/2013/04/06/linux-network-tuning-for-2013/
2022-06-08 22:34:17 +02:00
Stefan Agner
091b4e3a9a Linux: Update kernel 5.15.45 (#1967) 2022-06-08 22:34:11 +02:00
Stefan Agner
72b3c46bfc Bump buildroot (#1958)
* buildroot 2eebdbad5c...7995541510 (1):
  > Merge tag '2022.02.2' into 2022.02.x-haos
2022-06-08 22:34:01 +02:00
Stefan Agner
306c07b1b1 NVMe patches are applied for all Raspberry Pi based boards now (#1959) 2022-06-08 22:33:48 +02:00
Stefan Agner
ad2f3a3570 Apply NVMe fixes to all Raspberry Pi boards (#1911) (#1957) 2022-06-08 22:33:40 +02:00
Stefan Agner
083d894c50 Linux: Update kernel 5.15.44 (#1951) 2022-06-08 22:33:16 +02:00
36 changed files with 230 additions and 72 deletions

View File

@@ -12,6 +12,9 @@ jobs:
if: ${{ github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'run-dev-build') }}
name: Prepare build
runs-on: [ "ubuntu-20.04" ]
permissions:
contents: read
pull-requests: read
outputs:
version_main: ${{ steps.version_main.outputs.version_main }}
version_dev: ${{ steps.version_dev.outputs.version_dev }}${{ steps.version_pr.outputs.version_pr }}

View File

@@ -8,6 +8,9 @@ on:
jobs:
update_release_draft:
permissions:
contents: write # for release-drafter/release-drafter to create a github release
pull-requests: read # for release-drafter/release-drafter to read PR content and labels
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5

View File

@@ -44,6 +44,8 @@ jobs:
return { "board": boards }
build:
permissions:
contents: write # for actions/upload-release-asset to upload release asset
name: Release build for ${{ matrix.board.id }}
needs: validate_release
strategy:

View File

@@ -8,6 +8,9 @@ on:
jobs:
stale:
permissions:
issues: write # for actions/stale to close stale issues
pull-requests: write # for actions/stale to close stale PRs
runs-on: ubuntu-latest
steps:
# The 90 day stale policy

View File

@@ -5,18 +5,18 @@ Default Kernel tree: 5.15
| Board | Version |
|-------|---------|
| Open Virtual Appliance | 5.15.41 |
| Open Virtual Appliance | 5.15.60 |
| Raspberry Pi | 5.15.32 |
| Raspberry Pi 0-W | 5.15.32 |
| Raspberry Pi 2 | 5.15.32 |
| Raspberry Pi 3 | 5.15.32 |
| Raspberry Pi 4 | 5.15.32 |
| Home Assistant Yellow | 5.15.32 |
| Tinker Board | 5.15.41 |
| Odroid-C2 | 5.15.41 |
| Odroid-C4 | 5.15.41 |
| Odroid-N2 | 5.15.41 |
| Odroid-XU4 | 5.15.41 |
| Generic aarch64 | 5.15.41 |
| Generic x86-64 | 5.15.41 |
| Khadas VIM3 | 5.15.41 |
| Tinker Board | 5.15.60 |
| Odroid-C2 | 5.15.60 |
| Odroid-C4 | 5.15.60 |
| Odroid-N2 | 5.15.60 |
| Odroid-XU4 | 5.15.60 |
| Generic aarch64 | 5.15.60 |
| Generic x86-64 | 5.15.60 |
| Khadas VIM3 | 5.15.60 |

View File

@@ -1,8 +1,8 @@
From 24b77460dbfa2497ceb7a1611bf28b6eb88a1d74 Mon Sep 17 00:00:00 2001
Message-Id: <24b77460dbfa2497ceb7a1611bf28b6eb88a1d74.1645627172.git.stefan@agner.ch>
Message-Id: <24b77460dbfa2497ceb7a1611bf28b6eb88a1d74.1654086219.git.stefan@agner.ch>
From: Pascal Vizeli <pvizeli@syshack.ch>
Date: Tue, 10 Dec 2019 09:48:46 +0000
Subject: [PATCH 1/5] rpi: Use CONFIG_OF_BOARD instead of CONFIG_EMBED
Subject: [PATCH] rpi: Use CONFIG_OF_BOARD instead of CONFIG_EMBED
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
---
@@ -79,5 +79,5 @@ index 8acf04d0e4..5d5e700224 100644
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
--
2.35.1
2.36.1

View File

@@ -1,10 +1,10 @@
From c942eb452c1c31fe6259178b6e9fea5456d7fb9c Mon Sep 17 00:00:00 2001
Message-Id: <c942eb452c1c31fe6259178b6e9fea5456d7fb9c.1645627172.git.stefan@agner.ch>
In-Reply-To: <24b77460dbfa2497ceb7a1611bf28b6eb88a1d74.1645627172.git.stefan@agner.ch>
References: <24b77460dbfa2497ceb7a1611bf28b6eb88a1d74.1645627172.git.stefan@agner.ch>
Message-Id: <c942eb452c1c31fe6259178b6e9fea5456d7fb9c.1654086219.git.stefan@agner.ch>
In-Reply-To: <24b77460dbfa2497ceb7a1611bf28b6eb88a1d74.1654086219.git.stefan@agner.ch>
References: <24b77460dbfa2497ceb7a1611bf28b6eb88a1d74.1654086219.git.stefan@agner.ch>
From: Stefan Agner <stefan@agner.ch>
Date: Mon, 27 Sep 2021 12:28:04 +0200
Subject: [PATCH 2/5] usb: xhci: reset endpoint on USB stall
Subject: [PATCH] usb: xhci: reset endpoint on USB stall
There are devices which cause a USB stall when trying to read strings.
Specifically Arduino Mega R3 stalls when trying to read the product
@@ -83,5 +83,5 @@ index 35bd5cd29e..430823cb9d 100644
/* Invalidate buffer to make it available to usb-core */
if (length > 0)
--
2.35.1
2.36.1

View File

@@ -1,10 +1,10 @@
From ae45864457182fcaa67911e1e3d8db242dff3646 Mon Sep 17 00:00:00 2001
Message-Id: <ae45864457182fcaa67911e1e3d8db242dff3646.1645627172.git.stefan@agner.ch>
In-Reply-To: <24b77460dbfa2497ceb7a1611bf28b6eb88a1d74.1645627172.git.stefan@agner.ch>
References: <24b77460dbfa2497ceb7a1611bf28b6eb88a1d74.1645627172.git.stefan@agner.ch>
Message-Id: <ae45864457182fcaa67911e1e3d8db242dff3646.1654086219.git.stefan@agner.ch>
In-Reply-To: <24b77460dbfa2497ceb7a1611bf28b6eb88a1d74.1654086219.git.stefan@agner.ch>
References: <24b77460dbfa2497ceb7a1611bf28b6eb88a1d74.1654086219.git.stefan@agner.ch>
From: Stefan Agner <stefan@agner.ch>
Date: Tue, 29 Dec 2020 23:34:52 +0100
Subject: [PATCH 3/5] rpi: add NVMe to boot order
Subject: [PATCH] rpi: add NVMe to boot order
The Compute Module 4 I/O Board can support a NVMe. Add NVMe to the boot
order.
@@ -40,5 +40,5 @@ index 4c5c1ac31f..e24c94c7d2 100644
BOOT_TARGET_PXE(func) \
BOOT_TARGET_DHCP(func)
--
2.35.1
2.36.1

View File

@@ -1,11 +1,10 @@
From 3a13ff4eb509e8e80a52ae45c9a5573e745803c3 Mon Sep 17 00:00:00 2001
Message-Id: <3a13ff4eb509e8e80a52ae45c9a5573e745803c3.1645627172.git.stefan@agner.ch>
In-Reply-To: <24b77460dbfa2497ceb7a1611bf28b6eb88a1d74.1645627172.git.stefan@agner.ch>
References: <24b77460dbfa2497ceb7a1611bf28b6eb88a1d74.1645627172.git.stefan@agner.ch>
Message-Id: <3a13ff4eb509e8e80a52ae45c9a5573e745803c3.1654086219.git.stefan@agner.ch>
In-Reply-To: <24b77460dbfa2497ceb7a1611bf28b6eb88a1d74.1654086219.git.stefan@agner.ch>
References: <24b77460dbfa2497ceb7a1611bf28b6eb88a1d74.1654086219.git.stefan@agner.ch>
From: Stefan Agner <stefan@agner.ch>
Date: Thu, 23 Sep 2021 23:43:31 +0200
Subject: [PATCH 4/5] Revert "nvme: Correct the prps per page calculation
method"
Subject: [PATCH] Revert "nvme: Correct the prps per page calculation method"
This reverts commit 859b33c948945f7904f60a2c12a3792d356d51ad.
@@ -40,5 +39,5 @@ index 3c529a2fce..3bda491e12 100644
length -= (page_size - offset);
--
2.35.1
2.36.1

View File

@@ -1,11 +1,11 @@
From b00922ee48987ef91f0ca2aa3a66ad22c6c83d57 Mon Sep 17 00:00:00 2001
Message-Id: <b00922ee48987ef91f0ca2aa3a66ad22c6c83d57.1645627172.git.stefan@agner.ch>
In-Reply-To: <24b77460dbfa2497ceb7a1611bf28b6eb88a1d74.1645627172.git.stefan@agner.ch>
References: <24b77460dbfa2497ceb7a1611bf28b6eb88a1d74.1645627172.git.stefan@agner.ch>
Message-Id: <b00922ee48987ef91f0ca2aa3a66ad22c6c83d57.1654086219.git.stefan@agner.ch>
In-Reply-To: <24b77460dbfa2497ceb7a1611bf28b6eb88a1d74.1654086219.git.stefan@agner.ch>
References: <24b77460dbfa2497ceb7a1611bf28b6eb88a1d74.1654086219.git.stefan@agner.ch>
From: Stefan Agner <stefan@agner.ch>
Date: Thu, 7 Oct 2021 12:02:39 +0200
Subject: [PATCH 5/5] usb: xhci-brcm: Make driver compatible with downstream
device tree
Subject: [PATCH] usb: xhci-brcm: Make driver compatible with downstream device
tree
The downstream device tree uses just "generic-xhci" as compatible
string. Use this string to make U-Boot work with the downstream Kernel.
@@ -29,5 +29,5 @@ index fe17924028..0c6938187b 100644
};
--
2.35.1
2.36.1

View File

@@ -1,10 +1,10 @@
From 78924e9cf8c4af0baafcb2e7224bf04ad65276de Mon Sep 17 00:00:00 2001
Message-Id: <78924e9cf8c4af0baafcb2e7224bf04ad65276de.1650924333.git.stefan@agner.ch>
In-Reply-To: <78704bc154d695ee16fdf8396f4d60b740190014.1650924333.git.stefan@agner.ch>
References: <78704bc154d695ee16fdf8396f4d60b740190014.1650924333.git.stefan@agner.ch>
From 4ef63d77803aeb322fe72eb5445897eba52c68ff Mon Sep 17 00:00:00 2001
Message-Id: <4ef63d77803aeb322fe72eb5445897eba52c68ff.1654086219.git.stefan@agner.ch>
In-Reply-To: <24b77460dbfa2497ceb7a1611bf28b6eb88a1d74.1654086219.git.stefan@agner.ch>
References: <24b77460dbfa2497ceb7a1611bf28b6eb88a1d74.1654086219.git.stefan@agner.ch>
From: Stefan Agner <stefan@agner.ch>
Date: Thu, 23 Sep 2021 23:52:44 +0200
Subject: [PATCH 3/5] nvme: improve readability of nvme_setup_prps()
Subject: [PATCH] nvme: improve readability of nvme_setup_prps()
Improve readability by introducing consts, reuse consts where
appropriate and adding variables with discriptive name.
@@ -47,5 +47,5 @@ index 3bda491e12..1601651449 100644
prp_pool += page_size;
}
--
2.36.0
2.36.1

View File

@@ -1,10 +1,10 @@
From e040d976ecbdd8071bbcb73d78e17ababa88c51f Mon Sep 17 00:00:00 2001
Message-Id: <e040d976ecbdd8071bbcb73d78e17ababa88c51f.1650924333.git.stefan@agner.ch>
In-Reply-To: <78704bc154d695ee16fdf8396f4d60b740190014.1650924333.git.stefan@agner.ch>
References: <78704bc154d695ee16fdf8396f4d60b740190014.1650924333.git.stefan@agner.ch>
From b3441191724335b5a41d73875584ea293f85a56b Mon Sep 17 00:00:00 2001
Message-Id: <b3441191724335b5a41d73875584ea293f85a56b.1654086219.git.stefan@agner.ch>
In-Reply-To: <24b77460dbfa2497ceb7a1611bf28b6eb88a1d74.1654086219.git.stefan@agner.ch>
References: <24b77460dbfa2497ceb7a1611bf28b6eb88a1d74.1654086219.git.stefan@agner.ch>
From: Stefan Agner <stefan@agner.ch>
Date: Thu, 23 Sep 2021 23:58:35 +0200
Subject: [PATCH 4/5] nvme: Use pointer for CPU addressed buffers
Subject: [PATCH] nvme: Use pointer for CPU addressed buffers
Pass buffers which use CPU addressing as void pointers. This aligns with
DMA APIs which use void pointers as argument. It will avoid unnecessary
@@ -259,5 +259,5 @@ index 2cdf8ce320..8ff823cd81 100644
/**
* nvme_scan_namespace - scan all namespaces attached to NVMe controllers
--
2.36.0
2.36.1

View File

@@ -1,10 +1,10 @@
From c4736c35141e519d15430660e17c274e142e886d Mon Sep 17 00:00:00 2001
Message-Id: <c4736c35141e519d15430660e17c274e142e886d.1650924333.git.stefan@agner.ch>
In-Reply-To: <78704bc154d695ee16fdf8396f4d60b740190014.1650924333.git.stefan@agner.ch>
References: <78704bc154d695ee16fdf8396f4d60b740190014.1650924333.git.stefan@agner.ch>
From 54d797d83265e31e16db922eb7c12d4bbc749127 Mon Sep 17 00:00:00 2001
Message-Id: <54d797d83265e31e16db922eb7c12d4bbc749127.1654086219.git.stefan@agner.ch>
In-Reply-To: <24b77460dbfa2497ceb7a1611bf28b6eb88a1d74.1654086219.git.stefan@agner.ch>
References: <24b77460dbfa2497ceb7a1611bf28b6eb88a1d74.1654086219.git.stefan@agner.ch>
From: Stefan Agner <stefan@agner.ch>
Date: Fri, 24 Sep 2021 00:27:39 +0200
Subject: [PATCH 5/5] nvme: translate virtual addresses into the bus's address
Subject: [PATCH] nvme: translate virtual addresses into the bus's address
space
So far we've been content with passing physical/CPU addresses when
@@ -194,5 +194,5 @@ index c6aae4da5d..31e6899bca 100644
+
#endif /* __DRIVER_NVME_H__ */
--
2.36.0
2.36.1

View File

@@ -1 +1 @@
dwc_otg.lpm_enable=0 console=tty1 console=serial0,115200n8 console=ttyAMA2,115200n8
dwc_otg.lpm_enable=0 console=tty1 console=ttyAMA2,115200n8

View File

@@ -7,9 +7,12 @@ disable_splash=1
kernel=u-boot.bin
arm_64bit=1
# uncomment to enable primary UART console
# Enable primary UART by default
enable_uart=1
# Free up full-fledged PL011 UART for J11
dtoverlay=miniuart-bt
# No HDMI on Yellow, but we can't set to 16 since we need the full firmware
# for codecs
gpu_mem=32
@@ -23,9 +26,7 @@ gpu_mem=32
#dtoverlay=lirc-rpi
# Uncomment this to enable GPIO support for RPI-RF-MOD/HM-MOD-RPI-PCB
#enable_uart=1
#dtparam=i2c_arm=on
#dtoverlay=miniuart-bt
#dtoverlay=rpi-rf-mod
# Additional overlays and parameters are documented /boot/overlays/README

View File

@@ -6,5 +6,5 @@ KERNEL_FILE=Image
BOOT_SYS=hybrid
BOOT_SPL=false
BOOT_ENV_SIZE=0x4000
SUPERVISOR_MACHINE=raspberrypi4-64
SUPERVISOR_MACHINE=yellow
SUPERVISOR_ARCH=aarch64

View File

@@ -0,0 +1,41 @@
From 01e15ae929bb8442f3c9cb31b7cad182ecc4d520 Mon Sep 17 00:00:00 2001
Message-Id: <01e15ae929bb8442f3c9cb31b7cad182ecc4d520.1659172941.git.stefan@agner.ch>
In-Reply-To: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1659172941.git.stefan@agner.ch>
References: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1659172941.git.stefan@agner.ch>
From: Stefan Agner <stefan@agner.ch>
Date: Sat, 30 Jul 2022 11:12:13 +0200
Subject: [PATCH 12/13] gpio: raspberrypi-exp: Workaround polarity firmware bug
When configuring a GPIO as output, the firmware seems to invert the
initial state when active low polarity is declared in the device tree.
The bug has been acknowledged by the firmware team and will be fixed
in a future firmware release:
https://github.com/raspberrypi/linux/issues/5107
Fix this by inverting the polarity on our side as well to make sure
the initial output is set correctly.
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
drivers/gpio/gpio-raspberrypi-exp.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/gpio/gpio-raspberrypi-exp.c b/drivers/gpio/gpio-raspberrypi-exp.c
index 64a552ecc2ad..f986940c3a5d 100644
--- a/drivers/gpio/gpio-raspberrypi-exp.c
+++ b/drivers/gpio/gpio-raspberrypi-exp.c
@@ -119,6 +119,11 @@ static int rpi_exp_gpio_dir_out(struct gpio_chip *gc, unsigned int off, int val)
return ret;
set_out.polarity = ret; /* Retain existing setting */
+ /* Need to invert the GPIO in first config set if inverted polarity */
+ /* See https://github.com/raspberrypi/linux/issues/5107 */
+ if (set_out.polarity)
+ set_out.state = !val;
+
ret = rpi_firmware_property(gpio->fw, RPI_FIRMWARE_SET_GPIO_CONFIG,
&set_out, sizeof(set_out));
if (ret || set_out.gpio != 0) {
--
2.37.1

View File

@@ -0,0 +1,68 @@
From 713afd6c80d4635306682a5643799195846271b1 Mon Sep 17 00:00:00 2001
Message-Id: <713afd6c80d4635306682a5643799195846271b1.1659172941.git.stefan@agner.ch>
In-Reply-To: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1659172941.git.stefan@agner.ch>
References: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1659172941.git.stefan@agner.ch>
From: Stefan Agner <stefan@agner.ch>
Date: Sat, 30 Jul 2022 11:21:31 +0200
Subject: [PATCH 13/13] ARM: dts: bcm2711: yellow: Add LED overrides
Add device tree overrides for all three LEDs.
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
index f354bfb69093..2d272a02128b 100644
--- a/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
+++ b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts
@@ -621,20 +621,24 @@ audio_pins: audio_pins {
&leds {
act_led: led-act {
- label = "led0";
+ label = "act";
linux,default-trigger = "activity";
+ default-state = "off";
gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
};
pwr_led: led-pwr {
- label = "led1";
+ label = "pwr";
linux,default-trigger = "default-on";
+ default-state = "off";
gpios = <&expgpio 2 GPIO_ACTIVE_LOW>;
};
- user_led: led-user {
- label = "led2";
+ usr_led: led-usr {
+ label = "usr";
linux,default-trigger = "heartbeat";
+ default-state = "off";
+ panic-indicator;
gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
};
};
@@ -670,14 +674,13 @@ cam0_reg: &cam1_reg {
/ {
__overrides__ {
- act_led_gpio = <&act_led>,"gpios:4";
- act_led_activelow = <&act_led>,"gpios:8";
act_led_trigger = <&act_led>,"linux,default-trigger";
- pwr_led_gpio = <&pwr_led>,"gpios:4";
pwr_led_activelow = <&pwr_led>,"gpios:8";
pwr_led_trigger = <&pwr_led>,"linux,default-trigger";
+ usr_led_trigger = <&usr_led>,"linux,default-trigger";
+
eth_led0 = <&phy1>,"led-modes:0";
eth_led1 = <&phy1>,"led-modes:4";
--
2.37.1

View File

@@ -20,8 +20,16 @@ test -n "${BOOT_B_LEFT}" || setenv BOOT_B_LEFT 3
# HassOS bootargs
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 apparmor=1 security=apparmor rootwait systemd.machine_id=${MACHINE_ID} cgroup_enable=memory fsck.repair=yes"
# Red Button pressed?
if gpio input GPIO27; then
sleep 1
# ... and Blue Button Pressed?
if gpio input GPIO26; then
echo "Boot wipe has been pressed, deleting boot files to trigger USB boot..."
fatrm mmc 0:1 /start4.elf
reset
fi
# Red still pressed?
if gpio input GPIO27; then
echo "Device wipe button has been pressed, setting wipe flag..."
setenv bootargs_hassos "${bootargs_hassos} haos.wipe=1"

View File

@@ -20,7 +20,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh"
BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/arm-uefi/generic-aarch64 $(BR2_EXTERNAL_HASSOS_PATH)/board/arm-uefi/generic-aarch64/hassos-hook.sh"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.15.41"
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.15.60"
BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/board/arm-uefi/generic-aarch64/kernel.config"
BR2_LINUX_KERNEL_LZ4=y

View File

@@ -20,7 +20,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh"
BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/pc/generic-x86-64 $(BR2_EXTERNAL_HASSOS_PATH)/board/pc/generic-x86-64/hassos-hook.sh"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.15.41"
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.15.60"
BR2_LINUX_KERNEL_DEFCONFIG="x86_64"
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/board/pc/generic-x86-64/kernel.config"
BR2_LINUX_KERNEL_LZ4=y

View File

@@ -20,7 +20,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh"
BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/khadas/vim3 $(BR2_EXTERNAL_HASSOS_PATH)/board/khadas/vim3/hassos-hook.sh"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.15.41"
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.15.60"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/board/khadas/kernel-vim.config"
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config"

View File

@@ -20,7 +20,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh"
BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-c2 $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-c2/hassos-hook.sh"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.15.41"
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.15.60"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/kernel-amlogic.config"
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config"

View File

@@ -20,7 +20,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh"
BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-c4 $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-c4/hassos-hook.sh"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.15.41"
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.15.60"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/kernel-amlogic.config"
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config"

View File

@@ -20,7 +20,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh"
BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-n2 $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-n2/hassos-hook.sh"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.15.41"
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.15.60"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/kernel-amlogic.config"
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-n2/kernel.config"

View File

@@ -21,7 +21,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh"
BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-xu4 $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-xu4/hassos-hook.sh"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.15.41"
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.15.60"
BR2_LINUX_KERNEL_DEFCONFIG="exynos"
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config"
BR2_LINUX_KERNEL_LZ4=y

View File

@@ -20,7 +20,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh"
BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/pc/ova $(BR2_EXTERNAL_HASSOS_PATH)/board/pc/ova/hassos-hook.sh"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.15.41"
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.15.60"
BR2_LINUX_KERNEL_DEFCONFIG="x86_64"
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/board/pc/ova/kernel.config"
BR2_LINUX_KERNEL_LZ4=y

View File

@@ -22,7 +22,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh"
BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/asus/tinker $(BR2_EXTERNAL_HASSOS_PATH)/board/asus/hassos-hook.sh"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.15.41"
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.15.60"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/board/asus/tinker/kernel.config"
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config"

View File

@@ -112,7 +112,7 @@ BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE="$(BR2_EXTERNAL_HASSOS_PATH)/boa
BR2_PACKAGE_GASKET=y
BR2_PACKAGE_HASSIO=y
BR2_PACKAGE_HASSIO_ARCH="aarch64"
BR2_PACKAGE_HASSIO_MACHINE="raspberrypi4-64"
BR2_PACKAGE_HASSIO_MACHINE="yellow"
BR2_PACKAGE_OS_AGENT=y
BR2_PACKAGE_PI_BLUETOOTH=y
BR2_PACKAGE_RPI_RF_MOD=y

View File

@@ -1,5 +1,5 @@
VERSION_MAJOR=8
VERSION_BUILD=1
VERSION_BUILD=5
HASSOS_NAME="Home Assistant OS"
HASSOS_ID="haos"

View File

@@ -56,6 +56,23 @@ install_spl() {
fi
}
check_grubenv() {
BOOT_MNT=/mnt/boot
# Mount boot
if ! systemctl -q is-active mnt-boot.mount; then
systemctl start mnt-boot.mount
fi
# If GRUB is installed, check if GRUB environment has been currupted
if command -v grub-editenv > /dev/null; then
if ! grub-editenv "${BOOT_MNT}/EFI/BOOT/grubenv" list > /dev/null; then
echo "GRUB environment seems to be corrupted. Recreating a new environment."
grub-editenv "${BOOT_MNT}"/EFI/BOOT/grubenv create
fi
fi
}
post_install_kernel() {
BOOT_MNT=/mnt/boot
@@ -79,6 +96,9 @@ post_install_kernel() {
case "$1" in
install-check)
if [ "$RAUC_MF_COMPATIBLE" = "$RAUC_SYSTEM_COMPATIBLE" ]; then
# Check if GRUB env has been corrupted. This is only problematic
# with OS 8, where compatible matches.
check_grubenv
exit 0
fi
# Be compatible with hassos OS ID

View File

@@ -10,8 +10,12 @@ while ! docker version 2> /dev/null > /dev/null; do
done
# Install Supervisor, plug-ins and landing page
echo "Loading containers..."
for image in /build/images/*.tar; do
echo "Loading container images..."
# Make sure to order images by size (largest first)
# It seems docker load requires space during operation
# shellcheck disable=SC2045
for image in $(ls -S /build/images/*.tar); do
docker load --input "${image}"
done

View File

@@ -15,7 +15,7 @@ connection.mdns=2
connection.llmnr=2
[connectivity]
uri=http://version.home-assistant.io/online.txt
uri=http://checkonline.home-assistant.io/online.txt
[device]
wifi.scan-rand-mac-address=no

View File

@@ -1,3 +1,7 @@
# Since multicast is rather popular and we have many integrations running,
# more than the default of 20 memberships might be required.
net.ipv4.igmp_max_memberships = 1024
# Increase maximum receive and send buffer size
net.core.rmem_max = 4194304
net.core.wmem_max = 4194304

View File

@@ -1,2 +1,4 @@
[Time]
FallbackNTP=time.cloudflare.com
# Speed-up boot as first attempt is done before network is up
ConnectionRetrySec=10