0
0
mirror of https://github.com/libretro/Lakka-LibreELEC.git synced 2024-12-16 02:08:54 +00:00
GavinDarkglider 57ab31843d
Latest Lakka Switch Patches (#1600)
* Update kernel Config/patches for CEC support

* Add base CEC support to dock-hotplug, and make so support can be disabled via uenv.txt

* Add working libcec package for L4T, and enable CEC support in packages.

* Fix pulseaudio-alsa routing

This fixes using other audio backends(Alsathread, Alsa, TinyAlsa) in retroarch via dock or bluetooth.

* Downgrade GCC in L4T builds

This fixes issues revolving around undefined symbol: __aarch64_ldadd4_acq_rel issue with gcc 10

* Fix updater for switch builds
Only tested working with tar archives.

* Edit retroarch default settings for the switch.

* Fix pulseaudio changing sink volume issues.
2022-03-03 21:51:20 +01:00

159 lines
8.6 KiB
Diff

diff -Naur linux-switch-1/arch/arm64/boot/dts/Makefile linux-switch-2/arch/arm64/boot/dts/Makefile
--- linux-switch-1/arch/arm64/boot/dts/Makefile 2022-01-13 23:48:58.130816707 +0100
+++ linux-switch-2/arch/arm64/boot/dts/Makefile 2022-01-13 23:50:06.823960181 +0100
@@ -86,8 +86,8 @@
ifneq ($(dts_mfiles),)
dts-include :=
include $(dts_mfiles)
-dtb-y := $(addprefix $(tegra-rel-dtstree)/hardware/nvidia/,$(dtb-y))
-dtbo-y := $(addprefix $(tegra-rel-dtstree)/hardware/nvidia/,$(dtbo-y))
+dtb-y := $(addprefix $(tegra-rel-dtstree)/nvidia/,$(dtb-y))
+dtbo-y := $(addprefix $(tegra-rel-dtstree)/nvidia/,$(dtbo-y))
ifneq ($(dts-include),)
DTC_FLAGS += $(addprefix -i $(tegra-dtstree)/,$(dts-include))
DTCCPP_FLAGS += $(addprefix -I$(tegra-dtstree)/,$(dts-include))
diff -Naur linux-switch-1/Makefile linux-switch-2/Makefile
--- linux-switch-1/Makefile 2022-01-13 23:48:57.578807514 +0100
+++ linux-switch-2/Makefile 2022-01-13 23:50:06.823960181 +0100
@@ -1,9 +1,7 @@
ifeq ($(KERNEL_OVERLAYS),)
KERNEL_OVERLAYS :=
-KERNEL_OVERLAYS += $(CURDIR)/../nvidia
-KERNEL_OVERLAYS += $(CURDIR)/../nvgpu
-KERNEL_OVERLAYS += $(CURDIR)/../nvgpu-next
-KERNEL_OVERLAYS += $(CURDIR)/../nvidia-t23x
+KERNEL_OVERLAYS += $(CURDIR)/nvidia
+KERNEL_OVERLAYS += $(CURDIR)/nvidia/nvgpu
else
override KERNEL_OVERLAYS := $(subst :, ,$(KERNEL_OVERLAYS))
endif
diff -Naur linux-switch-1/nvidia/drivers/net/wireless/realtek/rtl8812au/hal/phydm/phydm.mk linux-switch-2/nvidia/drivers/net/wireless/realtek/rtl8812au/hal/phydm/phydm.mk
--- linux-switch-1/nvidia/drivers/net/wireless/realtek/rtl8812au/hal/phydm/phydm.mk 2022-01-13 23:48:57.506806314 +0100
+++ linux-switch-2/nvidia/drivers/net/wireless/realtek/rtl8812au/hal/phydm/phydm.mk 2022-01-13 23:50:06.823960181 +0100
@@ -1,4 +1,4 @@
-EXTRA_CFLAGS += -I$(srctree)/../nvidia/drivers/net/wireless/realtek/rtl8812au/hal/phydm
+EXTRA_CFLAGS += -I$(srctree.nvidia)/drivers/net/wireless/realtek/rtl8812au/hal/phydm
_PHYDM_FILES := hal/phydm/phydm_debug.o \
hal/phydm/phydm_antdiv.o\
diff -Naur linux-switch-1/nvidia/drivers/net/wireless/realtek/rtl8812au/Makefile linux-switch-2/nvidia/drivers/net/wireless/realtek/rtl8812au/Makefile
--- linux-switch-1/nvidia/drivers/net/wireless/realtek/rtl8812au/Makefile 2022-01-13 23:48:57.502806247 +0100
+++ linux-switch-2/nvidia/drivers/net/wireless/realtek/rtl8812au/Makefile 2022-01-13 23:50:06.823960181 +0100
@@ -20,7 +20,7 @@
EXTRA_CFLAGS += -Wno-date-time # Fix compile error && warning on gcc 4.9 and later
endif
-SOURCETREE = $(srctree)/../nvidia/drivers/net/wireless/realtek/rtl8812au/
+SOURCETREE = $(srctree.nvidia)/drivers/net/wireless/realtek/rtl8812au/
EXTRA_CFLAGS += -I$(SOURCETREE)/include
EXTRA_LDFLAGS += --strip-debug
diff -Naur linux-switch-1/nvidia/drivers/net/wireless/realtek/rtl8814au/hal/phydm/phydm.mk linux-switch-2/nvidia/drivers/net/wireless/realtek/rtl8814au/hal/phydm/phydm.mk
--- linux-switch-1/nvidia/drivers/net/wireless/realtek/rtl8814au/hal/phydm/phydm.mk 2022-01-13 23:48:57.518806514 +0100
+++ linux-switch-2/nvidia/drivers/net/wireless/realtek/rtl8814au/hal/phydm/phydm.mk 2022-01-13 23:50:06.823960181 +0100
@@ -1,4 +1,4 @@
-EXTRA_CFLAGS += -I$(srctree)/../nvidia/drivers/net/wireless/realtek/rtl8814au/hal/phydm
+EXTRA_CFLAGS += -I$(srctree.nvidia)/drivers/net/wireless/realtek/rtl8814au/hal/phydm
_PHYDM_FILES := hal/phydm/phydm_debug.o \
hal/phydm/phydm_antdiv.o\
diff -Naur linux-switch-1/nvidia/drivers/net/wireless/realtek/rtl8814au/Makefile linux-switch-2/nvidia/drivers/net/wireless/realtek/rtl8814au/Makefile
--- linux-switch-1/nvidia/drivers/net/wireless/realtek/rtl8814au/Makefile 2022-01-13 23:48:57.514806447 +0100
+++ linux-switch-2/nvidia/drivers/net/wireless/realtek/rtl8814au/Makefile 2022-01-13 23:50:06.823960181 +0100
@@ -20,7 +20,7 @@
EXTRA_CFLAGS += -Wno-date-time # Fix compile error && warning on gcc 4.9 and later
endif
-SOURCETREE = $(srctree)/../nvidia/drivers/net/wireless/realtek/rtl8814au/
+SOURCETREE = $(srctree.nvidia)/drivers/net/wireless/realtek/rtl8814au/
EXTRA_CFLAGS += -I$(SOURCETREE)/include
EXTRA_LDFLAGS += --strip-debug
diff -Naur linux-switch-1/nvidia/drivers/net/wireless/realtek/rtl8821au/hal/phydm/phydm.mk linux-switch-2/nvidia/drivers/net/wireless/realtek/rtl8821au/hal/phydm/phydm.mk
--- linux-switch-1/nvidia/drivers/net/wireless/realtek/rtl8821au/hal/phydm/phydm.mk 2022-01-13 23:48:57.530806714 +0100
+++ linux-switch-2/nvidia/drivers/net/wireless/realtek/rtl8821au/hal/phydm/phydm.mk 2022-01-13 23:50:06.823960181 +0100
@@ -1,4 +1,4 @@
-EXTRA_CFLAGS += -I$(srctree)/../nvidia/drivers/net/wireless/realtek/rtl8821au/hal/phydm
+EXTRA_CFLAGS += -I$(srctree.nvidia)/drivers/net/wireless/realtek/rtl8821au/hal/phydm
_PHYDM_FILES := hal/phydm/phydm_debug.o \
hal/phydm/phydm_antdiv.o\
diff -Naur linux-switch-1/nvidia/drivers/net/wireless/realtek/rtl8821au/Makefile linux-switch-2/nvidia/drivers/net/wireless/realtek/rtl8821au/Makefile
--- linux-switch-1/nvidia/drivers/net/wireless/realtek/rtl8821au/Makefile 2022-01-13 23:48:57.526806647 +0100
+++ linux-switch-2/nvidia/drivers/net/wireless/realtek/rtl8821au/Makefile 2022-01-13 23:50:06.823960181 +0100
@@ -20,7 +20,7 @@
EXTRA_CFLAGS += -Wno-date-time # Fix compile error && warning on gcc 4.9 and later
endif
-SOURCETREE = $(srctree)/../nvidia/drivers/net/wireless/realtek/rtl8821au/
+SOURCETREE = $(srctree.nvidia)/drivers/net/wireless/realtek/rtl8821au/
EXTRA_CFLAGS += -I$(SOURCETREE)/include
EXTRA_LDFLAGS += --strip-debug
diff -Naur linux-switch-1/nvidia/drivers/video/tegra/dc/bridge/Makefile linux-switch-2/nvidia/drivers/video/tegra/dc/bridge/Makefile
--- linux-switch-1/nvidia/drivers/video/tegra/dc/bridge/Makefile 2022-01-13 23:48:57.542806913 +0100
+++ linux-switch-2/nvidia/drivers/video/tegra/dc/bridge/Makefile 2022-01-13 23:54:29.884331380 +0100
@@ -1,8 +1,8 @@
GCOV_PROFILE := y
subdir-ccflags-y := -Werror
-ccflags-y += -I$(overlay)/drivers/video/tegra/host
-ccflags-y += -I$(overlay)/drivers/video/tegra/dc
-ccflags-y += -I$(overlay)/drivers/platform/tegra
+ccflags-y += -I$(srctree.nvidia)/drivers/video/tegra/host
+ccflags-y += -I$(srctree.nvidia)/drivers/video/tegra/dc
+ccflags-y += -I$(srctree.nvidia)/drivers/platform/tegra
ccflags-y += -I$(srctree)/arch/arm/mach-tegra
obj-$(CONFIG_TEGRA_HDMI2FPD_DS90UH949) += hdmi2fpd_ds90uh949.o
diff -Naur linux-switch-1/scripts/Kbuild.include linux-switch-2/scripts/Kbuild.include
--- linux-switch-1/scripts/Kbuild.include 2022-01-13 23:48:57.406804649 +0100
+++ linux-switch-2/scripts/Kbuild.include 2022-01-13 23:50:06.823960181 +0100
@@ -458,27 +458,20 @@
#
###############################################################################
# TEGRA_ROOT_PATH is the relative path to the directory one level upper than $srctree
-_TEGRA_ROOT_PATH = $(subst ^$(realpath $(srctree)/..)/,,^$(realpath $(kbuild-dir)))
-# _TEGRA_REL_PATH is path like "../../../" that points to directory one level
+_TEGRA_ROOT_PATH = $(subst ^$(realpath $(srctree))/,,^$(realpath $(kbuild-dir)))
+# _TEGRA_REL_PATH is path like "../../../" that points to $(srctree)
# upper that $(srctree)
_TEGRA_REL_PATH = $(subst $() $(),/,$(patsubst %,..,$(subst /, ,$(_TEGRA_ROOT_PATH))))
-# _KERNEL_LAST is the last directory name in $(srctree)
-_KERNEL_LAST = $(lastword $(subst /, ,$(realpath $(srctree))))
# obj-y += $(call tegra-path,nv-hidden-repo,drivers/foo/bar.o)
# will evaluate to either:
# obj-y += ../../../nv-hidden-repo/drivers/foo/bar.o
# or:
# obj-y += bar.o
-tegra-base-kernel-path = $(call _TEGRA_REL_PATH)/$(call _KERNEL_LAST)
-tegra-path = $(if $(wildcard $(srctree)/../$(1)),$(call _TEGRA_REL_PATH)/$(1)/$(2),$(call tegra-base-kernel-path)/$(2))
+tegra-base-kernel-path = $(call _TEGRA_REL_PATH)
+tegra-path = $(if $(wildcard $(srctree)/nvidia/$(1)),$(call _TEGRA_REL_PATH)/nvidia/$(1)/$(2),$(call tegra-base-kernel-path)/$(2))
+tegra-dtstree = $(srctree)/nvidia
-ifneq ($(NV_BUILD_KERNEL_DTS_ROOT),)
-tegra-dtstree = $(NV_BUILD_KERNEL_DTS_ROOT)
-else
-tegra-dtstree = $(srctree)/../../hardware/nvidia
-endif
-
-tegra-root-dtstree = $(subst ^$(realpath $(tegra-dtstree)/../..)/,,^$(realpath $(srctree)/arch/arm64/boot/dts))
+tegra-root-dtstree = $(subst ^$(realpath $(tegra-dtstree)/..)/,,^$(realpath $(srctree)/arch/arm64/boot/dts))
tegra-rel-dtstree = $(subst $() $(),/,$(patsubst %,..,$(subst /, ,$(tegra-root-dtstree))))
# delete partially updated (i.e. corrupted) files on error
.DELETE_ON_ERROR:
diff -Naur linux-switch-1/scripts/tags.sh linux-switch-2/scripts/tags.sh
--- linux-switch-1/scripts/tags.sh 2022-01-13 23:48:57.410804716 +0100
+++ linux-switch-2/scripts/tags.sh 2022-01-13 23:50:06.823960181 +0100
@@ -25,8 +25,8 @@
tree_nvidia=
else
tree=${srctree}/
- tree_nvgpu=${srctree}/../nvgpu/
- tree_nvidia=${srctree}/../nvidia/
+ tree_nvgpu=
+ tree_nvidia=
fi
# ignore userspace tools