Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare 14.0.rc2 #3694

Merged
merged 5 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion buildroot-external/board/raspberrypi/cmdline.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
dwc_otg.lpm_enable=0 console=tty0 usb-storage.quirks=174c:55aa:u,2109:0715:u,152d:0578:u,152d:0579:u,152d:1561:u,174c:0829:u,14b0:0206:u,174c:225c:u,7825:a2a4:u,152d:0562:u,125f:a88a:u
dwc_otg.lpm_enable=0 console=tty0 usb-storage.quirks=174c:55aa:u,2109:0715:u,152d:0578:u,152d:0579:u,152d:1561:u,174c:0829:u,14b0:0206:u,174c:225c:u,7825:a2a4:u,152d:0562:u,125f:a88a:u,152d:a583:u
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
From e29e2cfad33afa692f2f727f492dab02d5ff3948 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= <sairon@sairon.cz>
Date: Thu, 21 Nov 2024 14:26:20 +0100
Subject: [PATCH] ARM: dts: bcm2712: yellow: Sync sdio1 and sd_io_1v8_reg nodes
with CM5 DTS
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

SDIO1 and its 1V8 regulator have been changed in vanilla CM5 device tree,
reflect those changes in Yellow's DTS.

Signed-off-by: Jan Čermák <sairon@sairon.cz>
---
.../boot/dts/broadcom/bcm2712-rpi-cm5-ha-yellow.dts | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-cm5-ha-yellow.dts b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-cm5-ha-yellow.dts
index 4b130f42b2358..c85d608da2043 100644
--- a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-cm5-ha-yellow.dts
+++ b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-cm5-ha-yellow.dts
@@ -78,17 +78,11 @@ led_act: led-act {
};

sd_io_1v8_reg: sd_io_1v8_reg {
- compatible = "regulator-gpio";
+ compatible = "regulator-fixed";
regulator-name = "vdd-sd-io";
regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <3300000>;
- regulator-boot-on;
+ regulator-max-microvolt = <1800000>;
regulator-always-on;
- regulator-settling-time-us = <5000>;
- gpios = <&gio_aon 3 GPIO_ACTIVE_HIGH>;
- states = <1800000 0x1
- 3300000 0x0>;
- status = "okay";
};

