mirror of
https://github.com/home-assistant/operating-system.git
synced 2025-11-08 18:38:33 +00:00
Compare commits
51 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3f161bc7d1 | ||
|
|
1bd9245219 | ||
|
|
fb7a9c4196 | ||
|
|
8f69cd7fd1 | ||
|
|
67ddfe2563 | ||
|
|
ce8b777d74 | ||
|
|
82f36004f5 | ||
|
|
62a30ac509 | ||
|
|
ba73a8c3d7 | ||
|
|
0fdf920b89 | ||
|
|
f27c429be2 | ||
|
|
e4d00de474 | ||
|
|
65789af595 | ||
|
|
39b1c6de4e | ||
|
|
2916a1c247 | ||
|
|
2e6b38a0e1 | ||
|
|
5d164b12d1 | ||
|
|
e3bbe2003f | ||
|
|
93ac046349 | ||
|
|
d615f8c71e | ||
|
|
3977f1f039 | ||
|
|
d9e46d6dbb | ||
|
|
b23b54bed0 | ||
|
|
5eb7ccb761 | ||
|
|
c6d4e2788e | ||
|
|
14ca2ac75e | ||
|
|
4fb27c2ca8 | ||
|
|
c7018054b4 | ||
|
|
7f9116b7f8 | ||
|
|
e97b1231dc | ||
|
|
1a7dc0ca1f | ||
|
|
d3a43a4ca4 | ||
|
|
3c2f014acb | ||
|
|
1b6cfbf940 | ||
|
|
cdee2c5838 | ||
|
|
7e7612ffeb | ||
|
|
832b70bab1 | ||
|
|
0c08acd2c3 | ||
|
|
1467cc5f64 | ||
|
|
d44d93e4a1 | ||
|
|
2fb1663a35 | ||
|
|
a7617340e9 | ||
|
|
fd31ce14ea | ||
|
|
598e06de5d | ||
|
|
0452965fb0 | ||
|
|
d6fa83a0d3 | ||
|
|
edba18f6c4 | ||
|
|
50a0062ee6 | ||
|
|
26c383484e | ||
|
|
d8baa98ae2 | ||
|
|
ccca13d3ca |
8
.github/release-drafter.yml
vendored
8
.github/release-drafter.yml
vendored
@@ -4,8 +4,6 @@ version-template: "$MAJOR.$MINOR"
|
||||
categories:
|
||||
- title: 'Home Assistant Operating System'
|
||||
label: 'os'
|
||||
- title: 'Build System'
|
||||
label: 'build'
|
||||
- title: 'Raspberry Pi'
|
||||
label: 'board/raspberrypi'
|
||||
- title: 'Home Assistant Yellow'
|
||||
@@ -24,6 +22,12 @@ categories:
|
||||
label: 'board/khadas'
|
||||
- title: 'Generic aarch64'
|
||||
label: 'board/generic-aarch64'
|
||||
- title: 'Documentation'
|
||||
label: 'documentation'
|
||||
- title: 'Build System'
|
||||
label: 'build'
|
||||
- title: 'Dependencies'
|
||||
label: 'dependencies'
|
||||
filter-by-commitish: true
|
||||
template: |
|
||||
## Changes
|
||||
|
||||
25
.github/workflows/artifacts-index.yaml
vendored
25
.github/workflows/artifacts-index.yaml
vendored
@@ -83,11 +83,20 @@ jobs:
|
||||
|
||||
- name: Flush CloudFlare cache
|
||||
run: |
|
||||
curl --silent --show-error --fail -X POST \
|
||||
"https://api.cloudflare.com/client/v4/zones/${{ secrets.CF_ZONE }}/purge_cache" \
|
||||
-H "Authorization: Bearer ${{ secrets.CF_PURGE_TOKEN }}" \
|
||||
-H "Content-Type: application/json" \
|
||||
--data '{"files": [
|
||||
"https://os-artifacts.home-assistant.io/index.html",
|
||||
"https://os-artifacts.home-assistant.io/index.json"
|
||||
] }'
|
||||
# Create purge list of all artifacts
|
||||
jq -r '. | map("https://os-artifacts.home-assistant.io/${{ inputs.version }}/" + .) | join("\n")' < "${{ inputs.version }}.json" > purge_list
|
||||
# Add indexes to purge list too
|
||||
echo "https://os-artifacts.home-assistant.io/indexes/${{ inputs.version }}.json" >> purge_list
|
||||
echo "https://os-artifacts.home-assistant.io/index.html" >> purge_list
|
||||
echo "https://os-artifacts.home-assistant.io/index.json" >> purge_list
|
||||
# Split to chunks of 30 files (limit of CF API)
|
||||
split -d -l30 purge_list purge_list_chunked
|
||||
# Convert chunked lists to JSON arrays and call CF purge API
|
||||
for f in purge_list_chunked*; do
|
||||
files=$(jq -R -s 'split("\n")[:-1]' < "$f")
|
||||
curl --silent --show-error --fail -X POST \
|
||||
"https://api.cloudflare.com/client/v4/zones/${{ secrets.CF_ZONE }}/purge_cache" \
|
||||
-H "Authorization: Bearer ${{ secrets.CF_PURGE_TOKEN }}" \
|
||||
-H "Content-Type: application/json" \
|
||||
--data "{\"files\": ${files}}"
|
||||
done
|
||||
|
||||
4
.github/workflows/build.yaml
vendored
4
.github/workflows/build.yaml
vendored
@@ -136,7 +136,7 @@ jobs:
|
||||
}
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3.6.1
|
||||
uses: docker/setup-buildx-action@v3.7.1
|
||||
- name: Log in to the GitHub container registry
|
||||
uses: docker/login-action@v3.3.0
|
||||
with:
|
||||
@@ -144,7 +144,7 @@ jobs:
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Build and Push
|
||||
uses: docker/build-push-action@v6.5.0
|
||||
uses: docker/build-push-action@v6.9.0
|
||||
id: build_haos_builder
|
||||
with:
|
||||
context: .
|
||||
|
||||
2
.gitmodules
vendored
2
.gitmodules
vendored
@@ -1,4 +1,4 @@
|
||||
[submodule "buildroot"]
|
||||
path = buildroot
|
||||
url = https://github.com/home-assistant/buildroot.git
|
||||
branch = 2022.02.x-haos
|
||||
branch = 2024.02.x-haos
|
||||
|
||||
@@ -10,8 +10,8 @@ ODROID-M1S can boot HAOS directly from an SD card, as it has higher priority tha
|
||||
|
||||
HAOS can be installed directly to the eMMC using a special boot image, to do that:
|
||||
|
||||
1. Download [`ODROID-M1S_EMMC2UMS.img`][1]
|
||||
2. Use balenaEtcher or another tool to flash the UMS utility onto an SD card.
|
||||
1. Download the _UMS Utility_ image: [`ODROID-M1S_EMMC2UMS.img`][1]. The _UMS Utility_ is a special image that switches ODROID-M1S to USB Mass Storage device.
|
||||
2. Use balenaEtcher or another tool to flash the _UMS utility_ onto an SD card.
|
||||
3. Plug-in that SD card to your ODROID-M1S and boot it. Connect your PC to the Micro USB OTG port.
|
||||
4. The eMMC will show as a drive on your PC and you can directly flash the HAOS image with balenaEther.
|
||||
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
|
||||
# Kernel Version
|
||||
|
||||
Default Kernel tree: 6.1
|
||||
|
||||
| Board | Version |
|
||||
|-------|---------|
|
||||
| Open Virtual Appliance | 6.6.44 |
|
||||
| Open Virtual Appliance | 6.6.54 |
|
||||
| Raspberry Pi | 6.6.31 |
|
||||
| Raspberry Pi 0-W | 6.6.31 |
|
||||
| Raspberry Pi 2 | 6.6.31 |
|
||||
@@ -13,14 +11,14 @@ Default Kernel tree: 6.1
|
||||
| Raspberry Pi 4 | 6.6.31 |
|
||||
| Raspberry Pi 5 | 6.6.31 |
|
||||
| Home Assistant Yellow | 6.6.31 |
|
||||
| Home Assistant Green | 6.6.44 |
|
||||
| Tinker Board | 6.6.44 |
|
||||
| ODROID-C2 | 6.6.44 |
|
||||
| ODROID-C4 | 6.6.44 |
|
||||
| ODROID-M1 | 6.6.44 |
|
||||
| ODROID-M1S | 6.6.44 |
|
||||
| ODROID-N2 | 6.6.44 |
|
||||
| ODROID-XU4 | 6.6.44 |
|
||||
| Generic aarch64 | 6.6.44 |
|
||||
| Generic x86-64 | 6.6.44 |
|
||||
| Khadas VIM3 | 6.6.44 |
|
||||
| Home Assistant Green | 6.6.54 |
|
||||
| Tinker Board | 6.6.54 |
|
||||
| ODROID-C2 | 6.6.54 |
|
||||
| ODROID-C4 | 6.6.54 |
|
||||
| ODROID-M1 | 6.6.54 |
|
||||
| ODROID-M1S | 6.6.54 |
|
||||
| ODROID-N2 | 6.6.54 |
|
||||
| ODROID-XU4 | 6.6.54 |
|
||||
| Generic aarch64 | 6.6.54 |
|
||||
| Generic x86-64 | 6.6.54 |
|
||||
| Khadas VIM3 | 6.6.54 |
|
||||
|
||||
@@ -4,6 +4,8 @@ Home Assistant Operating System (formerly HassOS) is a Linux based operating sys
|
||||
|
||||
Home Assistant Operating System uses Docker as its container engine. By default it deploys the Home Assistant Supervisor as a container. Home Assistant Supervisor in turn uses the Docker container engine to control Home Assistant Core and Add-Ons in separate containers. Home Assistant Operating System is **not** based on a regular Linux distribution like Ubuntu. It is built using [Buildroot](https://buildroot.org/) and it is optimized to run Home Assistant. It targets single board compute (SBC) devices like the Raspberry Pi or ODROID but also supports x86-64 systems with UEFI.
|
||||
|
||||
[](https://www.openhomefoundation.org/)
|
||||
|
||||
## Features
|
||||
|
||||
- Lightweight and memory-efficient
|
||||
|
||||
Submodule buildroot updated: baa16784d2...d59d09ad38
@@ -1 +1 @@
|
||||
console=tty0
|
||||
console=ttyS2,1500000n8 console=tty0
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
From d3fb1ec2364b20025d71e2263514a71208cfb61e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= <sairon@sairon.cz>
|
||||
Date: Tue, 13 Aug 2024 17:51:29 +0200
|
||||
Subject: [PATCH] arch: arm64: dts: green: Improve LED representation
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Fix color and use labels/node names according to the LEDs functionality.
|
||||
|
||||
Signed-off-by: Jan Čermák <sairon@sairon.cz>
|
||||
Co-authored-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm/dts/rk3566-ha-green.dts | 11 +++++++----
|
||||
1 file changed, 7 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/dts/rk3566-ha-green.dts b/arch/arm/dts/rk3566-ha-green.dts
|
||||
index 68d836911e..c3adc59904 100644
|
||||
--- a/arch/arm/dts/rk3566-ha-green.dts
|
||||
+++ b/arch/arm/dts/rk3566-ha-green.dts
|
||||
@@ -48,16 +48,18 @@
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
- led_power: led-0 {
|
||||
+ led_power: led-power {
|
||||
+ label = "power";
|
||||
gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>;
|
||||
function = LED_FUNCTION_POWER;
|
||||
- color = <LED_COLOR_ID_RED>;
|
||||
+ color = <LED_COLOR_ID_WHITE>;
|
||||
default-state = "keep";
|
||||
linux,default-trigger = "default-on";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&led_power_pin>;
|
||||
};
|
||||
- led_act: led-1 {
|
||||
+ led_act: led-activity {
|
||||
+ label = "activity";
|
||||
gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
|
||||
function = LED_FUNCTION_ACTIVITY;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
@@ -65,7 +67,8 @@
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&led_act_pin>;
|
||||
};
|
||||
- led_user: led-2 {
|
||||
+ led_user: led-user {
|
||||
+ label = "user";
|
||||
gpios = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
|
||||
function = LED_FUNCTION_HEARTBEAT;
|
||||
color = <LED_COLOR_ID_YELLOW>;
|
||||
@@ -27,6 +27,36 @@ test -n "${MACHINE_ID}" || setenv BOOT_CONDITION "systemd.condition-first-boot=t
|
||||
# HassOS bootargs
|
||||
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 rootwait systemd.machine_id=${MACHINE_ID} fsck.repair=yes ${BOOT_CONDITION}"
|
||||
|
||||
i2c dev 0
|
||||
setenv check_btn_pressed ' \
|
||||
i2c read 0x20 0xf0.1 1 ${loadaddr}; \
|
||||
setexpr PWRON_STS *${loadaddr} \\\& 0x80; \
|
||||
test ${PWRON_STS} -eq 0x0;'
|
||||
|
||||
# Check if button is held for device wipe
|
||||
setenv counter 0
|
||||
while test ${counter} -lt 2; do
|
||||
if run check_btn_pressed; then
|
||||
echo "Reset button pressed for ${counter} seconds"
|
||||
setexpr counter ${counter} + 1
|
||||
|
||||
if test ${counter} -eq 2; then
|
||||
led user on
|
||||
echo "Waiting for button to be released"
|
||||
while run check_btn_pressed; do
|
||||
sleep 0.5
|
||||
done
|
||||
echo "Proceeding with device wipe"
|
||||
setenv bootargs_hassos "${bootargs_hassos} haos.wipe=1"
|
||||
else
|
||||
sleep 1
|
||||
fi
|
||||
else
|
||||
# U-Boot has no break statement :')
|
||||
setenv counter 2
|
||||
fi
|
||||
done
|
||||
|
||||
# HassOS system A/B
|
||||
setenv bootargs_a "root=PARTUUID=8d3d53e3-6d49-4c38-8349-aff6859e82fd ro"
|
||||
setenv bootargs_b "root=PARTUUID=a3ec664e-32ce-4665-95ea-7ae90ce9aa20 ro"
|
||||
|
||||
3
buildroot-external/board/nabucasa/green/uboot.config
Normal file
3
buildroot-external/board/nabucasa/green/uboot.config
Normal file
@@ -0,0 +1,3 @@
|
||||
CONFIG_LED=y
|
||||
CONFIG_LED_GPIO=y
|
||||
CONFIG_CMD_LED=y
|
||||
@@ -77,9 +77,9 @@ menuentry "Slot B (OK=$B_OK TRY=$B_TRY)" {
|
||||
}
|
||||
|
||||
menuentry "Slot A (rescue shell)" {
|
||||
linux (${boothd},gpt2)/bzImage root=PARTUUID=8d3d53e3-6d49-4c38-8349-aff6859e82fd $default_cmdline $cmdline rauc.slot=A systemd.unit=recovery.target
|
||||
linux (${boothd},gpt2)/bzImage root=PARTUUID=8d3d53e3-6d49-4c38-8349-aff6859e82fd $default_cmdline $cmdline rauc.slot=A systemd.unit=recovery.target debug
|
||||
}
|
||||
|
||||
menuentry "Slot B (rescue shell)" {
|
||||
linux (${boothd},gpt4)/bzImage root=PARTUUID=a3ec664e-32ce-4665-95ea-7ae90ce9aa20 $default_cmdline $cmdline rauc.slot=B systemd.unit=recovery.target
|
||||
linux (${boothd},gpt4)/bzImage root=PARTUUID=a3ec664e-32ce-4665-95ea-7ae90ce9aa20 $default_cmdline $cmdline rauc.slot=B systemd.unit=recovery.target debug
|
||||
}
|
||||
|
||||
@@ -23,21 +23,29 @@ test -n "${MACHINE_ID}" || setenv BOOT_CONDITION "systemd.condition-first-boot=t
|
||||
# HassOS bootargs
|
||||
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 rootwait systemd.machine_id=${MACHINE_ID} cgroup_enable=memory fsck.repair=yes ${BOOT_CONDITION}"
|
||||
|
||||
setenv confirm_reset_handled ' \
|
||||
led usr on; \
|
||||
echo "Waiting for red button to be released";
|
||||
while gpio input GPIO27; do sleep 0.5; done;'
|
||||
|
||||
# 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..."
|
||||
run confirm_reset_handled
|
||||
fatrm ${devtype} ${devnum}:1 /start4.elf
|
||||
reset
|
||||
fi
|
||||
# Red still pressed?
|
||||
if gpio input GPIO27; then
|
||||
echo "Device wipe button has been pressed, setting wipe flag..."
|
||||
run confirm_reset_handled
|
||||
setenv bootargs_hassos "${bootargs_hassos} haos.wipe=1"
|
||||
fi
|
||||
elif gpio input GPIO26; then
|
||||
led usr on
|
||||
ums 0 ${devtype} ${devnum}
|
||||
fi
|
||||
|
||||
|
||||
@@ -1 +1,5 @@
|
||||
CONFIG_CMD_USB_MASS_STORAGE=y
|
||||
|
||||
CONFIG_LED=y
|
||||
CONFIG_LED_GPIO=y
|
||||
CONFIG_CMD_LED=y
|
||||
|
||||
@@ -16,7 +16,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="6.6.44"
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.54"
|
||||
BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
|
||||
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless-pci.config $(BR2_EXTERNAL_HASSOS_PATH)/board/arm-uefi/generic-aarch64/kernel.config"
|
||||
BR2_LINUX_KERNEL_LZ4=y
|
||||
|
||||
@@ -16,7 +16,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="6.6.44"
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.54"
|
||||
BR2_LINUX_KERNEL_DEFCONFIG="x86_64"
|
||||
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless-pci.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-pci.config $(BR2_EXTERNAL_HASSOS_PATH)/board/pc/generic-x86-64/kernel.config"
|
||||
BR2_LINUX_KERNEL_LZ4=y
|
||||
|
||||
@@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh"
|
||||
BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/nabucasa/green $(BR2_EXTERNAL_HASSOS_PATH)/board/nabucasa/green/hassos-hook.sh"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.44"
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.54"
|
||||
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/kernel-arm64-rockchip.config"
|
||||
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/board/nabucasa/green/kernel.config"
|
||||
@@ -143,7 +143,7 @@ BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
|
||||
BR2_TARGET_UBOOT_CUSTOM_VERSION=y
|
||||
BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2024.01"
|
||||
BR2_TARGET_UBOOT_BOARD_DEFCONFIG="green"
|
||||
BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/bootloader/uboot.config"
|
||||
BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/bootloader/uboot.config $(BR2_EXTERNAL_HASSOS_PATH)/board/nabucasa/green/uboot.config"
|
||||
BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y
|
||||
BR2_TARGET_UBOOT_NEEDS_PYELFTOOLS=y
|
||||
BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y
|
||||
|
||||
@@ -16,7 +16,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="6.6.44"
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.54"
|
||||
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/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config"
|
||||
|
||||
@@ -16,7 +16,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="6.6.44"
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.54"
|
||||
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/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config"
|
||||
|
||||
@@ -16,7 +16,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="6.6.44"
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.54"
|
||||
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/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config"
|
||||
|
||||
@@ -16,7 +16,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-m1 $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-m1/hassos-hook.sh"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.44"
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.54"
|
||||
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/kernel-arm64-rockchip.config"
|
||||
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-m1/kernel.config"
|
||||
|
||||
@@ -16,7 +16,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-m1s $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-m1s/hassos-hook.sh"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.44"
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.54"
|
||||
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/kernel-arm64-rockchip.config"
|
||||
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-m1s/kernel.config"
|
||||
|
||||
@@ -16,7 +16,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="6.6.44"
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.54"
|
||||
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/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-n2/kernel.config"
|
||||
|
||||
@@ -17,7 +17,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="6.6.44"
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.54"
|
||||
BR2_LINUX_KERNEL_DEFCONFIG="exynos"
|
||||
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-xu4/kernel.config"
|
||||
BR2_LINUX_KERNEL_LZ4=y
|
||||
|
||||
@@ -16,7 +16,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="6.6.44"
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.54"
|
||||
BR2_LINUX_KERNEL_DEFCONFIG="x86_64"
|
||||
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-pci.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless-pci.config $(BR2_EXTERNAL_HASSOS_PATH)/board/pc/ova/kernel.config"
|
||||
BR2_LINUX_KERNEL_LZ4=y
|
||||
|
||||
@@ -18,7 +18,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="6.6.44"
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.54"
|
||||
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/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config"
|
||||
|
||||
@@ -43,7 +43,8 @@ CONFIG_SQUASHFS=y
|
||||
CONFIG_SQUASHFS_XATTR=y
|
||||
CONFIG_SQUASHFS_LZ4=y
|
||||
CONFIG_BTRFS_FS=m
|
||||
|
||||
CONFIG_NTFS3_FS=m
|
||||
CONFIG_EXFAT_FS=m
|
||||
CONFIG_MD=y
|
||||
CONFIG_BLK_DEV_DM=y
|
||||
CONFIG_BLK_DEV_LOOP=y
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
VERSION_MAJOR="13"
|
||||
VERSION_MINOR="0"
|
||||
VERSION_MINOR="2"
|
||||
VERSION_SUFFIX=""
|
||||
|
||||
HASSOS_NAME="Home Assistant OS"
|
||||
|
||||
@@ -22,7 +22,7 @@ container=$(docker run --privileged -e DOCKER_TLS_CERTDIR="" \
|
||||
-v "${build_dir}/data/":/data \
|
||||
-v "${build_dir}/data/docker/":/var/lib/docker \
|
||||
-v "${build_dir}":/build \
|
||||
-d docker:26.0-dind --storage-driver overlay2)
|
||||
-d docker:27.2-dind --storage-driver overlay2)
|
||||
|
||||
docker exec "${container}" sh /build/dind-import-containers.sh
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From c18ab299696dbb2fc092242e271068534ce9159c Mon Sep 17 00:00:00 2001
|
||||
From 6c0a2197bad3c339a638ea59b1eb36b5e449f7b8 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= <sairon@sairon.cz>
|
||||
Date: Tue, 30 Jul 2024 18:27:24 +0200
|
||||
Subject: [PATCH 1/1] loader/efi/linux: use legacy loader for broken Intel NM10
|
||||
Subject: [PATCH] loader/efi/linux: use legacy loader for broken Intel NM10
|
||||
platforms
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
@@ -23,13 +23,28 @@ that can not use the legacy loader, causing any unexpected failures.
|
||||
[1] https://lists.gnu.org/archive/html/grub-devel/2024-05/msg00117.html
|
||||
[2] https://lists.gnu.org/archive/html/grub-devel/2024-07/msg00009.html
|
||||
|
||||
----
|
||||
|
||||
Also AMD GX-212JC in HP t520 seems to be affected as reported in [3].
|
||||
|
||||
[3] https://github.com/home-assistant/operating-system/issues/3557
|
||||
|
||||
----
|
||||
|
||||
Added CPU ID for Macbook Air's Intel i5 CPU reported in [4]. This will
|
||||
likely target also other i5-based systems that are not affected by the
|
||||
EFI bug but it should cause no harm, as the legacy loader was used in
|
||||
pre-2.12 GRUB anyway.
|
||||
|
||||
[4] https://github.com/home-assistant/operating-system/issues/3305#issuecomment-2360633688
|
||||
|
||||
Signed-off-by: Jan Čermák <sairon@sairon.cz>
|
||||
---
|
||||
grub-core/loader/efi/linux.c | 65 +++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 64 insertions(+), 1 deletion(-)
|
||||
grub-core/loader/efi/linux.c | 67 +++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 66 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/grub-core/loader/efi/linux.c b/grub-core/loader/efi/linux.c
|
||||
index bfbd95aee..f4fc6d25c 100644
|
||||
index bfbd95a..98ac99c 100644
|
||||
--- a/grub-core/loader/efi/linux.c
|
||||
+++ b/grub-core/loader/efi/linux.c
|
||||
@@ -24,6 +24,7 @@
|
||||
@@ -40,7 +55,7 @@ index bfbd95aee..f4fc6d25c 100644
|
||||
#include <grub/types.h>
|
||||
#include <grub/efi/efi.h>
|
||||
#include <grub/efi/fdtload.h>
|
||||
@@ -452,6 +453,67 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
|
||||
@@ -452,6 +453,69 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
|
||||
return grub_errno;
|
||||
}
|
||||
|
||||
@@ -89,8 +104,10 @@ index bfbd95aee..f4fc6d25c 100644
|
||||
+ * negatives) or partial CPU identification (which might lead to
|
||||
+ * false positives instead).
|
||||
+ */
|
||||
+ return (processor_id == 0xbfebfbff61060300 // D2xxx/N2xxx
|
||||
+ || processor_id == 0xbfebfbff000106ca); // D525
|
||||
+ return (processor_id == 0xbfebfbff00030661 // D2xxx/N2xxx
|
||||
+ || processor_id == 0xbfebfbff000106ca // D525
|
||||
+ || processor_id == 0x00730f01178bfbff // AMD GX-212JC (HP t520)
|
||||
+ || processor_id == 0xbfebfbff000206a7); // Intel i5-2xxx (Macbook Air A1370)
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
@@ -108,7 +125,7 @@ index bfbd95aee..f4fc6d25c 100644
|
||||
static grub_err_t
|
||||
grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
int argc, char *argv[])
|
||||
@@ -490,7 +552,8 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
@@ -490,7 +554,8 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
|
||||
kernel_size = grub_file_size (file);
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
From 13cf1bb9c5fa91762184c3b0dddea1328c2746bc Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= <sairon@sairon.cz>
|
||||
Date: Wed, 11 Sep 2024 17:25:00 +0200
|
||||
Subject: [PATCH] systemd-timesyncd: delay start after network-online.target
|
||||
|
||||
As explained in [1], it's desired for the systemd-timesyncd to run after
|
||||
the network is deemed online, otherwise the connectivity (at least on
|
||||
HAOS with NetworkManager) is not operational when the NTP sync is
|
||||
attempted and it fails, delaying the boot and leading to other problems.
|
||||
Because it's not possible to remove dependencies of existing units using
|
||||
drop-ins, patch the service template file for systemd-timesyncd unit
|
||||
instead, avoiding the need for complete unit file override as in [2].
|
||||
|
||||
[1] https://github.com/home-assistant/operating-system/pull/2068
|
||||
[2] https://github.com/home-assistant/operating-system/pull/2082
|
||||
---
|
||||
units/systemd-timesyncd.service.in | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/units/systemd-timesyncd.service.in b/units/systemd-timesyncd.service.in
|
||||
index c606461..5870744 100644
|
||||
--- a/units/systemd-timesyncd.service.in
|
||||
+++ b/units/systemd-timesyncd.service.in
|
||||
@@ -13,8 +13,8 @@ Documentation=man:systemd-timesyncd.service(8)
|
||||
ConditionCapability=CAP_SYS_TIME
|
||||
ConditionVirtualization=!container
|
||||
DefaultDependencies=no
|
||||
-After=systemd-sysusers.service
|
||||
-Before=time-set.target sysinit.target shutdown.target
|
||||
+After=systemd-sysusers.service network-online.target
|
||||
+Before=time-set.target shutdown.target
|
||||
Conflicts=shutdown.target
|
||||
Wants=time-set.target
|
||||
|
||||
@@ -56,5 +56,5 @@ User=systemd-timesync
|
||||
{{SERVICE_WATCHDOG}}
|
||||
|
||||
[Install]
|
||||
-WantedBy=sysinit.target
|
||||
+WantedBy=time-sync.target
|
||||
Alias=dbus-org.freedesktop.timesync1.service
|
||||
@@ -0,0 +1,59 @@
|
||||
From f42a5b49e95a8deed0b8e6f1bea6679af7e908e4 Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Fri, 19 Apr 2024 13:25:55 +0200
|
||||
Subject: [PATCH] detect-virt: detect hyperv-enlightened qemu as qemu, not as
|
||||
hyperv
|
||||
|
||||
CPUID reporting hyperv should be taken with a grain of salt, and we
|
||||
should prefer other mechanisms then.
|
||||
|
||||
Fixes: #28001
|
||||
---
|
||||
src/basic/virt.c | 20 ++++++++++++++++----
|
||||
1 file changed, 16 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/basic/virt.c b/src/basic/virt.c
|
||||
index 88357a9..89abb53 100644
|
||||
--- a/src/basic/virt.c
|
||||
+++ b/src/basic/virt.c
|
||||
@@ -446,7 +446,7 @@ static Virtualization detect_vm_zvm(void) {
|
||||
/* Returns a short identifier for the various VM implementations */
|
||||
Virtualization detect_vm(void) {
|
||||
static thread_local Virtualization cached_found = _VIRTUALIZATION_INVALID;
|
||||
- bool other = false;
|
||||
+ bool other = false, hyperv = false;
|
||||
int xen_dom0 = 0;
|
||||
Virtualization v, dmi;
|
||||
|
||||
@@ -503,7 +503,12 @@ Virtualization detect_vm(void) {
|
||||
v = detect_vm_cpuid();
|
||||
if (v < 0)
|
||||
return v;
|
||||
- if (v == VIRTUALIZATION_VM_OTHER)
|
||||
+ if (v == VIRTUALIZATION_MICROSOFT)
|
||||
+ /* QEMU sets the CPUID string to hyperv's, in case it provides hyperv enlightenments. Let's
|
||||
+ * hence not return Microsoft here but just use the other mechanisms first to make a better
|
||||
+ * decision. */
|
||||
+ hyperv = true;
|
||||
+ else if (v == VIRTUALIZATION_VM_OTHER)
|
||||
other = true;
|
||||
else if (v != VIRTUALIZATION_NONE)
|
||||
goto finish;
|
||||
@@ -544,8 +549,15 @@ Virtualization detect_vm(void) {
|
||||
return v;
|
||||
|
||||
finish:
|
||||
- if (v == VIRTUALIZATION_NONE && other)
|
||||
- v = VIRTUALIZATION_VM_OTHER;
|
||||
+ /* None of the checks above gave us a clear answer, hence let's now use fallback logic: if hyperv
|
||||
+ * enlightenments are available but the VMM wasn't recognized as anything yet, it's probably
|
||||
+ * Microsoft. */
|
||||
+ if (v == VIRTUALIZATION_NONE) {
|
||||
+ if (hyperv)
|
||||
+ v = VIRTUALIZATION_MICROSOFT;
|
||||
+ else if (other)
|
||||
+ v = VIRTUALIZATION_VM_OTHER;
|
||||
+ }
|
||||
|
||||
cached_found = v;
|
||||
log_debug("Found VM virtualization %s", virtualization_to_string(v));
|
||||
@@ -1,60 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
#
|
||||
# This file is part of systemd.
|
||||
#
|
||||
# systemd is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2.1 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
[Unit]
|
||||
Description=Network Time Synchronization
|
||||
Documentation=man:systemd-timesyncd.service(8)
|
||||
ConditionCapability=CAP_SYS_TIME
|
||||
ConditionVirtualization=!container
|
||||
DefaultDependencies=no
|
||||
After=systemd-sysusers.service
|
||||
Before=time-set.target shutdown.target
|
||||
Conflicts=shutdown.target
|
||||
Wants=time-set.target
|
||||
|
||||
[Service]
|
||||
AmbientCapabilities=CAP_SYS_TIME
|
||||
BusName=org.freedesktop.timesync1
|
||||
CapabilityBoundingSet=CAP_SYS_TIME
|
||||
# Turn off DNSSEC validation for hostname look-ups, since those need the
|
||||
# correct time to work, but we likely won't acquire that without NTP. Let's
|
||||
# break this chicken-and-egg cycle here.
|
||||
Environment=SYSTEMD_NSS_RESOLVE_VALIDATE=0
|
||||
ExecStart=!!/usr/lib/systemd/systemd-timesyncd
|
||||
LockPersonality=yes
|
||||
MemoryDenyWriteExecute=yes
|
||||
NoNewPrivileges=yes
|
||||
PrivateDevices=yes
|
||||
PrivateTmp=yes
|
||||
ProtectProc=invisible
|
||||
ProtectControlGroups=yes
|
||||
ProtectHome=yes
|
||||
ProtectHostname=yes
|
||||
ProtectKernelLogs=yes
|
||||
ProtectKernelModules=yes
|
||||
ProtectKernelTunables=yes
|
||||
ProtectSystem=strict
|
||||
Restart=always
|
||||
RestartSec=0
|
||||
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
|
||||
RestrictNamespaces=yes
|
||||
RestrictRealtime=yes
|
||||
RestrictSUIDSGID=yes
|
||||
RuntimeDirectory=systemd/timesync
|
||||
StateDirectory=systemd/timesync
|
||||
SystemCallArchitectures=native
|
||||
SystemCallErrorNumber=EPERM
|
||||
SystemCallFilter=@system-service @clock
|
||||
Type=notify
|
||||
User=systemd-timesync
|
||||
WatchdogSec=3min
|
||||
|
||||
[Install]
|
||||
WantedBy=time-sync.target
|
||||
Alias=dbus-org.freedesktop.timesync1.service
|
||||
@@ -1,3 +1,2 @@
|
||||
[Unit]
|
||||
RequiresMountsFor=/var/lib/systemd
|
||||
After=network-online.target
|
||||
@@ -1,4 +1,3 @@
|
||||
labgrid==23.0.6
|
||||
pytest==7.2.2
|
||||
labgrid==24.0.1
|
||||
pytest-dependency==0.6.0
|
||||
pytest-timeout==2.3.1
|
||||
|
||||
@@ -71,3 +71,8 @@ def test_supervisor_logs(shell):
|
||||
def test_systemctl_status(shell):
|
||||
output = shell.run_check("systemctl --no-pager -l status -a || true")
|
||||
_LOGGER.info("%s", "\n".join(output))
|
||||
|
||||
@pytest.mark.dependency(depends=["test_init"])
|
||||
def test_systemctl_check_no_failed(shell):
|
||||
output = shell.run_check("systemctl --no-pager -l list-units --state=failed")
|
||||
assert "0 loaded units listed." in output, f"Some units failed:\n{"\n".join(output)}"
|
||||
|
||||
Reference in New Issue
Block a user