From 173ed85da36c66b58ddc97acf74e661d9c79f573 Mon Sep 17 00:00:00 2001 From: Gunjan Gupta Date: Wed, 28 Jun 2023 04:25:09 +0530 Subject: [PATCH] sunxi64: compilation fix workaround Disabled ws2812 driver for all sunxi64 boards in edge kernel. As this driver is used by Bigtreetech CB1 board, the driver is enabled for the same but edge kernel is kept back at 6.2.16. Once the driver has been updated, we can revert this commit. --- config/kernel/linux-sunxi64-edge.config | 2 +- config/sources/families/sun50iw9-btt.conf | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/config/kernel/linux-sunxi64-edge.config b/config/kernel/linux-sunxi64-edge.config index 94f1c97538..b5d501d643 100644 --- a/config/kernel/linux-sunxi64-edge.config +++ b/config/kernel/linux-sunxi64-edge.config @@ -6095,7 +6095,7 @@ CONFIG_NEW_LEDS=y CONFIG_LEDS_CLASS=y # CONFIG_LEDS_CLASS_FLASH is not set CONFIG_LEDS_CLASS_MULTICOLOR=m -CONFIG_LEDS_WS2812=m +# CONFIG_LEDS_WS2812 is not set # CONFIG_LEDS_BRIGHTNESS_HW_CHANGED is not set # diff --git a/config/sources/families/sun50iw9-btt.conf b/config/sources/families/sun50iw9-btt.conf index f25bae3f3d..3300aacdd1 100644 --- a/config/sources/families/sun50iw9-btt.conf +++ b/config/sources/families/sun50iw9-btt.conf @@ -41,9 +41,26 @@ case $BRANCH in ATF_TARGET_MAP='PLAT=sun50i_h616 DEBUG=1 bl31;;build/sun50i_h616/debug/bl31.bin' BOOTSCRIPT='boot-sun50i-next.cmd:boot.cmd' + # Stick to 6.2.16 kernel for edge until ws2812 driver is fixed + if [[ "$BRANCH" == "edge" ]]; then + KERNEL_MAJOR_MINOR="6.2" + KERNELBRANCH="tag:v6.2.16" + KERNELPATCHDIR="archive/sunxi-${KERNEL_MAJOR_MINOR}" + fi + ;; esac +# Enable ws2812 driver for edge kernel +function armbian_kernel_config__enable_ws2812_driver() { + if [[ "$BRANCH" == "edge" ]]; then + kernel_config_modifying_hashes+=("CONFIG_LEDS_WS2812=m") + if [[ -f .config ]]; then + kernel_config_set_m CONFIG_LEDS_WS2812 + fi + fi +} + # This build requires busybox (and dos2unix) function add_host_dependencies__sun50iw9_add_busybox_hostdep() { display_alert "Adding busybox dep" "for ${BOARD} bootloader compile" "debug"