Skip to content

Commit

Permalink
sync new version
Browse files Browse the repository at this point in the history
  • Loading branch information
jianyun8023 committed Dec 8, 2024
1 parent 2b35841 commit cba411f
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 10 deletions.
2 changes: 1 addition & 1 deletion buildroot-external/board/panther/x2/cmdline.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
console=tty0
console=ttyS2,1500000n8 console=tty0
6 changes: 3 additions & 3 deletions buildroot-external/board/panther/x2/meta
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ BOARD_NAME="Home Assistant Panther X2"
CHASSIS=embedded
BOOTLOADER=uboot
KERNEL_FILE=Image
BOOT_SYS=gpt
BOOT_SIZE=24M
PARTITION_TABLE_TYPE=hybrid
BOOT_SIZE=16M
BOOT_SPL=true
BOOT_SPL_SIZE=16M
BOOT_ENV_SIZE=0x8000
SUPERVISOR_MACHINE=green
SUPERVISOR_ARCH=aarch64
SUPERVISOR_ARCH=aarch64
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Subject: [PATCH] arch: arm: dts: panther: drop SPI NOR flash partitions
---
Index: arch/arm/dts/rk3566-panther-x2-u-boot.dtsi
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/arch/arm/dts/rk3566-panther-x2-u-boot.dtsi b/arch/arm/dts/rk3566-panther-x2-u-boot.dtsi
--- a/arch/arm/dts/rk3566-panther-x2-u-boot.dtsi (revision 83794fb732b13c1830f3a6f42551166d3b4e09ba)
+++ b/arch/arm/dts/rk3566-panther-x2-u-boot.dtsi (revision 2dde89fe908a0265151ce21d61a4da1e684cd856)
@@ -71,10 +71,7 @@

&sdhci {
cap-mmc-highspeed;
- mmc-ddr-1_8v;
mmc-hs200-1_8v;
- mmc-hs400-1_8v;
- mmc-hs400-enhanced-strobe;
};

&sfc {
34 changes: 32 additions & 2 deletions buildroot-external/board/panther/x2/uboot-boot.ush
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,39 @@ test -n "${MACHINE_ID}" || setenv BOOT_CONDITION "systemd.condition-first-boot=t
# HassOS bootargs
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 rootwait systemd.machine_id=${MACHINE_ID} fsck.repair=yes ${BOOT_CONDITION}"

i2c dev 0
setenv check_btn_pressed ' \
i2c read 0x20 0xf0.1 1 ${loadaddr}; \
setexpr PWRON_STS *${loadaddr} \\\& 0x80; \
test ${PWRON_STS} -eq 0x0;'

# Check if button is held for device wipe
setenv counter 0
while test ${counter} -lt 2; do
if run check_btn_pressed; then
echo "Reset button pressed for ${counter} seconds"
setexpr counter ${counter} + 1

if test ${counter} -eq 2; then
led user on
echo "Waiting for button to be released"
while run check_btn_pressed; do
sleep 0.5
done
echo "Proceeding with device wipe"
setenv bootargs_hassos "${bootargs_hassos} haos.wipe=1"
else
sleep 1
fi
else
# U-Boot has no break statement :')
setenv counter 2
fi
done

# HassOS system A/B
setenv bootargs_a "root=PARTUUID=8d3d53e3-6d49-4c38-8349-aff6859e82fd rootfstype=squashfs ro"
setenv bootargs_b "root=PARTUUID=a3ec664e-32ce-4665-95ea-7ae90ce9aa20 rootfstype=squashfs ro"
setenv bootargs_a "root=PARTUUID=8d3d53e3-6d49-4c38-8349-aff6859e82fd ro"
setenv bootargs_b "root=PARTUUID=a3ec664e-32ce-4665-95ea-7ae90ce9aa20 ro"

part number ${devtype} ${devnum} hassos-boot boot_partnum

Expand Down
3 changes: 3 additions & 0 deletions buildroot-external/board/panther/x2/uboot.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
CONFIG_LED=y
CONFIG_LED_GPIO=y
CONFIG_CMD_LED=y
13 changes: 9 additions & 4 deletions buildroot-external/configs/panther_x2_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh"
BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/panther/x2 $(BR2_EXTERNAL_HASSOS_PATH)/board/panther/x2/hassos-hook.sh"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.33"
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.63"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/kernel-arm64-rockchip.config"
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/board/panther/x2/kernel.config"
Expand Down Expand Up @@ -132,15 +132,19 @@ BR2_PACKAGE_UTIL_LINUX_LOGIN=y
BR2_PACKAGE_UTIL_LINUX_NOLOGIN=y
BR2_PACKAGE_UTIL_LINUX_PARTX=y
BR2_PACKAGE_UTIL_LINUX_ZRAMCTL=y
BR2_TARGET_ROOTFS_SQUASHFS=y
BR2_TARGET_ROOTFS_SQUASHFS4_LZ4=y
BR2_TARGET_ROOTFS_EROFS=y
BR2_TARGET_ROOTFS_EROFS_LZ4HC_LEVEL=12
BR2_TARGET_ROOTFS_EROFS_DEDUPE=y
BR2_TARGET_ROOTFS_EROFS_FRAGMENTS=y
BR2_TARGET_ROOTFS_EROFS_ZTAILPACKING=y
BR2_TARGET_ROOTFS_EROFS_PCLUSTERSIZE=262144
# BR2_TARGET_ROOTFS_TAR is not set
BR2_TARGET_UBOOT=y
BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
BR2_TARGET_UBOOT_CUSTOM_VERSION=y
BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2024.01"
BR2_TARGET_UBOOT_BOARD_DEFCONFIG="panther-x2"
BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/bootloader/uboot.config"
BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/bootloader/uboot.config $(BR2_EXTERNAL_HASSOS_PATH)/board/panther/x2/uboot.config"
BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y
BR2_TARGET_UBOOT_NEEDS_PYELFTOOLS=y
BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y
Expand All @@ -150,6 +154,7 @@ BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-rockchip.bin"
BR2_PACKAGE_HOST_DOSFSTOOLS=y
BR2_PACKAGE_HOST_E2FSPROGS=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_GPTFDISK=y
BR2_PACKAGE_HOST_MTOOLS=y
BR2_PACKAGE_HOST_RAUC=y
Expand Down

0 comments on commit cba411f

Please sign in to comment.