sd_vcc_reg: sd_vcc_reg {
@@ -355,6 +349,8 @@ &sdio1 {
sd-uhs-ddr50;
sd-uhs-sdr104;
mmc-hs200-1_8v;
+ mmc-hs400-1_8v;
+ mmc-hs400-enhanced-strobe;
broken-cd;
supports-cqe;
status = "okay";
1 change: 1 addition & 0 deletions buildroot-external/kernel/v6.6.y/device-support.config
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ CONFIG_USB_SERIAL_GENERIC=y
CONFIG_USB_SERIAL_OPTION=m
CONFIG_USB_SERIAL_SIMPLE=m
CONFIG_USB_SERIAL_CP210X=m
CONFIG_USB_SERIAL_CYPRESS_M8=m
CONFIG_USB_SERIAL_FTDI_SIO=m
CONFIG_USB_SERIAL_PL2303=m
CONFIG_USB_SERIAL_CH341=m
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1285,7 +1285,7 @@
CONFIG_BRCMFMAC=m
CONFIG_BRCMFMAC_USB=y
CONFIG_BRCMFMAC_PCIE=y
CONFIG_BRCM_TRACING=y

Check warning on line 1288 in buildroot-external/kernel/v6.6.y/kernel-arm64-rockchip.config

View workflow job for this annotation

GitHub Actions / Build for odroid-m1

BRCM_TRACING=y requested, actual = n

Check warning on line 1288 in buildroot-external/kernel/v6.6.y/kernel-arm64-rockchip.config

View workflow job for this annotation

GitHub Actions / Build for odroid-m1s

BRCM_TRACING=y requested, actual = n

Check warning on line 1288 in buildroot-external/kernel/v6.6.y/kernel-arm64-rockchip.config

View workflow job for this annotation

GitHub Actions / Build for green

BRCM_TRACING=y requested, actual = n
CONFIG_BRCMDBG=y
CONFIG_IPW2100=m
CONFIG_IPW2100_MONITOR=y
Expand Down Expand Up @@ -3119,7 +3119,6 @@
CONFIG_USB_SERIAL_WHITEHEAT=m
CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
CONFIG_USB_SERIAL_CP210X=m
CONFIG_USB_SERIAL_CYPRESS_M8=m
CONFIG_USB_SERIAL_EMPEG=m
CONFIG_USB_SERIAL_FTDI_SIO=m
CONFIG_USB_SERIAL_VISOR=m
Expand Down
2 changes: 1 addition & 1 deletion buildroot-external/meta
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VERSION_MAJOR="14"
VERSION_MINOR="0"
VERSION_SUFFIX="rc1"
VERSION_SUFFIX="rc2"

HASSOS_NAME="Home Assistant OS"
HASSOS_ID="haos"
Expand Down
63 changes: 51 additions & 12 deletions buildroot-external/rootfs-overlay/usr/libexec/haos-data-disk-detach
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh
# shellcheck disable=SC1091

# Find root using rdev command
rootpart=$(rdev | cut -f 1 -d ' ')
Expand All @@ -9,15 +10,53 @@ sleep 10s

datapartitions=$(blkid --match-token LABEL="hassos-data" --output device)

for datapart in ${datapartitions}
do
datadev=$(lsblk -no pkname "${datapart}")

# If major does not match our root device major, it is an external data
# disk. Rename to make sure it gets ignored.
if [ "$rootdev" != "$datadev" ]
then
echo "Found external data disk device on ${datapart}, mark it disabled..."
e2label "${datapart}" hassos-data-dis
fi
done
. /etc/os-release

disable_data_partition() {
e2label "${1}" hassos-data-dis
}
Comment on lines +15 to +17
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Ensure error handling in disable_data_partition function

The disable_data_partition function does not check the exit status of the e2label command. To enhance the robustness of the script, consider adding error handling to ensure that the label change was successful.

Apply this diff to add error checking:

 disable_data_partition() {
     e2label "${1}" hassos-data-dis
+    if [ $? -ne 0 ]; then
+        echo "Failed to disable data partition ${1}" >&2
+        exit 1
+    fi
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
disable_data_partition() {
e2label "${1}" hassos-data-dis
}
disable_data_partition() {
e2label "${1}" hassos-data-dis
if [ $? -ne 0 ]; then
echo "Failed to disable data partition ${1}" >&2
exit 1
fi
}


if [ "$VARIANT_ID" = "yellow" ]; then
emmc_data_partition=""
nvme_data_partition=""

for datapart in ${datapartitions}; do
datadev=$(lsblk -no pkname "${datapart}")

case "${datadev}" in
mmc*)
# Data partition on internal eMMC
if [ "$rootdev" = "$datadev" ]; then
emmc_data_partition="${datapart}"
fi
;;
nvme0*)
# Data partition on first NVMe disk
nvme_data_partition="${datapart}"
;;
*)
# Disable all other data disks as normally
if [ "$rootdev" != "$datadev" ]; then
echo "Found extra external data disk device on ${datapart}, marking it disabled..."
disable_data_partition "${datapart}"
fi
;;
esac
done

if [ -n "${emmc_data_partition}" ] && [ -n "${nvme_data_partition}" ]; then
echo "Found both eMMC and NVMe data disk devices, marking eMMC as disabled"
disable_data_partition "${emmc_data_partition}"
fi
else
for datapart in ${datapartitions}; do
datadev=$(lsblk -no pkname "${datapart}")

# If major does not match our root device major, it is an external data
# disk. Rename to make sure it gets ignored.
if [ "$rootdev" != "$datadev" ]; then
echo "Found external data disk device on ${datapart}, marking it disabled..."
disable_data_partition "${datapart}"
fi
done
fi
Loading