Compare commits

...

646 Commits
10.0 ... 14.1

Author SHA1 Message Date
Jan Čermák
07159c8225 Bump OS to release version 14.1 2024-12-19 08:09:46 +01:00
Jan Čermák
baa3f7871b Bump OS to pre-release version 14.1.rc1 2024-12-17 09:26:31 +01:00
Jan Čermák
48edf7a114 Bump Buildroot to 2024.02.9 (#3745)
* buildroot b2077df873...00e8f09356 (1):
  > Merge tag '2024.02.9' into 2024.02.x-haos
2024-12-16 16:53:52 +01:00
Jan Čermák
79a90f81ff Linux: Update kernel to 6.6.66 (#3744)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.66
2024-12-16 16:47:04 +01:00
dependabot[bot]
bb280e796f Bump docker/setup-buildx-action from 3.7.1 to 3.8.0 (#3746)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 3.7.1 to 3.8.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v3.7.1...v3.8.0)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-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>
2024-12-16 15:53:52 +01:00
Jan Čermák
765f4daaa2 Enable TCPMSS target iptables module for all boards (#3739)
The TCPMSS target module for iptables was enabled in some kernel defconfigs but
not for all targets. It is used e.g. in default config of @bigmoby's WireGuard
Client add-on. Enable it globally in the HAOS kernel config to make sure it's
always present.

Fixes #3730
2024-12-12 20:44:30 +01:00
Jan Čermák
c7a9a0b906 Remove existing rauc.db from a data disk on the first boot (#3737)
If data disk is adopted on Yellow using the mechanism added in #3686, it
contains RAUC version information that is very likely invalid. In such case,
remove the file on first boot and have it recreated by the raucdb-update
service.
2024-12-12 20:44:15 +01:00
Jan Čermák
3b0b0312f6 Add Hailo PCIe driver and firmware for x86-64, aarch64 and OVA (#3736)
Hailo modules are usable also in other generic targets, so enable them also on
generic x86 and ARM targets. Runtime tested only on x86-64 (Beelink with Intel
N100).
2024-12-12 20:44:02 +01:00
Jan Čermák
d06aa63e3f Add Hailo PCIe driver and firmware for Yellow (#3734)
The PCIe card from the RPi AI Kit (and probably other M.2 cards using the
Hailo-8 chip) can be used on Yellow - the driver initializes correctly and
creates a /dev/hailo0 device on Yellow both with CM4 and CM5.
2024-12-12 20:43:38 +01:00
Jan Čermák
70318701ea Linux: Update kernel to 6.6.65 (#3733)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.65
2024-12-11 19:05:25 +01:00
Jan Čermák
434b83722f Add HA Yellow image to RPi Imager index update action (#3731)
* Add HA Yellow image to RPi Imager index update action

Update the action to also bump HA Yellow image added in
home-assistant/version#402.

* Sync image name with the current JSON PR
2024-12-11 17:01:47 +01:00
Jan Čermák
e30cf80066 Compile hailo_pci module from original sources on RPi 5 (#3732)
Instead of using in-tree module on RPi 5, build it as a module from the
original sources. This will give us better control over the version used and
will also allow us for easier way to add the module to other platforms.

This also makes 017d172 unnecessary anymore.
2024-12-11 15:13:20 +01:00
Jan Čermák
2b30e2bf53 Linux: Update kernel to 6.6.64 (#3728)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.64
2024-12-09 20:01:36 +01:00
Jan Čermák
017d17291d Fix Hailo-8 firmware path expected since driver v4.19.0 (#3721)
The new driver now expects the firmware file to contain version number, adjust
the path and remove unnecessary makefile step.
2024-12-06 15:17:32 +01:00
Jan Čermák
ce1e261fa4 Bump RPi SDIO WiFi firmware to latest version (#3719)
* buildroot c65b0306bb...b2077df873 (1):
  > package/brcmfmac_sdio-firmware-rpi: bump version to 4c1789e

Raspberry Pi kernel 6.6 driver for BCM43455 (used in RPi 3B+/4B) calls new API
which uses the DUMP_OBSS feature for channel selection. If it's not preset, it
results in drivers reporting errors, e.g.:

brcmf_set_channel: set chanspec 0xd099 fail, reason -52

The RPi OS firmware was updated but the package we use for this firmware
contains an old version that lacks this support. Update to latest version
synced from RPi upstream to fix the issues. The root cause is explained in [1]
by @ragazenta. Both disabling the DUMP_OBSS and updating the firmware makes the
errors go away.

[1] https://github.com/raspberrypi/linux/issues/6049#issuecomment-2485431104

Fixes #3367
2024-12-05 21:29:29 +01:00
Jan Čermák
4229332cc7 Bump Hailo-8 firmware to 4.19.0 for RPi kernel 6.6.62 (#3716)
Kernel bump in #3715 contains update of the driver to version 4.19.0 - bump the
firmware version to match it.
2024-12-04 18:27:50 +01:00
Jan Čermák
0a4114db3e RaspberryPi: Update kernel to 6.6.62 - dd2394360860d15146c96635796a75b05bb32b61 (#3715)
* RaspberryPi: Update kernel to 6.6.62 - dd2394360860d15146c96635796a75b05bb32b61

* Bump buildroot to update rpi-firmware

* buildroot 1d7407c66b...c65b0306bb (1):
  > package/rpi-firmware: bump to version 1.20241126 for kernel 6.6.62
2024-12-04 18:26:00 +01:00
Jan Čermák
91079a0cc6 Merge branch 'main' into dev 2024-12-03 19:29:39 +01:00
Jan Čermák
2ac3fceaf4 Bump OS to release version 14.0 2024-12-03 14:16:01 +01:00
Jan Čermák
babf11d710 Bump OS to pre-release version 14.0.rc3 2024-12-02 21:22:42 +01:00
Jan Čermák
47a648392a Disable CM5's RTC to make Yellow's on-board RTC the primary one (#3706)
With both RTCs enabled, the rpi_rtc is probed as the first one, making the
on-board RTC unused by default. Since the CM5's RTC peripheral can't be used on
Yellow, as the VBAT pin is not connected, disable it completely to fix RTC.

(cherry picked from commit 9d643edb54)
2024-12-02 21:22:41 +01:00
dependabot[bot]
0b251bb950 Bump docker/build-push-action from 6.9.0 to 6.10.0 (#3704)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.9.0 to 6.10.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v6.9.0...v6.10.0)

---
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>
(cherry picked from commit e0ccf398f2)
2024-12-02 17:50:31 +01:00
Jan Čermák
3df7743633 Disable CQE on mmc0 to fix I/O freezes on Yellow+CM5 (#3705)
The I/O operations on the eMMC can sometimes fail and lock up completely, and
disabling CQE on the sdio1 (mmc0) interface seems to solve the issue. While it
is a known (and potentially resolved) issue [1] for SD cards in Raspberry Pi's
Linux fork, it is not acknowledged neither resolved for CM5's eMMC. With CQE
enabled, the device usually locks up within the first 10 first boots, when the
swap file is being created. After disabling CQE, no error occurred after more
that 100 cold boots (every time with swap file removed).

[1] https://github.com/raspberrypi/linuxissues/6349

(cherry picked from commit c514d6b482)
2024-12-02 17:50:28 +01:00
Jan Čermák
a355da2075 Reduce time of mmc0 interface random hangs on Yellow+CM5 boot (#3700)
For yet unknown root cause, the eMMC interface sometimes fails to initialize
properly, delaying boot for up to 130 seconds. This can be reduced by ~100s by
disabling SD and SDIO modes on the sdio1 interface used for mmc0 before a
better patch is found.

(cherry picked from commit 489de0b2fb)
2024-12-02 17:50:24 +01:00
Jan Čermák
66405f102a Linux: Update kernel to 6.6.63 (#3697)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.63

(cherry picked from commit 22dd060183)
2024-12-02 17:50:21 +01:00
Jan Čermák
9d643edb54 Disable CM5's RTC to make Yellow's on-board RTC the primary one (#3706)
With both RTCs enabled, the rpi_rtc is probed as the first one, making the
on-board RTC unused by default. Since the CM5's RTC peripheral can't be used on
Yellow, as the VBAT pin is not connected, disable it completely to fix RTC.
2024-12-02 17:47:40 +01:00
dependabot[bot]
e0ccf398f2 Bump docker/build-push-action from 6.9.0 to 6.10.0 (#3704)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.9.0 to 6.10.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v6.9.0...v6.10.0)

---
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>
2024-12-02 16:47:20 +01:00
Jan Čermák
c514d6b482 Disable CQE on mmc0 to fix I/O freezes on Yellow+CM5 (#3705)
The I/O operations on the eMMC can sometimes fail and lock up completely, and
disabling CQE on the sdio1 (mmc0) interface seems to solve the issue. While it
is a known (and potentially resolved) issue [1] for SD cards in Raspberry Pi's
Linux fork, it is not acknowledged neither resolved for CM5's eMMC. With CQE
enabled, the device usually locks up within the first 10 first boots, when the
swap file is being created. After disabling CQE, no error occurred after more
that 100 cold boots (every time with swap file removed).

[1] https://github.com/raspberrypi/linuxissues/6349
2024-12-02 16:45:35 +01:00
Jan Čermák
489de0b2fb Reduce time of mmc0 interface random hangs on Yellow+CM5 boot (#3700)
For yet unknown root cause, the eMMC interface sometimes fails to initialize
properly, delaying boot for up to 130 seconds. This can be reduced by ~100s by
disabling SD and SDIO modes on the sdio1 interface used for mmc0 before a
better patch is found.
2024-12-02 15:19:38 +01:00
Jan Čermák
22dd060183 Linux: Update kernel to 6.6.63 (#3697)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.63
2024-11-25 17:49:13 +01:00
Jan Čermák
91532037bb Bump OS to pre-release version 14.0.rc2 2024-11-22 14:25:55 +01:00
Jan Čermák
55bbddad4f Enable Cypress M8 USB serial driver for all targets (#3693)
Build cypress_m8 driver as module for all targets - some of them had it in
their base defconfig while some not. It is required e.g. for UPB PIM (Powerline
Interface Module).

Fixes #3690

(cherry picked from commit d57e507764)
2024-11-22 14:25:36 +01:00
Jan Čermák
444f65ca94 Sync Yellow's DTS with plain CM5 device tree (#3688)
Sync the DTS with changes added in newer commits merged after the initial
Yellow/CM5 DTS was written. The sdio1 node now has HS400 mode enabled and
sd_io_1v8_reg has been changed to regulator-fixed.

(cherry picked from commit b288cd212a)
2024-11-22 14:25:33 +01:00
Jan Čermák
74af855056 Always use NVMe datadisk on Yellow if it's present on first boot (#3686)
If HAOS on Yellow is booted for the first time with NVMe data disk present, it
should be preferred over the empty eMMC data partition. This will ease
reinstall of the system and migration from CM4 to CM5. All other data disks
(e.g. if a USB drive is used for them) are still treated as before, requiring
manual adoption using the Supervisor repair.

(cherry picked from commit 98ac7f0170)
2024-11-22 14:25:29 +01:00
@RubenKelevra
1291848041 Disable UAS via usb-storage.quirks on RPi for JMicron JMS583
Vendor ID: 152d
Product ID: a583

fixes #3674

(cherry picked from commit a042dc01d2)
2024-11-22 14:25:25 +01:00
Jan Čermák
d57e507764 Enable Cypress M8 USB serial driver for all targets (#3693)
Build cypress_m8 driver as module for all targets - some of them had it in
their base defconfig while some not. It is required e.g. for UPB PIM (Powerline
Interface Module).

Fixes #3690
2024-11-22 13:56:49 +01:00
Jan Čermák
b288cd212a Sync Yellow's DTS with plain CM5 device tree (#3688)
Sync the DTS with changes added in newer commits merged after the initial
Yellow/CM5 DTS was written. The sdio1 node now has HS400 mode enabled and
sd_io_1v8_reg has been changed to regulator-fixed.
2024-11-21 19:42:58 +01:00
Jan Čermák
98ac7f0170 Always use NVMe datadisk on Yellow if it's present on first boot (#3686)
If HAOS on Yellow is booted for the first time with NVMe data disk present, it
should be preferred over the empty eMMC data partition. This will ease
reinstall of the system and migration from CM4 to CM5. All other data disks
(e.g. if a USB drive is used for them) are still treated as before, requiring
manual adoption using the Supervisor repair.
2024-11-21 19:42:26 +01:00
@RubenKelevra
a042dc01d2 Disable UAS via usb-storage.quirks on RPi for JMicron JMS583
Vendor ID: 152d
Product ID: a583

fixes #3674
2024-11-21 19:07:41 +01:00
Jan Čermák
af833dbc9f Bump OS to development version 14.1.dev0 2024-11-19 16:06:02 +01:00
Jan Čermák
885f0a82ab Bump OS to pre-release version 14.0.rc1 2024-11-19 12:02:56 +01:00
Jan Čermák
eec6dfb28d Add Hailo-8 firmware for Raspberry Pi AI Kit/HAT on RPi 5 (#3680)
Add Hailo-8 firmware binary for Rasperry Pi AI accelerators. The version needs
to be determined from the Git history of the kernel sources, as the driver
source code is included in the RPi downstream kernel and the version string
can't be found in the code directly.

Fixes #3663
2024-11-18 19:01:25 +01:00
Stefan Agner
f169f78bb0 Add Kconfig option for Supervisor channel (#3618)
* Add Makefile variable for Supervisor channel

Allow to set the release channel pre-installed Home Assistant components
like Supervisor and add-on are fetched from. This channel is then also
used at runtime.

* Use choice instead of string variable

* Fix channel in Supervisor updater.json config

* Add newlines
2024-11-18 14:39:46 +01:00
Jan Čermák
71e580175e Linux: Update kernel to 6.6.62 (#3679)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.61
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.62
2024-11-18 14:09:42 +01:00
Jan Čermák
78cdaab597 Merge Yellow's RAUC post-install hook with the install hook (#3678)
As stated in the docs [1], post-install hook is not executed if the slot
already has an install hook defined. Merge the post-install hook with the
install hook to fix CM5 migration for Yellow.

[1] https://rauc.readthedocs.io/en/latest/using.html#slot-hooks
2024-11-18 12:51:58 +01:00
Jan Čermák
b9e66fbfd0 Remove unnecessary kernel post-install hook for GRUB-based targets (#3672)
The code for this hook was removed in #3457 but it wasn't removed from the
manifest. Remove it to avoid unnecessary execution of the hook.
2024-11-14 16:07:16 +01:00
Jan Čermák
9dfbdd9d12 Fix Yellow's post-install hook for config.txt migration (#3671)
The hook was missing in the manifest, enable it conditionally for Yellow and
add reminder to remove it once it's not needed.
2024-11-14 09:44:12 +01:00
Anton Starikov
b28dd8c4c4 Add iwlwifi-gl firmware needed for Intel BE200 Wi-Fi 7 card (#3668)
Add iwlwifi-gl firmware, which is required for Intel BE200 card. Targets are
generic_aarch64, generic_x86_64 and ova.

* buildroot 19027bc796...1d7407c66b (1):
  > package/linux-firmware: add iwlwifi gl firmware

Closes #3643.
2024-11-14 09:23:34 +01:00
Jan Čermák
23039ceea7 Reduce timeout for network time synchronization to 15 seconds (#3669)
The timeout of 90s was introduced before it was ensured that the timesync
systemd unit starts after network is online. Now with that, it makes less sense
to wait that long - if network is unreachable at the point the time
synchronization starts, and the server fails to reply on the first sync, the
polling interval is exponentially increased and the benefit of waiting for more
attempts is doubtful.

Since another synchronization attempt is done after network changes its state,
we should rely on that instead of having the 90 seconds interval as a waiting
period for plugging the network cable. Worst case, there are other mechanisms
that should set the time to a reasonably accurate value, making the NTP sync
less importart for most of the cases.
2024-11-13 17:14:54 +01:00
Jan Čermák
180c9ada3f Add initial support for Raspberry Pi CM5 on Yellow (#3667)
* Move RPi U-Boot patches to version-specific directory

We will need to use different series for 2024.10 which would be used as the
base for CM5 support.

* Remove common.h include from the fileenv cmd

It doesn't seem to be used and common.h has been removed in newer U-Boot.

* Use U-Boot 2024.10 with BCM2712 PCIe patches for Yellow

Use rebased patchset from v2024.01 with the first patch removed. Add patches
needed for PCIe initialization and use rpi_arm64_defconfig as the base config
for both CM4 and CM5.

* Add device tree for CM5 on HA Yellow and adjust config

Add device tree definition based on the CM5 device tree with BCM2712D0 changes
applied, and add nodes required for the on-board peripherals of Yellow.

Currently the difference in serial numbering still requires either changes in
this device tree, or userspace changes to create correct symlinks to make HA
configuration directly compatible with CM4 on Yellow.

* Add config.txt migration for conditional device_tree options

* Fix typos and minor issues found by CodeRabbit
2024-11-12 14:34:54 +01:00
Jan Čermák
6047770d7f Linux: Update kernel to 6.6.60 (#3666)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.60
2024-11-11 17:06:51 +01:00
Jan Čermák
0dc9c65d3c Fall back to max eMMC clock to fix Kingston eMMC compat with ODROID-N2 (#3665) 2024-11-09 19:04:02 +01:00
Jan Čermák
f612d42fb3 RaspberryPi: Update kernel to 6.6.51 - stable_20241008 (#3662)
* RaspberryPi: Update kernel to 6.6.51 - stable_20241008

* Update rpi-firmware to version for kernel 6.6.51

* buildroot 2ffac68a74...19027bc796 (1):
  > package/rpi-firmware: bump to version 1.20241008 for kernel 6.6.51
2024-11-05 16:02:58 +01:00
Jan Čermák
c9e2b50406 Bump Buildroot to 2024.02.7 (#3659)
* buildroot d59d09ad38...2ffac68a74 (1):
  > Merge tag '2024.02.7' into 2024.02.x-haos
2024-11-05 08:07:31 +01:00
Jan Čermák
7edde96735 Linux: Update kernel to 6.6.59 (#3657)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.58
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.59
2024-11-05 08:07:19 +01:00
xtsrthm
59851f7a51 Add support for external i2c devices (#3642)
This commit adds support for usb to i2c adapters, the i2c chardev and the bme280  famaily environment sensors
2024-11-05 08:06:52 +01:00
dependabot[bot]
8fd7f26d74 Bump mikepenz/action-junit-report from 4 to 5 (#3658)
Bumps [mikepenz/action-junit-report](https://github.com/mikepenz/action-junit-report) from 4 to 5.
- [Release notes](https://github.com/mikepenz/action-junit-report/releases)
- [Commits](https://github.com/mikepenz/action-junit-report/compare/v4...v5)

---
updated-dependencies:
- dependency-name: mikepenz/action-junit-report
  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>
2024-11-04 14:48:00 +01:00
Stefan Agner
a2ff594a75 Add kernel options required for Atheros 12k wirelss adapters (#3640)
Add support for interrupt remapping for IO-APIC and MSI devices as
required by some ath12k devices.

Fixes: #3621
2024-10-21 21:19:40 +01:00
Stefan Agner
f459a1174d Linux: Update kernel to 6.6.57 (#3639) 2024-10-21 21:19:33 +01:00
Jan Čermák
a5cdc318d4 Bump OS to development version 14.0.dev0 2024-10-15 14:36:49 +02:00
Jan Čermák
9e00205ceb Merge branch 'main' into dev 2024-10-15 14:36:21 +02:00
Jan Čermák
3f161bc7d1 Bump OS to release version 13.2 2024-10-15 13:23:17 +02:00
Jan Čermák
bb0086addf Linux: Update kernel to 6.6.56 (#3622)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.55
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.56
2024-10-14 16:44:37 +02:00
Jan Čermák
1bd9245219 Bump OS to pre-release version 13.2.rc2 2024-10-14 15:58:11 +02:00
Jan Čermák
fb7a9c4196 Linux: Update kernel to 6.6.54 (#3614)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.54

(cherry picked from commit 1b6b40ebe7)
2024-10-14 15:54:52 +02:00
dependabot[bot]
8f69cd7fd1 Bump docker/setup-buildx-action from 3.6.1 to 3.7.1 (#3613)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
(cherry picked from commit 998d0e37fe)
2024-10-14 15:54:49 +02:00
Jan Čermák
67ddfe2563 Linux: Update kernel to 6.6.53 (#3605)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.53

(cherry picked from commit a4a3912b21)
2024-10-14 15:54:44 +02:00
Darren Griffin
ce8b777d74 Add OHF logo to README (#3603)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
(cherry picked from commit 5d58a25b62)
2024-10-14 15:54:34 +02:00
dependabot[bot]
82f36004f5 Bump docker/build-push-action from 6.7.0 to 6.9.0 (#3604)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
(cherry picked from commit cf546d6f76)
2024-10-14 15:54:29 +02:00
Jan Čermák
1b6b40ebe7 Linux: Update kernel to 6.6.54 (#3614)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.54
2024-10-07 18:22:53 +02:00
dependabot[bot]
998d0e37fe Bump docker/setup-buildx-action from 3.6.1 to 3.7.1 (#3613)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-07 15:47:43 +02:00
Jan Čermák
a4a3912b21 Linux: Update kernel to 6.6.53 (#3605)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.53
2024-10-01 17:34:04 +02:00
Darren Griffin
5d58a25b62 Add OHF logo to README (#3603)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2024-09-30 18:47:33 +02:00
dependabot[bot]
cf546d6f76 Bump docker/build-push-action from 6.7.0 to 6.9.0 (#3604)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-30 15:57:27 +02:00
Jan Čermák
62a30ac509 Bump OS to pre-release version 13.2.rc1 2024-09-26 17:03:13 +02:00
Jan Čermák
ba73a8c3d7 Use GRUB2 legacy loader for Macbook Air A1370 (#3593)
Fix loading issues on this Intel-based platform as well. As described in the
patch commit message, there will be likely bigger collateral effect by
referring just to the CPU ID but it shouldn't have major detrimental effects.

[1] https://github.com/home-assistant/operating-system/issues/3305#issuecomment-2360633688
2024-09-25 17:13:33 +02:00
Jan Čermák
0fdf920b89 Fix guest-agent not starting with HyperV Enlightenments enabled (#3592)
Guest agent doesn't start because if HyperV Enlightenments are enabled, the
virtualization gets detected incorrectly. Backport Systemd patch that fixes the
detection, allowing the guest-agent service to meet its dependencies.

This patch should be no longer needed after update of Systemd to v256, or in
case the patch gets eventually backported to the v254 stable branch.

Fixes #3565
2024-09-25 17:13:22 +02:00
Jan Čermák
f27c429be2 Linux: Update kernel to 6.6.52 (#3591)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.52
2024-09-23 23:23:07 +02:00
Viacheslav Bocharov
e4d00de474 Update buildroot to 2024.02.x-haos in .gitmodules (#3589) 2024-09-17 15:07:28 +02:00
Jan Čermák
65789af595 Linux: Update kernel to 6.6.51 (#3587)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.51
2024-09-12 17:49:17 +02:00
Jan Čermák
39b1c6de4e Bump Buildroot to 2024.02.6 (#3586)
* buildroot c68e03d96b...d59d09ad38 (2):
  > package/procps-ng: fix build with BR2_PACKAGE_SYSTEMD enable
  > Merge tag '2024.02.6' into 2024.02.x-haos
2024-09-12 15:49:27 +02:00
Jan Čermák
2916a1c247 Relocate HAOS Systemd drop-ins to /usr/lib/systemd (#3582)
* Relocate HAOS Systemd drop-ins to /usr/lib/systemd

With some exceptions, Systemd drop-ins overriding default unit configuration
have been placed to `/etc/systemd/system`. This is meant for user overrides of
those, or per `man 5 systemd.unit` for "system unites created by the
administrator". Relocate all of these to `/usr/lib/systemd` which should be
used as path for units "installed by the distribution package manager" which is
closer to what we're trying to achieve.

This will make it easier to detect changes to unit files once we enable the
possibility to edit the content of /etc.

* Patch systemd-timesyncd.service instead of replacing it fully
2024-09-12 12:47:22 +02:00
Jan Čermák
2e6b38a0e1 Enable debug logging for GRUB rescue shell options (#3581)
If the system fails to boot, some kernel messages may not be shown before the
system fully boots. Enable the debug option for rescue shell options to have an
easy way to see those without modifying GRUB options. This will increase log
verbosity and turn on debug logging for Systemd as well [1].

[1] https://www.freedesktop.org/software/systemd/man/latest/systemd.html#debug
2024-09-11 23:30:15 +02:00
Jan Čermák
5d164b12d1 Add test for no failed Systemd units (#3583)
Test that systemctl reports no failed units at the end of the basic test.
2024-09-11 23:30:01 +02:00
Jan Čermák
e3bbe2003f Tests: update labgrid to v24.0.1 (#3584)
Bump labgrid to latest release. None of the changes require adjustments in the
tests. Remove pytest from requirements.txt, it's not needed anymore, so let pip
to resolve the correct (latest) version from labgrid's dependencies. With these
new dependencies, previous DeprecationWarnings on Python 3.12 are gone now.
2024-09-11 23:29:48 +02:00
Jan Čermák
93ac046349 Linux: Update kernel to 6.6.50 (#3580)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.50
2024-09-09 18:11:34 +02:00
Jan Čermák
d615f8c71e Linux: Update kernel to 6.6.49 (#3577)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.49
2024-09-05 00:33:38 +02:00
Jan Čermák
3977f1f039 Bump Docker to v27.2.0 (#3576)
* Update Docker to v27.2.0

Update Docker and containerd to latest supported version.

* buildroot a2c10a16a0...c68e03d96b (3):
  > package/containerd: bump version to v1.7.21
  > package/docker-cli: bump version to v27.2.0
  > package/docker-engine: bump version to v27.2.0

* package/hassio: update DinD container to v27.2
2024-09-03 15:42:43 +02:00
Jan Čermák
d9e46d6dbb Purge Cloudflare cache for all files after uploading R2 artifacts (#3568)
If an attempt to access R2 artifacts is made before the files exist, the 404
reply gets cached and it's not possible to access the file after it's been
created without purging the cache, essentially doing a cache poisoning for
future build artifacts. To avoid it, list all files that have been created by
the build and call the purge cache API.

As there's a limit for number of files that can be purged in a single API call
[1], the GNU split utility is used to split intermediary list of files to
chunks of 30 URLs, which is then converted to a JSON array and passed to the
curl command.

[1] https://developers.cloudflare.com/api/operations/zone-purge#purge-cached-content-by-url
2024-09-02 10:38:04 +02:00
Jan Čermák
b23b54bed0 Linux: Update kernel to 6.6.48 (#3570)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.48
2024-09-02 10:37:48 +02:00
Jan Čermák
5eb7ccb761 Use GRUB legacy loader for HP t520 to fix boot with GRUB 2.12 (#3562)
HP t520 have been reported to have the same issues as Atom boards with bad UEFI
firmware that doesn't work well with the new EFI loader used since GRUB 2.12.
Apply the patch to use legacy loader for its CPU ID as well.

Fixes #3557
2024-08-26 14:34:06 +02:00
Jan Čermák
c6d4e2788e Fix missing Intel AX210 firmware files, remove unused firmwares (#3556)
Fix AX210 firmware files, this time for real. In #3549 we still had only
ucode and pnvm files for AX211, AX210 was still missing the pnvm file,
because its ucode was provided through IWLWIFI_22000 without appropriate
pnvm file. Both AX210 and AX211 firmwares are now installed with
IWLWIFI_6E which includes both pnvm and ucode files.

Also some firmwares which are not used by the current kernel can be
removed, because the kernel always only loads the most recent one.

* buildroot 01188d9c38...a2c10a16a0 (2):
  > Revert "package/linux-firmware: exclude some files from compression"
  > package/linux-firmware: fix AX210 support, stick to latest supported ucode API, reorganize the split

Fixes #3477
2024-08-23 15:56:41 +02:00
Jan Čermák
14ca2ac75e Bump Buildroot to 2024.02.5 (#3550)
* buildroot 55be56d521...01188d9c38 (1):
  > Merge tag '2024.02.5' into 2024.02.x-haos
2024-08-21 17:35:30 +02:00
Jan Čermák
4fb27c2ca8 Linux: Update kernel to 6.6.47 (#3541)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.47
2024-08-21 17:34:55 +02:00
Jan Čermák
c7018054b4 Bump OS to development version 13.2.dev0 2024-08-21 17:33:16 +02:00
Jan Čermák
7f9116b7f8 Merge branch 'main' into dev 2024-08-21 17:32:55 +02:00
Jan Čermák
e97b1231dc Bump OS to release version 13.1 2024-08-21 15:29:36 +02:00
Jan Čermák
1a7dc0ca1f Fix iwlwifi driver failing to find .pnvm files for Intel 6E (AX210) (#3549)
Since updating to Buildroot 2024.02, the iwlwifi loads a different version of
firmware for Intel AX cards (reported on AX210) which also needs the pnvm file.
However, unlike firmwares, the load method is different and the driver can't
load a compressed file. Disable compression for all .pnvm files to fix this.

* buildroot baa16784d2...55be56d521 (1):
  > package/linux-firmware: exclude some files from compression

Fixes #3477

(cherry picked from commit d3a43a4ca4)
2024-08-21 15:28:47 +02:00
Jan Čermák
d3a43a4ca4 Fix iwlwifi driver failing to find .pnvm files for Intel 6E (AX210) (#3549)
Since updating to Buildroot 2024.02, the iwlwifi loads a different version of
firmware for Intel AX cards (reported on AX210) which also needs the pnvm file.
However, unlike firmwares, the load method is different and the driver can't
load a compressed file. Disable compression for all .pnvm files to fix this.

* buildroot baa16784d2...55be56d521 (1):
  > package/linux-firmware: exclude some files from compression

Fixes #3477
2024-08-21 11:14:15 +02:00
dependabot[bot]
3c2f014acb Bump docker/build-push-action from 6.6.1 to 6.7.0 (#3542)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.6.1 to 6.7.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v6.6.1...v6.7.0)

---
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>
2024-08-20 16:36:37 +02:00
Jan Čermák
1b6cfbf940 Bump OS to pre-release version 13.1.rc1 2024-08-16 13:10:22 +02:00
Jan Čermák
cdee2c5838 Add LED indication for button handling in Yellow's U-Boot (#3536)
With #3523 as inspiration, it might be useful to wait for buttons to be
released, e.g. in case when they become stuck. Also indicate the button
operation (wipe, boot files removal, UMS) has been handled by turning on the
yellow LED.
2024-08-16 13:04:07 +02:00
Jan Čermák
7e7612ffeb Implement device wipe using the hardware button on Green (#3523)
* Improve LED naming in U-Boot DTS

Port Stefan's patch from Linux patchset to U-Boot.

* Implement device wipe using the hardware button on Green

Unlike Yellow, Green doesn't have a way to easily wipe the device, e.g. if the
user forgets the password - in that case the only option is to use a microSD
card and reflash the system. Fortunately, Green has a hardware button wired to
the PMIC chip which exposes the button state in one of the registers. Read this
value in U-Boot and decide if cmdline flag for device wipe should be set - same
as we do on Yellow.

Also enable LED driver and command in U-Boot. In the current implementation, if
the button is held for ~5 seconds when plugging in the device (this time
includes DDR training, SPL, etc.), the yellow LED turns solid to indicate wipe
is about the start. When the Linux kernel starts, the kernel LED driver takes
over and starts blinking in heartbeat pattern. Because it takes a while to load
the kernel, the LED stays solid for 2-3 seconds, which should be enough to
recognize it was acknowledged.

* Wait for button to be released before wiping
2024-08-16 09:35:21 +02:00
Jan Čermák
832b70bab1 Linux: Update kernel to 6.6.46 (#3529)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.46
2024-08-14 17:38:00 +02:00
lamauny
0c08acd2c3 Enable NTFS and exFAT drivers for all targets (#3516)
Enable NTFS and exFAT drivers, as they're not in defconfigs of all platforms and may be useful when mounting removable drives. 

Fixes #2723

Co-authored-by: Jan Čermák <sairon@users.noreply.github.com>
2024-08-14 17:03:59 +02:00
Jan Čermák
1467cc5f64 Enable 1.5MBd serial console on Green for new installs (#3527)
With default console on HDMI (tty0), we lost the console on the serial port. It
may be useful for debugging, let's enable it for new installs with the same
speed as bootloader (to avoid the need for baud rate switching).
2024-08-14 17:00:15 +02:00
Jan Čermák
d44d93e4a1 Fix CPU ID for D2xxx/N2xxx in GRUB2 loader patch (#3526)
Report from @ChernyaevAN in [1] revealed it's 13829424153406670433 in decimal,
which means the endianness was wrong for the CPUs I didn't have available for
testing.

[1] https://github.com/home-assistant/operating-system/issues/3305#issuecomment-2288609199
2024-08-14 17:00:03 +02:00
Jan Čermák
2fb1663a35 Bump OS to development version 13.1.dev0 2024-08-13 15:51:13 +02:00
Jan Čermák
a7617340e9 Merge branch 'main' into dev 2024-08-13 15:50:52 +02:00
Jan Čermák
77e2b92972 Bump OS to release version 13.0 2024-08-13 11:14:31 +02:00
dependabot[bot]
fd31ce14ea Bump docker/build-push-action from 6.5.0 to 6.6.1 (#3519)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.5.0 to 6.6.1.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v6.5.0...v6.6.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>
2024-08-12 19:51:32 +02:00
Jan Čermák
598e06de5d Linux: Update kernel to 6.6.45 (#3518)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.45
2024-08-12 19:23:18 +02:00
Jan Čermák
d83602c6d3 Bump OS to pre-release version 13.0.rc2 2024-08-08 18:42:56 +02:00
Jan Čermák
55b3446bd9 Enable eMMC HS200 mode in Green's U-Boot defconfig (#3511)
Follow-up to #3412. While we haven't seen any issues so far, it's mentioned in
the original patch series we took inspiration from that HS200 works more
reliably, so enable it in Green's defconfig by amending the patch.

(cherry picked from commit 0452965fb0)
2024-08-08 18:42:35 +02:00
Jan Čermák
f292ba02e2 Fix writing U-Boot environment on ODROID-M1 (#3510)
Apply the same patch we applied in #3412 for Green. At that time I thought the
patch was already applied upstream for M1 and haven't checked, but it turns out
it wasn't true. Apply it here before we get U-Boot with that patch series [1]
included.

[1] https://patchwork.ozlabs.org/project/uboot/cover/20240204205312.2342868-1-jonas@kwiboo.se/

(cherry picked from commit d6fa83a0d3)
2024-08-08 18:42:32 +02:00
Jan Čermák
42baa80900 Increase block size of kernel squashfs image to 128K (#3509)
While mksquashfs uses this value by default, Genimage's default is 4K. This is
far too low value and results in slower kernel load, especially on embedded
boards with a flash drive. Explicitly set it to 128K to generate same images as
in pre-genimage builds.

(cherry picked from commit edba18f6c4)
2024-08-08 18:42:29 +02:00
Jan Čermák
ba86720163 Bump ODROID N2's U-Boot to v2024.01 again (#3508)
We previously reverted the bump because we were unsure where the eMMC issues
are coming from. Now we know some of them were caused by incompatible eMMCs
then never worked from the beggining, and attempt to fix them (by changing the
frequency) caused some other side effects. Bump U-Boot back to the version used
generally and continue from there.

(cherry picked from commit 50a0062ee6)
2024-08-08 18:42:23 +02:00
Jan Čermák
0452965fb0 Enable eMMC HS200 mode in Green's U-Boot defconfig (#3511)
Follow-up to #3412. While we haven't seen any issues so far, it's mentioned in
the original patch series we took inspiration from that HS200 works more
reliably, so enable it in Green's defconfig by amending the patch.
2024-08-08 18:40:20 +02:00
Jan Čermák
d6fa83a0d3 Fix writing U-Boot environment on ODROID-M1 (#3510)
Apply the same patch we applied in #3412 for Green. At that time I thought the
patch was already applied upstream for M1 and haven't checked, but it turns out
it wasn't true. Apply it here before we get U-Boot with that patch series [1]
included.

[1] https://patchwork.ozlabs.org/project/uboot/cover/20240204205312.2342868-1-jonas@kwiboo.se/
2024-08-08 18:40:09 +02:00
Jan Čermák
edba18f6c4 Increase block size of kernel squashfs image to 128K (#3509)
While mksquashfs uses this value by default, Genimage's default is 4K. This is
far too low value and results in slower kernel load, especially on embedded
boards with a flash drive. Explicitly set it to 128K to generate same images as
in pre-genimage builds.
2024-08-07 20:14:13 +02:00
Jan Čermák
50a0062ee6 Bump ODROID N2's U-Boot to v2024.01 again (#3508)
We previously reverted the bump because we were unsure where the eMMC issues
are coming from. Now we know some of them were caused by incompatible eMMCs
then never worked from the beggining, and attempt to fix them (by changing the
frequency) caused some other side effects. Bump U-Boot back to the version used
generally and continue from there.
2024-08-07 20:14:06 +02:00
Franz Josef Kaiser
26c383484e Explains UMS Utility image (#3507) 2024-08-07 16:43:41 +02:00
Jan Čermák
d8baa98ae2 Add documentation and dependencies category to release-drafter config (#3506)
* add Documentation category
* add Dependencies (to easily filter them out if not needed in changelog)
* adjust the order a bit to have user-facing changes first
2024-08-07 15:06:46 +02:00
Jan Čermák
ccca13d3ca Drop "default kernel tree" line from docs (#3505)
The following table is self-explanatory and unlike this, is kept up-to-date
automatically.
2024-08-06 17:18:10 +02:00
Jan Čermák
7a19b892a5 Bump OS to pre-release version 13.0.rc1 2024-08-06 14:45:45 +02:00
Jan Čermák
66fc7d7e2a Test landing page is reachable without internet connection (#3499)
* Test landing page is reachable without internet connection

Add test that checks user is able to access the landing page even when HAOS has
no internet connection. We still need some sort of outgoing connectivity, so
outgoing connection attempts don't end up with "network is unreachable". To
simulate this, restricted network is created for the QEMU instance used in the
test, and when everything is started, unresponsive default gateway is added.

This intents to test regression that was fixed by
home-assistant/supervisor#5204, Supervisor 2024.7.0+ is thus needed for this
test to pass.

* Bump requirements for tests
2024-08-06 11:02:59 +02:00
dependabot[bot]
9cc45f65ea Bump docker/setup-buildx-action from 3.6.0 to 3.6.1 (#3501)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-05 15:33:44 +02:00
Jan Čermák
c2527a2ae1 Linux: Update kernel to 6.6.44 (#3500)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.44
2024-08-05 14:04:32 +02:00
Jan Čermák
a32974e1a7 Use GRUB2 legacy loader only on some Intel Atom boards specifically (#3498)
* Use GRUB2 legacy loader only on some Intel Atom boards specifically

Previous revert of GRUB2 change that introduced usage of the generic EFI loader
for all x86 boards in #3324 caused regressions, the one confirmed is #3348.
This commit adds a specific patch that identifies the broken platforms based
on SMBIOS data gathered in #3305 and falls back to the legacy loader there.

Tested on Intel D525MW (falls back) and QEMU (no fallback).

* Enable GRUB's smbios module

Having smbios command in GRUB can help in future debugging, e.g. to add more
CPUs that should use the linux loader fallback.
2024-07-31 09:22:07 +02:00
Jan Čermák
d51a0d3cec Patch genimage to force first usable LBA @ 34 to fix RPi 5/Windows issues (#3497)
Genimage sets the first usable LBA to the offset of the first partition. While
it shouldn't be an issue in theory, Windows may do some nasty things with the
GPT header afterwards which breaks the Raspberry Pi bootloader, manifesting as

Before purpose of this behavior is clarified in [1], add a downstream patch
that sets the first usable LBA back to 34, which was the value that was used
before migrating to Genimage in #3388. Since changing this value (hopefully)
doesn't have any other consequences, and the images now should be closer to
pre-genimage builds, no more side-effects are expected from this change.

[1] https://www.github.com/pengutronix/genimage/issues/262

Fixes #3437
2024-07-30 18:57:37 +02:00
dependabot[bot]
13c4bb56c0 Bump docker/setup-buildx-action from 3.5.0 to 3.6.0 (#3496)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-29 16:39:08 +02:00
Jan Čermák
327e9a07c9 Linux: Update kernel to 6.6.43 (#3495)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.42
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.43
2024-07-29 14:06:21 +02:00
Jan Čermák
568499072f Allow EROFS compression for Rockchip kernels (#3493)
Rockchip config fragment had EROFS compression explicitly disabled. Remove that
option and also remove the EROFS one, as it's already set in common config.
2024-07-25 21:51:36 +02:00
Stefan Agner
bc7c109163 Enable Netfilter MARK match kernel configuration (#3492)
Make the Netfitler MARK match kernel config a OS required configuration.
This config is required by the OpenThread Border Router add-on.

Fixes: https://github.com/home-assistant/addons/issues/3698
2024-07-24 16:40:37 +02:00
Jan Čermák
b0bc71a835 Reduce log spam from Docker health checks (#3491)
Reduce verbosity from deactivated Docker mounts, triggered by the Docker
healthcheck. These messages do not carry any value for us and logs supplied by
users are often spammed mostly with these. Moreover, they sometimes cause
confusion that something is wrong, see for example #3021.

Unfortunately, it's not possible to use LogFilterPatterns= here, because it's
not applied to these messages, as explicitly said in the docs:

  Filtering is based on the unit for which LogFilterPatterns= is defined
  meaning log messages coming from systemd(1) about the unit are not taken
  into account.

runc 1.2.0 supposedly should fix this, but it's unclear when it would be
available, so let's stick to this solution (reducing verbosity from debug to
notice for all units `run-docker-*.mount`) for the time being.
2024-07-24 16:34:37 +02:00
Jan Čermák
a80311a285 Use EROFS for the root filesystem (#3456)
* Use name.sh functions for paths in genimage

Paths for images generated outside of genimage were not used in genimage
definitions. Use them as the single source of truth.

Images generated by genimage itself (e.g. kernel.img) don't need to use those
functions, so remove the unused ones.

* Use EROFS instead of SquashFS for root FS

* Enabled EROFS in common kernel fragment
* RootFS image switched to EROFS with options to get decent compression
* rootfstype removed from kernel command line

* Get size of correct FS image in GH build summary
2024-07-24 16:34:26 +02:00
Jan Čermák
6de9da2560 Bump buildroot to 2024.02.4 (#3487)
* buildroot d03dda4fcf...baa16784d2 (5):
  > Merge tag '2024.02.4' into 2024.02.x-haos
  > fs/erofs: add config options for dedupe, fragments and ztailpacking
  > fs/erofs: add LZMA compression, allow configurable compression level
  > package/erofs-utils: add config option for LZMA compression
  > package/erofs-utils: bump to 1.7.1
2024-07-23 13:50:56 +02:00
dependabot[bot]
5d5bc36892 Bump docker/login-action from 3.2.0 to 3.3.0 (#3484)
Bumps [docker/login-action](https://github.com/docker/login-action) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v3.2.0...v3.3.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>
2024-07-22 17:30:38 +02:00
dependabot[bot]
77a28bd1df Bump docker/build-push-action from 6.4.0 to 6.5.0 (#3486)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.4.0 to 6.5.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v6.4.0...v6.5.0)

---
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>
2024-07-22 17:29:13 +02:00
dependabot[bot]
038bfd9073 Bump docker/setup-buildx-action from 3.4.0 to 3.5.0 (#3485)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-22 17:11:32 +02:00
Jan Čermák
eb2bdf85e9 Linux: Update kernel to 6.6.41 (#3482)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.39
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.40
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.41
2024-07-22 12:57:35 +02:00
dependabot[bot]
d148ad2b50 Bump docker/build-push-action from 6.3.0 to 6.4.0 (#3475) 2024-07-15 18:27:37 +02:00
Jan Čermák
63a05a5a1e Revert "Revert GRUB2 patch causing boot failure on some old x86_64 BIOSes (#3324)" (#3470) 2024-07-11 00:01:52 +02:00
Jan Čermák
150be514e4 Enable i6300ESB watchdog driver for generic-aarch64 (#3468)
This is one of WDT drivers used by KVM/QEMU. For OVA it's been already enabled
in #2627 - enable it for aarch64 as well.

Fixes #3414
2024-07-10 14:39:08 +02:00
Jan Čermák
45cbd1d9b7 Linux: Update kernel to 6.6.38 (#3469)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.38
2024-07-10 14:38:51 +02:00
Jan Čermák
00171ae44c Enable aQuantia AQtion ethernet driver (#3467)
Enable driver for wide range of multi-gigabit NICs.

Fixes #3438
2024-07-09 13:01:25 +02:00
dependabot[bot]
777432913e Bump docker/setup-buildx-action from 3.3.0 to 3.4.0 (#3465)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-08 15:57:05 +02:00
dependabot[bot]
d57b6be01e Bump docker/build-push-action from 6.2.0 to 6.3.0 (#3466)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-08 15:56:48 +02:00
Jan Čermák
1f8ed07c42 Refer to GRUB instead of Barebox in top-level readme (#3464)
We don't use Barebox for over two years since d1cc7394, remove the forgotten
mention of it in readme.
2024-07-08 12:13:23 +02:00
Jan Čermák
3ef8b07676 Linux: Update kernel to 6.6.37 (#3463)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.37
2024-07-08 12:13:14 +02:00
Jan Čermák
ea286d9dad Populate grubenv with RAUC data in clean aarch64 OS image (#3458)
While not as bad as in 87a6c84, because the grubenv already exists in the
image, RAUC still complains about missing ORDER on the very first boot on
aarch64. Populate the environment in the same way as we do for other GRUB
platforms.
2024-07-08 12:12:58 +02:00
Jan Čermák
4308c45391 Remove old code from rauc-hook and GRUB env initialization (#3457)
With upgrade path enforced in standard HAOS upgrade procedure, we don't need to
keep some old code anymore. This means that upgrade from some very old HAOS
version (pre-8.0) to HAOS 13+ will fail in the install-check hook but this is
rather desirable.
2024-07-08 12:12:45 +02:00
Cyprien Laplace
33d8b538ad Fix rauc hook to save and restore the grub environment (#3451)
Without a machine-id, the next boot will be considered as a
first boot, and any external data disk will be disabled.

Fixes #3247.
2024-07-04 10:14:47 +02:00
Jan Čermák
245c0d0b03 Bump OS to development version 13.0.dev0 2024-07-03 19:38:47 +02:00
dependabot[bot]
c20841ac1e Bump docker/build-push-action from 6.1.0 to 6.2.0 (#3454)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.1.0 to 6.2.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v6.1.0...v6.2.0)

---
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>
2024-07-01 15:51:21 +02:00
Jan Čermák
0555e89ad0 Linux: Update kernel to 6.6.36 (#3448)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.36
2024-06-27 17:53:15 +02:00
Jan Čermák
203885a7d8 Linux: Update kernel to 6.6.35 (#3443)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.35
2024-06-25 16:21:48 +02:00
dependabot[bot]
7298ffc13f Bump docker/build-push-action from 6.0.0 to 6.1.0 (#3444)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-24 15:51:19 +02:00
Jan Čermák
6c7b6fdebe Generate version information for RAUC when rauc.db is empty (#3436)
RAUC currently doesn't know the version of the booted slot when booted for the
first time or after wiping the data partition. As a result `ha os info` is
missing this information too.

As there's no built-in mechanism for generating these data by RAUC itself, add
a oneshot service that checks if the boot slot information is contained in the
rauc.db and if not, then generate it.

RAUC seems to cope quite well even with bogus data contained in rauc.db but in
any case, a test has been added to check that everything works as expected.
2024-06-20 16:50:14 +02:00
Jan Čermák
87a6c84025 Fix boot slot A marked as bad on the very first boot (#3435)
On the very first boot, grubenv doesn't exist and loading and saving it
silently fails. However, it is later created by the hassos-persists script and
the missing information are added by grub.cfg on the next boot. As the
consequence, when RAUC tries to get information from grubenv on the first boot,
ORDER variable is missing and the slot is reported as bad.

Fixes #3376
2024-06-20 12:57:25 +02:00
Jan Čermák
94c6930acd Merge branch 'main' into dev 2024-06-18 15:02:36 +02:00
Jan Čermák
a70ed7e81e Bump OS to release version 12.4 2024-06-18 12:26:14 +02:00
dependabot[bot]
62d7794a6c Bump docker/build-push-action from 5.4.0 to 6.0.0 (#3421)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5.4.0 to 6.0.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v5.4.0...v6.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>
2024-06-17 17:08:08 +02:00
Jan Čermák
8490b3bf70 Linux: Update kernel to 6.6.34 (#3420)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.34
2024-06-17 16:00:58 +02:00
Jan Čermák
abe018d4aa Improve resiliency of skopeo operations in hassio package (#3416)
We still face occasional build errors when fetching from the Docker registry
fails and is not retried with the Skopeo's built-in retry mechanism that was
enabled in #1866. This happens on some network failures, or when premature EOF
is returned when fetching the HTTP data. Seems we're not the only ones having
such issues [1].

To workaround this, add a generic retry shell function that simply retries when
the command ends with a non-zero status, no matter what was the actual cause of
the error.

[1] https://www.github.com/containers/common/issues/654
2024-06-13 15:44:11 +02:00
Jan Čermák
0e9e8ca2a6 Bump OS to pre-release version 12.4.rc1 2024-06-13 13:01:03 +02:00
Jan Čermák
27bc7306ff Linux: Update kernel to 6.6.33 (#3415)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.33
2024-06-13 11:39:02 +02:00
Jan Čermák
6c2d5b5006 Bump Docker to v26.1.4 (#3411)
* buildroot b9520eedc6...ad5e711bc1 (4):
  > package/containerd: bump to v1.7.17
  > package/docker-cli: bump version to v26.1.4
  > package/docker-engine: bump version to v26.1.4
  > .github: remove upstream's PR template discouraging GH usage
2024-06-12 23:04:34 +02:00
Jan Čermák
d847b9803a Add hardware details to bug issue template (#3413)
Very often we have to ask for further details about the hardware that HAOS is
running on. Add a required field that asks for these details - in the end it
should't complicate the form a lot and might result in faster turnaround of
resolving the issues.

Also adjust the question about the upgrade and swap the order (people often
don't care and keep the pre-selected value).
2024-06-12 21:52:48 +02:00
Jan Čermák
89533755bc Fix writing to eMMC in U-Boot on Green (#3412)
When Green starts, there is an error indicating the MMC write failed when
saving the bootstate:

  storing env...

  MMC write: dev # 0, block # 1214464, count 64 ... mmc write failed 0 blocks written: ERROR

This results in the boot count not being updated properly if the boot fails.

Seems to be a known issue for this platform, disabling the DDR52 mode (which is
the same what upstream does for other RK356x boards [1]) fixes the issues and
the bootstate is updated correctly.

[1] https://patchwork.ozlabs.org/project/uboot/patch/20240204205312.2342868-2-jonas@kwiboo.se/
2024-06-12 21:52:36 +02:00
Jan Čermák
6d77355c1c Temporary revert ODROID-N2 U-Boot to 2023.01 to fix eMMC issues (#3409)
As we don't have proper solution for #3319 and #3351 yet, revert to
previous U-Boot which was proven working. This is intended as a
workaround but as there's nothing in the latest U-Boot that will be
really missed on N2, we can stay on the older version for the time
being.

This also means reverting the "40 MHz hack" back to the 24 MHz one.
Since this patch only applies to N2 (meson gx), it can stay along the
common hardkernel uboot patches.
2024-06-11 19:02:40 +02:00
Jan Čermák
26f0b5a9b7 Fix linux-firmware compression after BR 2024.02.3 merge (#3407)
The compression is necessary for successful generic-x86-64 build.

* buildroot 770f939463...b9520eedc6 (1):
  > package/linux-firmware: fix compression after bad merge
2024-06-11 12:49:20 +02:00
Jan Čermák
542f69efa4 Update Buildroot to 2024.02.3 (#3406)
* Bump buildroot to 2024.02.3

* buildroot 691077e577...770f939463 (1):
  > Merge tag '2024.02.3' into 2024.02.x-haos

* package/hassio: update dind to version 26.0 used in current buildroot
2024-06-10 17:14:17 +02:00
dependabot[bot]
ae588b762a Bump docker/build-push-action from 5.3.0 to 5.4.0 (#3405)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-10 15:08:18 +02:00
Jan Čermák
6135ecdcc7 Use Genimage for declarative image layout (#3388)
* Use Genimage for declarative image layout instead of s[fg]disk and dd

* Change partition type to hybrid for M1, M1S and Green

This is what it really is, so just make sure only one "fix" function is
called.

* Change efi BOOT_SYS to gpt

There is no reason to have separate efi and boot sys, since all boards
that use efi also use grub as the loader.

* Change BOOT_SYS to more explanatory PARTITION_TABLE_TYPE

* Add units to DISK_SIZE

* Add forced-primary patch and use it in MBR images

* Avoid disabling SC2155, remove old comments
2024-06-07 13:44:14 +02:00
Jan Čermák
22b63ae779 Set tty0 in cmdline as the default preferred console (#3402)
The preferred console (which is used for printing the systemd boot log)
is the last one specified in the cmdline boot arguments. Make sure it is
always tty0, i.e. the first graphical console.

In some places tty1 was used - change it to tty0 which is commonly used,
and in HAOS points to tty1 anyway.

The only exception is the Yellow, which doesn't have an HDMI port, so
the serial console is used as the preferred one instead.

For ASUS Tinker, use a versioned cmdline.txt file instead of in-place
generating it in the post-build hook.
2024-06-07 12:59:21 +02:00
Jan Čermák
bd7474fc97 RaspberryPi: Update kernel to 6.6.31 - stable_20240529 (#3400)
* RaspberryPi: Update kernel to 6.6.31 - stable_20240529

* Unify Linux patches after RPi update to non-conflicting 6.6.31

* Bump buildroot to update rpi-firmware

* buildroot 9af2384782...691077e577 (1):
  > package/rpi-firmware: bump to version 1.20240529 for kernel 6.6.31
2024-06-04 17:33:51 +02:00
dependabot[bot]
5ed9057728 Bump docker/login-action from 3.1.0 to 3.2.0 (#3399)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-03 15:15:55 +02:00
Jan Čermák
682d59434e Linux: Update kernel to 6.6.32 (#3394)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.32
2024-05-27 15:00:13 +02:00
Jan Čermák
2c725d90f6 Reintroduce IPv6 reachability probe patch for RPi lost after refactoring (#3389)
* Reintroduce IPv6 reachability probe patch for RPi lost after refactoring

In #3384 we moved the patches around, which results in version-specific
patches not applied for RPi linux-custom build. Copy the missing IPv6
reachability probe patch to the RPi patches directory.

* Only copy IPv6 reachability probe patch to top-level linux patches

Instead of copying the patch to RPi directory and renumbering the
patches, only copy it upper level so it's applied for all linux versions
other than 6.6.31.
2024-05-24 09:30:07 +02:00
Jan Čermák
8dbc03cc76 Linux: Update kernel to 6.6.31 (#3384)
* Linux: Update kernel to 6.6.31

* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.31

* Update patch workarounding Z-Wave.me USB issues

Linux commit 480c3abbba36628dab063b9ca218bb28090e5b46 changed code that
is reverted by the patch. Use a version-specific patch directory again
for upstream Linux patches before RPi kernel is updated to 6.6.31+.
2024-05-21 21:27:51 +02:00
Jan Čermák
8aa9869e4f Use U-Boot tarball for all boards (#3361)
ODROID M1, M1S and Green historically used git repo as the source. Now
that we use the same version for all boards, use always use distribution
tarball for consistency and more efficient caching.
2024-05-14 11:23:31 +02:00
Jan Čermák
dd96b5019a Bump buildroot to update openvmtools to 12.3.0 (again) (#3370)
Cherry-picked downstream-only patch lost in Buildroot 2024.02 bump.

* buildroot 34e790c5da...9af2384782 (1):
  > package/openvmtools: bump version to 12.3.0

Fixes #3366
2024-05-14 11:06:37 +02:00
Jan Čermák
229cc7ebbb Merge branch 'main' into dev 2024-05-09 10:18:11 +02:00
Jan Čermák
ca71774e7d Linux: Update kernel to 6.6.30 (#3342)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.30
2024-05-08 21:26:45 +02:00
Jan Čermák
12597f197f Bump OS to release version 12.3 2024-05-06 14:35:19 +02:00
Stefan Agner
2c266c53f1 Enable grep context feature (#3339)
Add context feature to Busybox grep configuration. Context is really useful
when checking host logs directly on the OS shell.
2024-05-01 19:05:01 +02:00
Jan Čermák
d7338e7570 Bump OS to pre-release version 12.3.rc2 2024-04-30 11:58:55 +02:00
Jan Čermák
301bf4a377 RaspberryPi: Update kernel to 6.6.28 - stable_20240423 (#3336)
* RaspberryPi: Update kernel to 6.6.28 - stable_20240423

* Bump buildroot to update rpi-firmware

* buildroot 0a64bfe8f1...e8948ce36e (1):
  > package/rpi-firmware: bump to version 1.20240424 for kernel 6.6.28

(cherry picked from commit 9fa953745a)
2024-04-30 11:57:24 +02:00
Jan Čermák
2ea9eccf79 Fix incorrect mapping of DT overlays on RPi 5 (#3335)
RPi 5 config uses BR2_LINUX_KERNEL_INSTALL_INTREE_OVERLAYS which builds
the device tree overlays from the Linux tree when building the kernel.
The overlays directory also contains overlay_map.dtb which is necessary
to correctly map overlays without RPi version suffix to the
platform-specific ones. Without this, some peripherals may not work
correctly on Pi 5 without any obvious error messages in the kernel log
because an incorrect (Pi 4) overlay is used as the default.

Fixes #3321

* buildroot cc0481f40e...0a64bfe8f1 (1):
  > Install overlay_map.dtb when using in-tree DT overlays

(cherry picked from commit fce19b7846)
2024-04-30 11:56:55 +02:00
Jan Čermák
1a5a2c4e28 Linux: Update kernel to 6.6.29 (#3334)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.29

(cherry picked from commit 65f35c65b2)
2024-04-30 11:56:48 +02:00
Jan Čermák
7a94a2ef71 Enable kernel userspace crypto API interface for all platforms (#3330)
Enable libkcapi in generic kernel config. The bloat is minimal and the
options are enabled on most distributions. These modules are also needed
for Bluetooth Mesh and adding them fixes compatibility with some HCI USB
adapters.

Fixes #3322

(cherry picked from commit 67315f86d4)
2024-04-30 11:56:44 +02:00
Jan Čermák
ddd528b8e7 Enable KVM for running tests in GH Actions (#3329)
It was not possible on free runners previously, but it should be now:
https://github.com/actions/runner-images/discussions/7191#discussioncomment-9018826

(cherry picked from commit 4e44b101f3)
2024-04-30 11:56:33 +02:00
Jan Čermák
9fa953745a RaspberryPi: Update kernel to 6.6.28 - stable_20240423 (#3336)
* RaspberryPi: Update kernel to 6.6.28 - stable_20240423

* Bump buildroot to update rpi-firmware

* buildroot 0a64bfe8f1...e8948ce36e (1):
  > package/rpi-firmware: bump to version 1.20240424 for kernel 6.6.28
2024-04-30 11:55:13 +02:00
Jan Čermák
fce19b7846 Fix incorrect mapping of DT overlays on RPi 5 (#3335)
RPi 5 config uses BR2_LINUX_KERNEL_INSTALL_INTREE_OVERLAYS which builds
the device tree overlays from the Linux tree when building the kernel.
The overlays directory also contains overlay_map.dtb which is necessary
to correctly map overlays without RPi version suffix to the
platform-specific ones. Without this, some peripherals may not work
correctly on Pi 5 without any obvious error messages in the kernel log
because an incorrect (Pi 4) overlay is used as the default.

Fixes #3321

* buildroot cc0481f40e...0a64bfe8f1 (1):
  > Install overlay_map.dtb when using in-tree DT overlays
2024-04-29 15:20:36 +02:00
Jan Čermák
65f35c65b2 Linux: Update kernel to 6.6.29 (#3334)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.29
2024-04-29 15:12:50 +02:00
Jan Čermák
67315f86d4 Enable kernel userspace crypto API interface for all platforms (#3330)
Enable libkcapi in generic kernel config. The bloat is minimal and the
options are enabled on most distributions. These modules are also needed
for Bluetooth Mesh and adding them fixes compatibility with some HCI USB
adapters.

Fixes #3322
2024-04-26 21:27:35 +02:00
Jan Čermák
4e44b101f3 Enable KVM for running tests in GH Actions (#3329)
It was not possible on free runners previously, but it should be now:
https://github.com/actions/runner-images/discussions/7191#discussioncomment-9018826
2024-04-26 15:30:23 +02:00
Jan Čermák
21fd9e64c8 Bump OS to development version 12.4.dev0 2024-04-26 11:59:15 +02:00
Jan Čermák
9dab6908c9 Bump OS to pre-release version 12.3.rc1 2024-04-26 11:24:09 +02:00
Jan Čermák
a277854add Bump buildroot to update BlueZ to 5.75 (#3326)
* buildroot 9a506c0e75...cc0481f40e (1):
  > package/{bluez5_utils, bluez5_utils-headers}: bump to version 5.75
2024-04-25 17:49:30 +02:00
Jan Čermák
8854dd4ddb Bump buildroot to update linux-pam (#3325)
This fixes "Warning: your password will expire in 0 days." message
shown on tty login since Buildroot bump in HAOS 12.2.

* buildroot 9f5750121a...d29893dd98 (1):
  > package/linux-pam: bump to version 1.6.1
2024-04-25 08:33:10 +02:00
Jan Čermák
478538eac0 Revert GRUB2 patch causing boot failure on some old x86_64 BIOSes (#3324)
GRUB 2.12 release contains a change of the loader [1] used for loading
the kernel on x86_64 platform. This change was identified to cause boot
failure on some old Intel Atom boards with the NM10 chipset, and
possibly some others. Revert this patch before we get a more proper fix
for the issue.

[1] https://git.savannah.gnu.org/cgit/grub.git/commit/?id=cfbfae1aef0694b416aa199291cfef7596cdfc20

Fixes #3305
2024-04-25 08:33:01 +02:00
Stefan Agner
e1b11540a1 ODROID-N2/C2/C4: Force 40MHz instead of 24MHz as eMMC clock (#3319)
It seems that forcing 24MHz clocks is problematic for newer 32GB
Kingston based eMMC modules on ODROID-N2(+). Use what downstream
U-Boot is using as f_max, which is 40MHz.

Fixes: #3227
2024-04-24 20:37:14 +02:00
Salim B
82c3e2a859 Update instructions for ODROID M1 Petitboot update (#3317) 2024-04-18 09:02:17 +02:00
Jan Čermák
9272065664 Linux: Update kernel to 6.6.28 (#3316)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.28
2024-04-17 16:23:18 +02:00
Jan Čermák
77c28be3cd Increase maximum length of usb_storage.quirks in RPi kernel params (#3311)
With #3281 we hit the maximum length of the quirks parameter. Since
cmdline.txt changes are not applied on OS update, only new installs of
12.2 are affected, effectively disabling all quirks until this patch
lands in future OS release.

Fixes #3308
2024-04-15 14:27:41 +02:00
Jan Čermák
85d7c23a5f Linux: Update kernel to 6.6.27 (#3310)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.26
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.27
2024-04-15 14:27:28 +02:00
Stefan Agner
4f53947596 Update Raspberry Pi 3 device tree list (#3301)
Make sure all Raspberry Pi devices using the BCM2837 SoC (or the SiP
version RP3A0 of it) are deployed. This especially makes sure that
we only deploy the downstream device trees (named bcm2710*) and deploy
device trees for the CM3 as well as the Zero 2 and Zero 2 W consistently
for 32-bit and 64-bit.
2024-04-12 09:42:05 +02:00
Jan Čermák
dd76a1dda4 Merge branch 'main' into dev 2024-04-11 10:38:30 +02:00
Jan Čermák
c9efdea83b Bump OS to release version 12.2 2024-04-11 10:07:22 +02:00
Jan Čermák
56ae6e1cb7 Remove BT_HS from kernel configs after upstream removal (#3299)
BT_HS has been removed in e7b02296fb400ee64822fbdd81a0718449066333 and
backported to stable branches - remove it from our configs to avoid
warnings.
2024-04-10 15:53:21 +02:00
Jan Čermák
2254260dad Update Raspberry Pi Kernel to v6.6.20 (#3297)
* RaspberryPi: Update kernel to 6.6.20 - 6f16847710cc0502450788b9f12f0a14d3429668

Used version specified in RPi OS release notes [1].

[1] https://downloads.raspberrypi.org/raspios_arm64/release_notes.txt

* Update RPi Buildroot defconfigs for v6.6.y kernel

* Update RPi kernel patches for v6.6.y kernel

* Amended old patches to accomodate for new DTS paths
* Removed 6.6.25 patches -> moved to the common folder
* Added patch to fix Yellow DTS compilation

* Bump buildroot to update rpi-firmware

* buildroot b45d671fe3...9f5750121a (1):
  > package/rpi-firmware: bump to version for (untagged) kernel v6.6.20

* Remove kernel v6.1.y config fragments, as they're not needed anymore
2024-04-10 10:04:35 +02:00
Jan Čermák
3252676fde Bump OS to pre-release version 12.2.rc2 2024-04-08 19:04:20 +02:00
Jan Čermák
5dc234d14f Only run HA CLI interactively if stdout is a terminal (#3292)
* Only run HA CLI interactively if stdout is a terminal

Flags for running HA CLI commands in an interactive shell added in #3238
cause the command to fail if the process is not running in a terminal.
This is needed for example for the fsfreeze hook, otherwise the command
fails, as seen in this trace when the hook is executed:

-----------
+ '[' thaw '=' freeze ]
+ '[' thaw '=' thaw ]
+ echo 'File system thaw requested, thawing Home Assistant'
File system thaw requested, thawing Home Assistant
+ ha backups thaw
the input device is not a TTY
------------

However, for example on Proxmox this message is not logged anywhere and
the hook just fails silently (i.e. it doesn't cause the backup to fail).

Fixes #3251

* Use -i also when not running in a terminal

(cherry picked from commit 78d281fce1)
2024-04-08 19:03:35 +02:00
Jan Čermák
3e970f1e9a Linux: Update kernel to 6.6.25 (#3291)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.25

(cherry picked from commit 7013872665)
2024-04-08 19:02:54 +02:00
Jan Čermák
ea217fe5bd Update Linux patches directory for v6.6.24 (#3289)
This should have been included in #3288.

(cherry picked from commit 974812a8af)
2024-04-08 19:02:44 +02:00
Jan Čermák
bfe9943068 Linux: Update kernel to 6.6.24 (#3288)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.24

(cherry picked from commit e18c6ef4ce)
2024-04-08 19:02:38 +02:00
Stefan Agner
7166a83998 Ignore non-existing CP15 barrier instructions emulation (#3285)
CP15 barrier instruction emulation only exists on arm64 architecture.
Avoid sysctl writing an error to the journal when the setting doesn't
exist by prepending a dash.

(cherry picked from commit 889b561ca1)
2024-04-08 19:02:33 +02:00
Jan Čermák
7a69678505 Use Docker 25 for installing containers in hassio package (#3286)
Bump DinD version used for creating data partition after Docker bump
in #3271.

(cherry picked from commit 90b618b096)
2024-04-08 19:02:28 +02:00
agglrx
0c9deaeebf Disable UAS via usb-storage.quirks on RPi for ADATA SD600Q (#3281)
Booting from a ADATA SD600Q fails when connected to a USB 3.0 port on RPi4. Adding it to the quirks list resolves the issue.

(cherry picked from commit 5ee9cef8c8)
2024-04-08 19:02:22 +02:00
dependabot[bot]
de3f2c6420 Bump docker/setup-buildx-action from 3.2.0 to 3.3.0 (#3293)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v3.2.0...v3.3.0)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-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>
2024-04-08 16:05:29 +02:00
Jan Čermák
78d281fce1 Only run HA CLI interactively if stdout is a terminal (#3292)
* Only run HA CLI interactively if stdout is a terminal

Flags for running HA CLI commands in an interactive shell added in #3238
cause the command to fail if the process is not running in a terminal.
This is needed for example for the fsfreeze hook, otherwise the command
fails, as seen in this trace when the hook is executed:

-----------
+ '[' thaw '=' freeze ]
+ '[' thaw '=' thaw ]
+ echo 'File system thaw requested, thawing Home Assistant'
File system thaw requested, thawing Home Assistant
+ ha backups thaw
the input device is not a TTY
------------

However, for example on Proxmox this message is not logged anywhere and
the hook just fails silently (i.e. it doesn't cause the backup to fail).

Fixes #3251

* Use -i also when not running in a terminal
2024-04-08 15:43:12 +02:00
Jan Čermák
7013872665 Linux: Update kernel to 6.6.25 (#3291)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.25
2024-04-08 12:46:54 +02:00
Jan Čermák
974812a8af Update Linux patches directory for v6.6.24 (#3289)
This should have been included in #3288.
2024-04-04 13:52:28 +02:00
Jan Čermák
e18c6ef4ce Linux: Update kernel to 6.6.24 (#3288)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.24
2024-04-04 12:56:14 +02:00
Stefan Agner
889b561ca1 Ignore non-existing CP15 barrier instructions emulation (#3285)
CP15 barrier instruction emulation only exists on arm64 architecture.
Avoid sysctl writing an error to the journal when the setting doesn't
exist by prepending a dash.
2024-04-04 00:33:45 +02:00
Jan Čermák
90b618b096 Use Docker 25 for installing containers in hassio package (#3286)
Bump DinD version used for creating data partition after Docker bump
in #3271.
2024-04-04 00:33:34 +02:00
agglrx
5ee9cef8c8 Disable UAS via usb-storage.quirks on RPi for ADATA SD600Q (#3281)
Booting from a ADATA SD600Q fails when connected to a USB 3.0 port on RPi4. Adding it to the quirks list resolves the issue.
2024-04-02 10:36:37 +02:00
Jan Čermák
040af8fd9b Bump OS to development version 12.3.dev0 2024-04-02 10:32:23 +02:00
Jan Čermák
94bf84a807 Bump OS to pre-release version 12.2.rc1 2024-03-28 11:13:08 +01:00
Jan Čermák
b564fb3fa7 Bump buildroot to fix dbus tmpfiles warning (#3273)
* buildroot f2472c23a3...b45d671fe3 (1):
  > package/dbus: set runstatedir to /run
2024-03-28 11:09:51 +01:00
Jan Čermák
2d6b731b9a Bump buildroot to add forgotten package/runc patch (#3272)
* buildroot 51c9960ed8...f2472c23a3 (1):
  > package/runc: add support for CGroup device permission updates
2024-03-27 17:33:14 +01:00
Jan Čermák
adbd449494 Bump buildroot to update Docker to v25.0.5 (#3271)
* buildroot 1c84a7493b...51c9960ed8 (2):
  > package/docker-engine: bump version to v25.0.5
  > package/docker-cli: bump version to v25.0.5
2024-03-27 17:24:40 +01:00
Jan Čermák
cff5c81cf0 Linux: Update kernel to 6.6.23 (#3270)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.23
2024-03-27 10:20:35 +01:00
Jan Čermák
aafa022800 Bump buildroot to 2024.02.1 (#3268)
* buildroot a1b2d12f32...1c84a7493b (1):
  > Merge tag '2024.02.1' into 2024.02.x-haos
2024-03-26 13:15:48 +01:00
Jan Čermák
ccf92bc87f Disable setting default keymap in systemd-vconsole-setup (#3261)
Since buildroot commit 3ceb8c97bcb6753740fa27a58b8e0dc00dbbbd19, systemd
has new option BR2_PACKAGE_SYSTEMD_VCONSOLE_DEFAULT_KEYMAP which
defaults to "us". With this option specified, systemd-console depends on
kbd package and causes the following message to be printed during
startup on HAOS:

systemd-vconsole-setup[253]: sh: gzip: not found

This comes from the loadkeys call which tries to open the gzipped file,
so likely the kbd package should also depend on gzip. However, since we
don't want the kbd package at this point, I'm leaving this for later
investigation and simply unsetting the new option to revert to
pre-2024.02 setup.
2024-03-20 12:25:43 +01:00
Jan Čermák
a45cab1756 Linux: Update kernel to 6.6.22 (#3259)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.22
2024-03-20 12:25:35 +01:00
Hedda
6c11146d9c List Nabu Casa appliances under boards README.md (#3260)
List Nabu Casa appliances under boards README.md

* Home Assistant Green
* Home Assistant Yellow (based custom carrier board and powered by a Raspberry Pi 4 Compute Module)
* Home Assistant Blue (based on ODROID-N2+)
2024-03-20 09:35:58 +01:00
dependabot[bot]
e144c2bc96 Bump docker/setup-buildx-action from 3.1.0 to 3.2.0 (#3257)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-18 15:35:15 +01:00
dependabot[bot]
6c7c972c5d Bump docker/build-push-action from 5.2.0 to 5.3.0 (#3256)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-18 15:31:55 +01:00
dependabot[bot]
1953c2afdb Bump docker/login-action from 3.0.0 to 3.1.0 (#3258)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-18 15:31:40 +01:00
Matthieu Baerts
6b062f3c75 kernel: enable MPTCP support (#3248)
The official description says:

  Multipath TCP (MPTCP) connections send and receive data over multiple
  subflows in order to utilize multiple network paths. Each subflow uses
  the TCP protocol, and TCP options carry header information for MPTCP.

Thanks to MPTCP, being able to use multiple paths in parallel or
simultaneously brings new use-cases:

- Seamless handovers: switching from one path to another while
  preserving established connections -- Apple is using it for this
  reason since 2013.

- Best network selection: using the "best" available path (latency,
  losses, cost, bandwidth) -- one path can be used as a "backup" one.

- Network aggregation: using multiple paths at the same time to have a
  higher throughput -- e.g. to combine a fixed an mobile network to
  send files faster.

For example, for HA, it is possible to keep a SSH connection alive when
switching from one network to another (e.g. while travelling).

To be able to use MPTCP, both ends need to support it. An application
has to request it, by creating an MPTCP socket instead of a TCP one.
The rest in unchanged. An alternative is to use 'mptcpize' tool, which
relies on LD_PRELOAD to create an MPTCP socket instead of a TCP one.

Note that a MPTCP-enabled server continues to accept regular TCP
connections that do not use the Multipath TCP extension without any
performance impact. When a connection request is received, and is linked
to a listening socket with MPTCP support, the kernel will simply check
if MPTCP options are present. If not, the accepted socket will be a
"plain" TCP one, with the same impact as before.

To use multiple paths at the same time, additional IP addresses need to
be configured, e.g. via the 'ip' tool (IPRoute2).

MPTCP in the kernel is enabled in most main Linux distributions (Debian,
Ubuntu, RedHat, Fedora, etc.), but in more specific ones like Raspbian.
It is available in the Linux kernel since v5.6.

Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
2024-03-14 16:51:01 +01:00
Jan Čermák
c085ff2b10 Bump OS to development version 12.2.dev0 2024-03-13 15:19:48 +01:00
Jan Čermák
454d764676 Update Buildroot to 2024.02 (#3241)
* Update Buildroot to tag 2024.02 with rebased HAOS patchset

* udisks2: update to v2.10.1

  * Updated to version 2.10.x compatible with libblockdev v3
  * Rebased patches to new codebase
  * Autoreconf patch is not needed anymore
  * libblockdev-nvme is now hard dependency of udisks daemon

* patches/grub2: remove upstreamed efidisk patch

* patches/network-manager: update multiple gateway patch

* package/os-agent: fix go download

  After the Go update, build fails with the following error on mod vendor:

    GOPROXY list is not the empty string, but contains no entries

  Turns out this step is not having the environment variables set, use
  those used for download to fix it.

* package/xe-guest-utilities: set DL env for go mod vendor

* Bump buildroot to fix missing unit file from nfs-utils

* buildroot 3f950a1aee...a1b2d12f32 (1):
  > package/nfs-utils: only install fsidd binary and unit file with enabled nfsd

* CI: install flake8 for pr-checks runner

  Use distribution package, as it's what's used in Buidlroot's Gitlab CI
  Docker image at buildroot/support/docker/Dockefile.

* Disable check for Upstream section in the patch header for now

  It was introduced in latest BR - disable it for now and re-enable
  for HAOS in a later separate PR.
2024-03-13 15:16:54 +01:00
Jan Čermák
0e3a2d016d Merge branch 'main' into dev 2024-03-13 12:21:53 +01:00
Jan Čermák
fde0c80e54 Bump OS to release version 12.1 2024-03-13 11:17:02 +01:00
Stefan Agner
80dfffc0b0 Bump OS to pre-release version 12.1.rc2 2024-03-12 16:04:54 +01:00
Jan Čermák
dd43bfee8e Fix IPv6 reachability patch not being applied (#3240)
Fix regression caused by #3224 which introduced version-specific
directory for linux patches, causing the upper-level patch not being
applied. Copy the patch to the version folder instead. Also we need
to keep it in the upper directory for RPi kernels.

(cherry picked from commit 8226323a1b)
2024-03-12 15:09:25 +01:00
Jan Čermák
32f1ca8fa8 Fix test_restore_ssl_directory with HA CLI in interactive PTY (#3239)
The test was missing --no-progress flag, which only manifested after
merging #3238 - causing the CLI to run in an interactive pseudotty.

(cherry picked from commit 122dd1c288)
2024-03-12 14:56:14 +01:00
Stefan Agner
3dfd3a4c21 Start HA CLI interactively and with a tty allocated (#3238)
Use -i (--interactive) and -t (--tty) to start the HA CLI interactively.
This is required by some commands like the new device wipe command added
with https://github.com/home-assistant/cli/pull/464.

(cherry picked from commit fe1978f98f)
2024-03-12 14:56:11 +01:00
Jan Čermák
8226323a1b Fix IPv6 reachability patch not being applied (#3240)
Fix regression caused by #3224 which introduced version-specific
directory for linux patches, causing the upper-level patch not being
applied. Copy the patch to the version folder instead. Also we need
to keep it in the upper directory for RPi kernels.
2024-03-12 14:55:18 +01:00
Jan Čermák
122dd1c288 Fix test_restore_ssl_directory with HA CLI in interactive PTY (#3239)
The test was missing --no-progress flag, which only manifested after
merging #3238 - causing the CLI to run in an interactive pseudotty.
2024-03-12 14:55:10 +01:00
Stefan Agner
fe1978f98f Start HA CLI interactively and with a tty allocated (#3238)
Use -i (--interactive) and -t (--tty) to start the HA CLI interactively.
This is required by some commands like the new device wipe command added
with https://github.com/home-assistant/cli/pull/464.
2024-03-12 10:12:35 +01:00
dependabot[bot]
541afd452b Bump docker/build-push-action from 5.1.0 to 5.2.0 (#3235)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5.1.0 to 5.2.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v5.1.0...v5.2.0)

---
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>
2024-03-11 18:28:48 +01:00
Jan Čermák
b5795a0277 Linux: Update kernel to 6.6.21 (#3234)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.21
2024-03-11 18:28:36 +01:00
Jan Čermák
a909d89e1c Bump OS to pre-release version 12.1.rc1 2024-03-07 17:48:52 +01:00
Jan Čermák
e24fbf63ae Revert back to OOT driver for RTL8821CU (#3225)
The in-tree driver introduced in HAOS 12.0 is having random issues,
so revert back to the stable OOT driver that was used before for now.
Also it add it to RPi 2 and Yellow where it's been missing the whole
time.

Fixes #3205
2024-03-06 16:50:14 +01:00
Jan Čermák
a6f54f6c4d Revert USB core changes to workaround Z-Wave stick issues (#3224)
Revert changes in the USB driver causing Z-Wave sticks (Z-Wave.me a
and Aeotec at least) failing to enumerate. Issue is reported upstream
but reverting the patches is a feasible workaround for the time being.

Refs #2995
2024-03-06 16:49:54 +01:00
dependabot[bot]
6ac4f3435b Bump docker/setup-buildx-action from 3.0.0 to 3.1.0 (#3221)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v3.0.0...v3.1.0)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-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>
2024-03-04 14:26:47 +01:00
Jan Čermák
8debb61114 Disable UAS via usb-storage.quirks on RPi for JMicron JMS567 (#3220)
Reported to have issues, quick search around the internet also confirms
that UAS driver doesn't work well here on Linux in general.

Fixes #3217
2024-03-04 12:11:47 +01:00
Jan Čermák
47f8671925 Add Intel Wireless-N 105 firmware for generic-x86-64 (#3219)
* buildroot 0ab96d7c0d...15dc3b6e0c (1):
  > linux-firmware: add options for missing Intel b/g/n cards

Fixes #3200
2024-03-04 11:56:23 +01:00
Jan Čermák
8f577e47db Linux: Update kernel to 6.6.20 (#3218)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.19
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.20
2024-03-04 11:42:04 +01:00
Jan Čermák
2adfa287d1 Linux: Update kernel to 6.6.18 (#3204)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.17
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.18
2024-02-27 19:17:39 +01:00
Jan Čermák
e60a2e4b68 Merge branch 'main' into dev 2024-02-26 09:39:41 +01:00
Jan Čermák
ff34a11f37 Bump OS to release version 12.0 2024-02-26 09:26:15 +01:00
Jan Čermák
dfdd3b4438 Clarify M1S flashing and recovery docs (#3187)
Remove the mentions of petitboot, as it's not normally used on M1S.
Document possibility to use SD card boot and alternative method of
reflashing the eMMC from an OS running from an SD card.
2024-02-20 14:24:24 +01:00
Tim L
9614f769f2 M1S issues template (#3181)
* Add Odroid M1S to issues template

* Add M1S to Hardkernel readme
2024-02-17 09:17:11 +01:00
Tim L
8c5377810f Add documentation for ODROID-M1S (#3179) 2024-02-16 12:22:28 +01:00
Jan Čermák
426ef2d568 Bump OS to development version 12.1.dev0 2024-02-15 12:08:24 +01:00
Jan Čermák
e9e027dd95 Bump OS to pre-release version 12.0.rc1 2024-02-15 11:40:55 +01:00
Jan Čermák
cf0bde1f5a Move output directory to /mnt in GH build action (#3174)
With recent change of Azure VM type, the disk layout has changed and
the build of ova target fails with insufficient space. Since there
is now plenty of space on /mnt partition, we can use that, just like
we've been using it for cache for now.

Ref: https://github.com/easimon/maximize-build-space/issues/39#issuecomment-1935591779
2024-02-14 17:42:17 +01:00
Tim L
1b66f81dfa Add support for Odroid M1S Board (#3121)
* Copy Odroid-m1 config for new odroid-m1s board

* config: Adjust names and paths for odroid-m1s

* configs: Use rk3566 blobs for ATF

* set correct fdt in uboot.ush

* Add linux patches with Odroid-m1s devicetree

Synced from Hardkernel unofficial 6.1 tree
ae33b44557/arch/arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts

With additional cleanup and fixes for mainline linux

* Add Odroid M1S to Github actions

* uboot: Patch boot order to set SD Card first

* Create u-boot placeholder partion for odroid-m1s also

* Switch u-boot to full odroid-m1s config

* cherry-pick emmc stability improvements

* Generalise u-boot to use ${devtype} instead of hardcoded mmc

* Remove deprecated snps, reset options from device tree

* re-enable uboot ethernet
2024-02-14 12:01:15 +01:00
Jens Maus
623ebd8d38 added udev rule to rpi-rf-mod package to allow addons to have write (#2854)
access to these led nodes.
2024-02-12 17:12:57 +01:00
Tim L
f05294e51d Factor out common Rockchip config (#3165)
* Create common kernel config for Rockchip aarch64 boards

* Green: drop kernel option already included in main config

* Move rockchip RNG patchset to common folder

* Odroid-m1 has no board specific patches now
2024-02-12 16:05:47 +01:00
Jan Čermák
af345d98d7 Add SD/MMC drivers of Realtek card readers for generic_x86_64 (#3170)
We added drivers for Realtek cards readers in #3005, however it also
needs MMC drivers in order to make card reading possible. Enable both
USB and PCI versions of those (each about ~40 kB).

Fixes #3167
2024-02-12 16:05:22 +01:00
Jan Čermák
b599d24658 Update issue template with better links to logs, add CLI instructions (#3169)
* Update issue template with better links to logs, add CLI instructions

Legacy supervisor_logs target (which is currently kind of broken) replaced
with standard logs with provider specified. Added instructions how to get
logs in HA CLI.

* Apply suggestions from code review

Co-authored-by: Stefan Agner <stefan@agner.ch>
2024-02-12 16:05:12 +01:00
Jan Čermák
e7a62ce563 RaspberryPi: Update kernel to 6.1.73 - stable_20240124 (#3162)
* RaspberryPi: Update kernel to 6.1.73 - stable_20240124

* Bump rpi-firmware to version for RPi Linux 6.1.73

* buildroot f844f7f725...0ab96d7c0d (1):
  > package/rpi-firmware: bump to version for stable_20240124 kernel
2024-02-08 22:02:28 +01:00
Stefan Agner
f770a3f4b2 Bump Pi 5 image on release in Raspberry Pi Imager json (#3161) 2024-02-08 19:24:18 +01:00
Jan Čermák
0028e20973 Linux: Update kernel to 6.6.16 (#3159)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.16
2024-02-08 10:36:58 +01:00
Jan Čermák
ad4493a781 Fix ODROID XU4 boot by disabling PROVE_LOCKING in kernel (#3158)
ODROID XU4 fails to boot after update to Linux 6.6. Comparing downstream
kernel config with upstream exynos defconfig shows it has various lockdep
options enabled, and PROVE_LOCKING seems to be the one that causes the
issue. It seems it (or any of PROVE_RCU, TRACE_IRQFLAGS or
PREEMPTIRQ_TRACEPOINTS) which get enabled along with it) probably
triggers some timing issues on the I2C bus, which causes the main PMIC
to fail to properly initialize all voltages.

Since these options should not have any real impact on our system, the
easiest option is to disable them. If we need them, or want to stay
closer to upstream defconfig, further debugging is needed.

Fixes #3137
2024-02-08 10:36:49 +01:00
Jan Čermák
5fddd20258 Use verity bundle format for RAUC updates (#3152)
We originally enabled it in 0ebcdcb9dc
but later reverted the patch in 5b927389b8
because of backward compatibility issues. Since we're going to 12.0,
there is now hopefully enough room for seamless transition.

Co-authored-by: Stefan Agner <stefan@agner.ch>
2024-02-06 18:19:10 +01:00
Jan Čermák
c1b936716d Enable ath12k, MT7996E and various new Realtek drivers from Linux v6.6 (#3151)
* Enable ath12k, MT7996E and various new Realtek drivers from Linux v6.6

* Remove custom rtl8821cu driver from targets running Linux 6.6
2024-02-06 18:18:58 +01:00
Jan Čermák
977f017cf8 Bump buildroot to update BlueZ to v5.72 (#3147)
* buildroot 235a3aee47...f844f7f725 (1):
  > package/{bluez5_utils, bluez5_utils-headers}: bump to version 5.72
2024-02-05 20:07:39 +01:00
Jan Čermák
87938f0a4b Use separate path for v6.1.y and v6.6.y kernel config fragments (#3146)
* Use separate path for v6.1.y and v6.6.y kernel config fragments

Since we're now maintaining Linux configs for two different versions,
it may happen that we want to add some options only to one of the
versions. While the Kconfig might figure the invalid options itself,
our config checking tooling would spam us with warnings. This commit
splits the configs to two directories. This pattern is used only for
the common fragments, more specific ones are usually sharing the same
Linux version anyway.

* Add back options removed in v6.6.y to v6.1.y kernel config fragments
2024-02-05 20:06:59 +01:00
dependabot[bot]
37c2f951d6 Bump release-drafter/release-drafter from 5 to 6 (#3144)
Bumps [release-drafter/release-drafter](https://github.com/release-drafter/release-drafter) from 5 to 6.
- [Release notes](https://github.com/release-drafter/release-drafter/releases)
- [Commits](https://github.com/release-drafter/release-drafter/compare/v5...v6)

---
updated-dependencies:
- dependency-name: release-drafter/release-drafter
  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>
2024-02-05 18:02:50 +01:00
Stefan Agner
3dee9895ac Merge branch 'main' into dev 2024-02-05 14:19:24 +01:00
Stefan Agner
0f0eacf46e Bump OS to release version 11.5 2024-02-05 10:41:11 +01:00
Jan Čermák
8fef166685 Bump OS to development version 12.0.dev0 2024-02-02 14:32:34 +01:00
Jan Čermák
b08f7de9e1 Update buildroot to latest version with rebased 6.6 patches 2024-02-02 14:31:49 +01:00
Jan Čermák
9dcf8ae82f Update to 6.6 LTS kernel (#3063)
* Linux: Update kernel 6.6.15

* Update buildroot packages to work with Linux 6.6

* Fix top-level and pc patches of linux

* Update tinker patch series

* Drop Odroid M1 patches

M1 is now supported in upstream.

* Update Hardkernel patches

Needed larger refactoring because of 379ae64609c7a3301b60483eb65bd8bc78f76328

* Update Green patches

* Update Odroid XU4 patches

Removing the TMU patch/hack for now, need to check if it's still needed.
If it is indeed, then it needs slighter rewrite.

* Move Rockchip RNG patches to M1 and Green dirs

* Update rtl88x2bu package to fix build

* Update gasket package to fix build

* Fix eq3_char_loop build

* Use fan53555 instead of custom rk860x driver

* Fix kernel base configs and fragments after 6.6 update

Mostly removed options that have been removed between releases. Only
a few options have been renamed, then there's bunch of options that
had dependencies added so they are available only on some architectures,
which are not those that we're using.

* Remove deprecated regulator-compatible from Green DTS
2024-02-02 14:27:18 +01:00
Jan Čermák
c90c175754 Linux: Update kernel to 6.1.76 (#3134)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.76
2024-02-01 11:32:41 +01:00
Jan Čermák
b3e3d833a7 Include links to kernel changelogs on kernel bump (#3133)
Generate list of changelogs if we're bumping to the next patch release.
If major or minor version is bumped, the commit message contains only
the title, like before.

Also fix English in the commit title of RPi bump.
2024-02-01 11:27:52 +01:00
Jan Čermák
5271dd180d Fix check-dotconfig warnings coming from custom kernel configs (#3130)
* Remove options not present in current kernel anymore

* Adjust options set to incorrect values

* Remove options unset due to missing dependencies
2024-02-01 10:05:45 +01:00
Jan Čermák
3c50eee20b Bump buildroot to 2023.02.9 (#3129)
* buildroot 512a487366...015e99f244 (1):
  > Merge tag '2023.02.9' into 2023.02.x-haos
2024-01-31 12:45:38 +01:00
Jan Čermák
1e70dc8edf Bump OS to pre-release version 11.5.rc3 2024-01-31 10:25:40 +01:00
Jan Čermák
fd3c1066b8 Update ATF and DDR blob for Odroid M1, change 1056->1560 MHz RAM timing (#3125)
Odroid M1 was using 1056 MHz blob for RAM training, although it can run
at 1560 MHz. Use the correct file for M1 and update it to latest version,
along with ARM Trusted Firmware blob.

(cherry picked from commit 1f45aaf359)
2024-01-31 10:24:58 +01:00
Stefan Agner
f4f7928f17 Disable MMC environment on ASUS Tinkerboard (#3124)
We don't really use the MMC environment, so disable it by default. This
prevents the following warning at startup:
Loading Environment from MMC... *** Warning - bad CRC, using default environment

(cherry picked from commit f263326ef8)
2024-01-31 10:24:05 +01:00
Stefan Agner
8eeb85ed17 Disable Ethernet in U-Boot if ODROID-M1 (#3122)
It seems that the Ethernet initialization in U-Boot causes significant
packet drops in Linux on some board. On a ODROID-M1 with 8GB of RAM, a
packet loss rate of ~20% has been observed. From the user point of view
it feels like a massive slow down (SSH feels very slow, Home Assistant
loads very slow or not at all).

Disabling the Ethernet controller driver avoids initialization in U-Boot
and makes Ethernet work correctly again in Linux.

While at it, drop the previously board specific configs. They haven't
been used and the board seemed fine without them.

(cherry picked from commit bd3cae5300)
2024-01-31 10:20:21 +01:00
Jens Maus
e00709d449 Add optional rpi-rf-mod dtoverlay block for RPi5 (#3080)
* added optional rpi-rf-mod dtoverlay block
* remove dtoverlay=miniuart-bt as not required.

(cherry picked from commit 9102f06fba)
2024-01-31 10:20:18 +01:00
Tim L
9e7b6783d1 Drop Amlogic specific patches for Odroid-m1 build (#3120)
All of the patches in ./board/hardkernel/patches are specific to
Amlogic SoC's. Drop this patch path when building Rockchip based
Odroid-m1 board.
2024-01-31 09:12:33 +01:00
Jan Čermák
1f45aaf359 Update ATF and DDR blob for Odroid M1, change 1056->1560 MHz RAM timing (#3125)
Odroid M1 was using 1056 MHz blob for RAM training, although it can run
at 1560 MHz. Use the correct file for M1 and update it to latest version,
along with ARM Trusted Firmware blob.
2024-01-30 13:48:36 +01:00
Jan Čermák
0ac12d3cd4 Also check kernel custom config file in linux-check-dotconfig (#3126)
If BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE is set, it should be also checked
by the script for checking that all kernel options are applied.
2024-01-30 13:36:59 +01:00
Stefan Agner
f263326ef8 Disable MMC environment on ASUS Tinkerboard (#3124)
We don't really use the MMC environment, so disable it by default. This
prevents the following warning at startup:
Loading Environment from MMC... *** Warning - bad CRC, using default environment
2024-01-30 11:47:48 +01:00
Jan Čermák
82e1beff2e Linux: Update kernel 6.1.75 (#3123) 2024-01-30 11:30:19 +01:00
Tim L
54e86009c2 Use rockchip combined SPL images for Tinkerboard (#3118)
* tinker: Drop patch for u-boot entry point and move into uboot.config

* tinker: Use rockchip combined uboot image
2024-01-30 11:22:23 +01:00
Stefan Agner
bd3cae5300 Disable Ethernet in U-Boot if ODROID-M1 (#3122)
It seems that the Ethernet initialization in U-Boot causes significant
packet drops in Linux on some board. On a ODROID-M1 with 8GB of RAM, a
packet loss rate of ~20% has been observed. From the user point of view
it feels like a massive slow down (SSH feels very slow, Home Assistant
loads very slow or not at all).

Disabling the Ethernet controller driver avoids initialization in U-Boot
and makes Ethernet work correctly again in Linux.

While at it, drop the previously board specific configs. They haven't
been used and the board seemed fine without them.
2024-01-30 10:12:48 +01:00
Jens Maus
9102f06fba Add optional rpi-rf-mod dtoverlay block for RPi5 (#3080)
* added optional rpi-rf-mod dtoverlay block
* remove dtoverlay=miniuart-bt as not required.
2024-01-30 10:12:01 +01:00
Tim L
9df30c9e4e Use rockchip combined uboot images (#3115) 2024-01-29 22:12:52 +01:00
Jan Čermák
378b90bc82 Bump OS to pre-release version 11.5.rc2 2024-01-26 14:23:39 +01:00
Jan Čermák
01c8c1a5fa Add kernel options missing as a result of enabling CONFIG_EXPERT (#3114)
Enabling CONFIG_EXPERT, which was a dependency of some options we try
to set by our config fragments, had a side-effect of toggling some other
options, most importantly the framebuffer console support. Enable the
options found by diffing old and new kernel configs.

Fixes #3112

(cherry picked from commit 3d234144a2)
2024-01-26 14:23:17 +01:00
Jan Čermák
3d234144a2 Add kernel options missing as a result of enabling CONFIG_EXPERT (#3114)
Enabling CONFIG_EXPERT, which was a dependency of some options we try
to set by our config fragments, had a side-effect of toggling some other
options, most importantly the framebuffer console support. Enable the
options found by diffing old and new kernel configs.

Fixes #3112
2024-01-26 14:04:14 +01:00
Jan Čermák
ae4ab5aa24 Bump OS to development version 11.6.dev0 2024-01-25 15:26:28 +01:00
Jan Čermák
113348ef93 Bump OS to pre-release version 11.5.rc1 2024-01-25 14:26:08 +01:00
Jan Čermák
4b2d34368d Fix path to VHDX artifact in OS build job (#3105) 2024-01-25 09:46:10 +01:00
Jan Čermák
aadb5a74b6 Use renamed MT7921/MT7922 options from linux-firmware upstream merge (#3106)
* ../../../buildroot 55120df0b7...512a487366 (3):
  > package/linux-firmware: add WiFi and BT firmware for MT7921 and MT7922
  > package/dbus-broker: fix legal info
  > package/rtl8821cu: fix legal info
2024-01-25 09:43:07 +01:00
Jan Čermák
4619dcbb16 Create empty overlays/README to fix DTB overlay loading on RPi 5 (#3107)
Since we're using a custom os_prefix for dual boot on RPi 5, overlays
can be also present in different directories. Raspberry Pi's bootloader
has a strange feature that it only respects os_prefix if the directory
with overlays contains a README file:
https://www.raspberrypi.com/documentation/computers/config_txt.html#overlay_prefix

While rpi-firmware package touches the file when copying overlays to
the destination directory, for RPi 5 we are using BR2_LINUX_KERNEL_INSTALL_INTREE_OVERLAYS
option which does not copy or create it. Ensure it is present (no matter
if we're using intree on rpi-firmware overlays) in the hassos-hook.

Fixes #3079

(also removed invalid mention about the README from config.txt)
2024-01-25 09:27:52 +01:00
Jan Čermák
08b3277bdb Resolve warnings caused by incorrect kernel config settings (#3104)
* Remove all non-existing kernel config symbols

* Remove unapplied x86 Intel sound options

These are missing various subsystem dependencies and were never in fact
enabled, assuming they're rather exotic and removing them completely.

* Add missing dependencies, adjust tristate values, remove nonsense

* Use KERNEL_LZ4 only for non-aarch64

Since aarch64 doesn't use self-extracting kernel:
https://patchwork.kernel.org/project/linux-arm-kernel/patch/20190119185540.20526-1-tobias.johannes.klausmann@mni.thm.de/

* Extract PCI options to device-support-pci fragment (renamed from device-support-pcie)

RPi 4+ should use this fragment too, since CM4 has PCIe support.

* Rename RPi's kernel-32b fragment to kernel-armv7
2024-01-24 12:03:25 +01:00
Stefan Agner
bf744adc5f Bump U-Boot to 2024.01 (#3096)
* Bump U-Boot to 2024.01 for Raspberry Pi and Home Assistant Yellow

* Regenerated using --no-thread

By default git creates some email headers. We can minimize them using
--no-thread.

* Fix build for Yellow

* Update U-Boot for ASUS Tinker Board

* Update U-Boot for Khadas VIM3

* Update U-Boot for ODROID-M1

* Update U-Boot for Home Assistant Green

* Update U-Boot for ODROID-C2/C4/N2/XU4
2024-01-24 10:01:13 +01:00
Jens Maus
f36ab6cf5e add missing ARMv8 32bit kernel support configs (#3099) 2024-01-23 21:28:24 +01:00
Stefan Agner
7685e04c2b Enable PCIe for Khadas VIM3 (#3092) (#3100)
It seems that the PCIe driver is not enabled for Khadas VIM3. Enable it
by default.

Note to make use of the M2X extension board, the following commands need
to be executed on the U-Boot command line:

```
HAOS> i2c dev 0
Setting bus to 0
HAOS> i2c mw 0x18 0x33 1
```
2024-01-23 21:27:49 +01:00
Jan Čermák
d83fc29969 Fix ARCH/SRCARCH for aarch64 in linux-check-dotconfig (#3098)
Wrong arch for arm64 produces few false check results resulting
from some symbols in arm64 tree not being loaded. We can use raw
$(ARCH) variable for arm, only need to translate aarch64 -> arm64.
2024-01-22 22:15:54 +01:00
Jan Čermák
82e7dc7ccf Linux: Update kernel 6.1.74 (#3093) 2024-01-22 18:09:30 +01:00
dependabot[bot]
ab586e285f Bump actions/cache from 3 to 4 (#3095)
Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/cache
  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>
2024-01-22 18:09:15 +01:00
Tom Pipe
ff84663caa Fix build_haos_builder step to fetch the correct version (#3091)
Fixes the build_haos_builder step to fetch the version correctly from the version step, not the (non-existent) version_main step
2024-01-19 13:18:03 +01:00
Tim L
c210a1a52a Dockerfile: migrate to trusted.gpg.d for docker repo keys (#3090)
Using apt-key for managing Debian repo keys has been deprecated for a
while now. While it currently works ok, seems to be broken in bookworm. This migrates to storing keys in trusted.gpg.d as recommended by the warning messages when using apt-key.
2024-01-19 11:02:34 +01:00
Jan Čermák
3aa2c1e411 Bump buildroot to update linux-firmware (#3084)
* buildroot 153f1461f6...55120df0b7 (8):
  > package/linux-firmware: bump version to 20231211
  > package/linux-firmware: bump version to 20231030
  > package/linux-firmware: add iwlwifi quz firmware
  > package/linux-firmware: add new option for Marvell prestera firmware
  > package/linux-firmware: bump version to 20230804
  > package/linux-firmware: bump version to 20230625
  > package/linux-firmware: add QCA9377 BT firmware
  > package/linux-firmware: bump version to 20230515
2024-01-17 18:58:56 +01:00
Jan Čermák
c845b387c9 Linux: Update kernel 6.1.73 (#3083) 2024-01-17 18:58:45 +01:00
Jan Čermák
bde080336e Fix path to cmdline after successful RPi 5 tryboot (#3085)
Path to cmdline is set in tryboot.txt to cmdline-tryboot.txt before
attempting A/B boot. After successful boot, tryboot.txt is relocated
to config.txt, yet the config path of cmdline is not changed and remains
set to cmdline-tryboot.txt which doesn't exist anymore at that point,
causing following reboots to fail.

Fixes #3065
2024-01-17 17:56:29 +01:00
Tom Pipe
e7c15f9aa6 Fix self_signed_cert variable value (#3071)
The value of ```self_signed_cert``` is being set incorrectly, resulting in a failed build, as the self signed certs aren't copied correctly.

Updated so the value is set from ```self_signed_cert``` and not ```self_signed```
2024-01-17 10:45:12 +01:00
Jan Čermák
a7f570c4b4 Linux: Update kernel 6.1.72 (#3064)
* Linux: Update kernel 6.1.72
* Remove SMB client workaround for 6.1.71
2024-01-11 10:04:10 +01:00
Jan Čermák
59555e597e Merge Buildroot 2023.2.8 (#3060)
* buildroot 2d89a0f9b6...153f1461f6 (1):
  > Merge tag '2023.02.8' into 2023.02.x-haos
2024-01-10 10:23:21 +01:00
Jan Čermák
c328d30610 Merge branch 'main' into dev 2024-01-09 10:55:26 +01:00
Jan Čermák
b88ba4d208 Bump OS to release version 11.4 2024-01-09 10:47:53 +01:00
Jan Čermák
99e8af2aac Bump OS to development version 11.5.dev0 2024-01-08 15:09:41 +01:00
Jan Čermák
66087c4334 Bump OS to pre-release version 11.4.rc1 2024-01-08 14:41:33 +01:00
Jan Čermák
baa756e736 Revert kernel patch causing failures on CIFS share disk usage (#3051)
* Revert kernel patch causing failures on CIFS share disk usage

The issue was reported upstream, waiting for a fix there. Reverting the
patch for a quick resolution of the bug that breaks some things in HA
and add-ons badly.

Refs #3041

* Move the patch to 6.1.71 subdirectory

That way Raspberry Pi's kernel won't be patched (unless it's the same
version which it's currently not).
2024-01-08 13:03:22 +01:00
Jan Čermák
1a48d6fdd4 Add rtw89 firmware option missing in #3003 (#3043)
In #3003 the rtw89 firmware was only added to the buildroot submodule,
config option for enabling it was missing.
2024-01-06 17:30:50 +01:00
Jan Čermák
f50f7c2475 Linux: Update kernel 6.1.71 (#3046) 2024-01-06 17:29:28 +01:00
Stefan Agner
e93d92b50e Merge branch 'main' into dev 2024-01-04 21:28:48 +01:00
Stefan Agner
0ec5c22d3a Remove rootfstype for Raspberry Pi 5 (#3037) 2024-01-04 21:26:55 +01:00
Stefan Agner
fdd0bd0efb Bump OS to release version 11.3 2024-01-04 15:40:02 +01:00
Stefan Agner
57913a3eee Bump OS to pre-release version 11.3.rc2 2024-01-03 10:46:30 +01:00
Jan Čermák
d6873893a4 Linux: Update kernel 6.1.70 (#3029) 2024-01-03 10:46:02 +01:00
Stefan Agner
572d14adcc Enable IP policy routing options (#3026) (#3027)
Enable multiple table options which allows policy routing based on
source address or type-of-service. This is useful for Tailscale.
2024-01-03 10:46:02 +01:00
Stefan Agner
fe8c4ef6c1 Set Raspberry Pi 2 Supervisor architecture correctly (#3012)
The Raspberry Pi 2 was based on Cortex-A7 in first revisions, then
Cortex-A53. However, both ar armv7 architectures, and that is also how
the Operating System itself is configured. Use the correct architecture
for Supervisor.

The hassos-supervisor script should recreate the container
automatically on first boot after update.

Since Supervisor itself is written in Python this shouldn't affect much.
However, the Supervisor uses it's architecture as default architecture
when building local add-on and uses it as default architecture for
multi-arch container images. This is also where this error got noticed
(see https://github.com/home-assistant/supervisor/issues/4402#issuecomment-1865979421).
2024-01-03 10:45:56 +01:00
Jan Čermák
714912a2a9 Suppress action-shellcheck warning from deprecated option (#3030)
Use ignore_paths instead of ignore for the buildroot directory.
2024-01-03 10:02:44 +01:00
Jan Čermák
62b76f7f47 Linux: Update kernel 6.1.70 (#3029) 2024-01-03 10:02:34 +01:00
Stefan Agner
d82458a6a8 Enable IP policy routing options (#3026) (#3027)
Enable multiple table options which allows policy routing based on
source address or type-of-service. This is useful for Tailscale.
2024-01-03 09:35:49 +01:00
Stefan Agner
6c549c10d8 Set Raspberry Pi 2 Supervisor architecture correctly (#3012)
The Raspberry Pi 2 was based on Cortex-A7 in first revisions, then
Cortex-A53. However, both ar armv7 architectures, and that is also how
the Operating System itself is configured. Use the correct architecture
for Supervisor.

The hassos-supervisor script should recreate the container
automatically on first boot after update.

Since Supervisor itself is written in Python this shouldn't affect much.
However, the Supervisor uses it's architecture as default architecture
when building local add-on and uses it as default architecture for
multi-arch container images. This is also where this error got noticed
(see https://github.com/home-assistant/supervisor/issues/4402#issuecomment-1865979421).
2023-12-26 17:53:20 +01:00
Jan Čermák
364ca718fb Remove duplicated step uploading ova QEMU image for the test job (#3011)
* Remove duplicated step uploading ova QEMU image for the test job

Instead of uploading the file twice with a fixed name, upload it in the
same step that is used for unpublished builds and pass the version string
to the test job.

* Update .github/workflows/test.yaml

Co-authored-by: Stefan Agner <stefan@agner.ch>

---------

Co-authored-by: Stefan Agner <stefan@agner.ch>
2023-12-26 17:53:00 +01:00
Jan Čermák
978e13b180 Generate self-signed certificate in the prepare step and archive it (#3015)
Generate the certificate only once and make it available. The preferred
option that doesn't generate warnings would be to use secrets in the
repository config, in that case no certificate is generated or archived.
2023-12-22 14:49:40 +01:00
Stefan Agner
225d4194bf Bump OS to development version 11.4.dev0 2023-12-21 17:04:24 +01:00
Stefan Agner
230a50587f Bump OS to pre-release version 11.3.rc1 2023-12-21 15:06:11 +01:00
Stefan Agner
de82d0b412 Linux: Update kernel 6.1.69 (#3009) 2023-12-21 09:45:54 +01:00
Stefan Agner
7ef16072c6 Bump buildroot to update dbus-broker to 35 (#3008)
* buildroot 4c89661fd1...2d89a0f9b6 (2):
  > package/dbus-broker: bump to release 35
  > Revert "package/dbus-broker: avoid blocking due to missing entropy"
2023-12-21 09:09:54 +01:00
Jan Čermák
13e0f13f3c Enable driver for Realtek card readers (#3005)
Enable PCI card reader found on some Intel NUC models, along with the USB
drivers as well.

Adds two new modules (listed with size):

30104   /lib/modules/6.1.68-haos/kernel/drivers/misc/cardreader/rtsx_usb.ko
167240  /lib/modules/6.1.68-haos/kernel/drivers/misc/cardreader/rtsx_pci.ko

Fixes #2688
2023-12-20 17:41:54 +01:00
Jan Čermák
5a9be34007 Add script for checking resulting kernel config (#3006)
There is bunch of kernel config options that are not propagated
correctly to the kernel configuration after fragments are merged
and processed by Kconfig. Current Buildroot tools are not good at
discovering these - while we cleaned up most inconsistencies by using
linux-diff-config and output from the merge_config.sh script, there
are still options that were removed or get a different value than
intended because of dependencies, etc.

This commit adds a Python script that is using Kconfiglib to parse
current kernel's Kconfig files and the generated .config and compare
the requested values from individual kernel config fragments. The
script can be used manually by running `make linux-check-dotconfig`
from the buildroot directory (with path to BR2_EXTERNAL directory set)
and it's called also from the CI, where it generates Github Workflow
warning annotations when some of the values are not present or when set
incorrectly.

The kconfiglib.py is checked-in to the repo as well, because the library
is currently abandoned on PyPI and packaged version has a bug that causes
errors parsing Kconfigs in newer Linux versions, fixed in outstanding
pull request ulfalizer/Kconfiglib#119 - so version from this PR is used
here.

If pypi/support#2526 is ever resolved, we could remove it from our repo
and use pip for installing the package as a requirement during build
of the build container.
2023-12-20 17:41:39 +01:00
Jan Čermák
2e7aa1dc6a Add rtw89, mt7921 and mt7922 WiFi and BT firmware (#3003)
Add new firmwares and enable them for all targets.
Bloat in rootfs in my x86_64 test build was ~2.16 MiB.

Buildroot bump:

* buildroot 8a75878da4...4c89661fd1 (2):
  > package/linux-firmware: add WiFi and BT firmware for MT7921 and MT7922
  > package/linux-firmware: add rtw89 firmware files
2023-12-20 17:39:04 +01:00
Jan Čermák
d116bba470 Enable virtio-mem and DMI tables/fw_cfg sysfs for aarch64 and ova (#3004)
Enable options that can be useful on virtualized systems as modules.

Fixes #2987
2023-12-20 16:16:53 +01:00
Jan Čermák
069614a968 Adjust build to allow running from forks or feature branches (#2998)
Make it possible to run build on feature branches by adding a flag that
can be used to select whether the build output will be uploaded to the
R2 artifacts bucket or kept only as build artifact on GH. The latter is
also used for 3rd party repos, allowing builds in forked repositories.

Feature builds are using Unix timestamp as the dev version suffix. This
makes them easily distiguishable, yet it makes them appear to be newer
than standard daily dev version builds when compared by AwesomeVersion.
2023-12-19 16:57:26 +01:00
Stefan Agner
b9efb8edaf Enable WPA3 support in wpa_supplicant to support WPA3-SAE (#3000) 2023-12-19 15:43:18 +01:00
Jan Čermák
722cdf26f4 Enable ZSTD compression of firmware files (#3001)
Compress firmware files from linux-firmware using ZSTD algorithm.
This should grant us some more space to add more firmwares and should
not have any major performance impact, because firmwares are not accessed
frequently.

Includes buildroot submodule bump:
* buildroot 07e08e01b2...8a75878da4 (1):
  > linux-firmware: add option for firmware files compression
2023-12-19 15:31:19 +01:00
dependabot[bot]
e4fab0ab93 Bump actions/upload-artifact from 3 to 4 (#2997)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  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-12-18 21:58:24 +01:00
dependabot[bot]
7fc91c7bd7 Bump actions/download-artifact from 3 to 4 (#2996)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  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-12-18 17:06:50 +01:00
Stefan Agner
779b75f10e Linux: Update kernel 6.1.68 (#2991) 2023-12-14 17:59:51 +01:00
Jan Čermák
f605dd43ec Add build summary for each board build (#2990)
This allows for rudimentary image/partition size tracking between builds,
potentially this could be further extended with more useful information
about the build (TBD).
2023-12-14 15:49:40 +01:00
Jan Čermák
fb13b2bff8 Remove Raspberry Pi 1/Zero from docs (#2986)
Its support has been removed 2 years ago.
2023-12-12 15:01:46 +01:00
Stefan Agner
5b3447ae38 Add Raspberry Pi 5 to GitHub Action (#2985) 2023-12-12 13:34:31 +01:00
Stefan Agner
8e1016dcaf Initial Raspberry Pi 5 support (#2914)
* Add initial Raspberry Pi 5 buildroot config

* Add machine-id support via cmdline.txt

* Add new entry if entry is missing

* Don't overwrite cmdline.txt when adding machine-id

Use sed to append the new cmdline parameter to the first line.

* Skeleton script for RAUC custom bootloader interface

* Deploy kernel/device-tree into a RAUC slot specific directory

This allows us to use the os_prefix feature to switch between slot A and
B. Compared to the boot_partition option, this option allows to use a
shared config.txt and cmdline.txt, which makes it more like how HAOS
currently works on other Raspberry Pis.

* Deploy new kernel/device-tree to correct slot on installation

* Increase boot size to 128MB

This makes sure we can store up to three kernels (slot A, B and an
temporary one while installing the OTA update).

* Initial tryboot implementation using os_prefix

* Make sure to delete the old slot completely

* Add Busybox xargs for tryboot bootloader script

* Compare tryboot bootloader file silently

* Revert "Increase boot size to 128MB"

This reverts commit 7f2c69b58f02f500d6aeee4f0a419046899b5e38.

* Use compressed kernel

* Address shellcheck

* Address shellcheck issue in rauc-hook

* Fix shellcheck for rpi-tryboot.sh

* Do not follow source - it gets checked separately

* Correctly set the slot to boot

* Apply suggestions from code review

Co-authored-by: Jan Čermák <sairon@users.noreply.github.com>

* Drop serial console from default cmdline.txt

* Resync rpi5_64_defconfig with rpi4_64_defconfig

* Improve machine-id match

Only match actual hexadecimal characters.

* Deploy firmware overlays to OS prefix directory

* Add Raspberry Pi 5 to documentation

* Bump buildroot

* buildroot fd1dc86f40...f13ad03408 (1):
  > linux: add in-tree device tree overlay support

* Install device tree overlays from Kernel sources

* Drop RPi RF modules for now

No Raspberry Pi 5 specific device tree overlays are  available, drop RPi
RF mod for now.

* Use Raspberry 5 specific identifiers for Supervisor/OS Agent

* Bump buildroot

* buildroot f13ad03408...07e08e01b2 (1):
  > linux: fix add in-tree device tree overlay support

* Revert "Drop RPi RF modules for now"

This reverts commit 46fc1701e4.

---------

Co-authored-by: Jan Čermák <sairon@users.noreply.github.com>
2023-12-12 13:19:26 +01:00
Stefan Agner
ac089a2d8e Linux: Update kernel 6.1.67 (#2984) 2023-12-12 09:20:50 +01:00
dependabot[bot]
77c7def4e3 Bump actions/setup-python from 4 to 5 (#2981)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-python
  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-12-11 15:24:01 +01:00
dependabot[bot]
c6ca14182b Bump actions/stale from 8.0.0 to 9.0.0 (#2980)
Bumps [actions/stale](https://github.com/actions/stale) from 8.0.0 to 9.0.0.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v8.0.0...v9.0.0)

---
updated-dependencies:
- dependency-name: actions/stale
  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-12-11 15:23:33 +01:00
Jan Čermák
1e6deab48b Linux: Update kernel 6.1.66 (#2979) 2023-12-11 10:51:20 +01:00
Jan Čermák
dff282ff00 Bump brcmfmac_sdio-firmware-rpi to sync with RPi OS (#2971)
* buildroot 836f7e7b5e...fd1dc86f40 (1):
  > brcmfmac_sdio-firmware-rpi: update to sync firmware with RPi OS, add new symlinks
2023-12-08 13:23:27 +01:00
Jan Čermák
1211b24c7f Add image size check to hdd-image.sh (#2965)
There is no sanity check when creating OS images, so when some of the
partitions gets too big, part of its data may get overwritten by the
following partition, resulting in corrupted image. Add checks for the
defined partition sizes and bail out if they're too big.
2023-12-05 11:38:33 +01:00
Stefan Agner
d427248a05 Merge branch 'main' into dev 2023-12-04 16:12:59 +01:00
Stefan Agner
6579b978d0 Bump OS to release version 11.2 2023-12-04 15:00:06 +01:00
Stefan Agner
1ffaec3acb Fix Supervisor image corruption detection (#2953)
* Fix Supervisor image corruption detection

When multiple images match the reference, multiple IDs are passed as a
single argument to docker image rm, leading to an error:
Error response from daemon: page not found

Make sure to pass the ids as separate argument to make the delete work
in any case.

* Cleanup reusing Supervisor from an old/unused reference

As noted in #2113, we don't need this logic anymore after a major OS
releases. So simply drop the logic to also make the image corruption
detection work again.

* Make sure image IDs are sorted to make them unique
2023-12-04 14:58:08 +01:00
Jan Čermák
934273e344 Backport support for Netgear AXE3000/A8000 and Comfast CF-952AX (#2962)
Current mainline contains support for two more WiFi cards in the mt7921u
driver that only use a proprietary VID/PID but are compatible with the
standard driver. Backport support for those via a simple driver patch.

Fixes #2926
2023-12-04 13:23:22 +01:00
Jan Čermák
da40ca2271 Linux: Update kernel 6.1.65 (#2960) 2023-12-04 13:23:13 +01:00
Jan Čermák
a79e3b270c RaspberryPi: Update kernel 6.1.63 - stable_20231123 (#2956)
* RaspberryPi: Update kernel 6.1.63 - stable_20231123

* Bump rpi-firmware to latest stable version

* buildroot 2b6996211e...836f7e7b5e (1):
  > package/rpi-firmware: bump to version for stable_20231123 kernel
2023-12-01 18:14:01 +01:00
Stefan Agner
20295a5f0b Fix RAUC certificate check (#2955)
Check the right environment variable when determining if RAUC
certificates through secrets are provided.
2023-11-30 17:49:16 +01:00
Stefan Agner
26e96caef6 Linux: Update kernel 6.1.64 (#2954) 2023-11-30 14:45:55 +01:00
Stefan Agner
c59c887a53 Fix Supervisor image corruption detection (#2953)
* Fix Supervisor image corruption detection

When multiple images match the reference, multiple IDs are passed as a
single argument to docker image rm, leading to an error:
Error response from daemon: page not found

Make sure to pass the ids as separate argument to make the delete work
in any case.

* Cleanup reusing Supervisor from an old/unused reference

As noted in #2113, we don't need this logic anymore after a major OS
releases. So simply drop the logic to also make the image corruption
detection work again.

* Make sure image IDs are sorted to make them unique
2023-11-30 14:41:44 +01:00
Jan Čermák
2c6d0de965 Enable more WiFi drivers for all platforms (#2951)
Preemptively enable larger set of WiFi drivers for all platforms and add more firmwares for them with the aim to harmonize WiFi device support among all boards and to have implicit support of devices that users might want to use.  Targets `generic_aarch64`, `generic_x86_64` and `ova` also include options and firmwares for cards that are using PCI/PCIe bus - support for these is in a separate config fragment.

Especially the `generic_x86_64` is currently very tight with the rootfs space, so I had to do some triaging and select only sensible drivers and firmwares - especially archaic PCMCIA devices or devices not supporting only 802.11g or lower standards were among the first that I removed during the triaging - we can consider enabling those but this time on an someone's explicit need to have them enabled.

This closes #2815 and replaces large part of #2761, also potentially addresses (at least) these: #2806, #2783, #2841, #2776, #2725, #2600

-------------

* Remove WiFi options from generic and board kernel config fragments
* Enable MMC in OVA kernel
   This is needed for SDIO drivers to work. Use the same options as we
   currently use for generic_x86_64.
* Add CRYPTO_MICHAEL_MIC to the common kernel config
   This is requirement for TKIP and is a dependency of ATH11K driver.
* Add kernel config fragments with wireless cards support
* Add firmwares for WiFi cards
* Enable more Bluetooth device drivers
2023-11-30 14:19:05 +01:00
Stefan Agner
e524a5e03d Bump OS to pre-release version 11.2.rc2 2023-11-28 17:24:46 +01:00
Stefan Agner
eab18076ad Remove kernel HCI driver if no WiFi/Bluetooth module present (#2944) (#2948)
* Remove kernel HCI driver if no WiFi/Bluetooth module present (#2944)

If the WiFi/Bluetooth module is not present on the SDIO bus, remove the
HCI driver. This avoids hci0 interface to be present. Current Home
Assistant Core versions show a Bluetooth device as soon as a hci device
is present. With this change there won't be a Bluetooth device shown.

* Update buildroot-external/package/pi-bluetooth/hcidisable.service

Co-authored-by: Jan Čermák <sairon@users.noreply.github.com>

---------

Co-authored-by: Jan Čermák <sairon@users.noreply.github.com>
2023-11-28 17:24:09 +01:00
Stefan Agner
376e4f9296 Do not start hciuart.service/bthelper@hci0.service if krnbt is used (#2947)
* Do not start hciuart.service if krnbt is used

Avoid starting (and failing to start) hciuart.service if krnbt is used.
This avoid unnecessary failed services showing up.

* Update buildroot-external/package/pi-bluetooth/hciuart.service

Co-authored-by: Jan Čermák <sairon@users.noreply.github.com>

* Drop duplicate bluetooth in path

* Avoid bthelper@hci0.service failing

* Revert "Avoid bthelper@hci0.service failing"

This reverts commit f79777e63e.

* Add ExecConditiono to bthelper@.service as well

---------

Co-authored-by: Jan Čermák <sairon@users.noreply.github.com>
2023-11-28 17:24:04 +01:00
Stefan Agner
9235649bbd Remove kernel HCI driver if no WiFi/Bluetooth module present (#2944) (#2948)
* Remove kernel HCI driver if no WiFi/Bluetooth module present (#2944)

If the WiFi/Bluetooth module is not present on the SDIO bus, remove the
HCI driver. This avoids hci0 interface to be present. Current Home
Assistant Core versions show a Bluetooth device as soon as a hci device
is present. With this change there won't be a Bluetooth device shown.

* Update buildroot-external/package/pi-bluetooth/hcidisable.service

Co-authored-by: Jan Čermák <sairon@users.noreply.github.com>

---------

Co-authored-by: Jan Čermák <sairon@users.noreply.github.com>
2023-11-28 17:23:08 +01:00
Stefan Agner
93a2d8a19b Do not start hciuart.service/bthelper@hci0.service if krnbt is used (#2947)
* Do not start hciuart.service if krnbt is used

Avoid starting (and failing to start) hciuart.service if krnbt is used.
This avoid unnecessary failed services showing up.

* Update buildroot-external/package/pi-bluetooth/hciuart.service

Co-authored-by: Jan Čermák <sairon@users.noreply.github.com>

* Drop duplicate bluetooth in path

* Avoid bthelper@hci0.service failing

* Revert "Avoid bthelper@hci0.service failing"

This reverts commit f79777e63e.

* Add ExecConditiono to bthelper@.service as well

---------

Co-authored-by: Jan Čermák <sairon@users.noreply.github.com>
2023-11-28 17:18:50 +01:00
Stefan Agner
c3b9912e2e Generate self-signed certificates for development (#2943)
* Generate self-signed certificates for development

To simplify development generate a self-signed certificate on first
build. Also make sure that the self-signed certificate is being added
the RAUC keyring so that manual updates can be performed.

* Add self-signed certificat independent of deployment type

* Add a warning when building with self-signed certificate
2023-11-27 18:36:12 +01:00
dependabot[bot]
741498c92b Bump dessant/label-actions from 4.0.0 to 4.0.1 (#2946)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-27 14:38:45 +01:00
Stefan Agner
d7f49ab9ff Bump OS to development version 11.3.dev0 2023-11-21 10:03:33 +01:00
Stefan Agner
b37dc33e5c Bump OS to pre-release version 11.2.rc1 2023-11-21 09:54:06 +01:00
Jens Maus
5891250bd1 Bump rpi-rf-mod dt overlay to latest version (#2921)
* Bump rpi-rf-mod dt overlay to latest version

* updated to 1.13.1
2023-11-21 09:52:03 +01:00
Jan Čermák
1ea0bb7bf4 Linux: Update kernel 6.1.63 (#2937) 2023-11-20 17:28:25 +01:00
Jan Čermák
f986d7f690 Bump buildroot to v2023.02.7 (#2936)
* buildroot 04e4585bec...2b6996211e (2):
  > Merge tag '2023.02.7' into 2023.02.x-haos
  > Merge tag '2023.02.6' into 2023.02.x-haos
2023-11-20 17:19:49 +01:00
dependabot[bot]
9fd789cdb5 Bump docker/build-push-action from 5.0.0 to 5.1.0 (#2935)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5.0.0 to 5.1.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v5.0.0...v5.1.0)

---
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-11-20 14:15:27 +01:00
dependabot[bot]
1848fd7555 Bump actions/github-script from 6 to 7 (#2934)
Bumps [actions/github-script](https://github.com/actions/github-script) from 6 to 7.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/github-script
  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-11-20 14:14:51 +01:00
Jan Čermák
5d11e16150 Fix miniUART on Yellow with kernel HCI init enabled (#2931)
Bluetooth initialization was broken on Yellow because RPi's kernel
started to use initialization by the kernel driver by default, yet
changes from the miniuart-bt overlay are applied directly to Yellow
DTS and had to be updated too. This commit replaces the previous
patch forcing the miniUART usage for Bluetooth with a new one which
is based on the current miniuart-bt-overlay.dts.
2023-11-16 15:55:14 +01:00
Jan Čermák
7c3cee049b Bump buildroot to fix rpi-firmware hash (#2930)
* buildroot a48cc458e7...04e4585bec (1):
  > package/rpi-firmware: update package tarball hash
2023-11-16 11:47:46 +01:00
Jan Čermák
c94b29a9cc Bump Raspberry Pi firmware to latest stable version (#2929)
Also added a little warning to the RPi kernel bump script, so the
future me/us don't do the same mistake as I did.

* buildroot 20ea6bedda...a48cc458e7 (1):
  > package/rpi-firmware: bump to version for stable_20231030 kernel
2023-11-15 18:52:27 +01:00
Jan Čermák
b06a89b264 Reduce Tinker and Amlogic kernel configs to defconfigs (#2925)
Reduce fully-expanded configs versioned in our repository to defconfigs
containing only the necessary options. Just like #2923, this change does
not alter the resulting kernel .config in any way for the affected
platforms (Tinker, Odroid C2/C4/N2).
2023-11-14 14:12:42 +01:00
Bertrand GRESSIER
5d9244b92a fix: disable uas for wavlink adaptor (#2924)
this adaptor doesn't work and the hard disk is not able to work correctly.
Need to disable UAS to fallback to the usb-storage module
2023-11-14 10:21:57 +01:00
Jan Čermák
5b534e3b58 Update old full Kernel configs to newly generated ones
For tinker and amlogic-based targets we're using checked-in kernel
configs generated by kconfig for some old kernel revisions. Check in
current config before we clean it up and reduce to a smaller stub later.
2023-11-13 15:04:42 +01:00
Jan Čermák
0f2b7c49f2 Clean up inconsistencies in kernel configs
Clean up all kernel configs and fragments from non-existing kernel
options, invalid choice values and choices that trigger warnings
during kernel package configuration.

Here's an example of warnings triggered for Yellow:

.config:8531:warning: override: MODULE_COMPRESS_NONE changes choice state
.config:8536:warning: override: ZSWAP_COMPRESSOR_DEFAULT_LZ4 changes choice state
.config:8537:warning: override: ZSWAP_ZPOOL_DEFAULT_ZSMALLOC changes choice state
.config:8543:warning: override: CPU_FREQ_DEFAULT_GOV_ONDEMAND changes choice state
.config:8717:warning: override: reassigning to symbol CGROUP_HUGETLB
.config:8767:warning: symbol value 'm' invalid for XFRM
.config:8852:warning: symbol value 'm' invalid for MEDIA_CONTROLLER_DVB
.config:8972:warning: symbol value 'm' invalid for SND_HDA_I915

There were also some options that are set in our or default configs
but end up patched by `KCONFIG_(DIS|EN)ABLE_OPT` in package makefiles,
these options are now explicitly set in our fragments too. For example
this was toggled for `generic_aarch64`:

CONFIG_DEFAULT_SECURITY_APPARMOR n -> y
CONFIG_DEFAULT_SECURITY_DAC y -> n
CONFIG_GCC_PLUGINS y -> n

The only goal of this commit is to make sure no warnings appear
anymore and the resulting kernel configs remain unchanged. This will
allow us to create tools for sanity checks of our kernel config
overrides. There is one single change in `ova` config resulting from
previously invalid `m` option for a bool value:

-# CONFIG_9P_FS_POSIX_ACL is not set
+CONFIG_9P_FS_POSIX_ACL=y
2023-11-13 14:55:40 +01:00
dependabot[bot]
754bec30fd Bump dessant/label-actions from 3.1.0 to 4.0.0 (#2922)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-13 14:30:44 +01:00
Stefan Agner
1238527b49 Linux: Update kernel 6.1.62 (#2917) 2023-11-09 22:09:04 +01:00
Stefan Agner
196c48ee5e Use kernel local version for HAOS compiled Linux kernel (#2912)
* Use kernel local version for HAOS compiled Linux kernel

Use the local version config option to add "haos" to the system's Linux
kernel version to indicate the kernel is built specifically for Home
Assistant OS. This makes sure to overwrite any other local version (e.g.
provided by Raspberry Pi kernel's defconfig) and makes it easier to
verify something is running on HAOS since the string will be visible in
any Container using `uname -a`.

* Add dash in front
2023-11-09 13:46:46 +01:00
Jan Čermák
5e80f74b7a Bump buildroot to add RTL885x firmware (#2911)
* buildroot 2a3f23fc4b...20ea6bedda (1):
  > package/linux-firmware: add RTL8851/RTL8852 firmware
2023-11-07 21:10:53 +01:00
Stefan Agner
11c2eab58a Generic AArch64: Enable options required for virtiofs (#2909) (#2910)
* Generic AArch64: Enable options required for virtiofs (#2909)

* Update buildroot-external/board/arm-uefi/generic-aarch64/kernel.config

Co-authored-by: Jan Čermák <sairon@users.noreply.github.com>

---------

Co-authored-by: Jan Čermák <sairon@users.noreply.github.com>
2023-11-06 17:13:16 +01:00
Jens Maus
e0d6cc15d5 fixed incorrect uppercase Y kconfig use (#2908) 2023-11-06 11:53:04 +01:00
Stefan Agner
1a6b7418f0 Improve Bluetooth cache cleanup command (#2906)
Use the find's delete flag to delete the files instead of spanning a
shell for each file.
2023-11-06 11:52:57 +01:00
Stefan Agner
fccb11cad1 Revert "Upload artifacts index even on partial builds (#2901)" (#2905)
This reverts commit 49f26c3d2e.

The steps is not valid in that context. Let's revert the commit to get a
green build first.
2023-11-02 16:35:26 +01:00
Jan Čermák
5314324c61 RaspberryPi: Update kernel 6.1.58 - stable_20231030 (#2904) 2023-11-02 16:26:47 +01:00
Jan Čermák
53d139df97 Linux: Update kernel 6.1.61 (#2903) 2023-11-02 16:19:57 +01:00
Stefan Agner
49f26c3d2e Upload artifacts index even on partial builds (#2901)
Make sure that the artifacts index always gets updated. This allows to
use builds even when not all of them are available.
2023-11-02 13:46:12 +01:00
Jan Čermák
d9b49bbcb8 Add pruning of object file cache (#2899) 2023-11-02 13:45:56 +01:00
Jan Čermák
26bfeb6c40 Refresh all boards' defconfigs (#2895)
Make sure the order of options is the same as generated by Kconfig by
running savedefconfig on an unchanged configuration.
2023-11-02 13:45:40 +01:00
Stefan Agner
586f2ea021 Fix Artifacts index bump when using workflow_call (#2900)
Use inputs.version which is available for workflow_call as well as
workflow_dispatch.
2023-11-02 11:33:55 +01:00
xtsrthm
6df79b13e9 generic-x86-64: Add missing dependency for #2800 to kernel.config (#2813)
* Add missing dependency to kernel.config

* Move CONFIG_IIO up to follow Kconfig hieararchy

---------

Co-authored-by: Jan Čermák <sairon@users.noreply.github.com>
2023-11-01 17:42:27 +01:00
Stefan Agner
204bd8bb56 Pass secrets to artifacts index generation workflow (#2893) 2023-10-31 23:22:10 +01:00
Jan Čermák
2888ccf28e Improve handling of timeouts in tests (#2890)
* Improve handling of timeouts in tests

Make timeout handling in tests more transparent. Added a custom shell
driver that allows to define global timeout for commands in the config
file, and replaced for/sleep constructs with infinite loops that will be
eventually terminated by pytest-timeout plugin. Current timeouts taken
from last runs on Github CI with some extra headroom.

* test_supervisor_is_updated shouldn't be skipped if no update was needed

* Allow more time for system startup

* Allow even more time for system startup
2023-10-31 18:16:49 +01:00
Stefan Agner
c33fc03fd6 Checkout source code when uploading artifacts index (#2892)
The index.html file comes from the repository source directory. Make sure
it is checked out when regenerating the artifacts index.
2023-10-31 14:37:02 +01:00
Jan Čermák
d7e3a8b985 Fix the condition for OS artifact download (#2891) 2023-10-31 14:08:49 +01:00
Stefan Agner
e4e4c62834 Fix quotes in artifact index generation (#2889) 2023-10-31 14:00:19 +01:00
Stefan Agner
2e8b66d283 Separate artifacts index update into separate workflow (#2888)
* Separate artifacts index update into separate workflow

* Apply suggestions from code review

Co-authored-by: Jan Čermák <sairon@users.noreply.github.com>

---------

Co-authored-by: Jan Čermák <sairon@users.noreply.github.com>
2023-10-31 13:50:35 +01:00
Jan Čermák
54cab43ea3 Add a flag to determine tests were called from another workflow (#2887)
If a reusable workflow is called from another workflow, the event_type
in the child workflow is still the same as parent's. This is a known
"feature": https://github.com/actions/runner/discussions/1884

Add a flag to inputs that has default value set to true. This is in turn
set only if the workflow is called from another one, chosing the correct
step for obtaining the OS image.
2023-10-31 10:12:37 +01:00
Jan Čermák
d39a767bfb Bump HAOS beta when stable version is released (#2885)
Beta users should also get latest stable without the need for manual
bump.

Suggested here: https://github.com/home-assistant/operating-system/pull/2855#discussion_r1368678727
2023-10-31 10:12:29 +01:00
Jan Čermák
5e5462ddde Always use environment for bump_version job (#2884)
As discussed here: https://github.com/home-assistant/operating-system/pull/2855#discussion_r1368533496
2023-10-31 10:12:21 +01:00
Jan Čermák
39778e882a Add test suite for Supervisor tests (#2880)
* Add test suite for Supervisor tests

* test_supervisor_is_updated should depend on test_update_supervisor

Co-authored-by: Stefan Agner <stefan@agner.ch>

---------

Co-authored-by: Stefan Agner <stefan@agner.ch>
2023-10-31 10:12:10 +01:00
Stefan Agner
e1be4f3efb Bump buildroot to update Docker to v24.0.7 (#2883)
* buildroot 82003cc280...2a3f23fc4b (2):
  > package/docker-cli: bump version to v24.0.7
  > package/docker-engine: bump version to v24.0.7
2023-10-30 15:42:13 +01:00
Jan Čermák
ae711734bf Run tests within build workflow (#2882) 2023-10-30 15:42:03 +01:00
Stefan Agner
6d7db27f84 Use the correct secret to clear cache on the Cloudflare frontend (#2881) 2023-10-30 14:54:22 +01:00
Stefan Agner
8133cfead8 Print object cache statistics before upload (#2874)
Print the object cache statistics before uploading them to the action
cache. The action cache accesses all files, this makes the statistics
of files used during build not useful.
2023-10-27 21:04:47 +02:00
Stefan Agner
91e82e40d9 Install AWS CLI tools in final build step (#2873) 2023-10-27 21:04:17 +02:00
Jan Čermák
6e8568c666 Optimize build cache for dev builds (#2872)
* Optimize build cache for dev builds

* Remove downloaded files cache, as it doesn't save that much time and
  it can't fit into the repo cache limit, randomly causing eviction of
  CC object cache for a single board.
* Limit saving of the object cache only to the dev branch, because
  of the restrictions for the cache access limit us from effectively
  using the cache for rc/main branches anyway.
* Adjust names of the steps a bit for clarity.

* Add printing of some cache stats

* Compare old ccache files' age to Makefile
2023-10-27 13:56:44 +02:00
Jan Čermák
252887cc0d RaspberryPi: Update kernel 6.1.58 - stable_20231024 (#2864)
* RaspberryPi: Update kernel 6.1.58 - stable_20231024

* Remove unnecessary Bluetooth patch

* Rebase Yellow patchset

---------

Co-authored-by: Stefan Agner <stefan@agner.ch>
2023-10-27 11:16:27 +02:00
Jan Čermák
4769d22b3c Add checkout step to bump_version job in the build workflow (#2871)
It's required both for the artifact index and to run the RPi Imager bump
local action.
2023-10-27 09:33:05 +02:00
Stefan Agner
28c13d7709 Fix GitHub action build.yaml (#2868) 2023-10-26 21:09:12 +02:00
Stefan Agner
9c021aa766 Linux: Update kernel 6.1.60 (#2867) 2023-10-26 20:45:06 +02:00
Stefan Agner
a1947336a8 Merge branch 'main' into dev 2023-10-26 20:25:16 +02:00
Stefan Agner
9e70ebe989 Maintain and upload artifacts index (#2839)
* Maintain and upload artifacts index

Make the artifacts browsable by maintaining a list of builds. This keeps
it up-to-date even when deleting images from the object storage, and
minimizes queries to the object storage.

* Add favicon

* Apply suggestions from code review

Co-authored-by: Joakim Sørensen <joasoe@gmail.com>

* Move index update outside of the build Matrix

* Add error handling and styling

* Exclude index files

* Add cache flush

* Use separate prefix for indexes

This allows to filter by prefix when generating the main index. Since
the list-objects-v2 is limited to 1000 entries, this will be a bottle
neck soon. Separating indexes allows to support up to 1000 nightly
builds.

* Add missing backslash

* Use cp and fix index format

* Sync index.html as well

* Move OS artifacts index file to root directory

This is not really GitHub related, so it shouldn't live in there.

* Adjust URL for dev builds

---------

Co-authored-by: Joakim Sørensen <joasoe@gmail.com>
2023-10-26 20:24:04 +02:00
Stefan Agner
12b3d62f9e Bump OS to release version 11.1 2023-10-26 11:53:26 +02:00
Jan Čermák
0ec13ca335 Add action for bumping OS version for RPi imager (#2861)
Automate bump of the rpi-imager-haos.json in the version repository on
stable release so we don't have to do it manually. Uses slightly
advanced jq magic to touch only the changed fields and keep the rest of
the JSON content intact.
2023-10-26 11:50:42 +02:00
Jan Čermák
ae42fbf235 Add action for bumping OS version for RPi imager (#2861)
Automate bump of the rpi-imager-haos.json in the version repository on
stable release so we don't have to do it manually. Uses slightly
advanced jq magic to touch only the changed fields and keep the rest of
the JSON content intact.
2023-10-26 10:21:31 +02:00
Stefan Agner
c5d21da0e8 Bump OS to development version 11.2.dev0 2023-10-23 23:09:40 +02:00
Stefan Agner
66c0435c7c Bump OS to pre-release version 11.1.rc1 2023-10-23 19:11:31 +02:00
Jan Čermák
b55e6c22c2 Do not use working-directory in test job (#2858) 2023-10-23 18:15:10 +02:00
Stefan Agner
aed1bb807c ODROID-M1: Fix environment read from SD card (#2822) (#2856)
Make sure the environment can be read and written to SD card as well.
This makes sure that first boot detection works properly too when
booting from SD card.
2023-10-23 14:25:52 +02:00
Jan Čermák
e928fa498f Use alternative environment for release build bump (#2855)
* Use alternative environment for release build bump

By using a separate environment, we can postpone the bump in the version
repository by adding a requirement for approval. Dev version will use
default (empty string) environment which doesn't have any constraints.

* Update build step name - it's not always dev build anymore

* Use dynamic environment name for beta/stable channels
2023-10-23 12:34:11 +02:00
Jan Čermák
b56f660316 Linux: Update kernel 6.1.59 (#2849) 2023-10-23 10:32:23 +02:00
Jens Maus
7f2d5c1524 Bump generic_raw_uart to 1.30 (#2847) 2023-10-23 10:32:01 +02:00
Jens Maus
f977067c18 bump qemu-guest-agent to 8.0.5 (#2846) 2023-10-23 10:30:43 +02:00
Stefan Agner
58accf39d7 Fix IPv6 routing failover for Thread (#2434) (#2845)
The patch added in #2434 is not working: IS_ENABLED requires the full
config symbol including CONFIG_ prefix.

Fix the patch to make automatic IPv6 route failover depening on IPv6
reachability probes actually work.
2023-10-20 00:10:34 +02:00
Jan Čermák
caf6611f7d Fix extraction of OVA image artifact in test step (#2842)
* Fix extraction of OVA image artifact in test step

If the test image is obtained from an artifact instead of downloading,
its name contains the version as well, in that case we still need to use
wildcard expansion.

* uncompress qcow2 to a stable filename
2023-10-19 22:58:00 +02:00
Jan Čermák
d7b32fd100 Fix path to test results in processing steps (#2837)
Working-directory is relevant only for run steps, the other steps need
full path relative to the repository root.
2023-10-18 11:31:23 +02:00
Jan Čermák
81d9a90729 Bump buildroot to update BlueZ to v5.70 (#2835)
* buildroot 81cb78a54b...82003cc280 (1):
  > package/{bluez5_utils, bluez5_utils-headers}: bump to version 5.70
2023-10-18 09:25:02 +02:00
Jan Čermák
d4cb408090 Fix test action by checking out source first (#2836)
The first action can't be action with simple run step, because it is
respecting the working-directory already. Put checkout step to the top.
2023-10-17 23:43:50 +02:00
Jan Čermák
3e36628c09 Create foundation for Labgrid-based OS tests (#2812)
* Create foundation for Labgrid-based OS tests

Add foundation for Labgrid-based tests of OS builds. Currently uses just
the QEMU driver, which starts a virtual machine with pristine OS, and
generates few log reports which are saved as build artifacts.

Workflow is currently triggered either manually by specifying an OS
version, or by OS build job, which now saves an artifact of the OVA
image. This allows for some modularity. If we eventually add the
possibility to run builds on PRs, we could also add the workflow_call
trigger and turn the workflow into a reusable one.

TBD (in future PRs): some meaningful tests and possibility to test on
real hardware (either local or distributed).

* Apply suggestions from @agners

Co-authored-by: Stefan Agner <stefan@agner.ch>

* Wrap test command in a script, create venv for local tests

* Make shellcheck happy

---------

Co-authored-by: Stefan Agner <stefan@agner.ch>
2023-10-17 18:23:29 +02:00
Stefan Agner
56ccbf4b9e Bump buildroot to 2023.02.6 (#2831)
* buildroot b1c6a5e707...81cb78a54b (86):
  > Update for 2023.02.6
  > package/libhtp: bump to version 0.5.45
  > package/exim: security bump version to 4.96.2
  > package/mutt: fix libgpgme static build
  > board/raspberrypi: fix typo in comment
  > package/netsnmp: fix musl build
  > package/nmap: fix build with libressl >= 3.5.0
  > package/gcc: remove leftover from legacy PowerPC patch
  > package/samba4: security bump version to 4.18.8
  > package/libcue: security bump to version 2.3.0
  > package/go: security bump to version 1.20.10
  > {linux, linux-headers}: bump 4.{14, 19}.x / 5.{4, 10, 15}.x / 6.{1, 5}.x series
  > package/wireless-regdb: bump version to 2023.09.01
  > package/python3: bump version to 3.11.6
  > {linux, linux-headers}: bump 5.15.x / 6.{1, 5}.x series
  > package/gstreamer1-editing-services: bump to version 1.22.6
  > package/gst-omx: bump to version 1.22.6
  > package/gst1-rtsp-vaapi: bump to version 1.22.6
  > package/gst1-rtsp-server: bump to version 1.22.6
  > package/gst1-python: bump to version 1.22.6
  > package/gst1-libav: bump to version 1.22.6
  > package/gst1-devtools: bump to version 1.22.6
  > package/gst1-plugins-ugly: security bump to version 1.22.6
  > package/gst1-plugins-bad: security bump to version 1.22.6
  > package/gst1-plugins-good: security bump to version 1.22.6
  > package/gst1-plugins-base: security bump to version 1.22.6
  > package/gstreamer1: bump to version 1.22.6
  > package/cups: add upstream security fix for CVE-2023-4504
  > package/mbedtls: security bump to version 2.28.5
  > package/mbedtls: bump to version 2.28.4
  > package/mbedtls: bump to 2.28.3
  > DEVELOPERS: add Thomas Petazzoni for nodejs
  > package/exim: security bump version to 4.96.1
  > package/efl: bump to version 1.26.3
  > package/netsnmp: security bump to version 5.9.4
  > package/sslh: add SSLH_CPE_ID_VENDOR
  > package/gptfdisk: fix bug with util-linux 2.38
  > package/libmodplug: use a full-length hash as version
  > package/libmodplug: add a patch fixing cctype UB
  > package/enlightenment: security bump to version 0.25.4
  > package/wpewebkit: needs >= GCC 9
  > package/Makefile.in: set --shuffle=none for MAKE1
  > package/pkg-generic.mk: fix rule order for reinstall/rebuild/reconfigure
  > package/tar: security bump to version 1.35
  > package/go: fix installation
  > package/pkg-utils.mk: break hardlinks in global {TARGET, HOST}_DIR on per-package build
  > package/webkitgtk: require GCC 9 for the 2.40.x series
  > package/linux-tools: fix SysV init script
  > boot/at91bootstrap: disable PIE and stack-protector build flags
  > package/rockchip-mali: fix hash of generated archive
  > package/urandom-scripts: move seedrng init script to S01
  > package/opkg-utils: actually install to target
  > package/powertop: picutils is optional, not mandatory
  > package/gnu-efi: disable on mips64el
  > package/olsr: fix build with gpsd >= 3.25
  > package/python-mako: add optional runtime dependency on python-babel
  > package/python-mako: add optional runtime dependency on python-pygments
  > package/python-mako: add missing dependency on python-markupsafe
  > package/openblas: Add support for RISC-V architecture
  > package/pipewire: fix typo in Kconfig comment
  > package/go: cgo for the target needs the toolchain
  > package/go: security bump to version 1.20.9
  > package/go: security bump to version 1.20.8
  > package/go: security bump to v1.20.7
  > package/go: adjust Upstream header in patch
  > package/go: fix go-bootstrap when parent dir contains invalid .git
  > package/go-bootstrap-stage2: bump version to 1.19.11
  > package/go: bump to version 1.20.6
  > package/go: adjust comments
  > package/go-bootstrap: split into two stages: go1.4 and go1.19.10
  > package/{glibc, localedef}: security bump to version glibc-2.36-118-g22955ad85186ee05834e47e665056148ca07699c
  > package/neon: drop patches
  > package/libfastjson: security bump to version 0.99.9.1
  > package/libvpx: Add upstream security patch to fix CVE-2023-5217
  > package/libvpx: bump version to 1.13.0
  > package/mosquitto: bump to version 2.0.18
  > package/samba4: bump version to 4.18.7
  > package/php: bump version to 8.2.11
  > package/suricata: security bump to version 6.0.14
  > package/librsvg: security bump to version 2.50.9
  > unifdef: add missing license
  > package/{glibc, localedef}: security bump to 2.36-117
  > package/nodejs: fix parallel build further
  > package/libyang: security bump to version 2.1.111
  > package/bind: security bump to version 9.16.44
  > {linux, linux-headers}: bump 4.{14, 19}.x / 5.{4, 10, 15}.x / 6.{1, 4}.x series
2023-10-17 17:40:54 +02:00
Stefan Agner
44dc1781a5 Fix deployment on dev branch (#2834)
The deployment on dev channel should always be development. The change
came in from the main branch backmerge where the wrong merge strategy
has been used (the merge strategy "ort" along with option "ours" has
been used, instead of the "ours" merge strategy). And since the
deployment was a separate hunk, it resolved to the release branch.
2023-10-17 17:34:53 +02:00
Stefan Agner
157144eaa5 Linux: Update kernel 6.1.58 (#2829) 2023-10-17 10:51:43 +02:00
Stefan Agner
f946e098d6 Merge remote-tracking branch 'origin/dev' into dev 2023-10-16 14:49:14 +02:00
Stefan Agner
2a334e8c1a Merge branch 'main' into dev 2023-10-16 14:46:59 +02:00
Stefan Agner
7845199fa8 Add Home Assistant Green to GitHub infrastructure (#2828)
Add Home Assistant Green to the issue template and release drafter
configuration.
2023-10-16 14:32:36 +02:00
Stefan Agner
01e9b7d4f6 Merge branch 'main' into dev 2023-10-16 09:34:44 +02:00
Stefan Agner
f407c3de66 Use Docker 24 during build time (#2811)
use the same Docker version we deploy on Home Assistant OS during build.
2023-10-14 13:26:10 +02:00
Stefan Agner
6206f6a428 Linux: Update kernel 6.1.57 (#2807)
* Linux: Update kernel 6.1.57

* Remove now obsolete patch

* Keep Bluetooth patch for Raspberry Pi boards
2023-10-14 10:40:42 +02:00
Stefan Agner
a669a352d5 Bump OS to release version 11.0 (#2808) 2023-10-13 12:14:20 +02:00
Jan Čermák
ff7645ddaf Bump buildroot to update libcurl to v8.4.0 (#2804)
* buildroot f125c3e292...b1c6a5e707 (1):
  > package/libcurl: security bump to 8.4.0
2023-10-13 09:57:24 +02:00
Stefan Agner
30d3678c2d Bump OS to pre-release version 11.0.rc2 (#2803) 2023-10-11 22:22:08 +02:00
Jan Čermák
ff0a4b44e0 Bump buildroot to update libcurl to v8.4.0 (#2804)
* buildroot f125c3e292...b1c6a5e707 (1):
  > package/libcurl: security bump to 8.4.0
2023-10-11 10:44:50 +02:00
Stefan Agner
19ded665bd Drop uploading to the old development build server (#2802)
With the new development build uploads on R2 working, we no longer need
to upload development builds to the old server. Drop the build step.
2023-10-10 13:51:33 +02:00
xtsrthm
fc3c313509 generic-x86-64: Fix typo in kernel.config (#2801) 2023-10-10 09:31:22 +02:00
Stefan Agner
5b927389b8 Revert "RAUC update: Use verity bundle format (#2786)" (#2799)
This reverts commit 0ebcdcb9dc.

We only added verity support in HAOS 10.4. However, we currently have
an issue since HAOS 10.3 where certain Realtek network cards don't work
anymore (see issue #2630). For this systems, it won't be possible to
upgrade, even when using the console.

Only having two HAOS releases creates a rather "narrow" upgrade path
accross all boards. There could be more issues where this proves
problematic.

Currently we don't use any new feature of the verity format. Therefor
let's postpone the move to the new format for a couple of releases
for now.
2023-10-10 09:15:39 +02:00
Stefan Agner
a42ae2f25b Linux: Update kernel 6.1.56 (#2798) 2023-10-10 09:15:35 +02:00
xtsrthm
3e65e9a839 generic-x86-64: Add support for external i2c devices (#2800)
This commit adds support for usb to i2c adapters, the i2c chardev and the bme280  famaily environment sensors
2023-10-09 23:44:15 +02:00
Stefan Agner
ba23d68de7 Revert "RAUC update: Use verity bundle format (#2786)" (#2799)
This reverts commit 0ebcdcb9dc.

We only added verity support in HAOS 10.4. However, we currently have
an issue since HAOS 10.3 where certain Realtek network cards don't work
anymore (see issue #2630). For this systems, it won't be possible to
upgrade, even when using the console.

Only having two HAOS releases creates a rather "narrow" upgrade path
accross all boards. There could be more issues where this proves
problematic.

Currently we don't use any new feature of the verity format. Therefor
let's postpone the move to the new format for a couple of releases
for now.
2023-10-09 14:51:03 +02:00
Stefan Agner
b60fe22de8 Linux: Update kernel 6.1.56 (#2798) 2023-10-08 13:34:15 +02:00
Stefan Agner
f5d4379aed Bump OS to version 11.1.dev0 2023-10-05 12:08:48 +02:00
Stefan Agner
0d3cb42e47 Bump OS to pre-release version 11.0.rc1 (#2792) 2023-10-05 12:05:23 +02:00
Stefan Agner
1bec4e858b Set containerd root explicitly (#2476) (#2791)
With the move to Docker 23 containerd stores its metadata no longer
undernath the Docker data directory but at its default location at
/var/lib/containerd. Previously Docker passed a containerd configuration
toml file which explicitly set the metadata root underneath Docker's
data directory.

On Home Assistant OS, the new location /var/lib/containerd is on a tmpfs
file system. For unknown reasons, it seems that if containerd's root
directory is on a tmpfs this leads to significantly more syscalls and
hence CPU load.

Change the metadata location to be on the data partition again. Since
containerd is treated separately from Docker these days, use a new
root directory under /mnt/data for containerd as well. With this, the
CPU load of containerd is back to normal.
2023-10-05 11:24:43 +02:00
Dave T
8be78b1257 Improve grammar in README.md (#2790) 2023-10-05 08:26:23 +02:00
Stefan Agner
29ad504667 Remove unnecessary plug-ins from containerd (#2789)
* Bump buildroot

* buildroot a1bdf74b19...f125c3e292 (1):
  > package/containerd: add control for additional build tags

* Drop unnecessary containerd changes

Now that the snappshotter and the CRI plug-ins are disabled we don't
need to configure or disable them via configuration anymore. Drop the
unnecessary configs.
2023-10-04 18:19:27 +02:00
Stefan Agner
2cbaaf9f3b Fix fsfreeze freeze support (#2787)
Pass the script argument properly to make sure the script gets actually
called from the QEMU guest agent.
2023-10-03 16:21:57 +02:00
Stefan Agner
0ebcdcb9dc RAUC update: Use verity bundle format (#2786)
Move from the current plain format to the new verity bundle format. This
requires at least HAOS 10.4 to work. The Supervisor will make sure to
update to the latest minor release of the previous major release, so
updating will work in the regular use case.
2023-10-03 16:21:45 +02:00
Stefan Agner
893a49a3f3 Add fsfreeze support for QEMU/KVM/Proxmox installations (#2781)
* Add fsfreeze support for QEMU/KVM/Proxmox installations

Add fsfreeze scripts which calls the new Supervisor API to freeze Home
Assistant Core and add-ons which support the backup freeze scripts
(`backup_pre` and `backup_post`).

This allows to create safe snapshots with databases running.

* Fix lint issues
2023-10-02 08:30:20 +02:00
Joakim Sørensen
a72c6c0322 Add action job to upload artifacts to R2 (#2779) 2023-10-02 08:29:00 +02:00
Stefan Agner
56d96acd1b Bump buildroot to 2023.02.5 (#2775)
* buildroot df5fccafd8...a1bdf74b19 (1):
  > Merge tag '2023.02.5' into 2023.02.x-haos
2023-09-28 00:01:56 +02:00
clayton craft
469b109efd generic-x86-64: enable backlight support (#2772)
This enables backlight support on these hosts, which is useful if
running HASS on an old laptop or tablet and you want to (e.g.) conserve
power by controlling the backlight.
2023-09-27 23:57:37 +02:00
Stefan Agner
65271c797c Bump buildroot to update Docker to v24.0.6 (#2774)
* buildroot d6894cf55f...df5fccafd8 (3):
  > package/docker-cli: bump version to v24.0.6
  > package/docker-engine: bump version to v24.0.6
  > package/containerd: bump to version 1.7.6
2023-09-26 14:54:11 +02:00
Stefan Agner
39e867c352 Disable overlayfs features not used by Docker (#2773)
Currently `CONFIG_OVERLAY_FS_METACOPY` and
`CONFIG_OVERLAY_FS_REDIRECT_DIR` kernel options are enabled but not
preferred by Docker. The metadata copy feature is disabled by default,
and also not actively used by the overlayfs2 driver (see
2c3d1f7b4b).
So the metadata copy config is not really problematic per se. However,
it enables the redirect_dir feature. And a kernel which has the
redirect_dir feature compiled in also enables it by default. This
actually makes the overlayfs2 driver to fallback to naive diff, which
is, from what I understand, slower than the overlayfs native diff (see
also
49c3a7c4ba).
The Docker daemon is also reporting this on startup:

  Not using native diff for overlay2, this may cause degraded performance
  for building images: kernel has CONFIG_OVERLAY_FS_REDIRECT_DIR enabled

Currently `CONFIG_OVERLAY_FS_METACOPY` is enabled, and it also enables
`CONFIG_OVERLAY_FS_REDIRECT_DIR`. There was already a previous attempt
to disable the latter (see #2067).

Disable both configs explicitly until Docker is able to use them.
2023-09-26 14:54:01 +02:00
Stefan Agner
dd21a73031 Fix versioning set during build (#2771)
Respect quotes in the meta file. While at it, simplify version
validation as well.

Make sure development version is correctly set at build time.

While at it also simplify version check.
2023-09-25 18:32:57 +02:00
Stefan Agner
f9251252d9 Update and fix containerd v1.6.22 (#2770)
* Introduce containerd configuration

Configure the CNI config directory to a writeable location.

Disable unnecessary plug-ins to avoid unnecessary error messages during
containerd startup.

* Bump buildroot

* buildroot 8ea671337e...d6894cf55f (1):
  > Revert "Revert "package/containerd: bump version to v1.6.22""
2023-09-25 13:48:15 +02:00
Stefan Agner
5ea343289c Linux: Update kernel 6.1.55 (#2769) 2023-09-25 13:42:02 +02:00
Stefan Agner
3df2749171 Adjust Home Assistant OS versioning to prepare for new release strategy (#2767)
* Adjust Home Assistant versioning to prepare for new release strategy

With OS 11 we'll create rc pre-releases which will get directly pushed
to the beta channel. In contrast, release builds will get directly
pushed to the stable channel.

Similar to Home Assistant Core we'll create bump commits for all stable
and beta releases. This makes sure that the source code matches the
built binaries for all releases.

The development build will get a generated version. To avoid issues
with the new rc builds the dev build version will get injected on source
level now.

* Apply suggestions from code review
2023-09-25 13:41:50 +02:00
Stefan Agner
7870a1d78e Download latest stable Supervisor after device wipe (#2765)
* Download latest stable Supervisor after device wipe

Currently we download the latest tag after a device wipe, which gives us
the latest Supervisor (which quite likely can be a development version).
Use the stable version file instead to get the tag to be used to
download the Supervisor.

* Delete potentially corrupted updater info
2023-09-25 10:27:36 +02:00
Stefan Agner
8d6b4eb11b Unify release and dev GitHub actions (#2764)
Use a single workflow file for releases and dev builds. This avoids
duplication and enhances the release builds with some of the recent
improvements (e.g. shared build container).
2023-09-21 17:06:41 +02:00
Stefan Agner
49a487d4a2 Use latest Network device naming scheme (#2763)
This essentially reverts #2380, making sure that Home Assistant OS uses
systemd's latest network naming scheme.

We stick to a certain naming scheme to make sure NetworkManager still
applies the network configuration (which is matched by network interface
name by default).

With Supervisor [PR #4476](https://github.com/home-assistant/supervisor/pull/4476)
NetworkManager uses udev path by default. With this we can safely enable
the new interface naming and NetworkManager will still apply the
configuration based on udev path correctly.
2023-09-21 17:06:29 +02:00
Stefan Agner
86b172b9c2 Create swapfile even when not using the multi-user.target (#2762)
Pull in the swapfile creation service haos-swapfile.service when
swap.target is reached. This makes sure the service is started even when
other targets are used (e.g. rescue.target).
2023-09-21 15:30:24 +02:00
Stefan Agner
53567a86e8 Linux: Update kernel 6.1.54 (#2760) 2023-09-21 11:27:32 +02:00
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
Stefan Agner
b883b91a8c Bump buildroot to 2023.02.3 (#2645)
* buildroot 7e37cfe4f7...005b88359c (1):
  > Merge tag '2023.02.3' into 2023.02.x-haos
2023-07-19 00:57:27 +02:00
Stefan Agner
c4be219a85 Bump U-Boot for ODROID-M1 to 2023.07.02 (#2643) 2023-07-12 15:09:45 +02:00
Stefan Agner
51e3d0b875 Close rejected issus as "not planned" (#2641) 2023-07-12 15:06:48 +02:00
Stefan Agner
d662cfde9e Use hosted GitHub Action runners (#2638)
* Use hosted GitHub Action runners

Instead of using self-hosted runners use the hosted GitHub Action
runners. Officially the GitHub Action runners have a maximum of 14GB
free space available. However, a single Home Assistant OS build requires
up to 23GB (the ova board seems to require most because of the various
output image formats).

This PR adds some tricks to make use of the GitHub hosted GitHub Action
runners still, namely:
- Build and download cache is stored on /mnt which offers an additional
  10GB of disk space
- Some tools/SDKs on the runner get removed from the root disk to free
  up some disk space.

Other than that building on the hosted GitHub Action runners seems
straight forward. The build time is significantly longer (from ~30
minutes on the current AMD Ryzen 7950X build machine to 1 hours 30
minutes even with cache). But since we can build all boards in parallel
now, the overall build time will likely be shorted.

* Remove top-level release directory

The top-level release directory adds another copy of the images. This is
unnecessary for our release process now. Save the additional space and
time requirement. It comes with a slight downside for developers, but
also helps to save disk space on dev machines.
2023-07-11 23:18:01 +02:00
Irene Cheng Chi
7ae59b7023 ova: add support for various ethernet adapters (#2637)
* generic-x86-64: fragment for pcie kernel config

* ova: fragment for pcie kernel config

* generic-x64-64: remove duplicate config entry
2023-07-11 23:17:48 +02:00
Stefan Agner
9f5b9f8afe Use maintained GitHub Action to upload release assets (#2635)
The chosen GitHub action sets MIME types correctly and allows glob
uploads. Also upload directly from the output directory. This way we can
remove the unnecessary copy to the release directory in the future.
2023-07-11 14:25:51 +02:00
Stefan Agner
48c99c31b8 Linux: Update kernel 6.1.38 (#2634) 2023-07-07 01:09:00 +02:00
Stefan Agner
e43594f3cd Bump buildroot to update dbus-broker (#2633)
* buildroot 42e8c43f6f...7e37cfe4f7 (1):
  > package/dbus-broker: avoid blocking due to missing entropy
2023-07-07 01:08:51 +02:00
Stefan Agner
689faa0260 Improve service ordering for udisks2.service (#2632)
UDisks2 requires D-Bus and the systemd-journald, hence add the two sockets
as a requirement and order the service after them.
2023-07-05 02:40:50 +02:00
Stefan Agner
9cd3e438fa Add Rockchip RK3568 hardware number generator support (#2578) (#2631)
Add patches for the hardware random number generator part of the
Rockchip RK3568. This avoids dbus-broker startup failure seen on some
Hardkernel ODROID-M1 devices due to lack of entropy.
2023-07-05 02:40:42 +02:00
Steven Barth
742dea4165 Add support for iTCO and IT87 watchdogs on x86_64 (#2629) 2023-07-04 20:35:09 +02:00
Steven Barth
6776b23c32 Add overlay for systemd config to enable watchdog configuration (#2628) 2023-07-04 20:34:55 +02:00
Steven Barth
f33b3f2750 Add support for (emulated) i6300ESB watchdog (#2627)
I6300ESB is the watchdog device able to be emulated via qemu/kvm therefore enabling watchdog support based on an existing HA addon
2023-07-04 09:12:20 +02:00
Stefan Agner
67aa29da48 Linux: Update kernel 6.1.37 (#2626) 2023-07-03 18:23:53 +02:00
Adam Duff
642b8a132f Enable UHID to support Bluetooth input devices (#2623)
* Add UHID config to hassos.config
2023-07-03 18:18:08 +02:00
Stefan Agner
b10bf134c0 Add kernel configurations for RAUC verity format (#2622) 2023-07-01 21:16:12 +02:00
Stefan Agner
6bcad34dae Linux: Update kernel 6.1.36 (#2621) 2023-07-01 21:16:01 +02:00
Jens Maus
6eb48fea7c Add config options to enable 32-bit ARMv7 instruction support on ODROID-M1 (#2615)
So that legacy armv7 32bit applications can be correctly executed.
(This refs https://github.com/jens-maus/RaspberryMatic/issues/2349).
2023-06-27 23:10:40 +02:00
Stefan Agner
dc02955e31 Enable Intel Core/Core2/Atom temperature sensor (#2613) (#2614) 2023-06-27 23:10:09 +02:00
Stefan Agner
c9e3c496f5 Enable Realtek 802.11ac wireless chips support (#2600) (#2609) 2023-06-23 00:56:33 +02:00
Stefan Agner
0d346f9dc5 Linux: Update kernel 6.1.35 (#2608) 2023-06-23 00:55:58 +02:00
Stefan Agner
d9c19a8003 Bump buildroot (#2604)
* buildroot f1c8c3df11...42e8c43f6f (1):
  > Merge tag '2023.02.2' into 2023.02.x-haos
2023-06-19 23:53:04 +02:00
Stefan Agner
47de77406e Add patch to fix Bluetooth LE advertisement stall (#2598)
On some platforms (it seems to be pronounced on Intel NUC systems)
Bluetooth advertisements suddenly stop after a short while. Currently
there are work arounds in place to restart the HCI controller to keep
receiving the advertisements.

Advertisements have been received fine with Linux 5.15. This change
reverts a commit which has been isolated to be the culprit.
2023-06-15 16:23:53 +02:00
Stefan Agner
22424e591b Linux: Update kernel 6.1.34 (#2596) 2023-06-14 23:47:22 +02:00
Stefan Agner
276f531f35 Avoid waiting for time synchronization too early (#2594)
In case a system takes a bit longer to boot (e.g. due to SWAP
initialization on first boot, especially on a system with lots of memory
and not very fast strage, e.g. an ODROID-M1 using an SD card) we might
time-out waiting for time synchronization before the time
synchronization service even got started. By ordering the
systemd-time-wait-sync.service after the network is online, the timeout
of this service should be started much later. With that the
systemd-time-wait-sync.service shouldn't timeout any longer.
2023-06-14 00:07:25 +02:00
Stefan Agner
84659c2bf1 Add support for Intel GMAC Ethernet controller (#2589) (#2593)
Add support for Intel GMAC Ethernet controller as found on Intel Elkhart
Lake based SoC (e.g. Fitlet3)
2023-06-14 00:07:16 +02:00
dependabot[bot]
ad29aee1de Bump dessant/label-actions from 3.0.0 to 3.1.0 (#2590)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-12 21:39:04 +02:00
Stefan Agner
e7d6d6513b Linux: Update kernel 6.1.33 (#2584) 2023-06-10 00:43:59 +02:00
Stefan Agner
24217838e2 Start OS Agent only when boot partition is mounted (#2583)
To read the current LED configuration correctly /mnt/boot is required.
This change makes sure that the boot partition is mounted when the OS
Agent starts.
2023-06-10 00:43:51 +02:00
Stefan Agner
9261843a27 Make sure rpcbind gets started after systemd-tmpfiles is ready (#2582) 2023-06-10 00:43:35 +02:00
Stefan Agner
04449d98b5 Linux: Update kernel 6.1.32 (#2576) 2023-06-06 00:18:07 +02:00
Jens Maus
6b62c1e6b8 Remove rng-tools/rngd since it is not required with kernel 5.15+ (#2575) 2023-06-06 00:17:56 +02:00
clayton craft
1e67fe4b2a Add support for RTL8723BS SDIO WiFi modules (#2567)
Many x86_64 tablets (e.g. Cherry View) use SDIO WiFi modules, this
enables the driver for a common one I've come across in the wild.

This module requires firmware from the following, which are already
enabled for this platform:

  - BR2_PACKAGE_LINUX_FIRMWARE_RTL_87XX
  - BR2_PACKAGE_LINUX_FIRMWARE_RTL_87XX_BT

fixes #2422
2023-06-01 19:36:03 +02:00
Stefan Agner
0ed1ff27fb Linux: Update kernel 6.1.31 (#2569) 2023-06-01 19:35:56 +02:00
Jens Maus
875c8edcaf Add Yellow-specific rpi-rf-mod dts support (#2565)
* added first yellow-specific rpi-rf-mod dts support

* fix linter errors.

* added missing BR2_PACKAGE_RPI_RF_MOD_DTS to enable dts compilation for
yellow.
2023-06-01 19:35:48 +02:00
Stefan Agner
0f955f5141 Yellow: Always use mini-UART for Bluetooth (#2571)
* Yellow: Always use mini-UART for Bluetooth

Unfortunately, the mini-UART device tree adjusts the alias for serial1,
which we need to make ttyAMA1 the Zigbee UART (UART4).

However, we can no simply adjust that overlay, as the overlays are not
built as part of the Buildroot build. Instead, they are directly copied
from Raspberry Pi's Firmware repostiory.

Instead of using device tree overlays, just apply the changes to our
Yellow specific device tree. To avoid that the device tree gets loaded
anyhow, we could adjust config.txt but that has complications on its
own. Since the overlay might be conflicting with the Yellow device tree
anyways, just remove all of them.

Note: The miniuart-bt.dtbo overlay won't be present, while config.txt
of upgraded instances still reference it. It seems that this doesn't
cause problems at boot time. Leaving the dtoverlay=miniuart-bt present
also allows user to downgrade in case needed.

* Avoid duplicating 98-rpi.conf
2023-06-01 12:13:18 +02:00
Stefan Agner
afa8ca1714 Yellow: Rely on device tree alias for serial port numbering (#2568)
Use the device tree alias to enumerate the ttyAMA serial ports.
2023-05-31 11:11:04 +02:00
Stefan Agner
e7d98e9eda Linux: Update kernel 6.1.30 (#2566) 2023-05-31 00:53:25 +02:00
Jens Maus
cc63f37094 added missing rpi-rf-mod support for khadas_vim3 and odroid-m1 (#2563) 2023-05-30 09:31:05 +02:00
Jens Maus
6ea71953be Update generic_raw_uart to version 1.29 (#2562)
* updated generic_raw_uart to version 1.29 including its dependencies.

* use capital letters for ODROID naming.
2023-05-30 09:30:56 +02:00
errorb0t
3710f2079e Add device manufacturer link (#2561)
Fix Gigabyte GB-BPCE-3455 being the only listed device without a manufacturer link.
2023-05-30 09:18:14 +02:00
Stefan Agner
94311130c1 Enable PCIe WiFi cards to OVA (#2558) (#2559) 2023-05-24 19:36:47 +02:00
Mike Degatano
18cc4cb771 Set bind propagation for supervisor data (#2557) 2023-05-23 22:51:32 +02:00
Stefan Agner
0c5cc3d425 Bump buildroot (#2553)
* buildroot 553e6c5465...f1c8c3df11 (1):
  > package/linux-firmware: bump to version 20230515
2023-05-18 01:06:09 +02:00
Stefan Agner
6845bf43a5 Linux: Update kernel 6.1.29 (#2551) 2023-05-18 01:06:00 +02:00
Stefan Agner
e01993fffb Linux: Update kernel 6.1.28 (#2546) 2023-05-11 23:34:58 +02:00
c0ffeeca7
bf5691d3cd Make it clearer that the image file needs to be renamed (#2544)
* Make it clearer that the image file needs to be renamed

- add information that the update was only successful if version 20230328 is visible.

* Update Documentation/boards/hardkernel/odroid-m1.md

---------

Co-authored-by: Stefan Agner <stefan@agner.ch>
2023-05-11 21:54:23 +02:00
Stefan Agner
19117e98bd Bump buildroot (#2542)
* buildroot 5288737d35...553e6c5465 (1):
  > package/linux-firmware: bump to version 20230404
2023-05-11 00:19:49 +02:00
Stefan Agner
5254cda720 Bump buildroot (#2541)
* buildroot 21edbd975f...5288737d35 (1):
  > Merge tag '2023.02.1' into 2023.02.x-haos
2023-05-11 00:16:08 +02:00
Stefan Agner
22cccfc781 Bump buildroot (#2539)
* buildroot 8e1c933e7f...21edbd975f (4):
  > package/docker-cli: bump version to v23.0.6
  > package/docker-engine: bump version to v23.0.6
  > package/containerd: Bump to containerd 1.6.21
  > package/runc: bump to version 1.1.7
2023-05-10 00:37:22 +02:00
Stefan Agner
f179742600 Enable BCM943228HMB and other PCI based Broadcom devices (#2525) (#2530) 2023-05-01 23:02:22 +02:00
Stefan Agner
6ad36f2aab Add rpcbind to support NFSv3 (#2529) 2023-05-01 23:02:14 +02:00
Stefan Agner
9d45acdfba Linux: Update kernel 6.1.27 (#2528) 2023-05-01 23:02:06 +02:00
Stefan Agner
064772d0bb Bump buildroot (#2518)
* buildroot f3d7e0d7e5...8e1c933e7f (2):
  > package/docker-cli: bump version to v23.0.5
  > package/docker-engine: bump version to v23.0.5
2023-04-27 18:35:35 +02:00
Stefan Agner
217f3d97f7 Bump buildroot (#2516)
* buildroot b3eec5763d...f3d7e0d7e5 (1):
  > package/network-manager: bump version to 1.40.18
2023-04-27 18:22:02 +02:00
Stefan Agner
566811ae62 Linux: Update kernel 6.1.26 (#2515) 2023-04-27 16:27:42 +02:00
Sven Serlier
b0d113d7bb Documentation: Update and add URLs (#2471)
* Update URLs

* Add URLs

* Update Documentation/network.md

Co-authored-by: Stefan Agner <stefan@agner.ch>

* Update Documentation/boards/README.md

Co-authored-by: Stefan Agner <stefan@agner.ch>

* Update Documentation/boards/README.md

Co-authored-by: Stefan Agner <stefan@agner.ch>

* Update Documentation/boards/README.md

Co-authored-by: Stefan Agner <stefan@agner.ch>

---------

Co-authored-by: Stefan Agner <stefan@agner.ch>
2023-04-27 12:15:14 +02:00
Stefan Agner
08d4c39d6c Bump buildroot (#2509)
* buildroot ac537ff658...b3eec5763d (1):
  > package/readline: add upstream patch to fix crash with invalid locale specification
2023-04-24 23:58:27 +02:00
Stefan Agner
02ac8e90d6 Enable Gasket driver for Google Coral support on ODROID-M1 (#2508) 2023-04-24 21:27:30 +02:00
Stefan Agner
bf76a0b473 Avoid CLI restart on shutdown (#2507)
* Avoid CLI restart on shutdown

* Update buildroot-external/rootfs-overlay/usr/sbin/hassos-cli
2023-04-24 21:27:21 +02:00
Stefan Agner
27992e2b13 Bump buildroot (#2506)
* buildroot acec896cab...ac537ff658 (1):
  > package/systemd: bump to version 252.9
2023-04-24 18:23:19 +02:00
Stefan Agner
4e1ea18251 Fix boot on Raspberry Pi 4 32-bit (#2505)
With U-Boot 2023.01 booting on Raspberry Pi 4 32-bit (at least with 4
or 8GB of memory) freezes when trying to enumerate USB devices. It seems
that the PCIe initialization partially fails, which causes the USB XHCI
initialization to fail.

It seems that a new restriction on viable addresses for PCIe
initialization causes the problem. Revert the offending commit to make
U-Boot properly detect USB devices again.
2023-04-24 18:23:10 +02:00
Stefan Agner
9d167da919 Fix startup by using BindTo and After (#2496) (#2503)
Use BindTo and After settings from the QEMU guest agente service file
present in the QEMU source tree (contrib/systemd/qemu-guest-agent.service).
2023-04-24 18:22:56 +02:00
Stefan Agner
a3471cff76 Linux: Update kernel 6.1.25 (#2495) 2023-04-20 22:04:53 +02:00
Stefan Agner
355ec34ad1 Fix NVMe SSD boot for Raspberry Pi 4/CM4 (#2493)
The new U-Boot 2023.01 requires an additional config which is missing
from the generic Raspberry Pi U-Boot configuration (see #2234). Add
it to the generic Raspberry Pi U-Boot configuration so Yellow as well as
other CM4 based systems can boot from NVMe SSD again.
2023-04-20 22:04:44 +02:00
Stefan Agner
a44d573d3d Enable HDMI on Khadas VIM3 (#2491)
Use the same kernel configuration for Display/GPU/HDMI/CDC kernel
modules as ODROID-N2 which has proven to be working well.
2023-04-20 18:21:37 +02:00
b-uwe
888b4c852d Fix typo in ODROID-M1 documentation (#2474) 2023-04-18 14:45:25 +02:00
Stefan Agner
fbcc8e1c45 Enable Broadcom Ethernet PHYs support (#2413) (#2470) 2023-04-16 23:47:22 +02:00
Stefan Agner
bdcf4f124a Linux: Update kernel 6.1.24 (#2469) 2023-04-13 20:49:13 +02:00
Stefan Agner
bea888f8db Fix build without device tree overlays (#2467) 2023-04-13 07:38:43 +02:00
Stefan Agner
a6894512dd Add Broadcom NetXtreme/Tigon3 firmware (#2413) (#2466) 2023-04-12 22:11:01 +02:00
Stefan Agner
0dd621d444 Add firmware for Realtek RTL8152/RTL8153 USB Ethernet Adapters (#2456) (#2465) 2023-04-12 22:09:09 +02:00
Stefan Agner
f9484851a1 Add label action for frontend issues (#2464) 2023-04-12 22:01:01 +02:00
Stefan Agner
03c5efcd0a Remove RPI-RF-MOD/HM-MOD-RPI-PCB hat overlays for Yellow (#2408) (#2461)
The overlays do not properly support the Yellow hardware. Remove them to
avoid issues with Zigbee/Audio and possible other on-board hardware.
2023-04-12 21:41:55 +02:00
Stefan Agner
907ce276c2 Document eMMC boot for ODROID-M1 (#2460) 2023-04-12 21:41:46 +02:00
Stefan Agner
afe075ff56 Bump Raspberry Pi kernel and firmware to 1.20230405 (#2459)
* Bump buildroot

* buildroot ddc0ddca51...acec896cab (1):
  > package/rpi-firmware: bump version to 1.20230405

* RaspberryPi: Update kernel 6.1.21 - 1.20230405
2023-04-12 00:04:18 +02:00
Stefan Agner
1a01e2c98f Bump U-Boot for ODROID-M1 to 2023.04 (#2458) 2023-04-12 00:04:04 +02:00
Stefan Agner
99746aeed9 Linux: Update kernel 6.1.23 (#2453) 2023-04-07 00:17:45 +02:00
Stefan Agner
991a2e93d9 Bump buildroot to update Docker to 23.0.3 (#2452)
* buildroot befb515cdb...ddc0ddca51 (4):
  > package/docker-cli: bump version to v23.0.3
  > package/docker-engine: security bump version to v23.0.3
  > package/containerd: security bump to version 1.6.20
  > package/runc: security bump to version v1.1.5
2023-04-06 00:24:24 +02:00
Stefan Agner
01548af27e Use UTF-8 as default native language support (NLS) (#2450)
This makes sure that CIFS/SMB are mounted with the UTF-8 character set
by default on all boards.
2023-04-06 00:24:02 +02:00
Stefan Agner
19e2869261 Add support for NFS and SMB/CIFS network file systems (#2446)
* Add support for NFS and SMB/CIFS network file systems

* Remove server component
2023-04-03 18:38:19 +02:00
dependabot[bot]
b88deef758 Bump actions/stale from 7.0.0 to 8.0.0 (#2447)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-03 16:37:06 +02:00
Stefan Agner
c7588e9350 Enable Multi-Gen LRU (#2392)
* Enable Multi-Gen LRU

Multi-Gen LRU should improve performance under memory pressure. This is
especially useful for embedded platforms where memory is scarce.

* Add service to configure Multi-Gen LRU

Use min_ttl_ms of 1 which is the least aggressive in terms of lag. Since
we are a server application, we can tune trashing prevention with a
higher acceptable lag.
2023-03-31 23:28:43 +02:00
Stefan Agner
bdb3bd3ab1 Use zsmalloc for zswap (#2443)
The allocator is supposed to work well under low memory conditions.
2023-03-30 22:57:31 +02:00
Stefan Agner
3686a12d11 Bump buildroot to update NetworkManager to 1.40.16 (#2442)
* buildroot 90d1128033...befb515cdb (1):
  > package/network-manager: bump version to 1.40.16
2023-03-30 22:24:44 +02:00
Stefan Agner
94fe385ef4 Linux: Update kernel 6.1.22 (#2441) 2023-03-30 22:24:35 +02:00
Stefan Agner
f5e2919db1 Bump buildroot (#2439)
* buildroot 2ccc4c3f04...90d1128033 (2):
  > package/docker-cli: bump version to v23.0.2
  > package/docker-engine: bump version to v23.0.2
2023-03-29 15:33:52 +02:00
Stefan Agner
399997e83c Set umask on swapfile creation (#2436)
Make sure the swapfile is only readable by the owner.
2023-03-28 18:18:58 +02:00
Stefan Agner
1edb5c8c9e Limit systemd-journald log size to 500MB (#2226) (#2435) 2023-03-28 18:18:27 +02:00
Stefan Agner
c64c5b13ab Improve IPv6 NDP for non-local Thread Border routers (#2434)
* Add multiple routes support in NetworkManager

Support multiple routes to the same network learned via Router
Information Option. With this change, the kernel will have multiple
routing table entries to a given Thread network. The routes gateway
won't be updated with every new RIO any longer since every gateway
has its own entry.

* Enable IPv6 router reachability probing

Currently router reachability probing is disabled since HAOS enables
IPv6 forwarding and the necessary kernel options are not enabled. With
this change router reachability probing is enabled even though we are
a router on our own.

Note that Linux commit ea659e077528 ("[IPV6] ROUTE: Do not enable router
reachability probing in router mode.") by default disabled this
behavior. But since we are acting as a router as well as a host device,
we rather want this reachability probing.

See also: https://lore.kernel.org/netdev/b9182b02829b158d55acc53a0bcec1ed667b2668.1680000784.git.stefan@agner.ch/T/#u
2023-03-28 18:18:19 +02:00
Jens Maus
555c229519 updated generic_raw_uart to latest 1.28 version and updated rpi-rf-mod (#2431)
package to latest version as well.
2023-03-27 09:35:22 +02:00
Stefan Agner
4744a2f123 Fix swapfile creation for all memory sizes (#2427)
* Fix swapfile creation for all memory sizes

In certain situation awk prints the swapfile size in scientific
notation. The script can't deal with that, in which case swap file
creation fails.

Use int to convert the number to an integer.

Since pages are 4k, also make sure swapsize is aligned to 4k blocks.

* Add info message
2023-03-27 09:34:38 +02:00
Stefan Agner
9cd98003e8 Bump OS release version to 11 2023-03-25 09:19:26 +01:00
404 changed files with 22398 additions and 15566 deletions

View File

@@ -23,6 +23,7 @@ body:
required: true
attributes:
label: What operating system image do you use?
default: 0
options:
- generic-x86-64 (Generic UEFI capable x86-64 systems)
- generic-aarch64 (Generic UEFI capable aarch64 systems)
@@ -30,6 +31,7 @@ body:
- odroid-c2 (Hardkernel ODROID-C2)
- odroid-c4 (Hardkernel ODROID-C4)
- odroid-m1 (Hardkernel ODROID-M1)
- odroid-m1s (Hardkernel ODROID-M1S)
- odroid-n2 (Hardkernel ODROID-N2/N2+)
- odroid-xu4 (Hardkernel ODROID-XU4)
- ova (for Virtual Machines)
@@ -38,8 +40,10 @@ body:
- rpi3-64 (Raspberry Pi 3 64-bit OS)
- rpi4 (Raspberry Pi 4/400 32-bit OS)
- rpi4-64 (Raspberry Pi 4/400 64-bit OS)
- rpi5-64 (Raspberry Pi 5 64-bit OS)
- tinker (ASUS Tinker Board/Tinker Board S)
- yellow (Home Assistant Yellow)
- green (Home Assistant Green)
description: >
Can be found in [Settings -> System -> Repairs -> System Information](https://my.home-assistant.io/redirect/system_health/). It is listed as the `Board` value.
@@ -56,10 +60,21 @@ body:
validations:
required: true
attributes:
label: Did you upgrade the Operating System.
label: Did the problem occur after upgrading the Operating System?
default: 0
options:
- "Yes"
- "No"
- "Yes"
- type: textarea
validations:
required: true
attributes:
label: Hardware details
description: >
Provide details about the hardware used for your install.
This is especially important for bare-metal x86 installations.
If you have any USB devices attached, please list them here.
For VMs, include the hypervisor type and version.
- type: textarea
validations:
required: true
@@ -79,10 +94,10 @@ body:
attributes:
label: Anything in the Supervisor logs that might be useful for us?
description: >
Supervisor Logs can be found in [Settings -> System -> Logs](https://my.home-assistant.io/redirect/logs/)
then choose `Supervisor` in the top right.
Supervisor Logs can be found in [Settings -> System -> Logs](https://my.home-assistant.io/redirect/logs/?provider=supervisor)
then choose `Supervisor` in the top right. Alternatively enter `ha supervisor logs` in the Home Assistant CLI.
[![Open your Home Assistant instance and show your Supervisor system logs.](https://my.home-assistant.io/badges/supervisor_logs.svg)](https://my.home-assistant.io/redirect/supervisor_logs/)
[![Open your Home Assistant instance and show your Supervisor system logs.](https://my.home-assistant.io/badges/supervisor_logs.svg)](https://my.home-assistant.io/redirect/logs/?provider=supervisor)
render: txt
- type: textarea
validations:
@@ -90,8 +105,8 @@ body:
attributes:
label: Anything in the Host logs that might be useful for us?
description: >
Host Logs can be found in [Settings -> System -> Logs](https://my.home-assistant.io/redirect/logs/)
then choose `Host` in the top right.
Host Logs can be found in [Settings -> System -> Logs](https://my.home-assistant.io/redirect/logs/?provider=host)
then choose `Host` in the top right. Alternatively enter `ha host logs` in the Home Assistant CLI.
render: txt
- type: textarea
attributes:

View File

@@ -0,0 +1,97 @@
name: 'Bump RPi Imager OS version'
description: 'Bump version of Home Assistant OS in RPi Imager'
inputs:
version:
required: true
description: "Version of Home Assistant OS to bump to."
release-date:
required: true
description: "Release date as ISO 8601 date string."
runs:
using: "composite"
steps:
- shell: bash
id: validate-input
env:
INPUTS_DATE: ${{ inputs.release-date }}
run: |
if [[ -z "$INPUTS_DATE" ]] || [[ ! "$INPUTS_DATE" =~ ^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})Z$ ]]; then
echo "::error::Argument 'release-date' must be an ISO 8601 date string."
exit 1
else
echo "date=$(date --date=${INPUTS_DATE} +'%Y-%m-%d')" >> "$GITHUB_OUTPUT"
fi
- shell: bash
run: git clone --depth 1 https://github.com/home-assistant/version.git /tmp/version
- shell: bash
env:
INPUTS_VERSION: ${{ inputs.version }}
run: |
function bump_entry() {
json=$1
version=$2
release_date=$3
image_id=$4
image_name=$5
url="https://github.com/home-assistant/operating-system/releases/download/${version}/haos_${image_id}-${version}.img.xz"
temp_image=$(mktemp --suffix=.img.xz)
temp_out=$(mktemp)
curl -fsL -o "$temp_image" "$url"
image_download_size=$(stat --printf="%s" "$temp_image")
image_download_sha256=$(sha256sum "$temp_image" | awk '{print $1}')
unxz "$temp_image"
temp_unpacked="${temp_image%.*}"
extract_size=$(stat --printf="%s" "$temp_unpacked")
extract_sha256=$(sha256sum "$temp_unpacked" | awk '{print $1}')
entry_name="Home Assistant OS ${version} (${image_name})"
jq '
. as $data
| $data
| .os_list = [
.os_list[]
| if .name | test("Home Assistant OS .* \\(" + $image_name + "\\)") then
.name = "Home Assistant OS " + $version + " (" + $image_name + ")"
| .url = $url
| .extract_size = ($extract_size | tonumber)
| .extract_sha256 = $extract_sha256
| .release_date = $release_date
| .image_download_size = ($image_download_size | tonumber)
| .image_download_sha256 = $image_download_sha256
else .
end
]' \
--arg version "$version" \
--arg image_name "$image_name" \
--arg entry_name "$entry_name" \
--arg release_date "$release_date" \
--arg url "$url" \
--arg image_download_size "$image_download_size" \
--arg image_download_sha256 "$image_download_sha256" \
--arg extract_size "$extract_size" \
--arg extract_sha256 "$extract_sha256" \
"$json" > "$temp_out"
mv "$temp_out" "$json"
rm -rf "$temp_unpacked" "$temp_out"
}
bump_entry /tmp/version/rpi-imager-haos.json "$INPUTS_VERSION" "${{ steps.validate-input.outputs.date }}" "rpi3-64" "RPi 3"
bump_entry /tmp/version/rpi-imager-haos.json "$INPUTS_VERSION" "${{ steps.validate-input.outputs.date }}" "rpi4-64" "RPi 4/400"
bump_entry /tmp/version/rpi-imager-haos.json "$INPUTS_VERSION" "${{ steps.validate-input.outputs.date }}" "rpi5-64" "RPi 5"
bump_entry /tmp/version/rpi-imager-haos.json "$INPUTS_VERSION" "${{ steps.validate-input.outputs.date }}" "yellow" "Yellow"
- shell: bash
env:
INPUTS_VERSION: ${{ inputs.version }}
run: |
cd /tmp/version
git commit -am "Bump Home Assistant OS to ${INPUTS_VERSION} for RPi Imager"
git push
- shell: bash
run: rm -rf /tmp/version

View File

@@ -8,6 +8,7 @@ assume-fixed:
release. You can find the latest stable release at
https://github.com/home-assistant/operating-system/releases/latest
close: true
close-reason: not planned
core-issue:
comment: >
@@ -19,6 +20,19 @@ core-issue:
repository, the issue might have been reported already. Open a new issue
in that repository if you can't find a matching issue.
close: true
close-reason: not planned
frontend-issue:
comment: >
:wave: @{issue-author}, thanks for reporting an issue!
It looks like this issue is related to Home Assistant Frontend. Please
check the [Home Assistant Frontend](https://github.com/home-assistant/frontend/issues)
repository, the issue might have been reported already. Open a new issue
in that repository if you can't find a matching issue.
close: true
close-reason: not planned
supervisor-issue:
comment: >
@@ -30,6 +44,7 @@ supervisor-issue:
repository, the issue might have been reported already. Open a new issue
in that repository if you can't find a matching issue.
close: true
close-reason: not planned
new-feature:
comment: >
@@ -41,3 +56,4 @@ new-feature:
Please check if someone already requested a similar feature, or create
a new feature request with the "haos" tag in that forum. Thank you!
close: true
close-reason: not planned

View File

@@ -4,12 +4,12 @@ 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'
label: 'board/yellow'
- title: 'Home Assistant Green'
label: 'board/green'
- title: 'Open Virtual Appliance'
label: 'board/ova'
- title: 'Generic x86-64'
@@ -22,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

102
.github/workflows/artifacts-index.yaml vendored Normal file
View File

@@ -0,0 +1,102 @@
name: Update artifacts index
on:
# Manual run for specified version
workflow_dispatch:
inputs:
version:
description: Version of HAOS to build index for
required: true
type: string
# Called by other workflows (e.g. build.yaml)
workflow_call:
inputs:
version:
description: Version of HAOS to build index for
required: true
type: string
secrets:
R2_OS_ARTIFACTS_ID:
required: true
R2_OS_ARTIFACTS_KEY:
required: true
R2_OS_ARTIFACTS_BUCKET:
required: true
R2_OS_ARTIFACTS_ENDPOINT:
required: true
CF_ZONE:
required: true
CF_PURGE_TOKEN:
required: true
env:
PYTHON_VERSION: "3.10"
jobs:
build-index:
name: Build Home Assistant OS artifacts index
runs-on: ubuntu-22.04
steps:
- name: Checkout source
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup Python version ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install AWS CLI
run: pip install awscli
- name: Create build index
env:
AWS_ACCESS_KEY_ID: ${{ secrets.R2_OS_ARTIFACTS_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_OS_ARTIFACTS_KEY }}
run: |
aws s3api list-objects-v2 \
--bucket "${{ secrets.R2_OS_ARTIFACTS_BUCKET }}" \
--endpoint-url "${{ secrets.R2_OS_ARTIFACTS_ENDPOINT }}" \
--prefix "${{ inputs.version }}/" \
--query 'Contents[].Key' | jq 'map(split("/")[1]) | sort' > "${{ inputs.version }}.json"
aws s3 cp \
"${{ inputs.version }}.json" \
s3://${{ secrets.R2_OS_ARTIFACTS_BUCKET }}/indexes/ \
--endpoint-url "${{ secrets.R2_OS_ARTIFACTS_ENDPOINT }}"
- name: Regenerate artifacts index
env:
AWS_ACCESS_KEY_ID: ${{ secrets.R2_OS_ARTIFACTS_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_OS_ARTIFACTS_KEY }}
run: |
aws s3api list-objects-v2 \
--bucket "${{ secrets.R2_OS_ARTIFACTS_BUCKET }}" \
--endpoint-url "${{ secrets.R2_OS_ARTIFACTS_ENDPOINT }}" \
--prefix "indexes/" \
--query 'Contents[].Key' | jq 'map(capture("indexes/(?<version>[[:digit:]].+).json").version) | sort' > .os-artifacts/index.json
aws s3 sync \
.os-artifacts/ \
s3://${{ secrets.R2_OS_ARTIFACTS_BUCKET }}/ \
--endpoint-url "${{ secrets.R2_OS_ARTIFACTS_ENDPOINT }}" \
- name: Flush CloudFlare cache
run: |
# 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

444
.github/workflows/build.yaml vendored Normal file
View File

@@ -0,0 +1,444 @@
# Home Assistant Operating System build workflow
name: OS build
on:
release:
types: [published]
workflow_dispatch:
inputs:
boards:
description: 'List of boards to build (comma separated identifiers)'
required: false
type: string
publish:
description: 'Publish build artifacts to R2 (not applicable to forks)'
required: true
type: boolean
default: true
env:
PYTHON_VERSION: "3.10"
jobs:
prepare:
name: Prepare build
runs-on: ubuntu-22.04
permissions:
contents: read
pull-requests: read
packages: write
outputs:
version_dev: ${{ steps.version_dev.outputs.version_dev }}
version_main: ${{ steps.version.outputs.version_main }}
version_full: ${{ steps.version.outputs.version_full }}
channel: ${{ steps.channel.outputs.channel }}
matrix: ${{ steps.generate_matrix.outputs.result }}
build_container_image: ghcr.io/${{ github.repository_owner }}/haos-builder@${{ steps.build_haos_builder.outputs.digest }}
publish_build: ${{ steps.check_publish.outputs.publish_build }}
self_signed_cert: ${{ steps.generate_signing_key.outputs.self_signed_cert }}
steps:
- name: Checkout source
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Check if build should be published
id: check_publish
env:
PUBLISH_FLAG: ${{ inputs.publish }}
run: |
if [ "${{ github.repository }}" == "home-assistant/operating-system" ]; then
if [ "${PUBLISH_FLAG}" != "true" ] && [ "${{ github.event_name }}" != "release" ]; then
echo "publish_build=false" >> "$GITHUB_OUTPUT"
else
echo "publish_build=true" >> "$GITHUB_OUTPUT"
fi
else
echo "publish_build=false" >> "$GITHUB_OUTPUT"
fi
- name: Generate development version
shell: bash
id: version_dev
if: ${{ github.event_name != 'release' }}
env:
PUBLISH_BUILD: ${{ steps.check_publish.outputs.publish_build }}
run: |
version_dev="dev$(date --utc +'%Y%m%d')"
if [ "${{ env.PUBLISH_BUILD }}" != "true" ]; then
version_dev="dev$(date +%s)"
fi
echo "Development version \"${version_dev}\""
echo "version_dev=${version_dev}" >> $GITHUB_OUTPUT
- name: Set version suffix
if: ${{ github.event_name != 'release' }}
env:
VERSION_DEV: ${{ steps.version_dev.outputs.version_dev }}
run: |
sed -i -E "s/(^VERSION_SUFFIX=\").*(\"$)/\1${VERSION_DEV}\2/" buildroot-external/meta
- name: Get version
id: version
run: |
. ${GITHUB_WORKSPACE}/buildroot-external/meta
echo "version_main=${VERSION_MAJOR}.${VERSION_MINOR}" >> $GITHUB_OUTPUT
if [ -z "${VERSION_SUFFIX}" ]; then
version_full="${VERSION_MAJOR}.${VERSION_MINOR}"
else
version_full="${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_SUFFIX}"
fi
echo "version_full=${version_full}" >> $GITHUB_OUTPUT
echo "Full version number of this release is \"${version_full}\"."
- name: Validate version
id: version_check
if: ${{ github.event_name == 'release' }}
run: |
if [ "${{ steps.version.outputs.version_full }}" != "${{ github.event.release.tag_name }}" ]; then
echo "Version number in Buildroot metadata does not match tag (${{ steps.version.outputs.version_full }} vs ${{ github.event.release.tag_name }})."
exit 1
fi
- name: Get channel
id: channel
run: |
if [[ "${{ github.event_name }}" == "release" ]]; then
if [[ "${{ github.event.release.prerelease }}" == "true" ]]; then
echo "channel=beta" >> "$GITHUB_OUTPUT"
else
echo "channel=stable" >> "$GITHUB_OUTPUT"
fi
else
echo "channel=dev" >> "$GITHUB_OUTPUT"
fi
- name: Create build matrix
uses: actions/github-script@v7
id: generate_matrix
with:
script: |
const boards = require('./.github/workflows/matrix.json')
if ("${{ github.event_name }}" == "release") {
return { "board": boards }
}
const boardFilter = "${{ github.event.inputs.boards }}"
if (boardFilter == "") {
console.log("Run full build for all boards")
return { "board": boards }
} else {
console.log("Run partial build")
const boardSet = new Set(boardFilter.split(","))
const buildBoards = boards.filter(b => boardSet.has(b.id))
return { "board": buildBoards }
}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.8.0
- name: Log in to the GitHub container registry
uses: docker/login-action@v3.3.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push
uses: docker/build-push-action@v6.10.0
id: build_haos_builder
with:
context: .
file: Dockerfile
tags: ghcr.io/${{ github.repository_owner }}/haos-builder
cache-from: ghcr.io/${{ github.repository_owner }}/haos-builder:cache-${{ steps.version.outputs.version_main }}
cache-to: ghcr.io/${{ github.repository_owner }}/haos-builder:cache-${{ steps.version.outputs.version_main }}
push: true
- name: Generate self-signed certificate
id: generate_signing_key
env:
RAUC_CERTIFICATE: ${{ secrets.RAUC_CERTIFICATE }}
RAUC_PRIVATE_KEY: ${{ secrets.RAUC_PRIVATE_KEY }}
if: env.RAUC_CERTIFICATE == '' || env.RAUC_PRIVATE_KEY == ''
run: |
echo "::warning:: RAUC certificate or key is missing in the repository secrets. Building with a public self-signed certificate!"
buildroot-external/scripts/generate-signing-key.sh cert.pem key.pem
echo "self_signed_cert=true" >> $GITHUB_OUTPUT
- name: Create signing key
uses: actions/upload-artifact@v4
if: steps.generate_signing_key.outcome == 'success'
with:
name: signing-key
path: |
cert.pem
key.pem
build:
name: Build for ${{ matrix.board.id }}
permissions:
contents: write # for actions/upload-release-asset to upload release asset
needs: prepare
strategy:
fail-fast: ${{ github.event_name == 'release' }}
matrix: ${{ fromJson(needs.prepare.outputs.matrix) }}
runs-on: ubuntu-22.04
steps:
- name: Checkout source
uses: actions/checkout@v4
with:
submodules: true
persist-credentials: false
- name: Setup Python version ${{ env.PYTHON_VERSION }}
if: ${{ github.event_name != 'release' }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install AWS CLI
if: ${{ github.event_name != 'release' && needs.prepare.outputs.publish_build == 'true' }}
run: pip install awscli
- name: Set version suffix
if: ${{ github.event_name != 'release' }}
env:
VERSION_DEV: ${{ needs.prepare.outputs.version_dev }}
run: |
sed -i -E "s/(^VERSION_SUFFIX=\").*(\"$)/\1${VERSION_DEV}\2/" buildroot-external/meta
- name: 'Add release PKI certs'
if: ${{ needs.prepare.outputs.self_signed_cert != 'true' }}
env:
RAUC_CERTIFICATE: ${{ secrets.RAUC_CERTIFICATE }}
RAUC_PRIVATE_KEY: ${{ secrets.RAUC_PRIVATE_KEY }}
run: |
echo -e "-----BEGIN CERTIFICATE-----\n${RAUC_CERTIFICATE}\n-----END CERTIFICATE-----" > cert.pem
echo -e "-----BEGIN PRIVATE KEY-----\n${RAUC_PRIVATE_KEY}\n-----END PRIVATE KEY-----" > key.pem
- name: Get self-signed certificate from the prepare job
if: ${{ needs.prepare.outputs.self_signed_cert == 'true' }}
uses: actions/download-artifact@v4
with:
name: signing-key
- name: Free space on build drive
run: |
# Inspired by https://github.com/easimon/maximize-build-space/blob/v7/action.yml
df -h
sudo rm -rf /usr/local/lib/android/sdk/ndk
sudo rm -rf /opt/hostedtoolcache/CodeQL
sudo mkdir /mnt/cache
sudo mkdir /mnt/output
WORKSPACE_OWNER="$(stat -c '%U:%G' "${GITHUB_WORKSPACE}")"
# output directory is symlinked for easier access from workspace
# but for build container it must be mounted as a volume
sudo ln -sf /mnt/output "${GITHUB_WORKSPACE}/output"
sudo chown -R "${WORKSPACE_OWNER}" /mnt/cache
sudo chown -R "${WORKSPACE_OWNER}" /mnt/output
df -h
- name: "Restore cache: object files"
uses: actions/cache/restore@v4
with:
path: /mnt/cache/cc
key: haos-cc-${{ matrix.board.id }}
- name: Build
run: |
BUILDER_UID="$(id -u)"
BUILDER_GID="$(id -g)"
docker run --rm --privileged \
-e BUILDER_UID="${BUILDER_UID}" -e BUILDER_GID="${BUILDER_GID}" \
-v "${GITHUB_WORKSPACE}:/build" \
-v "/mnt/cache:/cache" \
-v "/mnt/output:/build/output" \
${{ needs.prepare.outputs.build_container_image }} \
make BUILDDIR=/build ${{ matrix.board.defconfig }}
- name: Check Linux config
run: |
docker run --rm --privileged \
-e BUILDER_UID="$(id -u)" -e BUILDER_GID="$(id -g)" \
-v "${GITHUB_WORKSPACE}:/build" \
-v "/mnt/cache:/cache" \
-v "/mnt/output:/build/output" \
${{ needs.prepare.outputs.build_container_image }} \
make -C buildroot O="/build/output" BR2_EXTERNAL="/build/buildroot-external" \
BR2_CHECK_DOTCONFIG_OPTS="--github-format --strip-path-prefix=/build/" linux-check-dotconfig
- name: Upload artifacts
if: ${{ github.event_name != 'release' && needs.prepare.outputs.publish_build == 'true' }}
working-directory: output/images/
env:
AWS_ACCESS_KEY_ID: ${{ secrets.R2_OS_ARTIFACTS_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_OS_ARTIFACTS_KEY }}
run: |
aws s3 sync \
./ \
s3://${{ secrets.R2_OS_ARTIFACTS_BUCKET }}/${{ needs.prepare.outputs.version_full }}/ \
--exclude "*" \
--include "haos_*" \
--endpoint-url ${{ secrets.R2_OS_ARTIFACTS_ENDPOINT }}
- name: Upload release assets
if: ${{ github.event_name == 'release' }}
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: output/images/haos_*
- name: Print cache stats
run: |
echo "Cache size: $(du -sh /mnt/cache/cc)"
echo "Files total: $(find /mnt/cache/cc -mindepth 1 -type f | wc -l)"
echo "Old files to remove: $(find /mnt/cache/cc -mindepth 1 -type f -not -anewer output/Makefile | wc -l)"
find /mnt/cache/cc -mindepth 1 -type f -not -anewer output/Makefile -delete
echo "Cache size after pruning: $(du -sh /mnt/cache/cc)"
- name: "Save cache: object files"
if: github.ref == 'refs/heads/dev'
uses: actions/cache/save@v4
with:
path: /mnt/cache/cc
key: haos-cc-${{ matrix.board.id }}-${{ github.run_id }}
- name: Generate build summary
run: |
echo "# ${{ matrix.board.id }} build summary" >> $GITHUB_STEP_SUMMARY
echo "## Artifacts" >> $GITHUB_STEP_SUMMARY
echo "| File | Size (bytes) | Size (formatted) |" >> $GITHUB_STEP_SUMMARY
echo "|:-|:-|:-|" >> $GITHUB_STEP_SUMMARY
for f in output/images/haos_*; do
echo "| $(basename $f) | $(du -b $f | cut -f1) | $(du -bh $f | cut -f1) |" >> $GITHUB_STEP_SUMMARY
done
echo "## Partitions" >> $GITHUB_STEP_SUMMARY
echo "| File | Size (bytes) | Size (formatted) |" >> $GITHUB_STEP_SUMMARY
echo "|:-|:-|:-|" >> $GITHUB_STEP_SUMMARY
for f in boot.vfat kernel.img rootfs.erofs overlay.ext4 data.ext4; do
echo "| ${f} | $(du -b output/images/$f | cut -f1) | $(du -bh output/images/$f | cut -f1) |" >> $GITHUB_STEP_SUMMARY
done
- name: Upload OS image artifact
uses: actions/upload-artifact@v4
if: ${{ github.event_name != 'release' && needs.prepare.outputs.publish_build != 'true' && matrix.board.id != 'ova' }}
with:
name: haos_${{ matrix.board.id }}-${{ needs.prepare.outputs.version_full }}.img.xz
path: |
output/images/haos_${{ matrix.board.id }}-${{ needs.prepare.outputs.version_full }}.img.xz
- name: Upload RAUC bundle artifact
uses: actions/upload-artifact@v4
if: ${{ github.event_name != 'release' && needs.prepare.outputs.publish_build != 'true' }}
with:
name: haos_${{ matrix.board.id }}-${{ needs.prepare.outputs.version_full }}.raucb
path: |
output/images/haos_${{ matrix.board.id }}-${{ needs.prepare.outputs.version_full }}.raucb
- name: Upload Open Virtualization Format (OVA) artifact
uses: actions/upload-artifact@v4
if: ${{ github.event_name != 'release' && needs.prepare.outputs.publish_build != 'true' && matrix.board.id == 'ova' }}
with:
name: haos_${{ matrix.board.id }}-${{ needs.prepare.outputs.version_full }}.ova
path: |
output/images/haos_${{ matrix.board.id }}-${{ needs.prepare.outputs.version_full }}.ova
- name: Upload QEMU disk image artifact
uses: actions/upload-artifact@v4
# Create artifact for ova every time - it's used by the called tests workflow
if: ${{ matrix.board.id == 'ova' || (github.event_name != 'release' && needs.prepare.outputs.publish_build != 'true' && matrix.board.id == 'generic-aarch64') }}
with:
name: haos_${{ matrix.board.id }}-${{ needs.prepare.outputs.version_full }}.qcow2.xz
path: |
output/images/haos_${{ matrix.board.id }}-${{ needs.prepare.outputs.version_full }}.qcow2.xz
- name: Upload VMware Virtual Machine Disk (VMDK) artifact
uses: actions/upload-artifact@v4
if: ${{ github.event_name != 'release' && needs.prepare.outputs.publish_build != 'true' && (matrix.board.id == 'generic-aarch64' || matrix.board.id == 'ova') }}
with:
name: haos_${{ matrix.board.id }}-${{ needs.prepare.outputs.version_full }}.vmdk.zip
path: |
output/images/haos_${{ matrix.board.id }}-${{ needs.prepare.outputs.version_full }}.vmdk.zip
- name: Upload VirtualBox Virtual Disk Image (VDI) artifact
uses: actions/upload-artifact@v4
if: ${{ github.event_name != 'release' && needs.prepare.outputs.publish_build != 'true' && matrix.board.id == 'ova' }}
with:
name: haos_${{ matrix.board.id }}-${{ needs.prepare.outputs.version_full }}.vdi.zip
path: |
output/images/haos_${{ matrix.board.id }}-${{ needs.prepare.outputs.version_full }}.vdi.zip
- name: Upload Virtual Hard Disk v2 (VHDX) artifact
uses: actions/upload-artifact@v4
if: ${{ github.event_name != 'release' && needs.prepare.outputs.publish_build != 'true' && matrix.board.id == 'ova' }}
with:
name: haos_${{ matrix.board.id }}-${{ needs.prepare.outputs.version_full }}.vhdx.zip
path: |
output/images/haos_${{ matrix.board.id }}-${{ needs.prepare.outputs.version_full }}.vhdx.zip
test:
name: Test OS image
needs: [ build, prepare ]
uses: ./.github/workflows/test.yaml
with:
version: ${{ needs.prepare.outputs.version_full }}
update_index:
name: Update artifacts index
if: ${{ github.event_name != 'release' && needs.prepare.outputs.publish_build == 'true' }}
needs: [ build, prepare ]
uses: home-assistant/operating-system/.github/workflows/artifacts-index.yaml@dev
with:
version: ${{ needs.prepare.outputs.version_full }}
secrets:
R2_OS_ARTIFACTS_ID: ${{ secrets.R2_OS_ARTIFACTS_ID }}
R2_OS_ARTIFACTS_KEY: ${{ secrets.R2_OS_ARTIFACTS_KEY }}
R2_OS_ARTIFACTS_BUCKET: ${{ secrets.R2_OS_ARTIFACTS_BUCKET }}
R2_OS_ARTIFACTS_ENDPOINT: ${{ secrets.R2_OS_ARTIFACTS_ENDPOINT }}
CF_ZONE: ${{ secrets.CF_ZONE }}
CF_PURGE_TOKEN: ${{ secrets.CF_PURGE_TOKEN }}
bump_version:
name: Bump ${{ needs.prepare.outputs.channel }} channel version
if: ${{ github.repository == 'home-assistant/operating-system' && needs.prepare.outputs.publish_build == 'true' }}
environment: ${{ needs.prepare.outputs.channel }}
needs: [ build, prepare ]
runs-on: ubuntu-22.04
steps:
- name: Checkout source
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Initialize git
uses: home-assistant/actions/helpers/git-init@master
with:
name: ${{ secrets.GIT_NAME }}
email: ${{ secrets.GIT_EMAIL }}
token: ${{ secrets.GIT_TOKEN }}
- name: Bump Home Assistant OS ${{ needs.prepare.outputs.channel }} channel version
uses: home-assistant/actions/helpers/version-push@master
with:
key: "hassos[]"
key-description: "Home Assistant OS"
version: ${{ needs.prepare.outputs.version_full }}
channel: ${{ needs.prepare.outputs.channel }}
- name: Bump Home Assistant OS beta channel version on stable release
if: ${{ needs.prepare.outputs.channel == 'stable' }}
uses: home-assistant/actions/helpers/version-push@master
with:
key: "hassos[]"
key-description: "Home Assistant OS"
version: ${{ needs.prepare.outputs.version_full }}
channel: beta
- name: Bump stable Home Assistant version for RPi Imager
if: ${{ github.event_name == 'release' && needs.prepare.outputs.channel == 'stable' }}
uses: "./.github/actions/bump-rpi-imager-version"
with:
version: ${{ needs.prepare.outputs.version_full }}
release-date: ${{ github.event.release.published_at }}

View File

@@ -1,143 +0,0 @@
# Home Assistant Operating System build workflow
name: Development build
on:
workflow_dispatch:
pull_request_target:
types: [opened,synchronize,labeled]
jobs:
prepare:
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 }}
matrix: ${{ steps.generate_matrix.outputs.result }}
steps:
- name: Generate Development build version
shell: bash
id: version_dev
run: |
version_dev="dev$(date --utc +'%Y%m%d')"
echo "Development version \"${version_dev}\""
echo "version_dev=${version_dev}" >> $GITHUB_OUTPUT
- name: Generate Development build version for PR
if: ${{ github.event.pull_request }}
shell: bash
id: version_pr
run: |
version_pr=$(printf "%05d" ${{ github.event.pull_request.number }})
echo "Development build for PR #${{ github.event.pull_request.number }}"
echo "version_pr=${version_pr}" >> $GITHUB_OUTPUT
- uses: actions/checkout@v3
- name: Get Major/Minor version
id: version_main
run: |
major=$(cat ${GITHUB_WORKSPACE}/buildroot-external/meta | grep VERSION_MAJOR | cut -d'=' -f2)
build=$(cat ${GITHUB_WORKSPACE}/buildroot-external/meta | grep VERSION_BUILD | cut -d'=' -f2)
echo "version_main=${major}.${build}" >> $GITHUB_OUTPUT
- name: Create build matrix
uses: actions/github-script@v6
id: generate_matrix
with:
script: |
const boards = require('./.github/workflows/matrix.json')
if (context.eventName == "workflow_dispatch") {
console.log("Run full build for all boards")
return { "board": boards }
}
const labels = context.payload.pull_request.labels.map(l => l.name)
const labelsSet = new Set(labels)
const buildBoards = boards.filter(b => labelsSet.has(b.label))
return { "board": buildBoards }
build:
if: ${{ github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'run-dev-build') }}
name: Development build for ${{ matrix.board.id }}
environment: "dev_build"
needs: prepare
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.prepare.outputs.matrix) }}
runs-on: ${{ matrix.board.runner }}
steps:
- name: Define git reference
uses: actions/github-script@v6
id: generate_gitref
with:
script: |
if (context.eventName == "workflow_dispatch")
return { "ref": context.ref }
return { "ref": context.payload.pull_request.head.sha }
- name: Checkout source
uses: actions/checkout@v3
with:
submodules: true
persist-credentials: false
ref: ${{ fromJSON(steps.generate_gitref.outputs.result).ref }}
- name: Build container
run: docker build -t haos-builder .
- name: 'Add release PKI certs'
env:
RAUC_CERTIFICATE: ${{ secrets.RAUC_CERTIFICATE }}
RAUC_PRIVATE_KEY: ${{ secrets.RAUC_PRIVATE_KEY }}
run: |
echo -e "-----BEGIN CERTIFICATE-----\n${RAUC_CERTIFICATE}\n-----END CERTIFICATE-----" > cert.pem
echo -e "-----BEGIN PRIVATE KEY-----\n${RAUC_PRIVATE_KEY}\n-----END PRIVATE KEY-----" > key.pem
- name: Build
run: |
BUILDER_UID="$(id -u)"
BUILDER_GID="$(id -g)"
docker run --rm --privileged -v "${GITHUB_WORKSPACE}:/build" \
-e BUILDER_UID="${BUILDER_UID}" -e BUILDER_GID="${BUILDER_GID}" \
-v "${{ matrix.board.runner }}-build-cache:/cache" \
-v "/build/output" \
haos-builder make BUILDDIR=/build VERSION_DEV=${{ needs.prepare.outputs.version_dev }} ${{ matrix.board.defconfig }}
- name: Upload images
uses: burnett01/rsync-deployments@5.2
with:
rsh: -q
switches: -aW
path: release/
remote_path: ${{ secrets.DEV_TARGET_PATH }}/${{ needs.prepare.outputs.version_main }}.${{ needs.prepare.outputs.version_dev }}/
remote_host: ${{ secrets.DEV_HOST }}
remote_port: ${{ secrets.DEV_PORT }}
remote_user: ${{ secrets.DEV_USERNAME }}
remote_key: ${{ secrets.DEV_SSH_KEY }}
bump_version:
name: Bump dev channel version
if: ${{ github.event_name == 'workflow_dispatch' }}
needs: [ build, prepare ]
runs-on: [ "ubuntu-20.04" ]
steps:
- name: Initialize git
uses: home-assistant/actions/helpers/git-init@master
with:
name: ${{ secrets.GIT_NAME }}
email: ${{ secrets.GIT_EMAIL }}
token: ${{ secrets.GIT_TOKEN }}
- name: Bump Home Assistant OS dev channel version to ${{ needs.prepare.outputs.version_main }}.${{ needs.prepare.outputs.version_dev }}
uses: home-assistant/actions/helpers/version-push@master
with:
key: "hassos[]"
key-description: "Home Assistant OS"
version: ${{ needs.prepare.outputs.version_main }}.${{ needs.prepare.outputs.version_dev }}
channel: "dev"

View File

@@ -14,4 +14,4 @@ jobs:
action:
runs-on: ubuntu-latest
steps:
- uses: dessant/label-actions@v3.0.0
- uses: dessant/label-actions@v4.0.1

View File

@@ -2,97 +2,115 @@
{
"id": "ova",
"defconfig": "ova",
"runner": "x86-64-runner",
"architecture": "x86-64",
"label": "board/ova"
},
{
"id": "generic-x86-64",
"defconfig": "generic_x86_64",
"runner": "x86-64-runner",
"architecture": "x86-64",
"label": "board/generic-x86-64"
},
{
"id": "generic-aarch64",
"defconfig": "generic_aarch64",
"runner": "aarch64-runner",
"architecture": "aarch64",
"label": "board/generic-aarch64"
},
{
"id": "khadas-vim3",
"defconfig": "khadas_vim3",
"runner": "aarch64-runner",
"architecture": "aarch64",
"label": "board/khadas"
},
{
"id": "odroid-c2",
"defconfig": "odroid_c2",
"runner": "aarch64-runner",
"architecture": "aarch64",
"label": "board/odroid"
},
{
"id": "odroid-c4",
"defconfig": "odroid_c4",
"runner": "aarch64-runner",
"architecture": "aarch64",
"label": "board/odroid"
},
{
"id": "odroid-m1",
"defconfig": "odroid_m1",
"runner": "aarch64-runner",
"architecture": "aarch64",
"label": "board/odroid"
},
{
"id": "odroid-m1s",
"defconfig": "odroid_m1s",
"architecture": "aarch64",
"label": "board/odroid"
},
{
"id": "odroid-n2",
"defconfig": "odroid_n2",
"runner": "aarch64-runner",
"architecture": "aarch64",
"label": "board/odroid"
},
{
"id": "odroid-xu4",
"defconfig": "odroid_xu4",
"runner": "aarch64-runner",
"architecture": "aarch64",
"label": "board/odroid"
},
{
"id": "rpi2",
"defconfig": "rpi2",
"runner": "arm-runner",
"architecture": "arm",
"label": "board/raspberrypi"
},
{
"id": "rpi3",
"defconfig": "rpi3",
"runner": "arm-runner",
"architecture": "arm",
"label": "board/raspberrypi"
},
{
"id": "rpi3-64",
"defconfig": "rpi3_64",
"runner": "aarch64-runner",
"architecture": "aarch64",
"label": "board/raspberrypi"
},
{
"id": "rpi4",
"defconfig": "rpi4",
"runner": "arm-runner",
"architecture": "arm",
"label": "board/raspberrypi"
},
{
"id": "rpi4-64",
"defconfig": "rpi4_64",
"runner": "aarch64-runner",
"architecture": "aarch64",
"label": "board/raspberrypi"
},
{
"id": "rpi5-64",
"defconfig": "rpi5_64",
"architecture": "aarch64",
"label": "board/raspberrypi"
},
{
"id": "yellow",
"defconfig": "yellow",
"runner": "aarch64-runner",
"architecture": "aarch64",
"label": "board/yellow"
},
{
"id": "green",
"defconfig": "green",
"architecture": "aarch64",
"label": "board/green"
},
{
"id": "tinker",
"defconfig": "tinker",
"runner": "arm-runner",
"architecture": "arm",
"label": "board/tinker"
}
]

View File

@@ -8,8 +8,14 @@ jobs:
linters:
runs-on: ubuntu-22.04
steps:
- name: Install additional dependencies
run: |
sudo apt-get update
sudo apt-get -y install \
python3-flake8
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true
@@ -21,8 +27,8 @@ jobs:
- name: Check shell scripts
uses: ludeeus/action-shellcheck@2.0.0
with:
ignore: buildroot
ignore_paths: buildroot
- name: Check buildroot-external packages
run: |
buildroot/utils/check-package --exclude PackageHeader --br2-external buildroot-external/package/*/*
buildroot/utils/check-package --exclude PackageHeader --exclude Upstream --br2-external buildroot-external/package/*/*

View File

@@ -13,6 +13,6 @@ jobs:
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
- uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,176 +0,0 @@
# Home Assistant Operating System release build workflow
name: Release build
on:
release:
types: [published]
jobs:
validate_release:
name: Validate release
runs-on: [ "ubuntu-20.04" ]
outputs:
version: ${{ steps.version_check.outputs.version }}
version_dev: ${{ steps.version_check.outputs.version_dev }}
matrix: ${{ steps.generate_matrix.outputs.result }}
steps:
- uses: actions/checkout@v3
- name: Validate version
id: version_check
run: |
major=$(cat ${GITHUB_WORKSPACE}/buildroot-external/meta | grep VERSION_MAJOR | cut -d'=' -f2)
build=$(cat ${GITHUB_WORKSPACE}/buildroot-external/meta | grep VERSION_BUILD | cut -d'=' -f2)
tag_major=$(echo "${{ github.event.release.tag_name }}" | cut -d '.' -f 1)
tag_build=$(echo "${{ github.event.release.tag_name }}" | cut -d '.' -f 2)
tag_dev=$(echo "${{ github.event.release.tag_name }}" | cut -d '.' -f 3)
if [ "${major}.${build}" != "${tag_major}.${tag_build}" ]; then
echo "Version number in Buildroot metadata is does not match tag (${major}.${build} vs ${{ github.event.release.tag_name }})."
exit 1
fi
if [ "" != "${tag_dev}" ]; then
echo "version=${major}.${build}.${tag_dev}" >> $GITHUB_OUTPUT
else
echo "version=${major}.${build}" >> $GITHUB_OUTPUT
fi
echo "version_dev=${tag_dev}" >> $GITHUB_OUTPUT
- name: Create build matrix
uses: actions/github-script@v6
id: generate_matrix
with:
script: |
const boards = require('./.github/workflows/matrix.json')
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:
matrix: ${{ fromJson(needs.validate_release.outputs.matrix) }}
runs-on: ${{ matrix.board.runner }}
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
with:
submodules: true
- name: Build container
run: docker build -t haos-builder .
- name: 'Add release PKI certs'
env:
RAUC_CERTIFICATE: ${{ secrets.RAUC_CERTIFICATE }}
RAUC_PRIVATE_KEY: ${{ secrets.RAUC_PRIVATE_KEY }}
run: |
echo -e "-----BEGIN CERTIFICATE-----\n${RAUC_CERTIFICATE}\n-----END CERTIFICATE-----" > cert.pem
echo -e "-----BEGIN PRIVATE KEY-----\n${RAUC_PRIVATE_KEY}\n-----END PRIVATE KEY-----" > key.pem
- name: Build
run: |
BUILDER_UID="$(id -u)"
BUILDER_GID="$(id -g)"
docker run --rm --privileged -v "${GITHUB_WORKSPACE}:/build" \
-e BUILDER_UID="${BUILDER_UID}" -e BUILDER_GID="${BUILDER_GID}" \
-v "${{ matrix.board.runner }}-build-cache:/cache" \
-v "/build/output" \
haos-builder make BUILDDIR=/build VERSION_DEV=${{ needs.validate_release.outputs.version_dev }} ${{ matrix.board.defconfig }}
- name: Upload disk image
if: ${{ matrix.board.id != 'ova' }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ github.workspace }}/release/haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.img.xz
asset_name: haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.img.xz
asset_content_type: application/x-xz
- name: Upload rauc update
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ github.workspace }}/release/haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.raucb
asset_name: haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.raucb
asset_content_type: application/octet-stream
- name: Upload ova image
if: ${{ matrix.board.id == 'ova' }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ github.workspace }}/release/haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.ova
asset_name: haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.ova
asset_content_type: application/x-tar
- name: Upload qcow2 image
if: ${{ matrix.board.id == 'ova' || matrix.board.id == 'generic-aarch64' }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ github.workspace }}/release/haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.qcow2.xz
asset_name: haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.qcow2.xz
asset_content_type: application/x-xz
- name: Upload vdi image
if: ${{ matrix.board.id == 'ova' }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ github.workspace }}/release/haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.vdi.zip
asset_name: haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.vdi.zip
asset_content_type: application/zip
- name: Upload vhdx image
if: ${{ matrix.board.id == 'ova' }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ github.workspace }}/release/haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.vhdx.zip
asset_name: haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.vhdx.zip
asset_content_type: application/zip
- name: Upload vmdk image
if: ${{ matrix.board.id == 'ova' || matrix.board.id == 'generic-aarch64' }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ github.workspace }}/release/haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.vmdk.zip
asset_name: haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.vmdk.zip
asset_content_type: application/zip
bump_version:
name: Bump dev version to ${{ needs.validate_release.outputs.version }}
needs: [ build, validate_release ]
runs-on: [ "ubuntu-20.04" ]
steps:
- name: Initialize git
uses: home-assistant/actions/helpers/git-init@master
with:
name: ${{ secrets.GIT_NAME }}
email: ${{ secrets.GIT_EMAIL }}
token: ${{ secrets.GIT_TOKEN }}
- name: Bump Home Assistant OS beta version
uses: home-assistant/actions/helpers/version-push@master
with:
key: "hassos[]"
key-description: "Home Assistant OS"
version: ${{ needs.validate_release.outputs.version }}
channel: "beta"

View File

@@ -3,7 +3,7 @@ name: Stale
# yamllint disable-line rule:truthy
on:
schedule:
- cron: "0 * * * *"
- cron: "40 5 * * *"
workflow_dispatch:
jobs:
@@ -19,7 +19,7 @@ jobs:
# - No PRs marked as no-stale or pinned
# - No issues marked as no-stale, help-wanted or pinned
- name: 90 days stale issues & PRs policy
uses: actions/stale@v7.0.0
uses: actions/stale@v9.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 90

101
.github/workflows/test.yaml vendored Normal file
View File

@@ -0,0 +1,101 @@
name: Test HAOS image
run-name: "Test HAOS ${{ inputs.version || format('(OS build #{0})', github.event.workflow_run.run_number) }}"
on:
# Manual test of specified version
workflow_dispatch:
inputs:
version:
description: Version of HAOS to test
required: true
type: string
# Called by other workflows (e.g. build.yaml)
workflow_call:
inputs:
use-artifact:
# Workaround for GH weirdness: https://github.com/actions/runner/discussions/1884
description: Download OS image using actions/download-artifact
required: false
type: boolean
default: true
version:
description: Version of HAOS to test (as used in the name of the qcow2 image artifact)
required: true
type: string
jobs:
test:
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
name: Test in QEMU
runs-on: ubuntu-22.04
steps:
- name: Checkout source
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install system dependencies
run: |
sudo apt update
sudo apt install -y qemu-system-x86 ovmf
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install Python requirements
run:
pip install -r tests/requirements.txt
- name: Download HAOS image
if: ${{ !inputs.use-artifact }}
run: |
curl -sfL -o haos.qcow2.xz https://os-artifacts.home-assistant.io/${{github.event.inputs.version}}/haos_ova-${{github.event.inputs.version}}.qcow2.xz
- name: Get OS image artifact
if: ${{ inputs.use-artifact }}
uses: actions/download-artifact@v4
with:
name: haos_ova-${{ inputs.version }}.qcow2.xz
- name: Extract OS image
run: |
xz -dc haos*.qcow2.xz > tests/haos.qcow2
rm haos*.qcow2.xz
- name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Run tests
run: |
./tests/run_tests.sh
- name: Archive logs
uses: actions/upload-artifact@v4
if: always()
with:
name: logs
path: |
tests/lg_logs/**
- name: Archive JUnit reports
uses: actions/upload-artifact@v4
if: always()
with:
name: junit_reports
path: |
tests/junit_reports/*.xml
- name: Publish test report
uses: mikepenz/action-junit-report@v5
if: always()
with:
report_paths: 'tests/junit_reports/*.xml'
annotate_only: true
detailed_summary: true

2
.gitignore vendored
View File

@@ -9,4 +9,4 @@ output*/
*.pem
# vscode generated files
.vscode*
.vscode*

2
.gitmodules vendored
View File

@@ -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

82
.os-artifacts/index.html Normal file
View File

@@ -0,0 +1,82 @@
<!DOCTYPE html>
<html>
<head>
<title>Home Assistant OS - development builds</title>
<link rel="shortcut icon" href="https://brands.home-assistant.io/homeassistant/icon.png">
<style>
body {
font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
}
.error {
color: maroon;
}
</style>
</head>
<body>
<h1>Home Assistant OS - development builds</h1>
<select id="os-builds"></select>
<div id="os-builds-list"></div>
<script>
const buildSelect = document.getElementById('os-builds');
const osBuildsList = document.getElementById('os-builds-list');
const fillVersions = async () => {
try {
const response = await fetch('/index.json');
if (!response.ok) {
const p = document.createElement('p');
p.className = "error";
p.textContent = "Could not load version index file.";
osBuildsList.appendChild(p);
return;
}
const items = await response.json();
items.reverse();
items.forEach(buildVersion => {
buildSelect.appendChild(new Option(buildVersion, buildVersion));
});
buildSelect.dispatchEvent(new Event('change'));
} catch (error) {
console.error('Error fetching data:', error);
}
}
buildSelect.addEventListener('change', async function() {
osBuildsList.innerHTML = '';
const buildVersion = this.value;
try {
const response = await fetch(`/indexes/${buildVersion}.json`);
if (!response.ok) {
const p = document.createElement('p');
p.className = "error";
p.textContent = `Could not load index file for version ${buildVersion}.`;
osBuildsList.appendChild(p);
return;
}
const images = await response.json();
const ul = document.createElement('ul');
images.forEach(image => {
const li = document.createElement('li');
const a = document.createElement('a');
a.href =`/${buildVersion}/${image}`;
a.textContent = image;
li.appendChild(a);
ul.appendChild(li);
});
osBuildsList.appendChild(ul);
} catch (error) {
console.error('Error fetching images:', error);
}
});
fillVersions();
</script>
</body>
</html>

View File

@@ -12,8 +12,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
gpg \
dirmngr \
software-properties-common \
&& curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - \
&& add-apt-repository "deb https://download.docker.com/linux/debian $(lsb_release -cs) stable" \
&& curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/trusted.gpg.d/docker.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/trusted.gpg.d/docker.gpg] \
https://download.docker.com/linux/debian $(lsb_release -cs) stable" > /etc/apt/sources.list.d/docker.list \
&& apt-get update && apt-get install -y --no-install-recommends \
docker-ce \
&& rm -rf /var/lib/apt/lists/*

View File

@@ -4,28 +4,30 @@
The following boards/devices are supported:
- Nabu Casa
- [Home Assistant Green](https://www.home-assistant.io/green/)
- [Home Assistant Yellow](https://www.home-assistant.io/yellow/) (based custom carrier board and powered by a Raspberry Pi 4 Compute Module)
- [Home Assistant Blue](https://www.home-assistant.io/blue/) (based on ODROID-N2+)
- Raspberry Pi
- Pi 4 Model B (1 GB, 2 GB, 4 GB and 8 GB model) 64-bit (recommended)
- Pi 4 Model B (1 GB, 2 GB, 4 GB and 8 GB model) 32-bit
- Pi 3 Model B and B+ 64-bit (recommended)
- Pi 3 Model B and B+ 32-bit
- Pi 2 (not recommended)
- Pi Zero-W (not recommended)
- Pi (not recommended)
- Pi 5 ([4 GB](https://www.raspberrypi.com/products/raspberry-pi-5/?variant=raspberry-pi-5-4gb) and [8 GB](https://www.raspberrypi.com/products/raspberry-pi-5/?variant=raspberry-pi-5-8gb) model) 64-bit
- Pi 4 Model B ([1 GB](https://www.raspberrypi.com/products/raspberry-pi-4-model-b/?variant=raspberry-pi-4-model-b-1gb), [2 GB](https://www.raspberrypi.com/products/raspberry-pi-4-model-b/?variant=raspberry-pi-4-model-b-2gb), [4 GB](https://www.raspberrypi.com/products/raspberry-pi-4-model-b/?variant=raspberry-pi-4-model-b-4gb) and [8 GB](https://www.raspberrypi.com/products/raspberry-pi-4-model-b/?variant=raspberry-pi-4-model-b-8gb) model) 32-bit or 64-bit (recommended)
- [Pi 3 Model B](https://www.raspberrypi.com/products/raspberry-pi-3-model-b/) and [B+](https://www.raspberrypi.com/products/raspberry-pi-3-model-b-plus/) 32-bit or 64-bit (recommended)
- [Pi 2](https://www.raspberrypi.com/products/raspberry-pi-2-model-b/) (not recommended)
- Hardkernel
- ODROID-C2
- ODROID-C4
- ODROID-M1
- ODROID-N2
- ODROID-N2+
- ODROID-XU4
- [ODROID-C2](https://www.hardkernel.com/shop/odroid-c2/) (discontinued)
- [ODROID-C4](https://www.hardkernel.com/shop/odroid-c4/)
- [ODROID-M1](https://www.hardkernel.com/shop/odroid-m1/)
- ODROID-M1S [4 GB](https://www.hardkernel.com/shop/odroid-m1s-with-4gbyte-ram/) or [8 GB](https://www.hardkernel.com/shop/odroid-m1s-with-8gbyte-ram/)
- [ODROID-N2](https://www.hardkernel.com/shop/odroid-n2/) (discontinued)
- ODROID-N2+ [2 GB](https://www.hardkernel.com/shop/odroid-n2-with-2gbyte-ram-2/) or [4 GB](https://www.hardkernel.com/shop/odroid-n2-with-4gbyte-ram-2/)
- [ODROID-XU4](https://www.hardkernel.com/shop/odroid-xu4-special-price/)
- Asus
- Tinker Board
- [Tinker Board](https://tinker-board.asus.com/product/tinker-board.html)
- Generic x86-64 (UEFI, not suited for virtualization)
- Intel NUC5CPYH
- Intel NUC6CAYH
- Intel NUC10I3FNK2
- Gigabyte GB-BPCE-3455
- [Intel NUC5CPYH](https://www.intel.com/content/www/us/en/products/sku/85254/intel-nuc-kit-nuc5cpyh/specifications.html)
- [Intel NUC6CAYH](https://www.intel.com/content/www/us/en/products/sku/95062/intel-nuc-kit-nuc6cayh/specifications.html)
- [Intel NUC10I3FNK2](https://www.intel.com/content/www/us/en/products/sku/195503/intel-nuc-10-performance-kit-nuc10i3fnk/specifications.html)
- [Gigabyte GB-BPCE-3455](https://www.gigabyte.com/Mini-PcBarebone/GB-BPCE-3455-rev-10/sp#sp)
- Computers supporting x86-64 architecture and UEFI boot should generally work
- Virtual appliance (x86_64/UEFI):
- VMDK
@@ -41,6 +43,9 @@ Notes:
|Board|Build|Config|Docs|
|-----|----|------|----|
|Green |`make green` |[green](../../buildroot-external/configs/green_defconfig)|-|
|Yellow |`make yellow` |[yellow](../../buildroot-external/configs/yellow_defconfig)|-|
|Pi5 64-bit |`make rpi5_64` |[rpi5_64](../../buildroot-external/configs/rpi5_64_defconfig)|[raspberrypi](./raspberrypi/)|
|Pi4B 64-bit |`make rpi4_64` |[rpi4_64](../../buildroot-external/configs/rpi4_64_defconfig)|[raspberrypi](./raspberrypi/)|
|Pi4B 32-bit |`make rpi4` |[rpi4](../../buildroot-external/configs/rpi4_defconfig)|[raspberrypi](./raspberrypi/)|
|Pi3B 64-bit |`make rpi3_64` |[rpi3_64](../../buildroot-external/configs/rpi3_64_defconfig)|[raspberrypi](./raspberrypi/)|
@@ -49,6 +54,7 @@ Notes:
|ODROID-C2 |`make odroid_c2` |[odroid_c2](../../buildroot-external/configs/odroid_c2_defconfig)|[hardkernel](./hardkernel/)|
|ODROID-C4 |`make odroid_c4` |[odroid_c4](../../buildroot-external/configs/odroid_c4_defconfig)|[hardkernel](./hardkernel/)|
|ODROID-M1 |`make odroid_m1` |[odroid_m1](../../buildroot-external/configs/odroid_m1_defconfig)|[hardkernel](./hardkernel/)|
|ODROID-M1S |`make odroid_m1s` |[odroid_m1s](../../buildroot-external/configs/odroid_m1s_defconfig)|[hardkernel](./hardkernel/)|
|ODROID-N2/N2+ |`make odroid_n2` |[odroid_n2](../../buildroot-external/configs/odroid_n2_defconfig)|[hardkernel](./hardkernel/)|
|ODROID-XU4 |`make odroid_xu4` |[odroid_xu4](../../buildroot-external/configs/odroid_xu4_defconfig)|[hardkernel](./hardkernel/)|
|Tinker Board |`make tinker` |[tinker](../../buildroot-external/configs/tinker_defconfig)|[asus](./asus/)|

View File

@@ -7,6 +7,7 @@
| ODROID-C2 | 2016 | yes | [odroid_c2](../../../buildroot-external/configs/odroid_c2_defconfig) |
| ODROID-C4 | 2020 | yes | [odroid_c4](../../../buildroot-external/configs/odroid_c4_defconfig) |
| ODROID-M1 | 2022 | yes | [odroid_m1](../../../buildroot-external/configs/odroid_m1_defconfig) |
| ODROID-M1S | 2023 | yes | [odroid_m1s](../../../buildroot-external/configs/odroid_m1s_defconfig)|
| ODROID-N2 | 2019 | yes | [odroid_n2](../../../buildroot-external/configs/odroid_n2_defconfig) |
| ODROID-XU4 | 2015 | yes | [odroid_xu4](../../../buildroot-external/configs/odroid_xu4_defconfig)|

View File

@@ -8,9 +8,20 @@ SD-card boot is supported via on-board bootloader (SPL) or recovery button.
## eMMC
eMMC boot is currently only supported via recovery button. eMMC boot via
on-board bootloader will require an update of Petitboot (as of March 13 2023,
this update hasn't been released yet.
eMMC boot via on-board bootloader requires a newer version of Petitboot
(spiboot 20230328 or later). To install the latest version download the SPI boot image
from [linuxfactory.or.kr][1] as follows:
1. Download `spiupdate_odroidm1_20240415.img.xz`
2. Use balenaEtcher or another tool to flash the updater onto an SD card
3. Download `spiboot-20240109.img`
4. Rename the `spiboot-20240109.img` file to`spiboot.img`.
5. Paste the `spiboot.img` file onto the FAT partition of that same SD card.
6. Plug-in that SD card to your ODROID-M1. Petitboot will update itself, you can verify the progress on the HDMI output.
7. If you see the version 20240109 in the top left corner, the installation was successful.\
If you see any other version there, the installation failed.
Once Petitboot is updated you can flash Home Assistant OS directly onto an eMMC.
## NVMe
@@ -24,8 +35,8 @@ However, the ODROID-M1 automatically boots from internal SPI. To boot
directly off the SD-card or eMMC you need to press the recovery button.
The SPI flashed U-Boot SPL tries searches for an U-Boot binary on the SD-card
(and future releases also on the eMMC). This mechanism allows you to boot the Home
Assistant OS U-Boot without pressing the recovery button.
(and from eMMC with Petitboot 20230328 and later). This mechanism allows you to
boot the Home Assistant OS U-Boot without pressing the recovery button.
## Console
@@ -35,3 +46,5 @@ The serial console's baudrate is 1500000 by default.
The systemd startup messages will only appear on the serial console by default.
To show the messages on the HDMI console instead, add the console manually
to the `cmdline.txt` file on the boot partition (e.g. `console=tty0`).
[1]: http://ppa.linuxfactory.or.kr/images/petitboot/odroidm1/

View File

@@ -0,0 +1,58 @@
# ODROID-M1S
Home Assistant OS 12 and newer support the ODROID-M1S board.
## SD-card
ODROID-M1S can boot HAOS directly from an SD card, as it has higher priority than the system on the eMMC. Simply flash the image to the SD card using your favorite tool and insert it to the micro SD slot on the board. This works even when the eMMC is wiped, or when it contains the factory-default U-Boot SPL loader, which is still able to load U-Boot provided in the HAOS image. In the second case, however, if the SD card fails to probe (e.g. due to a hardware failure), the system on the eMMC may be booted instead of HAOS.
## eMMC
HAOS can be installed directly to the eMMC using a special boot image, to do that:
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.
Installing HAOS replaces the firmware and SPL on the eMMC with the mainline version provided by HAOS. As a result, it is not possible to use the SD card with the EMMC2UMS image anymore, because the mainline SPL is not compatible with U-Boot in the EMMC2UMS image at this time (February 2024). This does not pose any problem for standard use, just makes it more complicated in case you want to return to the Hardkernel-provided OS.
A reliable way of reflashing the eMMC in this case is to use HAOS booted from an SD card. To do that, insert the SD card with HAOS to the micro SD slot and plug the board in. Once the device boots to the HA CLI, enter `login` to enter the root shell and use `curl` to download an image and `dd` it to the eMMC block device:
```sh
curl https://dn.odroid.com/RK3566/ODROID-M1S/Installer/ODROID-M1S_EMMC2UMS.img | dd of=/dev/mmcblk0
```
This way the device will start in the UMS mode on the next boot with the SD card removed. Alternatively you can use the [Hardkernel installer image][2] directly instead of the EMMC2UMS image.
## NVMe
Booting directly from NVMe is not supported. The NVMe card can be used as a data disk.
## Technical notes on boot flow
The Home Assistant OS image is bootable by the SoC directly. Refer to the [boot sequence documentation][3] for the details on what part of the boot is executed from the eMMC and what from the SD card. The steps documented above should however cover all scenarios that a standard user may encounter during usage.
## Console
By default, console access is available on the serial header (UART) and on HDMI.
The serial console's baudrate is 1500000 by default.
The systemd startup messages will only appear on the serial console by default.
To show the messages on the HDMI console instead, add the console manually
to the `cmdline.txt` file on the boot partition (e.g. `console=tty0`).
## GPIO
Odroid-M1S introduces a new 14pin expansion header. Refer to [the ODROID wiki][4].
At this point not all functionality is supported by the upstream kernel used by Home Assistant OS.
Supported modules include:
- UPS
- Internal USB
- Mini IO board (partial support)
[1]: https://dn.odroid.com/RK3566/ODROID-M1S/Installer/ODROID-M1S_EMMC2UMS.img
[2]: https://wiki.odroid.com/odroid-m1s/getting_started/os_installation_guide#user_installer
[3]: https://wiki.odroid.com/odroid-m1s/board_support/boot_sequence
[4]: https://wiki.odroid.com/odroid-m1s/hardware/expansion_connectors

View File

@@ -4,10 +4,10 @@
| Device | Release Date | Support | Config |
|---------------------|---------------|-----------------|--------------------|
| Raspberry Pi B/B+/A+|2012/2014/2014 | not recommended | [rpi](../../../buildroot-external/configs/rpi_defconfig) |
| Raspberry Pi 2 B |2015 | not recommended | [rpi2](../../../buildroot-external/configs/rpi2_defconfig) |
| Raspberry Pi 3 B/B+ |2016/2018 | yes | [rpi3](../../../buildroot-external/configs/rpi3_defconfig) / [rpi3_64](../../../buildroot-external/configs/rpi3_64_defconfig) |
| Raspberry Pi 4 B |2019 | yes | [rpi4](../../../buildroot-external/configs/rpi4_defconfig) / [rpi4_64](../../../buildroot-external/configs/rpi4_64_defconfig) |
| Raspberry Pi 5 |2023 | yes (beta) | [rpi5_64](../../../buildroot-external/configs/rpi5_64_defconfig) |
## Serial console

View File

@@ -1,23 +1,24 @@
# Kernel Version
Default Kernel tree: 5.15
| Board | Version |
|-------|---------|
| Open Virtual Appliance | 6.1.21 |
| Raspberry Pi | 6.1.19 |
| Raspberry Pi 0-W | 6.1.19 |
| Raspberry Pi 2 | 6.1.19 |
| Raspberry Pi 3 | 6.1.19 |
| Raspberry Pi 4 | 6.1.19 |
| Home Assistant Yellow | 6.1.19 |
| Tinker Board | 6.1.21 |
| ODROID-C2 | 6.1.21 |
| ODROID-C4 | 6.1.21 |
| ODROID-M1 | 6.1.21 |
| ODROID-N2 | 6.1.21 |
| ODROID-XU4 | 6.1.21 |
| Generic aarch64 | 6.1.21 |
| Generic x86-64 | 6.1.21 |
| Khadas VIM3 | 6.1.21 |
| Open Virtual Appliance | 6.6.66 |
| Raspberry Pi | 6.6.62 |
| Raspberry Pi 0-W | 6.6.62 |
| Raspberry Pi 2 | 6.6.62 |
| Raspberry Pi 3 | 6.6.62 |
| Raspberry Pi 4 | 6.6.62 |
| Raspberry Pi 5 | 6.6.62 |
| Home Assistant Yellow | 6.6.62 |
| Home Assistant Green | 6.6.66 |
| Tinker Board | 6.6.66 |
| ODROID-C2 | 6.6.66 |
| ODROID-C4 | 6.6.66 |
| ODROID-M1 | 6.6.66 |
| ODROID-M1S | 6.6.66 |
| ODROID-N2 | 6.6.66 |
| ODROID-XU4 | 6.6.66 |
| Generic aarch64 | 6.6.66 |
| Generic x86-64 | 6.6.66 |
| Khadas VIM3 | 6.6.66 |

View File

@@ -188,6 +188,6 @@ If you now view the default connection `cat /etc/NetworkManager/system-connectio
Doing a `nmcli con reload` does not always work, so restart the virtual machine or the physical system.
[nm-manual]: https://developer.gnome.org/NetworkManager/stable/manpages.html
[nm-manual]: https://networkmanager.dev/docs/api/1.40/manpages.html
[configuration-usb]: configuration.md
[uuid]: https://www.uuidgenerator.net/
[uuid]: https://www.uuidgenerator.net/version4

View File

@@ -1,11 +1,8 @@
BUILDDIR:=$(shell pwd)
RELEASE_DIR = $(BUILDDIR)/release
BUILDROOT=$(BUILDDIR)/buildroot
BUILDROOT_EXTERNAL=$(BUILDDIR)/buildroot-external
DEFCONFIG_DIR = $(BUILDROOT_EXTERNAL)/configs
VERSION_DATE := $(shell date --utc +'%Y%m%d')
VERSION_DEV := "dev$(VERSION_DATE)"
TARGETS := $(notdir $(patsubst %_defconfig,%,$(wildcard $(DEFCONFIG_DIR)/*_defconfig)))
TARGETS_CONFIG := $(notdir $(patsubst %_defconfig,%-config,$(wildcard $(DEFCONFIG_DIR)/*_defconfig)))
@@ -23,9 +20,6 @@ endif
all: $(TARGETS)
$(RELEASE_DIR):
mkdir -p $(RELEASE_DIR)
savedefconfig:
@echo "config $*"
$(MAKE) -C $(BUILDROOT) O=$(O) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL) "savedefconfig"
@@ -34,10 +28,9 @@ $(TARGETS_CONFIG): %-config:
@echo "config $*"
$(MAKE) -C $(BUILDROOT) O=$(O) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL) "$*_defconfig"
$(TARGETS): %: $(RELEASE_DIR) %-config
$(TARGETS): %: %-config
@echo "build $@"
$(MAKE) -C $(BUILDROOT) O=$(O) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL) VERSION_DEV=$(VERSION_DEV)
cp -f $(O)/images/haos_* $(RELEASE_DIR)/
$(MAKE) -C $(BUILDROOT) O=$(O) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL)
# Do not clean when building for one target
ifneq ($(words $(filter $(TARGETS),$(MAKECMDGOALS))), 1)

View File

@@ -2,7 +2,9 @@
Home Assistant Operating System (formerly HassOS) is a Linux based operating system optimized to host [Home Assistant](https://www.home-assistant.io) and its [Add-ons](https://www.home-assistant.io/addons/).
Home Assistant Operating System uses Docker as Container engine. It by default 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.
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.
[![Home Assistant - A project from the Open Home Foundation](https://www.openhomefoundation.org/badges/home-assistant.png)](https://www.openhomefoundation.org/)
## Features
@@ -14,6 +16,7 @@ Home Assistant Operating System uses Docker as Container engine. It by default d
## Supported hardware
- Nabu Casa
- Raspberry Pi
- Hardkernel ODROID
- Asus Tinker Board
@@ -37,7 +40,7 @@ The Home Assistant Operating System documentation can be found on the [Home Assi
### Components
- **Bootloader:**
- [Barebox](https://barebox.org/) for devices that support UEFI
- [GRUB](https://www.gnu.org/software/grub/) for devices that support UEFI
- [U-Boot](https://www.denx.de/wiki/U-Boot) for devices that don't support UEFI
- **Operating System:**
- [Buildroot](https://buildroot.org/) LTS Linux
@@ -55,4 +58,4 @@ The Home Assistant Operating System documentation can be found on the [Home Assi
The Development build GitHub Action Workflow is a manually triggered workflow
which creates Home Assistant OS development builds. The development builds are
available at [os-builds.home-assistant.io](https://os-builds.home-assistant.io/).
available at [https://os-artifacts.home-assistant.io/index.html](https://os-artifacts.home-assistant.io/index.html).

View File

@@ -2,6 +2,8 @@ source "$BR2_EXTERNAL_HASSOS_PATH/package/bluetooth-rtl8723/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/eq3_char_loop/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/gasket/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/generic_raw_uart/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/hailo8-firmware/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/hailo-pci/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/hardkernel-boot/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/hassio/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/khadas-boot/Config.in"

View File

@@ -1 +1 @@
console=tty1 console=ttyS0
console=ttyS0 console=tty0

View File

@@ -60,7 +60,7 @@ fi
save_env A_TRY A_OK B_TRY B_OK ORDER MACHINE_ID
default_cmdline="rootwait zram.enabled=1 zram.num_devices=3 net.naming-scheme=v250 systemd.machine_id=$MACHINE_ID fsck.repair=yes $boot_condition"
default_cmdline="rootwait zram.enabled=1 zram.num_devices=3 systemd.machine_id=$MACHINE_ID fsck.repair=yes $boot_condition"
file_env -f ($root)/cmdline.txt cmdline
# root is a full HDD/partition definition in GRUB format like hd0,gpt1

View File

@@ -10,6 +10,9 @@ function hassos_pre_image() {
cp "${BOARD_DIR}/grub.cfg" "${EFIPART_DATA}/EFI/BOOT/grub.cfg"
cp "${BOARD_DIR}/cmdline.txt" "${EFIPART_DATA}/cmdline.txt"
grub-editenv "${EFIPART_DATA}/EFI/BOOT/grubenv" create
grub-editenv "${EFIPART_DATA}/EFI/BOOT/grubenv" set ORDER="A B"
grub-editenv "${EFIPART_DATA}/EFI/BOOT/grubenv" set A_OK=1
grub-editenv "${EFIPART_DATA}/EFI/BOOT/grubenv" set A_TRY=0
cp -r "${EFIPART_DATA}/"* "${BOOT_DATA}/"
}
@@ -24,4 +27,3 @@ function hassos_post_image() {
convert_disk_image_xz
}

View File

@@ -1,17 +1,43 @@
CONFIG_EFI_STUB=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set
CONFIG_CONNECTOR=y
CONFIG_VSOCKETS=y
CONFIG_VIRTIO=y
CONFIG_VIRTIO_PCI=y
CONFIG_VIRTIO_NET=y
CONFIG_VIRTIO_BALLOON=m
CONFIG_VIRTIO_MEM=m
CONFIG_VIRTIO_INPUT=m
CONFIG_VIRTIO_BLK=y
CONFIG_VIRTIO_BLK_SCSI=y
CONFIG_VIRTIO_CONSOLE=m
CONFIG_VIRTIO_VSOCKETS=m
CONFIG_VIRTIO_MMIO=y
CONFIG_SCSI_VIRTIO=y
CONFIG_HW_RANDOM_VIRTIO=y
CONFIG_HW_RANDOM_VIRTIO=m
CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y
CONFIG_VIRTIO_IOMMU=m
CONFIG_CRYPTO_ENGINE=m
CONFIG_CRYPTO_DEV_VIRTIO=m
# options for backward compatibility
CONFIG_ARMV8_DEPRECATED=y
CONFIG_SWP_EMULATION=y
CONFIG_CP15_BARRIER_EMULATION=y
CONFIG_SETEND_EMULATION=y
# These options are needed for virtio-fs
CONFIG_FUSE_FS=y
CONFIG_VIRTIO_FS=y
CONFIG_DAX=y
CONFIG_FS_DAX=y
CONFIG_ZONE_DEVICE=y
CONFIG_DMI_SYSFS=m
CONFIG_FW_CFG_SYSFS=m
CONFIG_NVME_CORE=y
CONFIG_BLK_DEV_NVME=y
@@ -19,7 +45,6 @@ CONFIG_NVME_HWMON=y
CONFIG_DRM_VIRTIO_GPU=m
CONFIG_HYPERVISOR_GUEST=y
CONFIG_HYPERV=y
CONFIG_HYPERV_UTILS=m
CONFIG_HYPERV_BALLOON=m
@@ -30,3 +55,5 @@ CONFIG_HYPERV_VSOCKETS=m
CONFIG_PCI_HYPERV=m
CONFIG_PCI_HYPERV_INTERFACE=m
CONFIG_FB_HYPERV=y
CONFIG_I6300ESB_WDT=y

View File

@@ -3,9 +3,9 @@ BOARD_NAME="Generic aarch64"
CHASSIS=embedded
BOOTLOADER=grub
KERNEL_FILE=Image
BOOT_SYS=efi
PARTITION_TABLE_TYPE=gpt
BOOT_SIZE=32M
BOOT_SPL=false
DISK_SIZE=6
DISK_SIZE=6G
SUPERVISOR_MACHINE=qemuarm-64
SUPERVISOR_ARCH=aarch64

View File

@@ -3,7 +3,6 @@
function hassos_pre_image() {
local BOOT_DATA="$(path_boot_dir)"
local SPL_IMG="$(path_spl_img)"
cp -t "${BOOT_DATA}" \
"${BINARIES_DIR}/boot.scr" \
@@ -13,14 +12,7 @@ function hassos_pre_image() {
mkdir -p "${BOOT_DATA}/overlays"
cp "${BINARIES_DIR}"/*.dtbo "${BOOT_DATA}/overlays/"
cp "${BOARD_DIR}/boot-env.txt" "${BOOT_DATA}/haos-config.txt"
echo "console=tty1" > "${BOOT_DATA}/cmdline.txt"
# SPL
create_spl_image
dd if="${BINARIES_DIR}/idbloader.img" of="${SPL_IMG}" conv=notrunc bs=512 seek=64
dd if="${BINARIES_DIR}/u-boot-dtb.img" of="${SPL_IMG}" conv=notrunc bs=512 seek=8192
cp "${BOARD_DIR}/cmdline.txt" "${BOOT_DATA}/cmdline.txt"
}

View File

@@ -0,0 +1 @@
console=tty0

View File

@@ -0,0 +1,13 @@
image spl.img {
size = ${BOOT_SPL_SIZE}
hdimage {
partition-table-type = "none"
fill = "yes"
}
partition uboot {
offset = 32k
image = "u-boot-rockchip.bin"
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -3,7 +3,7 @@ BOARD_NAME="Asus TinkerBoard"
CHASSIS=embedded
BOOTLOADER=uboot
KERNEL_FILE=zImage
BOOT_SYS=hybrid
PARTITION_TABLE_TYPE=hybrid
BOOT_SIZE=24M
BOOT_SPL=true
BOOT_SPL_SIZE=8M

View File

@@ -0,0 +1,7 @@
partition spl {
size = ${BOOT_SPL_SIZE}
image = "spl.img"
in-partition-table = "no"
offset = 0
holes = {"(0; 17k)"}
}

View File

@@ -1,5 +1,4 @@
From 3553f8a938dbb498aa1846a37ea343b7f53739da Mon Sep 17 00:00:00 2001
Message-Id: <3553f8a938dbb498aa1846a37ea343b7f53739da.1676488094.git.stefan@agner.ch>
From b4d676729c5bee4b9adb85362f6f2e32f833b6c2 Mon Sep 17 00:00:00 2001
From: Stefan Agner <stefan@agner.ch>
Date: Wed, 17 Feb 2021 19:55:41 +0100
Subject: [PATCH] Revert "ARM: dts: rockchip: use DMA channels for UARTs for
@@ -7,13 +6,13 @@ Subject: [PATCH] Revert "ARM: dts: rockchip: use DMA channels for UARTs for
This reverts commit 3425fe335c29310f6628faf9a7947d07f32d8962.
---
arch/arm/boot/dts/rk3288.dtsi | 8 --------
arch/arm/boot/dts/rockchip/rk3288.dtsi | 8 --------
1 file changed, 8 deletions(-)
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
index 487b0e03d4b4..1569b1824c89 100644
--- a/arch/arm/boot/dts/rk3288.dtsi
+++ b/arch/arm/boot/dts/rk3288.dtsi
diff --git a/arch/arm/boot/dts/rockchip/rk3288.dtsi b/arch/arm/boot/dts/rockchip/rk3288.dtsi
index cb9cdaddffd4..51f1273d6beb 100644
--- a/arch/arm/boot/dts/rockchip/rk3288.dtsi
+++ b/arch/arm/boot/dts/rockchip/rk3288.dtsi
@@ -378,8 +378,6 @@ uart0: serial@ff180000 {
reg-io-width = <4>;
clocks = <&cru SCLK_UART0>, <&cru PCLK_UART0>;
@@ -50,6 +49,3 @@ index 487b0e03d4b4..1569b1824c89 100644
pinctrl-names = "default";
pinctrl-0 = <&uart4_xfer>;
status = "disabled";
--
2.39.1

View File

@@ -1,7 +1,4 @@
From 695638c05c0bb6f7bcc65e172dd132b3aa280b47 Mon Sep 17 00:00:00 2001
Message-Id: <695638c05c0bb6f7bcc65e172dd132b3aa280b47.1676488094.git.stefan@agner.ch>
In-Reply-To: <3553f8a938dbb498aa1846a37ea343b7f53739da.1676488094.git.stefan@agner.ch>
References: <3553f8a938dbb498aa1846a37ea343b7f53739da.1676488094.git.stefan@agner.ch>
From 02c7d9bb23f497993d52f5a41341ed955e6a2745 Mon Sep 17 00:00:00 2001
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
Date: Mon, 5 Nov 2018 22:15:14 +0100
Subject: [PATCH] ARM: DTS: rk3288-tinker: Defining the SPI interface
@@ -17,13 +14,13 @@ Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
[move change to rk3288-tinker.dtsi]
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
arch/arm/boot/dts/rk3288-tinker.dtsi | 19 +++++++++++++++++++
arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
diff --git a/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi b/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi
index 09618bb7d872..30430d2e64b9 100644
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
--- a/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi
+++ b/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi
@@ -483,6 +483,25 @@ &sdio0 {
status = "okay";
};
@@ -50,6 +47,3 @@ index 09618bb7d872..30430d2e64b9 100644
&tsadc {
rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */
rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */
--
2.39.1

View File

@@ -1,7 +1,4 @@
From d04122215cb56b57458e05b475e41744b8126533 Mon Sep 17 00:00:00 2001
Message-Id: <d04122215cb56b57458e05b475e41744b8126533.1676488094.git.stefan@agner.ch>
In-Reply-To: <3553f8a938dbb498aa1846a37ea343b7f53739da.1676488094.git.stefan@agner.ch>
References: <3553f8a938dbb498aa1846a37ea343b7f53739da.1676488094.git.stefan@agner.ch>
From bf7869033cf3caa50912cbdfa548428a6571c104 Mon Sep 17 00:00:00 2001
From: Stefan Agner <stefan@agner.ch>
Date: Fri, 4 Sep 2020 21:57:55 +0200
Subject: [PATCH] ARM: dts: rockchip: enable I2C1/4 on rk3288-tinker
@@ -10,13 +7,13 @@ Enable I2C devices which are accessible via 40-pin header.
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
arch/arm/boot/dts/rk3288-tinker.dtsi | 8 ++++++++
arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
diff --git a/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi b/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi
index 30430d2e64b9..395afc2b2283 100644
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
--- a/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi
+++ b/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi
@@ -342,10 +342,18 @@ regulator-state-mem {
};
};
@@ -36,6 +33,3 @@ index 30430d2e64b9..395afc2b2283 100644
&i2c5 {
status = "okay";
};
--
2.39.1

View File

@@ -1,7 +1,4 @@
From 7d37754f29c379c5066c6abf38c8d01d654b1613 Mon Sep 17 00:00:00 2001
Message-Id: <7d37754f29c379c5066c6abf38c8d01d654b1613.1676488094.git.stefan@agner.ch>
In-Reply-To: <3553f8a938dbb498aa1846a37ea343b7f53739da.1676488094.git.stefan@agner.ch>
References: <3553f8a938dbb498aa1846a37ea343b7f53739da.1676488094.git.stefan@agner.ch>
From a0ef6a86e96920a9cf703d8c65d0126494037d37 Mon Sep 17 00:00:00 2001
From: Myy Miouyouyou <myy@miouyouyou.fr>
Date: Thu, 19 Oct 2017 21:24:47 +0200
Subject: [PATCH] RK3288: DTSI: rk3288.dtsi: Add missing SPI2 pinctrl
@@ -13,13 +10,13 @@ This patch is taken from the patches provided by the ARMbian team.
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
---
arch/arm/boot/dts/rk3288.dtsi | 2 +-
arch/arm/boot/dts/rockchip/rk3288.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
index 1569b1824c89..478fd1bb85df 100644
--- a/arch/arm/boot/dts/rk3288.dtsi
+++ b/arch/arm/boot/dts/rk3288.dtsi
diff --git a/arch/arm/boot/dts/rockchip/rk3288.dtsi b/arch/arm/boot/dts/rockchip/rk3288.dtsi
index 51f1273d6beb..d8663928bfe2 100644
--- a/arch/arm/boot/dts/rockchip/rk3288.dtsi
+++ b/arch/arm/boot/dts/rockchip/rk3288.dtsi
@@ -311,7 +311,7 @@ spi2: spi@ff130000 {
dma-names = "tx", "rx";
interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
@@ -29,6 +26,3 @@ index 1569b1824c89..478fd1bb85df 100644
reg = <0x0 0xff130000 0x0 0x1000>;
#address-cells = <1>;
#size-cells = <0>;
--
2.39.1

View File

@@ -1,7 +1,4 @@
From 05fde1d1dbbe7805a58a8c445b8fb19e0df59826 Mon Sep 17 00:00:00 2001
Message-Id: <05fde1d1dbbe7805a58a8c445b8fb19e0df59826.1676488094.git.stefan@agner.ch>
In-Reply-To: <3553f8a938dbb498aa1846a37ea343b7f53739da.1676488094.git.stefan@agner.ch>
References: <3553f8a938dbb498aa1846a37ea343b7f53739da.1676488094.git.stefan@agner.ch>
From e828e0fc2be98e5ad20c93981681505fc97b063b Mon Sep 17 00:00:00 2001
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
Date: Mon, 5 Nov 2018 20:16:05 +0100
Subject: [PATCH] ARM: DTSI: rk3288-tinker: Improving the CPU max voltage
@@ -10,13 +7,13 @@ Taken from the various patches provided by @TonyMac32 .
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
---
arch/arm/boot/dts/rk3288-tinker.dtsi | 2 +-
arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
diff --git a/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi b/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi
index 395afc2b2283..c7e79e594720 100644
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
--- a/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi
+++ b/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi
@@ -184,7 +184,7 @@ vdd_cpu: DCDC_REG1 {
regulator-always-on;
regulator-boot-on;
@@ -26,6 +23,3 @@ index 395afc2b2283..c7e79e594720 100644
regulator-name = "vdd_arm";
regulator-ramp-delay = <6000>;
regulator-state-mem {
--
2.39.1

View File

@@ -1,7 +1,4 @@
From 940d61e1e04929166d5a2bcbc1934aa931952ca5 Mon Sep 17 00:00:00 2001
Message-Id: <940d61e1e04929166d5a2bcbc1934aa931952ca5.1676488094.git.stefan@agner.ch>
In-Reply-To: <3553f8a938dbb498aa1846a37ea343b7f53739da.1676488094.git.stefan@agner.ch>
References: <3553f8a938dbb498aa1846a37ea343b7f53739da.1676488094.git.stefan@agner.ch>
From ad1ffd6be5f54a0871e3c303602548687dfe0ffc Mon Sep 17 00:00:00 2001
From: Myy Miouyouyou <myy@miouyouyou.fr>
Date: Sun, 7 Jan 2018 01:52:44 +0100
Subject: [PATCH] drivers: mmc: dw-mci-rockchip: Handle ASUS Tinkerboard reboot
@@ -24,7 +21,7 @@ Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
1 file changed, 66 insertions(+)
diff --git a/drivers/mmc/host/dw_mmc-rockchip.c b/drivers/mmc/host/dw_mmc-rockchip.c
index 2a99f15f527f..181718374429 100644
index b07190ba4b7a..0badaa1b404e 100644
--- a/drivers/mmc/host/dw_mmc-rockchip.c
+++ b/drivers/mmc/host/dw_mmc-rockchip.c
@@ -12,6 +12,11 @@
@@ -114,6 +111,3 @@ index 2a99f15f527f..181718374429 100644
return 0;
}
--
2.39.1

View File

@@ -1,7 +1,4 @@
From 479e2acb95c09b15382b3766391294790ebd200b Mon Sep 17 00:00:00 2001
Message-Id: <479e2acb95c09b15382b3766391294790ebd200b.1676488094.git.stefan@agner.ch>
In-Reply-To: <3553f8a938dbb498aa1846a37ea343b7f53739da.1676488094.git.stefan@agner.ch>
References: <3553f8a938dbb498aa1846a37ea343b7f53739da.1676488094.git.stefan@agner.ch>
From 4e6c3d013c847f199664a3075934f5ca52d8cba4 Mon Sep 17 00:00:00 2001
From: Stefan Agner <stefan@agner.ch>
Date: Tue, 10 May 2022 22:57:26 +0200
Subject: [PATCH] ARM: dts: rockchip: Add Bluetooth to rk3288-tinker
@@ -11,13 +8,13 @@ for Realtek rtl8723bs Bluetooth device.
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
arch/arm/boot/dts/rk3288-tinker.dtsi | 26 ++++++++++++++++++++++++++
arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi | 26 +++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
diff --git a/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi b/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi
index c7e79e594720..5d261fae6e72 100644
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
--- a/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi
+++ b/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi
@@ -386,6 +386,20 @@ bl_en: bl-en {
};
};
@@ -58,6 +55,3 @@ index c7e79e594720..5d261fae6e72 100644
};
&uart1 {
--
2.39.1

View File

@@ -0,0 +1,32 @@
From f597ec583c262ed4c3264ddf661e22b503fb8a11 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= <sairon@sairon.cz>
Date: Wed, 10 Jan 2024 16:29:59 +0100
Subject: [PATCH] usb-audio: add ASUS TinkerBoard's ALC4040
Converted to git-series patch from the original plain git diff file
buildroot-external/board/asus/tinker/patches/linux/3001_Tinkerboard-4.19-audio.patch
Co-authored-by: Pascal Vizeli <pascal.vizeli@syshack.ch>
---
sound/usb/card.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/sound/usb/card.c b/sound/usb/card.c
index 1b2edc0fd2e9..3069ac5b6759 100644
--- a/sound/usb/card.c
+++ b/sound/usb/card.c
@@ -521,6 +521,14 @@ static void usb_audio_make_shortname(struct usb_device *dev,
}
strim(card->shortname);
+
+ /* Tinker Board ALC4040 CODEC */
+
+ if(USB_ID_VENDOR(chip->usb_id) == 0x0bda &&
+ USB_ID_PRODUCT(chip->usb_id) == 0x481a) {
+ strlcat(card->shortname, " OnBoard", sizeof(card->shortname));
+ }
+
}
static void usb_audio_make_longname(struct usb_device *dev,

View File

@@ -1,19 +0,0 @@
diff --git a/sound/usb/card.c b/sound/usb/card.c
index 2bfe4e80a..cea93aaf5 100644
--- a/sound/usb/card.c
+++ b/sound/usb/card.c
@@ -382,6 +382,14 @@ static void usb_audio_make_shortname(struct usb_device *dev,
}
strim(card->shortname);
+
+ /* Tinker Board ALC4040 CODEC */
+
+ if(USB_ID_VENDOR(chip->usb_id) == 0x0bda &&
+ USB_ID_PRODUCT(chip->usb_id) == 0x481a) {
+ strlcat(card->shortname, " OnBoard", sizeof(card->shortname));
+ }
+
}
static void usb_audio_make_longname(struct usb_device *dev,

View File

@@ -1,37 +0,0 @@
From 966cd1782632bc8279667955ec315e93c89495e6 Mon Sep 17 00:00:00 2001
Message-Id: <966cd1782632bc8279667955ec315e93c89495e6.1645627366.git.stefan@agner.ch>
From: Pascal Vizeli <pvizeli@syshack.ch>
Date: Fri, 24 Apr 2020 12:41:50 +0000
Subject: [PATCH 1/2] SPL: modify load address of U-Boot
Default load address of U-Boot is at sector 16384, which is where HAOS
has its first partition. Use 0x2000 (8192) instead.
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
configs/tinker-rk3288_defconfig | 1 +
configs/tinker-s-rk3288_defconfig | 1 +
2 files changed, 2 insertions(+)
diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig
index a9c9a122f6..b839fdb570 100644
--- a/configs/tinker-rk3288_defconfig
+++ b/configs/tinker-rk3288_defconfig
@@ -92,3 +92,4 @@ CONFIG_VIDEO_ROCKCHIP=y
CONFIG_DISPLAY_ROCKCHIP_HDMI=y
CONFIG_CMD_DHRYSTONE=y
CONFIG_ERRNO_STR=y
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x2000
diff --git a/configs/tinker-s-rk3288_defconfig b/configs/tinker-s-rk3288_defconfig
index f367c9370f..c52b0753ec 100644
--- a/configs/tinker-s-rk3288_defconfig
+++ b/configs/tinker-s-rk3288_defconfig
@@ -94,3 +94,4 @@ CONFIG_DISPLAY_ROCKCHIP_HDMI=y
CONFIG_CONSOLE_SCROLL_LINES=10
CONFIG_CMD_DHRYSTONE=y
CONFIG_ERRNO_STR=y
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x2000
--
2.35.1

View File

@@ -1,10 +1,7 @@
From 98674c65a6595e7ac554f7ec9d6f0228556756f6 Mon Sep 17 00:00:00 2001
Message-Id: <98674c65a6595e7ac554f7ec9d6f0228556756f6.1645627366.git.stefan@agner.ch>
In-Reply-To: <966cd1782632bc8279667955ec315e93c89495e6.1645627366.git.stefan@agner.ch>
References: <966cd1782632bc8279667955ec315e93c89495e6.1645627366.git.stefan@agner.ch>
From defc964eaa9f4ccc9cd1568ade4e4d81f35b9e07 Mon Sep 17 00:00:00 2001
From: Pascal Vizeli <pvizeli@syshack.ch>
Date: Fri, 24 Apr 2020 11:37:55 +0000
Subject: [PATCH 2/2] pmic: enable LDO2 vcc33_mipi at bootup
Subject: [PATCH] pmic: enable LDO2 vcc33_mipi at bootup
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
---
@@ -64,5 +61,5 @@ index f85209c649..6fa1bb0c66 100644
+}
+#endif
--
2.35.1
2.43.0

View File

@@ -20,11 +20,11 @@ test -n "${BOOT_B_LEFT}" || setenv BOOT_B_LEFT 3
test -n "${MACHINE_ID}" || setenv BOOT_CONDITION "systemd.condition-first-boot=true"
# HassOS bootargs
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 net.naming-scheme=v250 systemd.machine_id=${MACHINE_ID} fsck.repair=yes ${BOOT_CONDITION}"
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 systemd.machine_id=${MACHINE_ID} fsck.repair=yes ${BOOT_CONDITION}"
# HassOS system A/B
setenv bootargs_a "root=PARTUUID=8d3d53e3-6d49-4c38-8349-aff6859e82fd rootfstype=squashfs ro rootwait"
setenv bootargs_b "root=PARTUUID=a3ec664e-32ce-4665-95ea-7ae90ce9aa20 rootfstype=squashfs ro rootwait"
setenv bootargs_a "root=PARTUUID=8d3d53e3-6d49-4c38-8349-aff6859e82fd ro rootwait"
setenv bootargs_b "root=PARTUUID=a3ec664e-32ce-4665-95ea-7ae90ce9aa20 ro rootwait"
# Load environment from haos-config.txt
if test -e mmc ${devnum}:1 haos-config.txt; then

View File

@@ -1,3 +1,6 @@
# CONFIG_USB_STORAGE is not set
# CONFIG_DOS_PARTITION is not set
CONFIG_OF_LIBFDT_OVERLAY=y
CONFIG_SPL_PAD_TO=0x3f8000
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x2000
# CONFIG_ENV_IS_IN_MMC is not set

File diff suppressed because it is too large Load Diff

View File

@@ -1 +1 @@
console=tty0 console=ttyAML0,115200n8
console=ttyAML0,115200n8 console=tty0

View File

@@ -3,9 +3,6 @@
function hassos_pre_image() {
local BOOT_DATA="$(path_boot_dir)"
local BL1="${BINARIES_DIR}/bl1.bin.hardkernel"
local UBOOT_GXBB="${BINARIES_DIR}/u-boot.gxbb"
local SPL_IMG="$(path_spl_img)"
cp "${BINARIES_DIR}/boot.scr" "${BOOT_DATA}/boot.scr"
cp "${BINARIES_DIR}/meson-gxbb-odroidc2.dtb" "${BOOT_DATA}/meson-gxbb-odroidc2.dtb"
@@ -14,13 +11,6 @@ function hassos_pre_image() {
cp "${BINARIES_DIR}"/*.dtbo "${BOOT_DATA}/overlays/"
cp "${BOARD_DIR}/boot-env.txt" "${BOOT_DATA}/haos-config.txt"
cp "${BOARD_DIR}/cmdline.txt" "${BOOT_DATA}/cmdline.txt"
# SPL
create_spl_image
dd if="${BL1}" of="${SPL_IMG}" conv=notrunc bs=1 count=440
dd if="${BL1}" of="${SPL_IMG}" conv=notrunc bs=512 skip=1 seek=1
dd if="${UBOOT_GXBB}" of="${SPL_IMG}" conv=notrunc bs=512 seek=97
}

View File

@@ -0,0 +1,20 @@
image spl.img {
size = ${BOOT_SPL_SIZE}
hdimage {
partition-table-type = "none"
fill = "yes"
}
partition bl1 {
in-partition-table = "no"
image = "bl1.bin.hardkernel"
offset = 0
}
partition u-boot {
in-partition-table = "no"
image = "u-boot.gxbb"
offset = 97s
}
}

View File

@@ -3,7 +3,7 @@ BOARD_NAME="Hardkernel ODROID-C2"
CHASSIS=embedded
BOOTLOADER=uboot
KERNEL_FILE=Image
BOOT_SYS=mbr
PARTITION_TABLE_TYPE=mbr
BOOT_SIZE=24M
BOOT_SPL=true
BOOT_SPL_SIZE=8M

View File

@@ -0,0 +1,8 @@
partition spl {
size = ${BOOT_SPL_SIZE}
image = "spl.img"
in-partition-table = "no"
offset = 0
holes = {"(440; 512)"}
}

View File

@@ -22,11 +22,11 @@ test -n "${BOOT_B_LEFT}" || setenv BOOT_B_LEFT 3
test -n "${MACHINE_ID}" || setenv BOOT_CONDITION "systemd.condition-first-boot=true"
# HassOS bootargs
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 net.naming-scheme=v250 systemd.machine_id=${MACHINE_ID} fsck.repair=yes ${BOOT_CONDITION}"
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 systemd.machine_id=${MACHINE_ID} fsck.repair=yes ${BOOT_CONDITION}"
# HassOS system A/B
setenv bootargs_a "root=PARTUUID=48617373-06 rootfstype=squashfs ro rootwait"
setenv bootargs_b "root=PARTUUID=48617373-08 rootfstype=squashfs ro rootwait"
setenv bootargs_a "root=PARTUUID=48617373-06 ro rootwait"
setenv bootargs_b "root=PARTUUID=48617373-08 ro rootwait"
# Load environment from haos-config.txt
if test -e mmc ${devnum}:1 haos-config.txt; then

View File

@@ -1 +1 @@
console=tty0 console=ttyAML0,115200n8
console=ttyAML0,115200n8 console=tty0

View File

@@ -3,8 +3,6 @@
function hassos_pre_image() {
local BOOT_DATA="$(path_boot_dir)"
local UBOOT_SM1="${BINARIES_DIR}/u-boot.sm1"
local SPL_IMG="$(path_spl_img)"
cp "${BINARIES_DIR}/boot.scr" "${BOOT_DATA}/boot.scr"
cp "${BINARIES_DIR}/meson-sm1-odroid-c4.dtb" "${BOOT_DATA}/meson-sm1-odroid-c4.dtb"
@@ -13,11 +11,6 @@ function hassos_pre_image() {
cp "${BINARIES_DIR}"/*.dtbo "${BOOT_DATA}/overlays/"
cp "${BOARD_DIR}/boot-env.txt" "${BOOT_DATA}/haos-config.txt"
cp "${BOARD_DIR}/cmdline.txt" "${BOOT_DATA}/cmdline.txt"
# SPL
create_spl_image
dd if="${UBOOT_SM1}" of="${SPL_IMG}" conv=notrunc bs=512 seek=1
}

View File

@@ -0,0 +1,13 @@
image spl.img {
size = ${BOOT_SPL_SIZE}
hdimage {
partition-table-type = "none"
fill = "yes"
}
partition uboot {
offset = 512
image = "u-boot.sm1"
}
}

View File

@@ -3,7 +3,7 @@ BOARD_NAME="Hardkernel ODROID-C4"
CHASSIS=embedded
BOOTLOADER=uboot
KERNEL_FILE=Image
BOOT_SYS=mbr
PARTITION_TABLE_TYPE=mbr
BOOT_SIZE=24M
BOOT_SPL=true
BOOT_SPL_SIZE=8M

View File

@@ -0,0 +1,7 @@
partition spl {
size = ${BOOT_SPL_SIZE}
image = "spl.img"
in-partition-table = "no"
offset = 0
holes = {"(0; 512)"}
}

View File

@@ -22,11 +22,11 @@ test -n "${BOOT_B_LEFT}" || setenv BOOT_B_LEFT 3
test -n "${MACHINE_ID}" || setenv BOOT_CONDITION "systemd.condition-first-boot=true"
# HassOS bootargs
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 net.naming-scheme=v250 systemd.machine_id=${MACHINE_ID} clk_ignore_unused usb-storage.quirks=0x2537:0x1066:u,0x2537:0x1068:u ${BOOT_CONDITION}"
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 systemd.machine_id=${MACHINE_ID} clk_ignore_unused usb-storage.quirks=0x2537:0x1066:u,0x2537:0x1068:u ${BOOT_CONDITION}"
# HassOS system A/B
setenv bootargs_a "root=PARTUUID=48617373-06 rootfstype=squashfs ro rootwait"
setenv bootargs_b "root=PARTUUID=48617373-08 rootfstype=squashfs ro rootwait"
setenv bootargs_a "root=PARTUUID=48617373-06 ro rootwait"
setenv bootargs_b "root=PARTUUID=48617373-08 ro rootwait"
# Load environment from haos-config.txt
if test -e mmc ${devnum}:1 haos-config.txt; then

View File

@@ -0,0 +1 @@
console=tty0

View File

@@ -3,19 +3,12 @@
function hassos_pre_image() {
local BOOT_DATA="$(path_boot_dir)"
local SPL_IMG="$(path_spl_img)"
cp "${BINARIES_DIR}/boot.scr" "${BOOT_DATA}/boot.scr"
cp "${BINARIES_DIR}"/*.dtb "${BOOT_DATA}/"
cp "${BOARD_DIR}/boot-env.txt" "${BOOT_DATA}/haos-config.txt"
cp "${BOARD_DIR}/cmdline.txt" "${BOOT_DATA}/cmdline.txt"
# SPL
create_spl_image
dd if="${BINARIES_DIR}/idbloader.img" of="${SPL_IMG}" conv=notrunc bs=512 seek=64
dd if="${BINARIES_DIR}/u-boot.itb" of="${SPL_IMG}" conv=notrunc bs=512 seek=16384
}

View File

@@ -0,0 +1,13 @@
image spl.img {
size = ${BOOT_SPL_SIZE}
hdimage {
partition-table-type = "none"
fill = "yes"
}
partition uboot {
offset = 32k
image = "u-boot-rockchip.bin"
}
}

View File

@@ -1,3 +1,4 @@
# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
CONFIG_THERMAL_GOV_BANG_BANG=y
@@ -7,3 +8,5 @@ CONFIG_KEYBOARD_GPIO=y
CONFIG_KEYBOARD_GPIO_POLLED=y
CONFIG_MMC_SDHCI_OF_DWCMSHC=y
# CONFIG_DW_WATCHDOG is not set

View File

@@ -3,7 +3,7 @@ BOARD_NAME="Hardkernel ODROID-M1"
CHASSIS=embedded
BOOTLOADER=uboot
KERNEL_FILE=Image
BOOT_SYS=gpt
PARTITION_TABLE_TYPE=hybrid
BOOT_SIZE=16M
BOOT_SPL=true
BOOT_SPL_SIZE=16M

View File

@@ -0,0 +1,17 @@
partition spl {
size = ${BOOT_SPL_SIZE}
image = "spl.img"
in-partition-table = "no"
offset = 0
holes = {"(0; 17k)", "(8M; 16M)"}
}
partition uboot {
size = 8M
offset = 8M
# FIXME: hdd-image intended to use the following, but the next one
# is in the img because of the _fix_disk_spl_gpt function
# partition-type-uuid = "21686148-6449-6e6f-744e-656564454649"
partition-type-uuid = "e3c9e316-0b5c-4db8-817d-f92df00215ae"
# no image here - already contains data from spl.img
}

View File

@@ -1,38 +0,0 @@
From 24048c1753916bd983746542b16d19d2b399eeb7 Mon Sep 17 00:00:00 2001
Message-Id: <24048c1753916bd983746542b16d19d2b399eeb7.1678107917.git.stefan@agner.ch>
In-Reply-To: <d388735d551e09b00317a509859fca51776b9826.1678107917.git.stefan@agner.ch>
References: <d388735d551e09b00317a509859fca51776b9826.1678107917.git.stefan@agner.ch>
From: Aurelien Jarno <aurelien@aurel32.net>
Date: Fri, 30 Sep 2022 07:12:36 +0200
Subject: [PATCH] arm64: dts: rockchip: add thermal support to ODROID-M1
Add the thermal nodes for the ODROID-M1.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Tested-by: Dan Johansen <strit@manjaro.org>
Link: https://lore.kernel.org/r/20220930051246.391614-4-aurelien@aurel32.net
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
index b3016437640b..112c65af3f55 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
@@ -409,6 +409,12 @@ &sdmmc0 {
status = "okay";
};
+&tsadc {
+ rockchip,hw-tshut-mode = <1>;
+ rockchip,hw-tshut-polarity = <0>;
+ status = "okay";
+};
+
&uart2 {
status = "okay";
};
--
2.39.2

View File

@@ -1,103 +0,0 @@
From 982bb2beab8e38a7c0a365770be2ad9c5221a650 Mon Sep 17 00:00:00 2001
Message-Id: <982bb2beab8e38a7c0a365770be2ad9c5221a650.1678107917.git.stefan@agner.ch>
In-Reply-To: <d388735d551e09b00317a509859fca51776b9826.1678107917.git.stefan@agner.ch>
References: <d388735d551e09b00317a509859fca51776b9826.1678107917.git.stefan@agner.ch>
From: Aurelien Jarno <aurelien@aurel32.net>
Date: Fri, 30 Sep 2022 07:12:37 +0200
Subject: [PATCH] arm64: dts: rockchip: Add NOR flash to ODROID-M1
Enable the Rockchip Serial Flash Controller for the ODROID-M1 and add
the corresponding SPI NOR flash entry. The SFC is used in dual I/O mode
and not quad I/O mode, as the FSPI_D2 pin is shared with the EMMC_RSTn
pin.
The partitions addresses and sizes are taken from the ODROID-M1
Partition Table page on the ODROID wiki.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Tested-by: Dan Johansen <strit@manjaro.org>
Link: https://lore.kernel.org/r/20220930051246.391614-5-aurelien@aurel32.net
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
.../boot/dts/rockchip/rk3568-odroid-m1.dts | 58 +++++++++++++++++++
1 file changed, 58 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
index 112c65af3f55..94e839c9afab 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
@@ -351,6 +351,20 @@ rgmii_phy0: ethernet-phy@0 {
};
&pinctrl {
+ fspi {
+ fspi_dual_io_pins: fspi-dual-io-pins {
+ rockchip,pins =
+ /* fspi_clk */
+ <1 RK_PD0 1 &pcfg_pull_none>,
+ /* fspi_cs0n */
+ <1 RK_PD3 1 &pcfg_pull_none>,
+ /* fspi_d0 */
+ <1 RK_PD1 1 &pcfg_pull_none>,
+ /* fspi_d1 */
+ <1 RK_PD2 1 &pcfg_pull_none>;
+ };
+ };
+
leds {
led_power_pin: led-power-pin {
rockchip,pins = <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
@@ -409,6 +423,50 @@ &sdmmc0 {
status = "okay";
};
+&sfc {
+ /* Dual I/O mode as the D2 pin conflicts with the eMMC */
+ pinctrl-0 = <&fspi_dual_io_pins>;
+ pinctrl-names = "default";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <100000000>;
+ spi-rx-bus-width = <2>;
+ spi-tx-bus-width = <1>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "SPL";
+ reg = <0x0 0xe0000>;
+ };
+ partition@e0000 {
+ label = "U-Boot Env";
+ reg = <0xe0000 0x20000>;
+ };
+ partition@100000 {
+ label = "U-Boot";
+ reg = <0x100000 0x200000>;
+ };
+ partition@300000 {
+ label = "splash";
+ reg = <0x300000 0x100000>;
+ };
+ partition@400000 {
+ label = "Filesystem";
+ reg = <0x400000 0xc00000>;
+ };
+ };
+ };
+};
+
&tsadc {
rockchip,hw-tshut-mode = <1>;
rockchip,hw-tshut-polarity = <0>;
--
2.39.2

View File

@@ -1,102 +0,0 @@
From ae25f92a09abb7dd16a9ad3b74e0c105b385f214 Mon Sep 17 00:00:00 2001
Message-Id: <ae25f92a09abb7dd16a9ad3b74e0c105b385f214.1678107917.git.stefan@agner.ch>
In-Reply-To: <d388735d551e09b00317a509859fca51776b9826.1678107917.git.stefan@agner.ch>
References: <d388735d551e09b00317a509859fca51776b9826.1678107917.git.stefan@agner.ch>
From: Aurelien Jarno <aurelien@aurel32.net>
Date: Fri, 30 Sep 2022 07:12:38 +0200
Subject: [PATCH] arm64: dts: rockchip: Add analog audio on ODROID-M1
On the ODROID-M1, the I2S1 TDM controller is connected to the rk809
codec in I2S mode. It is used to provide a stereo headphones output and
a mono speaker output. A GPIO with an external pullup is used as an
headphone detection input.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Tested-by: Dan Johansen <strit@manjaro.org>
Link: https://lore.kernel.org/r/20220930051246.391614-6-aurelien@aurel32.net
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
.../boot/dts/rockchip/rk3568-odroid-m1.dts | 43 ++++++++++++++++++-
1 file changed, 42 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
index 94e839c9afab..634c1bd80b4e 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
@@ -59,6 +59,31 @@ led_work: led-1 {
};
};
+ rk809-sound {
+ compatible = "simple-audio-card";
+ pinctrl-names = "default";
+ pinctrl-0 = <&hp_det_pin>;
+ simple-audio-card,name = "Analog RK817";
+ simple-audio-card,format = "i2s";
+ simple-audio-card,hp-det-gpio = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>;
+ simple-audio-card,mclk-fs = <256>;
+ simple-audio-card,widgets =
+ "Headphone", "Headphones",
+ "Speaker", "Speaker";
+ simple-audio-card,routing =
+ "Headphones", "HPOL",
+ "Headphones", "HPOR",
+ "Speaker", "SPKO";
+
+ simple-audio-card,cpu {
+ sound-dai = <&i2s1_8ch>;
+ };
+
+ simple-audio-card,codec {
+ sound-dai = <&rk809>;
+ };
+ };
+
vcc3v3_sys: vcc3v3-sys-regulator {
compatible = "regulator-fixed";
regulator-name = "vcc3v3_sys";
@@ -131,10 +156,15 @@ rk809: pmic@20 {
reg = <0x20>;
interrupt-parent = <&gpio0>;
interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
+ assigned-clocks = <&cru I2S1_MCLKOUT_TX>;
+ assigned-clock-parents = <&cru CLK_I2S1_8CH_TX>;
#clock-cells = <1>;
+ clock-names = "mclk";
+ clocks = <&cru I2S1_MCLKOUT_TX>;
pinctrl-names = "default";
- pinctrl-0 = <&pmic_int_l>;
+ pinctrl-0 = <&pmic_int_l>, <&i2s1m0_mclk>;
rockchip,system-power-controller;
+ #sound-dai-cells = <0>;
vcc1-supply = <&vcc3v3_sys>;
vcc2-supply = <&vcc3v3_sys>;
vcc3-supply = <&vcc3v3_sys>;
@@ -340,6 +370,11 @@ regulator-state-mem {
};
};
+&i2s1_8ch {
+ rockchip,trcm-sync-tx-only;
+ status = "okay";
+};
+
&mdio0 {
rgmii_phy0: ethernet-phy@0 {
compatible = "ethernet-phy-ieee802.3-c22";
@@ -379,6 +414,12 @@ pmic_int_l: pmic-int-l {
rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
+
+ rk809 {
+ hp_det_pin: hp-det-pin {
+ rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
};
&pmu_io_domains {
--
2.39.2

View File

@@ -1,97 +0,0 @@
From 3a1be3d8719ef6335385d4e5e456371e7bf7383f Mon Sep 17 00:00:00 2001
Message-Id: <3a1be3d8719ef6335385d4e5e456371e7bf7383f.1678107917.git.stefan@agner.ch>
In-Reply-To: <d388735d551e09b00317a509859fca51776b9826.1678107917.git.stefan@agner.ch>
References: <d388735d551e09b00317a509859fca51776b9826.1678107917.git.stefan@agner.ch>
From: Aurelien Jarno <aurelien@aurel32.net>
Date: Fri, 30 Sep 2022 07:12:39 +0200
Subject: [PATCH] arm64: dts: rockchip: Enable vop2 and hdmi tx on ODROID-M1
Enable the RK356x Video Output Processor (VOP) 2 on ODROID M1.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Tested-by: Dan Johansen <strit@manjaro.org>
Link: https://lore.kernel.org/r/20220930051246.391614-7-aurelien@aurel32.net
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
.../boot/dts/rockchip/rk3568-odroid-m1.dts | 47 +++++++++++++++++++
1 file changed, 47 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
index 634c1bd80b4e..126b893048fe 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
@@ -8,6 +8,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/pinctrl/rockchip.h>
+#include <dt-bindings/soc/rockchip,vop2.h>
#include "rk3568.dtsi"
/ {
@@ -37,6 +38,17 @@ dc_12v: dc-12v-regulator {
regulator-max-microvolt = <12000000>;
};
+ hdmi-con {
+ compatible = "hdmi-connector";
+ type = "a";
+
+ port {
+ hdmi_con_in: endpoint {
+ remote-endpoint = <&hdmi_out_con>;
+ };
+ };
+ };
+
leds {
compatible = "gpio-leds";
@@ -131,6 +143,24 @@ &gmac0_rgmii_clk
rx_delay = <0x2d>;
};
+&hdmi {
+ avdd-0v9-supply = <&vdda0v9_image>;
+ avdd-1v8-supply = <&vcca1v8_image>;
+ status = "okay";
+};
+
+&hdmi_in {
+ hdmi_in_vp0: endpoint {
+ remote-endpoint = <&vp0_out_hdmi>;
+ };
+};
+
+&hdmi_out {
+ hdmi_out_con: endpoint {
+ remote-endpoint = <&hdmi_con_in>;
+ };
+};
+
&i2c0 {
status = "okay";
@@ -517,3 +547,20 @@ &tsadc {
&uart2 {
status = "okay";
};
+
+&vop {
+ assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
+ assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
+ status = "okay";
+};
+
+&vop_mmu {
+ status = "okay";
+};
+
+&vp0 {
+ vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
+ reg = <ROCKCHIP_VOP2_EP_HDMI0>;
+ remote-endpoint = <&hdmi_in_vp0>;
+ };
+};
--
2.39.2

View File

@@ -1,48 +0,0 @@
From ded87dc761951205b8b9ba8ee4081e28a850a3db Mon Sep 17 00:00:00 2001
Message-Id: <ded87dc761951205b8b9ba8ee4081e28a850a3db.1678107917.git.stefan@agner.ch>
In-Reply-To: <d388735d551e09b00317a509859fca51776b9826.1678107917.git.stefan@agner.ch>
References: <d388735d551e09b00317a509859fca51776b9826.1678107917.git.stefan@agner.ch>
From: Aurelien Jarno <aurelien@aurel32.net>
Date: Fri, 30 Sep 2022 07:12:40 +0200
Subject: [PATCH] arm64: dts: rockchip: Enable HDMI audio on ODROID-M1.
This enables the i2s0 controller and the hdmi-sound node on the
ODROID-M1.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Tested-by: Dan Johansen <strit@manjaro.org>
Link: https://lore.kernel.org/r/20220930051246.391614-8-aurelien@aurel32.net
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
index 126b893048fe..ac4e94d18feb 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
@@ -161,6 +161,10 @@ hdmi_out_con: endpoint {
};
};
+&hdmi_sound {
+ status = "okay";
+};
+
&i2c0 {
status = "okay";
@@ -400,6 +404,10 @@ regulator-state-mem {
};
};
+&i2s0_8ch {
+ status = "okay";
+};
+
&i2s1_8ch {
rockchip,trcm-sync-tx-only;
status = "okay";
--
2.39.2

View File

@@ -1,37 +0,0 @@
From 13438a717627cae086cc3a1126552cffa2f4bd16 Mon Sep 17 00:00:00 2001
Message-Id: <13438a717627cae086cc3a1126552cffa2f4bd16.1678107917.git.stefan@agner.ch>
In-Reply-To: <d388735d551e09b00317a509859fca51776b9826.1678107917.git.stefan@agner.ch>
References: <d388735d551e09b00317a509859fca51776b9826.1678107917.git.stefan@agner.ch>
From: Aurelien Jarno <aurelien@aurel32.net>
Date: Fri, 30 Sep 2022 07:12:41 +0200
Subject: [PATCH] arm64: dts: rockchip: Enable the GPU on ODROID-M1
Enable the GPU core on the Rockchip RK3568 ODROID-M1.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Tested-by: Dan Johansen <strit@manjaro.org>
Link: https://lore.kernel.org/r/20220930051246.391614-9-aurelien@aurel32.net
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
index ac4e94d18feb..e4b7699d3eea 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
@@ -143,6 +143,11 @@ &gmac0_rgmii_clk
rx_delay = <0x2d>;
};
+&gpu {
+ mali-supply = <&vdd_gpu>;
+ status = "okay";
+};
+
&hdmi {
avdd-0v9-supply = <&vdda0v9_image>;
avdd-1v8-supply = <&vcca1v8_image>;
--
2.39.2

View File

@@ -1,111 +0,0 @@
From 0f0a85a289b4d0fbd5c39eb5ddbb681a37ad490c Mon Sep 17 00:00:00 2001
Message-Id: <0f0a85a289b4d0fbd5c39eb5ddbb681a37ad490c.1678107917.git.stefan@agner.ch>
In-Reply-To: <d388735d551e09b00317a509859fca51776b9826.1678107917.git.stefan@agner.ch>
References: <d388735d551e09b00317a509859fca51776b9826.1678107917.git.stefan@agner.ch>
From: Aurelien Jarno <aurelien@aurel32.net>
Date: Fri, 30 Sep 2022 07:12:42 +0200
Subject: [PATCH] arm64: dts: rockchip: Enable the USB 2.0 ports on ODROID-M1
The Rockchip RK3568 has two USB OHCI/EHCI controllers connected to a PHY
providing one host-only port and one OTG port. On the ODROID-M1, they
are both used in host mode. The USB ports are powered by a DC/DC
converter providing 5V and named VCC5V0_SYS on the schematics, followed
by a power switch.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Tested-by: Dan Johansen <strit@manjaro.org>
Link: https://lore.kernel.org/r/20220930051246.391614-10-aurelien@aurel32.net
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
.../boot/dts/rockchip/rk3568-odroid-m1.dts | 61 +++++++++++++++++++
1 file changed, 61 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
index e4b7699d3eea..2e4cc20bd676 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
@@ -105,6 +105,28 @@ vcc3v3_sys: vcc3v3-sys-regulator {
regulator-max-microvolt = <3300000>;
vin-supply = <&dc_12v>;
};
+
+ vcc5v0_sys: vcc5v0-sys-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc5v0_sys";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&dc_12v>;
+ };
+
+ vcc5v0_usb_host: vcc5v0-usb-host-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc5v0_usb_host";
+ enable-active-high;
+ gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&vcc5v0_usb_host_en_pin>;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vcc5v0_sys>;
+ };
};
&cpu0 {
@@ -463,6 +485,15 @@ hp_det_pin: hp-det-pin {
rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
+
+ usb {
+ vcc5v0_usb_host_en_pin: vcc5v0-usb-host-en-pin {
+ rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ vcc5v0_usb_otg_en_pin: vcc5v0-usb-otg-en-pin {
+ rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
};
&pmu_io_domains {
@@ -561,6 +592,36 @@ &uart2 {
status = "okay";
};
+&usb_host0_ehci {
+ status = "okay";
+};
+
+&usb_host0_ohci {
+ status = "okay";
+};
+
+&usb_host1_ehci {
+ status = "okay";
+};
+
+&usb_host1_ohci {
+ status = "okay";
+};
+
+&usb2phy1 {
+ status = "okay";
+};
+
+&usb2phy1_host {
+ phy-supply = <&vcc5v0_usb_host>;
+ status = "okay";
+};
+
+&usb2phy1_otg {
+ phy-supply = <&vcc5v0_usb_host>;
+ status = "okay";
+};
+
&vop {
assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
--
2.39.2

View File

@@ -1,114 +0,0 @@
From d8abc451c669a8fd36b31db5cb96ec49da819124 Mon Sep 17 00:00:00 2001
Message-Id: <d8abc451c669a8fd36b31db5cb96ec49da819124.1678107917.git.stefan@agner.ch>
In-Reply-To: <d388735d551e09b00317a509859fca51776b9826.1678107917.git.stefan@agner.ch>
References: <d388735d551e09b00317a509859fca51776b9826.1678107917.git.stefan@agner.ch>
From: Aurelien Jarno <aurelien@aurel32.net>
Date: Fri, 30 Sep 2022 07:12:43 +0200
Subject: [PATCH] arm64: dts: rockchip: Enable the USB 3.0 ports on ODROID-M1
The Rockchip RK3568 has two USB XHCI controllers. The USB 2.0 signals
are connected to a PHY providing one host-only port and one OTG port.
The USB 3.0 signals are connected to two USB3.0/PCIE/SATA combo PHY.
The ODROID M1 has 2 type A USB 3.0 connectors, with the USB 3.0 signals
connected to the two combo PHYs. For the USB 2.0 signals, one connector
is connected to the host-only PHY and uses the same power switch as the
USB 2.0 ports. The other connector has its own power switch and is
connected to the OTG PHY, which is also connected to a device only
micro-USB connector. The purpose of this micro-USB connector is for
firmware update using the Rockusb vendor specific USB class. Therefore
it does not make sense to enable this port on Linux, and the PHY is
forced to host mode.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Tested-by: Dan Johansen <strit@manjaro.org>
Link: https://lore.kernel.org/r/20220930051246.391614-11-aurelien@aurel32.net
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
.../boot/dts/rockchip/rk3568-odroid-m1.dts | 49 ++++++++++++++++++-
1 file changed, 48 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
index 2e4cc20bd676..9a84a7e76d7a 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
@@ -127,6 +127,30 @@ vcc5v0_usb_host: vcc5v0-usb-host-regulator {
regulator-max-microvolt = <5000000>;
vin-supply = <&vcc5v0_sys>;
};
+
+ vcc5v0_usb_otg: vcc5v0-usb-otg-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc5v0_usb_otg";
+ enable-active-high;
+ gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&vcc5v0_usb_otg_en_pin>;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vcc5v0_sys>;
+ };
+};
+
+&combphy0 {
+ /* Used for USB3 */
+ phy-supply = <&vcc5v0_usb_host>;
+ status = "okay";
+};
+
+&combphy1 {
+ /* Used for USB3 */
+ phy-supply = <&vcc5v0_usb_otg>;
+ status = "okay";
};
&cpu0 {
@@ -490,7 +514,7 @@ usb {
vcc5v0_usb_host_en_pin: vcc5v0-usb-host-en-pin {
rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
};
- vcc5v0_usb_otg_en_pin: vcc5v0-usb-otg-en-pin {
+ vcc5v0_usb_otg_en_pin: vcc5v0-usb-dr-en-pin {
rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
@@ -600,6 +624,11 @@ &usb_host0_ohci {
status = "okay";
};
+&usb_host0_xhci {
+ dr_mode = "host";
+ status = "okay";
+};
+
&usb_host1_ehci {
status = "okay";
};
@@ -608,6 +637,24 @@ &usb_host1_ohci {
status = "okay";
};
+&usb_host1_xhci {
+ status = "okay";
+};
+
+&usb2phy0 {
+ status = "okay";
+};
+
+&usb2phy0_host {
+ phy-supply = <&vcc5v0_usb_host>;
+ status = "okay";
+};
+
+&usb2phy0_otg {
+ phy-supply = <&vcc5v0_usb_otg>;
+ status = "okay";
+};
+
&usb2phy1 {
status = "okay";
};
--
2.39.2

View File

@@ -1,48 +0,0 @@
From 2f6d4521403932ca22cb4dabef9033f1d52232ba Mon Sep 17 00:00:00 2001
Message-Id: <2f6d4521403932ca22cb4dabef9033f1d52232ba.1678107917.git.stefan@agner.ch>
In-Reply-To: <d388735d551e09b00317a509859fca51776b9826.1678107917.git.stefan@agner.ch>
References: <d388735d551e09b00317a509859fca51776b9826.1678107917.git.stefan@agner.ch>
From: Aurelien Jarno <aurelien@aurel32.net>
Date: Fri, 30 Sep 2022 07:12:44 +0200
Subject: [PATCH] arm64: dts: rockchip: Add SATA support to ODROID-M1
Enable the Combo PHY and SATA nodes in ODROID-M1.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Tested-by: Dan Johansen <strit@manjaro.org>
Link: https://lore.kernel.org/r/20220930051246.391614-12-aurelien@aurel32.net
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
index 9a84a7e76d7a..bd24ccf94e76 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
@@ -153,6 +153,11 @@ &combphy1 {
status = "okay";
};
+&combphy2 {
+ /* used for SATA */
+ status = "okay";
+};
+
&cpu0 {
cpu-supply = <&vdd_cpu>;
};
@@ -538,6 +543,10 @@ &saradc {
status = "okay";
};
+&sata2 {
+ status = "okay";
+};
+
&sdhci {
bus-width = <8>;
max-frequency = <200000000>;
--
2.39.2

View File

@@ -1,80 +0,0 @@
From 1572a9c5d9fa9f654fbc1909528ae5940ad34aa3 Mon Sep 17 00:00:00 2001
Message-Id: <1572a9c5d9fa9f654fbc1909528ae5940ad34aa3.1678107917.git.stefan@agner.ch>
In-Reply-To: <d388735d551e09b00317a509859fca51776b9826.1678107917.git.stefan@agner.ch>
References: <d388735d551e09b00317a509859fca51776b9826.1678107917.git.stefan@agner.ch>
From: Aurelien Jarno <aurelien@aurel32.net>
Date: Fri, 30 Sep 2022 07:12:45 +0200
Subject: [PATCH] arm64: dts: rockchip: Add PCIEe v3 nodes to ODROID-M1
Add nodes to ODROID-M1 to support PCIe v3 on the M2 slot.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Tested-by: Dan Johansen <strit@manjaro.org>
Link: https://lore.kernel.org/r/20220930051246.391614-13-aurelien@aurel32.net
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
.../boot/dts/rockchip/rk3568-odroid-m1.dts | 34 +++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
index bd24ccf94e76..2f685c606bb9 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
@@ -96,6 +96,19 @@ simple-audio-card,codec {
};
};
+ vcc3v3_pcie: vcc3v3-pcie-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc3v3_pcie";
+ enable-active-high;
+ gpio = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&vcc3v3_pcie_en_pin>;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ startup-delay-us = <5000>;
+ vin-supply = <&vcc3v3_sys>;
+ };
+
vcc3v3_sys: vcc3v3-sys-regulator {
compatible = "regulator-fixed";
regulator-name = "vcc3v3_sys";
@@ -479,6 +492,18 @@ rgmii_phy0: ethernet-phy@0 {
};
};
+&pcie30phy {
+ status = "okay";
+};
+
+&pcie3x2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pcie_reset_pin>;
+ reset-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>;
+ vpcie3v3-supply = <&vcc3v3_pcie>;
+ status = "okay";
+};
+
&pinctrl {
fspi {
fspi_dual_io_pins: fspi-dual-io-pins {
@@ -503,6 +528,15 @@ led_work_pin: led-work-pin {
};
};
+ pcie {
+ pcie_reset_pin: pcie-reset-pin {
+ rockchip,pins = <2 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ vcc3v3_pcie_en_pin: vcc3v3-pcie-en-pin {
+ rockchip,pins = <4 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
pmic {
pmic_int_l: pmic-int-l {
rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
--
2.39.2

View File

@@ -1,54 +0,0 @@
From b2eae73eeb32dd9383571de6af18fc8bd39aac3a Mon Sep 17 00:00:00 2001
Message-Id: <b2eae73eeb32dd9383571de6af18fc8bd39aac3a.1678107917.git.stefan@agner.ch>
In-Reply-To: <d388735d551e09b00317a509859fca51776b9826.1678107917.git.stefan@agner.ch>
References: <d388735d551e09b00317a509859fca51776b9826.1678107917.git.stefan@agner.ch>
From: Aurelien Jarno <aurelien@aurel32.net>
Date: Fri, 30 Sep 2022 07:12:46 +0200
Subject: [PATCH] arm64: dts: rockchip: Add IR receiver node to ODROID-M1
Add the infrared receiver and its associated pinctrl entry. Note that
there is an external pullup to VCC3V3_SYS.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Tested-by: Dan Johansen <strit@manjaro.org>
Link: https://lore.kernel.org/r/20220930051246.391614-14-aurelien@aurel32.net
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
index 2f685c606bb9..59ecf868dbd0 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
@@ -49,6 +49,13 @@ hdmi_con_in: endpoint {
};
};
+ ir-receiver {
+ compatible = "gpio-ir-receiver";
+ gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_LOW>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&ir_receiver_pin>;
+ };
+
leds {
compatible = "gpio-leds";
@@ -519,6 +526,13 @@ fspi_dual_io_pins: fspi-dual-io-pins {
};
};
+ ir-receiver {
+ ir_receiver_pin: ir-receiver-pin {
+ /* external pullup to VCC3V3_SYS */
+ rockchip,pins = <0 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
leds {
led_power_pin: led-power-pin {
rockchip,pins = <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
--
2.39.2

View File

@@ -0,0 +1,46 @@
From 023bc5bd23d3239494bca81d807d3c093f78c131 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= <sairon@sairon.cz>
Date: Thu, 8 Aug 2024 17:52:47 +0200
Subject: [PATCH] odroid-m1: Disable eMMC DDR52 mode, enable HS200
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Disable DDR52 mode on odroid-m1 to fix eMMC writes. Also enable HS200,
as it's supposed to work more reliably than slower modes.
Signed-off-by: Jan Čermák <sairon@sairon.cz>
Upstream: https://patchwork.ozlabs.org/project/uboot/cover/20240204205312.2342868-1-jonas@kwiboo.se/
---
arch/arm/dts/rk3568-odroid-m1-u-boot.dtsi | 3 ---
configs/odroid-m1-rk3568_defconfig | 2 ++
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/arm/dts/rk3568-odroid-m1-u-boot.dtsi b/arch/arm/dts/rk3568-odroid-m1-u-boot.dtsi
index 0fc360b06d..f9d34d3b77 100644
--- a/arch/arm/dts/rk3568-odroid-m1-u-boot.dtsi
+++ b/arch/arm/dts/rk3568-odroid-m1-u-boot.dtsi
@@ -14,10 +14,7 @@
&sdhci {
cap-mmc-highspeed;
- mmc-ddr-1_8v;
mmc-hs200-1_8v;
- mmc-hs400-1_8v;
- mmc-hs400-enhanced-strobe;
pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>;
};
diff --git a/configs/odroid-m1-rk3568_defconfig b/configs/odroid-m1-rk3568_defconfig
index 96b4e9ecda..517ac0575d 100644
--- a/configs/odroid-m1-rk3568_defconfig
+++ b/configs/odroid-m1-rk3568_defconfig
@@ -72,6 +72,8 @@ CONFIG_ROCKCHIP_GPIO=y
CONFIG_SYS_I2C_ROCKCHIP=y
CONFIG_MISC=y
CONFIG_SUPPORT_EMMC_RPMB=y
+CONFIG_MMC_HS200_SUPPORT=y
+CONFIG_SPL_MMC_HS200_SUPPORT=y
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
CONFIG_MMC_SDHCI=y

View File

@@ -1,5 +1,5 @@
part start mmc ${devnum} hassos-bootstate mmc_env
mmc dev ${devnum}
setenv loadbootstate " \
echo 'loading env...'; \
@@ -20,11 +20,11 @@ test -n "${BOOT_B_LEFT}" || setenv BOOT_B_LEFT 3
test -n "${MACHINE_ID}" || setenv BOOT_CONDITION "systemd.condition-first-boot=true"
# HassOS bootargs
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 net.naming-scheme=v250 systemd.machine_id=${MACHINE_ID} fsck.repair=yes ${BOOT_CONDITION}"
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 systemd.machine_id=${MACHINE_ID} fsck.repair=yes ${BOOT_CONDITION}"
# HassOS system A/B
setenv bootargs_a "root=PARTUUID=8d3d53e3-6d49-4c38-8349-aff6859e82fd rootfstype=squashfs ro rootwait"
setenv bootargs_b "root=PARTUUID=a3ec664e-32ce-4665-95ea-7ae90ce9aa20 rootfstype=squashfs ro rootwait"
setenv bootargs_a "root=PARTUUID=8d3d53e3-6d49-4c38-8349-aff6859e82fd ro rootwait"
setenv bootargs_b "root=PARTUUID=a3ec664e-32ce-4665-95ea-7ae90ce9aa20 ro rootwait"
part number mmc ${devnum} hassos-boot boot_partnum

View File

@@ -1,5 +1,2 @@
CONFIG_DOS_PARTITION=y
# CONFIG_EFI_PARTITION is not set
# CONFIG_USB_STORAGE is not set
CONFIG_DISPLAY_BOARDINFO=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
# CONFIG_DWC_ETH_QOS is not set
# CONFIG_DWC_ETH_QOS_ROCKCHIP is not set

View File

@@ -0,0 +1 @@
console=tty0

View File

@@ -0,0 +1,18 @@
#!/bin/bash
# shellcheck disable=SC2155
function hassos_pre_image() {
local BOOT_DATA="$(path_boot_dir)"
cp "${BINARIES_DIR}/boot.scr" "${BOOT_DATA}/boot.scr"
cp "${BINARIES_DIR}"/*.dtb "${BOOT_DATA}/"
cp "${BOARD_DIR}/boot-env.txt" "${BOOT_DATA}/haos-config.txt"
cp "${BOARD_DIR}/cmdline.txt" "${BOOT_DATA}/cmdline.txt"
}
function hassos_post_image() {
convert_disk_image_xz
}

View File

@@ -0,0 +1,13 @@
image spl.img {
size = ${BOOT_SPL_SIZE}
hdimage {
partition-table-type = "none"
fill = "yes"
}
partition uboot {
offset = 32k
image = "u-boot-rockchip.bin"
}
}

View File

@@ -0,0 +1,12 @@
# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
CONFIG_THERMAL_GOV_BANG_BANG=y
CONFIG_SENSORS_GPIO_FAN=y
CONFIG_KEYBOARD_GPIO=y
CONFIG_KEYBOARD_GPIO_POLLED=y
CONFIG_MMC_SDHCI_OF_DWCMSHC=y
# CONFIG_DW_WATCHDOG is not set

View File

@@ -0,0 +1,12 @@
BOARD_ID=odroid-m1s
BOARD_NAME="Hardkernel ODROID-M1S"
CHASSIS=embedded
BOOTLOADER=uboot
KERNEL_FILE=Image
PARTITION_TABLE_TYPE=hybrid
BOOT_SIZE=16M
BOOT_SPL=true
BOOT_SPL_SIZE=16M
BOOT_ENV_SIZE=0x8000
SUPERVISOR_MACHINE=odroid-m1
SUPERVISOR_ARCH=aarch64

View File

@@ -0,0 +1,17 @@
partition spl {
size = ${BOOT_SPL_SIZE}
image = "spl.img"
in-partition-table = "no"
offset = 0
holes = {"(0; 17k)", "(8M; 16M)"}
}
partition uboot {
size = 8M
offset = 8M
# FIXME: hdd-image intended to use the following, but the next one
# is in the img because of the _fix_disk_spl_gpt function
# partition-type-uuid = "21686148-6449-6e6f-744e-656564454649"
partition-type-uuid = "e3c9e316-0b5c-4db8-817d-f92df00215ae"
# no image here - already contains data from spl.img
}

View File

@@ -0,0 +1,896 @@
From 83dadbe0a615f6fc7550dec98dee938647050990 Mon Sep 17 00:00:00 2001
From: Tim Lunn <tim@feathertop.org>
Date: Sun, 28 Jan 2024 18:52:26 +1100
Subject: [PATCH] arm64: dts: rockchip: Import Hardkernel ODROID-M1S board
Odroid-m1s is in the process of being upstreamed.
For now sync dts for Odroid-m1s:
https://github.com/tobetter/linux/blob/ae33b445578884c70d7bfc5d6d519de4db815ccd/arch/arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts
---
arch/arm64/boot/dts/rockchip/Makefile | 1 +
.../boot/dts/rockchip/rk3566-odroid-m1s.dts | 861 ++++++++++++++++++
2 files changed, 862 insertions(+)
create mode 100644 arch/arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts
diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
index 8c15593c0ca4..362359684ed0 100644
--- a/arch/arm64/boot/dts/rockchip/Makefile
+++ b/arch/arm64/boot/dts/rockchip/Makefile
@@ -63,6 +63,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire-excavator.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399pro-rock-pi-n10.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-anbernic-rg353p.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-anbernic-rg503.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-odroid-m1s.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-pinenote-v1.1.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-pinenote-v1.2.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-quartz64-a.dtb
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts b/arch/arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts
new file mode 100644
index 000000000000..1cad9217c374
--- /dev/null
+++ b/arch/arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts
@@ -0,0 +1,861 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2023 Hardkernel Co., Ltd.
+ *
+ */
+
+/dts-v1/;
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/rockchip.h>
+#include <dt-bindings/soc/rockchip,vop2.h>
+
+#include "rk3566.dtsi"
+
+/ {
+ model = "Hardkernel ODROID-M1S";
+ compatible = "rockchip,rk3566-odroid-m1", "rockchip,rk3566";
+
+ aliases {
+ ethernet1 = &gmac1;
+ i2c0 = &i2c3;
+ i2c3 = &i2c0;
+ mmc0 = &sdhci;
+ mmc1 = &sdmmc0;
+ serial0 = &uart1;
+ serial1 = &uart0;
+ };
+
+ chosen: chosen {
+ stdout-path = "serial2:1500000n8";
+ };
+
+ hdmi-con {
+ compatible = "hdmi-connector";
+ type = "a";
+
+ port {
+ hdmi_con_in: endpoint {
+ remote-endpoint = <&hdmi_out_con>;
+ };
+ };
+ };
+
+ gmac1_clkin: external-gmac1-clock {
+ compatible = "fixed-clock";
+ clock-frequency = <125000000>;
+ clock-output-names = "gmac1_clkin";
+ #clock-cells = <0>;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+ status = "okay";
+
+ red_led: red {
+ gpios = <&gpio0 RK_PC6 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "default-on";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_RED>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&led_power_en>;
+ };
+ blue_led: blue {
+ gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "heartbeat";
+ function = LED_FUNCTION_HEARTBEAT;
+ color = <LED_COLOR_ID_BLUE>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&led_work_en>;
+ };
+ };
+
+ pcie20_3v3: pcie20-3v3-regulator {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ gpios = <&gpio2 RK_PC2 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pcie20_3v3_en>;
+ regulator-name = "pcie20_3v3";
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ rk809-sound {
+ compatible = "simple-audio-card";
+ simple-audio-card,format = "i2s";
+ simple-audio-card,name = "ODROID-M1-FRONT";
+ simple-audio-card,mclk-fs = <256>;
+ status = "okay";
+
+ simple-audio-card,cpu {
+ sound-dai = <&i2s1_8ch>;
+ };
+
+ simple-audio-card,codec {
+ sound-dai = <&rk809>;
+ };
+ };
+
+ vcc3v3_sys: vcc3v3-sys {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc3v3_sys";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&vcc5v0_sys>;
+ };
+
+ vcc5v_dcin: vcc5v-dcin {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc-5v";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ };
+
+ vcc5v0_sys: vcc5v0-sys {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc5v0_sys";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vcc5v_dcin>;
+ };
+
+ vcc5v0_host: vcc5v0-host-regulator {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ gpio = <&gpio3 RK_PB0 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&vcc5v0_host_en>;
+ regulator-name = "vcc5v0_host";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vcc5v0_sys>;
+ };
+
+ vcc5v0_usb_otg: vcc5v0-otg-regulator {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&vcc5v0_usb_otg_en>;
+ regulator-name = "vcc5v0_usb_otg";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vcc5v0_sys>;
+ };
+
+ vcc5v0_usb_host: vcc5v0-usb3-regulator {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&vcc5v0_usb_host_en>;
+ regulator-name = "vcc5v0_usb_host";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vcc5v0_sys>;
+ };
+};
+
+&combphy1 {
+ phy-supply = <&vcc5v0_usb_host>;
+ status = "okay";
+};
+
+&combphy2 {
+ status = "okay";
+};
+
+&cpu0 {
+ cpu-supply = <&vdd_cpu>;
+};
+
+&cpu1 {
+ cpu-supply = <&vdd_cpu>;
+};
+
+&cpu2 {
+ cpu-supply = <&vdd_cpu>;
+};
+
+&cpu3 {
+ cpu-supply = <&vdd_cpu>;
+};
+
+&display_subsystem {
+ status = "okay";
+};
+
+&gmac1 {
+ assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1_RGMII_SPEED>, <&cru SCLK_GMAC1>;
+ assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, <&cru SCLK_GMAC1>, <&gmac1_clkin>;
+ clock_in_out = "input";
+ phy-supply = <&vcc_3v3>;
+ phy-mode = "rgmii";
+ pinctrl-names = "default";
+ pinctrl-0 = <&gmac1m1_miim
+ &gmac1m1_tx_bus2
+ &gmac1m1_rx_bus2
+ &gmac1m1_rgmii_clk
+ &gmac1m1_rgmii_bus
+ &gmac1m1_clkinout>;
+ snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
+ snps,reset-active-low;
+ /* Reset time is 20ms, 100ms for rtl8211f */
+ snps,reset-delays-us = <0 20000 100000>;
+ tx_delay = <0x4f>;
+ rx_delay = <0x2d>;
+ phy-handle = <&rgmii_phy1>;
+ status = "okay";
+};
+
+&gpio0 {
+ gpio-line-names =
+ /* GPIO0_A0-A3 */
+ "", "", "", "",
+ /* GPIO0_A4-A7 */
+ "", "", "", "",
+
+ /* GPIO0_B0-B3 */
+ "", "", "", "PIN_28",
+ /* GPIO0_B4-B7 */
+ "PIN_27", "PIN_33", "PIN_7", "",
+
+ /* GPIO0_C0-C3 */
+ "PIN_11", "PIN_13", "PIN_15", "",
+ /* GPIO0_C4-C7 */
+ "", "", "", "",
+
+ /* GPIO0_D0-D3 */
+ "", "", "", "",
+ /* GPIO0_D4-D7 */
+ "", "", "", "";
+};
+
+&gpio1 {
+ gpio-line-names =
+ /* GPIO1_A0-A3 */
+ "", "", "", "",
+ /* GPIO1_A4-A7 */
+ "", "", "", "",
+
+ /* GPIO1_B0-B3 */
+ "", "", "", "",
+ /* GPIO1_B4-B7 */
+ "", "", "", "",
+
+ /* GPIO1_C0-C3 */
+ "", "", "", "",
+ /* GPIO1_C4-C7 */
+ "", "", "", "",
+
+ /* GPIO1_D0-D3 */
+ "", "", "", "",
+ /* GPIO1_D4-D7 */
+ "", "", "", "";
+};
+
+&gpio2 {
+ gpio-line-names =
+ /* GPIO2_A0-A3 */
+ "", "", "", "PIN_10",
+ /* GPIO2_A4-A7 */
+ "PIN_8", "PINN_35", "PIN_36", "PIN_12",
+
+ /* GPIO2_B0-B3 */
+ "PIN_22", "PIN_26", "PIN_32", "",
+ /* GPIO2_B4-B7 */
+ "", "PIN_16", "PIN_18", "PIN_31",
+
+ /* GPIO2_C0-C3 */
+ "PIN_29", "", "", "",
+ /* GPIO2_C4-C7 */
+ "", "", "", "",
+
+ /* GPIO2_D0-D3 */
+ "", "", "", "",
+ /* GPIO2_D4-D7 */
+ "", "", "", "";
+};
+
+&gpio3 {
+ gpio-line-names =
+ /* GPIO3_A0-A3 */
+ "", "PIN_24", "", "",
+ /* GPIO3_A4-A7 */
+ "", "", "", "",
+
+ /* GPIO3_B0-B3 */
+ "", "", "", "EXTPIN_13",
+ /* GPIO3_B4-B7 */
+ "EXTPIN_14", "PIN_5", "PIN_3", "",
+
+ /* GPIO3_C0-C3 */
+ "", "PIN_19", "PIN_21", "PIN_23",
+ /* GPIO3_C4-C7 */
+ "EXTPIN_11", "EXTPIN_12", "", "",
+
+ /* GPIO3_D0-D3 */
+ "", "", "", "",
+ /* GPIO3_D4-D7 */
+ "", "", "", "";
+};
+
+&gpio4 {
+ gpio-line-names =
+ /* GPIO4_A0-A3 */
+ "", "", "", "",
+ /* GPIO4_A4-A7 */
+ "", "", "", "",
+
+ /* GPIO4_B0-B3 */
+ "", "", "", "",
+ /* GPIO4_B4-B7 */
+ "", "", "", "",
+
+ /* GPIO4_C0-C3 */
+ "", "", "", "",
+ /* GPIO4_C4-C7 */
+ "", "", "", "",
+
+ /* GPIO4_D0-D3 */
+ "", "", "", "",
+ /* GPIO4_D4-D7 */
+ "", "", "", "";
+};
+
+&gpu {
+ mali-supply = <&vdd_gpu>;
+ status = "okay";
+};
+
+&hdmi {
+ avdd-0v9-supply = <&vdda0v9_image>;
+ avdd-1v8-supply = <&vcca1v8_image>;
+ status = "okay";
+};
+
+&hdmi_in {
+ hdmi_in_vp0: endpoint {
+ remote-endpoint = <&vp0_out_hdmi>;
+ };
+};
+
+&hdmi_out {
+ hdmi_out_con: endpoint {
+ remote-endpoint = <&hdmi_con_in>;
+ };
+};
+
+&hdmi_sound {
+ simple-audio-card,name = "ODROID-M1-HDMI";
+ status = "okay";
+};
+
+&i2c0 {
+ status = "okay";
+ vdd_cpu: tcs4525@1c {
+ compatible = "tcs,tcs452x";
+ reg = <0x1c>;
+ vin-supply = <&vcc5v0_sys>;
+ regulator-compatible = "fan53555-reg";
+ regulator-name = "vdd_cpu";
+ regulator-min-microvolt = <712500>;
+ regulator-max-microvolt = <1390000>;
+ regulator-init-microvolt = <900000>;
+ regulator-ramp-delay = <2300>;
+ fcs,suspend-voltage-selector = <1>;
+ regulator-boot-on;
+ regulator-always-on;
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ rk809: pmic@20 {
+ compatible = "rockchip,rk809";
+ reg = <0x20>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
+ assigned-clocks = <&cru I2S1_MCLKOUT_TX>;
+ assigned-clock-parents = <&cru CLK_I2S1_8CH_TX>;
+ #clock-cells = <1>;
+ clock-names = "mclk";
+ clocks = <&cru I2S1_MCLKOUT_TX>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pmic_int>, <&i2s1m0_mclk>;
+ rockchip,system-power-controller;
+ #sound-dai-cells = <0>;
+ vcc1-supply = <&vcc3v3_sys>;
+ vcc2-supply = <&vcc3v3_sys>;
+ vcc3-supply = <&vcc3v3_sys>;
+ vcc4-supply = <&vcc3v3_sys>;
+ vcc5-supply = <&vcc3v3_sys>;
+ vcc6-supply = <&vcc3v3_sys>;
+ vcc7-supply = <&vcc3v3_sys>;
+ vcc8-supply = <&vcc3v3_sys>;
+ vcc9-supply = <&vcc3v3_sys>;
+ wakeup-source;
+
+ regulators {
+ vdd_logic: DCDC_REG1 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-init-microvolt = <900000>;
+ regulator-ramp-delay = <6001>;
+ regulator-initial-mode = <0x2>;
+ regulator-name = "vdd_logic";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_gpu: DCDC_REG2 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-init-microvolt = <900000>;
+ regulator-ramp-delay = <6001>;
+ regulator-initial-mode = <0x2>;
+ regulator-name = "vdd_gpu";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_ddr: DCDC_REG3 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-initial-mode = <0x2>;
+ regulator-name = "vcc_ddr";
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ };
+ };
+
+ vdd_npu: DCDC_REG4 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-init-microvolt = <900000>;
+ regulator-ramp-delay = <6001>;
+ regulator-initial-mode = <0x2>;
+ regulator-name = "vdd_npu";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdda0v9_image: LDO_REG1 {
+ regulator-boot-on;
+ regulator-always-on;
+ regulator-min-microvolt = <900000>;
+ regulator-max-microvolt = <900000>;
+ regulator-name = "vdda0v9_image";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdda_0v9: LDO_REG2 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <900000>;
+ regulator-max-microvolt = <900000>;
+ regulator-name = "vdda_0v9";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdda0v9_pmu: LDO_REG3 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <900000>;
+ regulator-max-microvolt = <900000>;
+ regulator-name = "vdda0v9_pmu";
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <900000>;
+ };
+ };
+
+ vccio_acodec: LDO_REG4 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3000000>;
+ regulator-name = "vccio_acodec";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vccio_sd: LDO_REG5 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vccio_sd";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc3v3_pmu: LDO_REG6 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vcc3v3_pmu";
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <3300000>;
+ };
+ };
+
+ vcca_1v8: LDO_REG7 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcca_1v8";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcca1v8_ddr: LDO_REG8 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcca1v8_pmu";
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <1800000>;
+ };
+ };
+
+ vcca1v8_image: LDO_REG9 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcca1v8_image";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_1v8: DCDC_REG5 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcc_1v8";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_3v3: SWITCH_REG1 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-name = "vcc_3v3";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc3v3_sd: SWITCH_REG2 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-name = "vcc3v3_sd";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+ };
+ };
+};
+
+&i2c2 {
+ status = "disabled";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c2m1_xfer>;
+
+ clock-frequency = <400000>;
+};
+
+&i2c3 {
+ status = "disabled";
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c3m1_xfer>;
+};
+
+&i2s0_8ch {
+ status = "okay";
+};
+
+&i2s1_8ch {
+ status = "okay";
+ rockchip,clk-trcm = <1>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2s1m0_sclktx
+ &i2s1m0_lrcktx
+ &i2s1m0_sdi0
+ &i2s1m0_sdo0>;
+};
+
+&mdio1 {
+ rgmii_phy1: phy@0 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <0x0>;
+ };
+};
+
+&pcie2x1 {
+ reset-gpios = <&gpio1 RK_PB2 GPIO_ACTIVE_HIGH>;
+ vpcie3v3-supply = <&pcie20_3v3>;
+ pinctrl-0 = <&pcie20m2_pins>;
+ status = "okay";
+};
+
+&pinctrl {
+ gmac1 {
+ gmac1m1_miim: gmac1m1-miim {
+ rockchip,pins =
+ /* gmac1_mdcm1 */
+ <4 RK_PB6 3 &pcfg_pull_none_drv_level_15>,
+ /* gmac1_mdiom1 */
+ <4 RK_PB7 3 &pcfg_pull_none_drv_level_15>;
+ };
+
+ gmac1m1_clkinout: gmac1m1-clkinout {
+ rockchip,pins =
+ /* gmac1_mclkinoutm1 */
+ <4 RK_PC1 3 &pcfg_pull_none_drv_level_15>;
+ };
+
+ gmac1m1_rx_bus2: gmac1m1-rx-bus2 {
+ rockchip,pins =
+ /* gmac1_rxd0m1 */
+ <4 RK_PA7 3 &pcfg_pull_none_drv_level_15>,
+ /* gmac1_rxd1m1 */
+ <4 RK_PB0 3 &pcfg_pull_none_drv_level_15>,
+ /* gmac1_rxdvcrsm1 */
+ <4 RK_PB1 3 &pcfg_pull_none_drv_level_15>;
+ };
+
+ gmac1m1_tx_bus2: gmac1m1-tx-bus2 {
+ rockchip,pins =
+ /* gmac1_txd0m1 */
+ <4 RK_PA4 3 &pcfg_pull_none_drv_level_15>,
+ /* gmac1_txd1m1 */
+ <4 RK_PA5 3 &pcfg_pull_none_drv_level_15>,
+ /* gmac1_txenm1 */
+ <4 RK_PA6 3 &pcfg_pull_none_drv_level_15>;
+ };
+
+ gmac1m1_rgmii_clk: gmac1m1-rgmii-clk {
+ rockchip,pins =
+ /* gmac1_rxclkm1 */
+ <4 RK_PA3 3 &pcfg_pull_none_drv_level_15>,
+ /* gmac1_txclkm1 */
+ <4 RK_PA0 3 &pcfg_pull_none_drv_level_15>;
+ };
+
+ gmac1m1_rgmii_bus: gmac1m1-rgmii-bus {
+ rockchip,pins =
+ /* gmac1_rxd2m1 */
+ <4 RK_PA1 3 &pcfg_pull_none_drv_level_15>,
+ /* gmac1_rxd3m1 */
+ <4 RK_PA2 3 &pcfg_pull_none_drv_level_15>,
+ /* gmac1_txd2m1 */
+ <3 RK_PD6 3 &pcfg_pull_none_drv_level_15>,
+ /* gmac1_txd3m1 */
+ <3 RK_PD7 3 &pcfg_pull_none_drv_level_15>;
+ };
+ };
+
+ leds {
+ led_power_en: led_power_en {
+ rockchip,pins = <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ led_work_en: led_work_en {
+ rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ pcie {
+ pcie20_3v3_en: pcie20-3v3-en {
+ rockchip,pins = <2 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ pmic {
+ pmic_int: pmic_int {
+ rockchip,pins =
+ <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+
+ usb {
+ vcc5v0_host_en: vcc5v0-host-en {
+ rockchip,pins = <3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ vcc5v0_usb_otg_en: vcc5v0-otg-en {
+ rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ vcc5v0_usb_host_en: vcc5v0-usb3-en {
+ rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+};
+
+&pmu_io_domains {
+ pmuio1-supply = <&vcc3v3_pmu>;
+ pmuio2-supply = <&vcc3v3_pmu>;
+ vccio1-supply = <&vccio_acodec>;
+ vccio2-supply = <&vcc_1v8>;
+ vccio3-supply = <&vccio_sd>;
+ vccio4-supply = <&vcc_3v3>;
+ vccio5-supply = <&vcc_3v3>;
+ vccio6-supply = <&vcc_3v3>;
+ vccio7-supply = <&vcc_3v3>;
+ status = "okay";
+};
+
+&pwm1 {
+ status = "disabled";
+ pinctrl-0 = <&pwm1m1_pins>;
+};
+
+&saradc {
+ vref-supply = <&vcca_1v8>;
+ status = "okay";
+};
+
+&sdhci {
+ bus-width = <8>;
+ max-frequency = <200000000>;
+ non-removable;
+ pinctrl-names = "default";
+ pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe &emmc_rstnout>;
+ vmmc-supply = <&vcc_3v3>;
+ vqmmc-supply = <&vcc_1v8>;
+ status = "okay";
+};
+
+&sdmmc0 {
+ bus-width = <4>;
+ cap-sd-highspeed;
+ cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
+ disable-wp;
+ pinctrl-names = "default";
+ pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>;
+ sd-uhs-sdr104;
+ vmmc-supply = <&vcc3v3_sys>;
+ vqmmc-supply = <&vccio_sd>;
+ status = "okay";
+};
+
+&tsadc {
+ status = "okay";
+};
+
+&uart1 {
+ dma-names = "tx", "rx";
+ /* uart1 uart1-with-ctsrts */
+ pinctrl-0 = <&uart1m1_xfer>;
+ pinctrl-1 = <&uart1m1_xfer &uart1m1_ctsn &uart1m1_rtsn>;
+ status = "disabled";
+};
+
+&uart2 {
+ status = "okay";
+};
+
+&usb_host0_ehci {
+ status = "okay";
+};
+
+&usb_host0_ohci {
+ status = "okay";
+};
+
+&usb_host0_xhci {
+ dr_mode = "otg";
+ status = "okay";
+};
+
+&usb_host1_ehci {
+ status = "okay";
+};
+
+&usb_host1_ohci {
+ status = "okay";
+};
+
+&usb_host1_xhci {
+ status = "okay";
+};
+
+&usb2phy0 {
+ status = "okay";
+};
+
+&usb2phy0_host {
+ phy-supply = <&vcc5v0_usb_host>;
+ status = "okay";
+};
+
+&usb2phy0_otg {
+ vbus-supply = <&vcc5v0_usb_otg>;
+ status = "okay";
+};
+
+&usb2phy1 {
+ status = "okay";
+};
+
+&usb2phy1_host {
+ phy-supply = <&vcc5v0_host>;
+ status = "okay";
+};
+
+&usb2phy1_otg {
+ phy-supply = <&vcc5v0_host>;
+ status = "okay";
+};
+
+&vop {
+ assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
+ assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
+ status = "okay";
+};
+
+&vop_mmu {
+ status = "okay";
+};
+
+&vp0 {
+ vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
+ reg = <ROCKCHIP_VOP2_EP_HDMI0>;
+ remote-endpoint = <&hdmi_in_vp0>;
+ };
+};
--
2.40.1

View File

@@ -0,0 +1,335 @@
From eb02261dd6c88a7fcf3c28e59a7976905815fa6b Mon Sep 17 00:00:00 2001
From: Tim Lunn <tim@feathertop.org>
Date: Sun, 28 Jan 2024 18:55:57 +1100
Subject: [PATCH] arm64: dts: clean up as required for mainline linux
---
.../boot/dts/rockchip/rk3566-odroid-m1s.dts | 212 +++---------------
1 file changed, 27 insertions(+), 185 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts b/arch/arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts
index 1cad9217c374..cbf2495901d7 100644
--- a/arch/arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts
@@ -18,12 +18,8 @@ / {
aliases {
ethernet1 = &gmac1;
- i2c0 = &i2c3;
- i2c3 = &i2c0;
mmc0 = &sdhci;
mmc1 = &sdmmc0;
- serial0 = &uart1;
- serial1 = &uart0;
};
chosen: chosen {
@@ -52,7 +48,7 @@ leds {
compatible = "gpio-leds";
status = "okay";
- red_led: red {
+ red_led: led-0 {
gpios = <&gpio0 RK_PC6 GPIO_ACTIVE_LOW>;
linux,default-trigger = "default-on";
function = LED_FUNCTION_POWER;
@@ -60,7 +56,7 @@ red_led: red {
pinctrl-names = "default";
pinctrl-0 = <&led_power_en>;
};
- blue_led: blue {
+ blue_led: led-1 {
gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "heartbeat";
function = LED_FUNCTION_HEARTBEAT;
@@ -97,6 +93,25 @@ simple-audio-card,codec {
};
};
+ spdif_dit: spdif-dit {
+ compatible = "linux,spdif-dit";
+ #sound-dai-cells = <0>;
+ status = "disabled";
+ };
+
+ spdif_sound: spdif-sound {
+ compatible = "simple-audio-card";
+ status = "disabled";
+
+ simple-audio-card,cpu {
+ sound-dai = <&spdif>;
+ };
+
+ simple-audio-card,codec {
+ sound-dai = <&spdif_dit>;
+ };
+ };
+
vcc3v3_sys: vcc3v3-sys {
compatible = "regulator-fixed";
regulator-name = "vcc3v3_sys";
@@ -164,7 +179,6 @@ vcc5v0_usb_host: vcc5v0-usb3-regulator {
};
&combphy1 {
- phy-supply = <&vcc5v0_usb_host>;
status = "okay";
};
@@ -215,121 +229,6 @@ &gmac1m1_rgmii_bus
status = "okay";
};
-&gpio0 {
- gpio-line-names =
- /* GPIO0_A0-A3 */
- "", "", "", "",
- /* GPIO0_A4-A7 */
- "", "", "", "",
-
- /* GPIO0_B0-B3 */
- "", "", "", "PIN_28",
- /* GPIO0_B4-B7 */
- "PIN_27", "PIN_33", "PIN_7", "",
-
- /* GPIO0_C0-C3 */
- "PIN_11", "PIN_13", "PIN_15", "",
- /* GPIO0_C4-C7 */
- "", "", "", "",
-
- /* GPIO0_D0-D3 */
- "", "", "", "",
- /* GPIO0_D4-D7 */
- "", "", "", "";
-};
-
-&gpio1 {
- gpio-line-names =
- /* GPIO1_A0-A3 */
- "", "", "", "",
- /* GPIO1_A4-A7 */
- "", "", "", "",
-
- /* GPIO1_B0-B3 */
- "", "", "", "",
- /* GPIO1_B4-B7 */
- "", "", "", "",
-
- /* GPIO1_C0-C3 */
- "", "", "", "",
- /* GPIO1_C4-C7 */
- "", "", "", "",
-
- /* GPIO1_D0-D3 */
- "", "", "", "",
- /* GPIO1_D4-D7 */
- "", "", "", "";
-};
-
-&gpio2 {
- gpio-line-names =
- /* GPIO2_A0-A3 */
- "", "", "", "PIN_10",
- /* GPIO2_A4-A7 */
- "PIN_8", "PINN_35", "PIN_36", "PIN_12",
-
- /* GPIO2_B0-B3 */
- "PIN_22", "PIN_26", "PIN_32", "",
- /* GPIO2_B4-B7 */
- "", "PIN_16", "PIN_18", "PIN_31",
-
- /* GPIO2_C0-C3 */
- "PIN_29", "", "", "",
- /* GPIO2_C4-C7 */
- "", "", "", "",
-
- /* GPIO2_D0-D3 */
- "", "", "", "",
- /* GPIO2_D4-D7 */
- "", "", "", "";
-};
-
-&gpio3 {
- gpio-line-names =
- /* GPIO3_A0-A3 */
- "", "PIN_24", "", "",
- /* GPIO3_A4-A7 */
- "", "", "", "",
-
- /* GPIO3_B0-B3 */
- "", "", "", "EXTPIN_13",
- /* GPIO3_B4-B7 */
- "EXTPIN_14", "PIN_5", "PIN_3", "",
-
- /* GPIO3_C0-C3 */
- "", "PIN_19", "PIN_21", "PIN_23",
- /* GPIO3_C4-C7 */
- "EXTPIN_11", "EXTPIN_12", "", "",
-
- /* GPIO3_D0-D3 */
- "", "", "", "",
- /* GPIO3_D4-D7 */
- "", "", "", "";
-};
-
-&gpio4 {
- gpio-line-names =
- /* GPIO4_A0-A3 */
- "", "", "", "",
- /* GPIO4_A4-A7 */
- "", "", "", "",
-
- /* GPIO4_B0-B3 */
- "", "", "", "",
- /* GPIO4_B4-B7 */
- "", "", "", "",
-
- /* GPIO4_C0-C3 */
- "", "", "", "",
- /* GPIO4_C4-C7 */
- "", "", "", "",
-
- /* GPIO4_D0-D3 */
- "", "", "", "",
- /* GPIO4_D4-D7 */
- "", "", "", "";
-};
-
&gpu {
mali-supply = <&vdd_gpu>;
status = "okay";
@@ -368,7 +267,6 @@ vdd_cpu: tcs4525@1c {
regulator-name = "vdd_cpu";
regulator-min-microvolt = <712500>;
regulator-max-microvolt = <1390000>;
- regulator-init-microvolt = <900000>;
regulator-ramp-delay = <2300>;
fcs,suspend-voltage-selector = <1>;
regulator-boot-on;
@@ -409,7 +307,6 @@ vdd_logic: DCDC_REG1 {
regulator-boot-on;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1350000>;
- regulator-init-microvolt = <900000>;
regulator-ramp-delay = <6001>;
regulator-initial-mode = <0x2>;
regulator-name = "vdd_logic";
@@ -423,7 +320,6 @@ vdd_gpu: DCDC_REG2 {
regulator-boot-on;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1350000>;
- regulator-init-microvolt = <900000>;
regulator-ramp-delay = <6001>;
regulator-initial-mode = <0x2>;
regulator-name = "vdd_gpu";
@@ -447,7 +343,6 @@ vdd_npu: DCDC_REG4 {
regulator-boot-on;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1350000>;
- regulator-init-microvolt = <900000>;
regulator-ramp-delay = <6001>;
regulator-initial-mode = <0x2>;
regulator-name = "vdd_npu";
@@ -587,6 +482,9 @@ regulator-state-mem {
};
};
};
+ codec {
+ rockchip,mic-in-differential;
+ };
};
};
@@ -611,7 +509,7 @@ &i2s0_8ch {
&i2s1_8ch {
status = "okay";
- rockchip,clk-trcm = <1>;
+ rockchip,trcm-sync-tx-only;
pinctrl-names = "default";
pinctrl-0 = <&i2s1m0_sclktx
&i2s1m0_lrcktx
@@ -620,7 +518,7 @@ &i2s1m0_sdi0
};
&mdio1 {
- rgmii_phy1: phy@0 {
+ rgmii_phy1: ethernet-phy@0 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <0x0>;
};
@@ -634,62 +532,6 @@ &pcie2x1 {
};
&pinctrl {
- gmac1 {
- gmac1m1_miim: gmac1m1-miim {
- rockchip,pins =
- /* gmac1_mdcm1 */
- <4 RK_PB6 3 &pcfg_pull_none_drv_level_15>,
- /* gmac1_mdiom1 */
- <4 RK_PB7 3 &pcfg_pull_none_drv_level_15>;
- };
-
- gmac1m1_clkinout: gmac1m1-clkinout {
- rockchip,pins =
- /* gmac1_mclkinoutm1 */
- <4 RK_PC1 3 &pcfg_pull_none_drv_level_15>;
- };
-
- gmac1m1_rx_bus2: gmac1m1-rx-bus2 {
- rockchip,pins =
- /* gmac1_rxd0m1 */
- <4 RK_PA7 3 &pcfg_pull_none_drv_level_15>,
- /* gmac1_rxd1m1 */
- <4 RK_PB0 3 &pcfg_pull_none_drv_level_15>,
- /* gmac1_rxdvcrsm1 */
- <4 RK_PB1 3 &pcfg_pull_none_drv_level_15>;
- };
-
- gmac1m1_tx_bus2: gmac1m1-tx-bus2 {
- rockchip,pins =
- /* gmac1_txd0m1 */
- <4 RK_PA4 3 &pcfg_pull_none_drv_level_15>,
- /* gmac1_txd1m1 */
- <4 RK_PA5 3 &pcfg_pull_none_drv_level_15>,
- /* gmac1_txenm1 */
- <4 RK_PA6 3 &pcfg_pull_none_drv_level_15>;
- };
-
- gmac1m1_rgmii_clk: gmac1m1-rgmii-clk {
- rockchip,pins =
- /* gmac1_rxclkm1 */
- <4 RK_PA3 3 &pcfg_pull_none_drv_level_15>,
- /* gmac1_txclkm1 */
- <4 RK_PA0 3 &pcfg_pull_none_drv_level_15>;
- };
-
- gmac1m1_rgmii_bus: gmac1m1-rgmii-bus {
- rockchip,pins =
- /* gmac1_rxd2m1 */
- <4 RK_PA1 3 &pcfg_pull_none_drv_level_15>,
- /* gmac1_rxd3m1 */
- <4 RK_PA2 3 &pcfg_pull_none_drv_level_15>,
- /* gmac1_txd2m1 */
- <3 RK_PD6 3 &pcfg_pull_none_drv_level_15>,
- /* gmac1_txd3m1 */
- <3 RK_PD7 3 &pcfg_pull_none_drv_level_15>;
- };
- };
-
leds {
led_power_en: led_power_en {
rockchip,pins = <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
@@ -825,7 +667,7 @@ &usb2phy0_host {
};
&usb2phy0_otg {
- vbus-supply = <&vcc5v0_usb_otg>;
+ phy-supply = <&vcc5v0_usb_otg>;
status = "okay";
};
--
2.40.1

View File

@@ -0,0 +1,43 @@
From 641ec8e05726d42c8ec7fa3bda1d8a64f126b475 Mon Sep 17 00:00:00 2001
From: Tim Lunn <tim@feathertop.org>
Date: Fri, 12 Jan 2024 22:32:56 +1100
Subject: [PATCH] arm64: dts: fix vdd_cpu regulator for mainline
---
.../arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts b/arch/arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts
index cbf2495901d7..a5d9216b544b 100644
--- a/arch/arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts
@@ -259,18 +259,19 @@ &hdmi_sound {
&i2c0 {
status = "okay";
- vdd_cpu: tcs4525@1c {
- compatible = "tcs,tcs452x";
+
+ vdd_cpu: regulator@1c {
+ compatible = "tcs,tcs4525";
reg = <0x1c>;
- vin-supply = <&vcc5v0_sys>;
- regulator-compatible = "fan53555-reg";
+ fcs,suspend-voltage-selector = <1>;
regulator-name = "vdd_cpu";
+ regulator-always-on;
+ regulator-boot-on;
regulator-min-microvolt = <712500>;
regulator-max-microvolt = <1390000>;
regulator-ramp-delay = <2300>;
- fcs,suspend-voltage-selector = <1>;
- regulator-boot-on;
- regulator-always-on;
+ vin-supply = <&vcc3v3_sys>;
+
regulator-state-mem {
regulator-off-in-suspend;
};
--
2.40.1

View File

@@ -0,0 +1,51 @@
From b4d16cd88ec2701dcb15b9519a79288ea5d2bfec Mon Sep 17 00:00:00 2001
From: Tim Lunn <tim@feathertop.org>
Date: Sat, 3 Feb 2024 23:40:16 +1100
Subject: [PATCH] Remove deprecated snps,reset properties
---
arch/arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts b/arch/arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts
index b8adfd7024f9..e755d00b1d4f 100644
--- a/arch/arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts
@@ -192,8 +192,9 @@ &gmac1 {
assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1_RGMII_SPEED>, <&cru SCLK_GMAC1>;
assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, <&cru SCLK_GMAC1>, <&gmac1_clkin>;
clock_in_out = "input";
- phy-supply = <&vcc_3v3>;
+ phy-handle = <&rgmii_phy1>;
phy-mode = "rgmii";
+ phy-supply = <&vcc_3v3>;
pinctrl-names = "default";
pinctrl-0 = <&gmac1m1_miim
&gmac1m1_tx_bus2
@@ -201,13 +202,8 @@ &gmac1m1_rx_bus2
&gmac1m1_rgmii_clk
&gmac1m1_rgmii_bus
&gmac1m1_clkinout>;
- snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
- snps,reset-active-low;
- /* Reset time is 20ms, 100ms for rtl8211f */
- snps,reset-delays-us = <0 20000 100000>;
tx_delay = <0x4f>;
rx_delay = <0x2d>;
- phy-handle = <&rgmii_phy1>;
status = "okay";
};
@@ -504,6 +500,9 @@ &mdio1 {
rgmii_phy1: ethernet-phy@0 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <0x0>;
+ reset-assert-us = <20000>;
+ reset-deassert-us = <100000>;
+ reset-gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
};
};
--
2.40.1

View File

@@ -0,0 +1,48 @@
From ed61d0b5f18bf333ff7f35fc8546dd58d227b12f Mon Sep 17 00:00:00 2001
From: Tim Lunn <tim@feathertop.org>
Date: Sat, 3 Feb 2024 18:38:49 +1100
Subject: [PATCH] Apply fixes for mainline u-boot
---
arch/arm/dts/rk3566-odroid-m1s.dts | 6 +-----
configs/odroid-m1s-rk3566_defconfig | 1 -
2 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/arch/arm/dts/rk3566-odroid-m1s.dts b/arch/arm/dts/rk3566-odroid-m1s.dts
index 73e29d80c7..2dba07ba19 100644
--- a/arch/arm/dts/rk3566-odroid-m1s.dts
+++ b/arch/arm/dts/rk3566-odroid-m1s.dts
@@ -17,12 +17,8 @@
aliases {
ethernet0 = &gmac1;
- i2c0 = &i2c3;
- i2c3 = &i2c0;
mmc0 = &sdhci;
mmc1 = &sdmmc0;
- serial0 = &uart1;
- serial1 = &uart0;
};
chosen {
@@ -578,7 +574,7 @@
disable-wp;
pinctrl-names = "default";
pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>;
- sd-uhs-sdr50;
+ sd-uhs-sdr104;
vmmc-supply = <&vcc3v3_sd>;
vqmmc-supply = <&vccio_sd>;
status = "okay";
diff --git a/configs/odroid-m1s-rk3566_defconfig b/configs/odroid-m1s-rk3566_defconfig
index d70a10dc08..61b6962063 100644
--- a/configs/odroid-m1s-rk3566_defconfig
+++ b/configs/odroid-m1s-rk3566_defconfig
@@ -106,4 +106,3 @@ CONFIG_USB_DWC3=y
CONFIG_USB_DWC3_GENERIC=y
CONFIG_FS_CRAMFS=y
CONFIG_ERRNO_STR=y
-CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x0800
--
2.40.1

View File

@@ -0,0 +1,44 @@
From 2a1d8f586799e4166e802babcce18c9980aa1f44 Mon Sep 17 00:00:00 2001
From: Tim Lunn <tim@feathertop.org>
Date: Thu, 1 Feb 2024 17:50:46 +1100
Subject: [PATCH] Improve reliability of eMMC
Cherry-picked from:
20240126232615.6826-2-jonas@kwiboo.se
---
arch/arm/dts/rk3566-odroid-m1s-u-boot.dtsi | 4 ----
configs/odroid-m1s-rk3566_defconfig | 2 ++
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/arch/arm/dts/rk3566-odroid-m1s-u-boot.dtsi b/arch/arm/dts/rk3566-odroid-m1s-u-boot.dtsi
index 33a1d142b8..04d0cd17ef 100644
--- a/arch/arm/dts/rk3566-odroid-m1s-u-boot.dtsi
+++ b/arch/arm/dts/rk3566-odroid-m1s-u-boot.dtsi
@@ -14,11 +14,7 @@
&sdhci {
cap-mmc-highspeed;
- mmc-ddr-1_8v;
mmc-hs200-1_8v;
- mmc-hs400-1_8v;
- mmc-hs400-enhanced-strobe;
- pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>;
};
&uart2 {
diff --git a/configs/odroid-m1s-rk3566_defconfig b/configs/odroid-m1s-rk3566_defconfig
index 61b6962063..7920ef224d 100644
--- a/configs/odroid-m1s-rk3566_defconfig
+++ b/configs/odroid-m1s-rk3566_defconfig
@@ -70,6 +70,8 @@ CONFIG_ROCKCHIP_GPIO=y
CONFIG_SYS_I2C_ROCKCHIP=y
CONFIG_MISC=y
CONFIG_SUPPORT_EMMC_RPMB=y
+CONFIG_MMC_HS200_SUPPORT=y
+CONFIG_SPL_MMC_HS200_SUPPORT=y
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
CONFIG_MMC_SDHCI=y
--
2.40.1

Some files were not shown because too many files have changed in this diff Show More