Skip to content

Instantly share code, notes, and snippets.

@HemanthJabalpuri
Last active December 6, 2023 06:58
Show Gist options
  • Save HemanthJabalpuri/44e958166e690caec692c915e9ba1309 to your computer and use it in GitHub Desktop.
Save HemanthJabalpuri/44e958166e690caec692c915e9ba1309 to your computer and use it in GitHub Desktop.
diff --git a/arch/arm64/configs/vendor/bengal-perf_defconfig b/arch/arm64/configs/vendor/bengal-perf_defconfig
index 79d8332..8108504 100644
--- a/arch/arm64/configs/vendor/bengal-perf_defconfig
+++ b/arch/arm64/configs/vendor/bengal-perf_defconfig
@@ -93,9 +93,10 @@ CONFIG_CRYPTO_AES_ARM64_NEON_BLK=y
CONFIG_PANIC_ON_REFCOUNT_ERROR=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_UNLOAD=y
CONFIG_MODVERSIONS=y
CONFIG_MODULE_SIG=y
-CONFIG_MODULE_SIG_FORCE=y
+# CONFIG_MODULE_SIG_FORCE is not set
CONFIG_MODULE_SIG_SHA512=y
# CONFIG_BLK_DEV_BSG is not set
CONFIG_BLK_INLINE_ENCRYPTION=y
diff --git a/arch/arm64/configs/vendor/bengal-perf_defconfig b/arch/arm64/configs/vendor/bengal-perf_defconfig
index 79d8332..83325b1 100644
--- a/arch/arm64/configs/vendor/bengal-perf_defconfig
+++ b/arch/arm64/configs/vendor/bengal-perf_defconfig
@@ -92,10 +92,11 @@ CONFIG_CRYPTO_AES_ARM64_CE_BLK=y
CONFIG_CRYPTO_AES_ARM64_NEON_BLK=y
CONFIG_PANIC_ON_REFCOUNT_ERROR=y
CONFIG_MODULES=y
+CONFIG_MODULE_FORCE_LOAD=y
CONFIG_MODULE_UNLOAD=y
CONFIG_MODVERSIONS=y
CONFIG_MODULE_SIG=y
-CONFIG_MODULE_SIG_FORCE=y
+# CONFIG_MODULE_SIG_FORCE is not set
CONFIG_MODULE_SIG_SHA512=y
# CONFIG_BLK_DEV_BSG is not set
CONFIG_BLK_INLINE_ENCRYPTION=y
diff --git a/kernel/module.c b/kernel/module.c
index 9dfc374..4ad3327 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -1272,7 +1272,7 @@ static int try_to_force_load(struct module *mod, const char *reason)
#endif
}
-#ifdef CONFIG_MODVERSIONS
+#if 0
static u32 resolve_rel_crc(const s32 *crc)
{
@@ -3704,6 +3704,10 @@ static int load_module(struct load_info *info, const char __user *uargs,
long err = 0;
char *after_dashes;
+ //FIXME
+ flags |= MODULE_INIT_IGNORE_MODVERSIONS;
+ flags |= MODULE_INIT_IGNORE_VERMAGIC;
+
err = elf_header_check(info);
if (err)
goto free_copy;
diff --git a/Makefile b/Makefile
index e66fd39..ae794c7 100644
--- a/Makefile
+++ b/Makefile
@@ -17,6 +17,10 @@ endif
ifeq ($(CONFIG_ARCH_SDM660), y)
include $(srctree)/techpack/audio/config/sdm660auto.conf
endif
+ifeq ($(CONFIG_ARCH_BENGAL), y)
+include $(srctree)/techpack/audio/config/bengalauto.conf
+export $(shell sed 's/=.*//' $(srctree)/techpack/audio/config/bengalauto.conf)
+endif
# Use USERINCLUDE when you must reference the UAPI directories only.
USERINCLUDE += \
@@ -49,6 +53,23 @@ ifeq ($(CONFIG_ARCH_SDM660), y)
LINUXINCLUDE += \
-include $(srctree)/techpack/audio/config/sdm660autoconf.h
endif
+ifeq ($(CONFIG_ARCH_BENGAL), y)
+LINUXINCLUDE += \
+ -include $(srctree)/techpack/audio/config/bengalautoconf.h
+endif
+ifeq ($(CONFIG_DEVON_DTB), y)
+LINUXINCLUDE += \
+ -include $(srctree)/techpack/audio/config/devonautoconf.h
+endif
+ifeq ($(CONFIG_HAWAO_DTB), y)
+LINUXINCLUDE += \
+ -include $(srctree)/techpack/audio/config/hawaoautoconf.h
+endif
+ifeq ($(CONFIG_RHODE_DTB), y)
+LINUXINCLUDE += \
+ -include $(srctree)/techpack/audio/config/rhodeautoconf.h
+endif
+
obj-y += soc/
obj-y += dsp/
obj-y += ipc/
diff --git a/asoc/codecs/Kbuild b/asoc/codecs/Kbuild
index 9af58e0..142aaf9 100644
--- a/asoc/codecs/Kbuild
+++ b/asoc/codecs/Kbuild
@@ -258,7 +258,6 @@ ifeq ($(KERNEL_BUILD), 1)
obj-y += rouleur/
obj-y += wsa883x/
obj-y += sdm660_cdc/
- obj-y += awinic/
obj-y += foursemi/
endif
# Module information used by KBuild framework
@@ -295,7 +294,7 @@ hdmi_dlkm-y := $(HDMICODEC_OBJS)
#Add awinic driver begain
ifdef CONFIG_SND_SMARTPA_AW882XX
-ifneq (,$(filter rhode% hawao%, $(TARGET_PRODUCT)))
+ifneq (,$(filter y, $(CONFIG_DEVON_DTB) $(CONFIG_HAWAO_DTB) $(CONFIG_RHODE_DTB)))
SND_SOC_AW882XX_OBJS += aw88261/aw882xx.o
SND_SOC_AW882XX_OBJS += aw88261/aw_init.o
SND_SOC_AW882XX_OBJS += aw88261/aw_bin_parse.o
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment