[Desire 626 Android Development] BigCountry907:
Proprietary Modules

Building Proprietary Modules / Not Included in the Source

Lets take a look at the modules that did not build.

-rw-r--r-- root root 137370 2015-10-30 14:45 core_ctl.ko

lrw-r--r-- root root 2015-10-30 14:43 crypto_test_mod.ko -> crypto_test_mod.ko.3.10

-rw-r--r-- root root 287076 2015-10-30 14:43 crypto_test_mod.ko.3.10

lrw-r--r-- root root 2015-10-30 14:43 moc_crypto.ko -> moc_crypto.ko.3.10

-rw-r--r-- root root 510307 2015-10-30 14:43 moc_crypto.ko.3.10

-rw-r--r-- root root 40 2015-10-30 14:43 moc_crypto.ko.sig.3.10

lrw-r--r-- root root 2015-10-30 14:43 moc_crypto_api_tmpl.ko -> moc_crypto_api_tmpl.ko.3.10

-rw-r--r-- root root 176510 2015-10-30 14:43 moc_crypto_api_tmpl.ko.3.10

lrw-r--r-- root root 2015-10-30 14:43 moc_platform_mod.ko -> moc_platform_mod.ko.3.10

-rw-r--r-- root root 8541 2015-10-30 14:42 moc_platform_mod.ko.3.10

-rw-r--r-- root root 258697 2015-10-30 14:41 texfat.ko

lrw-r--r-- root root 2015-10-30 14:34 wlan.ko -> /system/lib/modules/pronto/pronto_wlan.ko

These are the modules we need to fix / get source for.

#1 core_ctl.ko

#2 crypto_test_mod.ko.3.10

#3 moc_crypto.ko.3.10

#4 moc_crypto.ko.sig.3.10

#5 moc_crypto_api_tmpl.ko.3.10

#6 moc_platform_mod.ko.3.10

#7 texfat.ko

#8 /system/lib/modules/pronto/pronto_wlan.ko

These modules require the following symlinks.

#1 crypto_test_mod.ko -> crypto_test_mod.ko.3.10

#2 moc_crypto.ko -> moc_crypto.ko.3.10

#3 moc_crypto_api_tmpl.ko -> moc_crypto_api_tmpl.ko.3.10

#4 moc_platform_mod.ko -> moc_platform_mod.ko.3.10

#5 wlan.ko -> /system/lib/modules/pronto/pronto_wlan.ko

Who is Who and What is What

This is the prima/pronto wireless net driver.

/system/lib/modules/pronto/pronto_wlan.ko

We will need to get source code for this module to build it.

The Mocana Cryptographic Loadable Kernel Module

crypto_test_mod.ko.3.10

moc_crypto.ko.3.10

moc_crypto.ko.sig.3.10

moc_crypto_api_tmpl.ko.3.10

moc_platform_mod.ko.3.10

http://csrc.nist.gov/groups/STM/cmvp/documents/140-1/140sp/140sp1903.pdf

We will need to get source code from somewhere.

This I believe is a Qualcomm Module for the MSM8909 Board

core_ctl.ko

We will need to figure this one out.

This Is for large sd card support

texfat.ko

We will need to figure this one out.

So far with our extraversion and localversion settings during compile the original modules still work.

Long term we really want to be able to build theese

Building the Prima WIFI Module.

SEE INSTRUCTIONS ON THE NEXT PAGE

Building the msm_core_ctl module .

Export sched_setscheduler_nocheck() so that external kernel modules can use it.

A) Open ~/android/device/a32e/kernel/sched/core.c in a text editor

Search for do_sched_setscheduler(pid_t pid, int policy, struct sched_param __user *param)

It is about line number 4239

add

EXPORT_SYMBOL(sched_setscheduler_nocheck);

The file should look like this

return __sched_setscheduler(p, &attr, false);
}

[COLOR="Green"][SIZE="4"]EXPORT_SYMBOL(sched_setscheduler_nocheck);[/SIZE][/COLOR]

static int
do_sched_setscheduler(pid_t pid, int policy, struct sched_param __user *param)

Save and close the file.

ADD THE MODULE TO BUILD FILES

B) Open ~/android/device/a32e/drivers/soc/qcom/Kconfig in a text editor

config MSM_CORE_CTL_HELPER

It is about line number 558

add

config MSM_CORE_CTL
tristate "Core control module"
help
Add support for the Qualcomm core control module

The file should look like this

config MSM_PACMAN
bool "Enable the Peripheral Access Control Manager (PACMan)"
help
Add support for the Peripheral Access Control Manager (PACMan)
This driver allows reconfiguration of the Bus Access Manager
Low Speed Peripheral (BLSP) ownership.

[COLOR="Green"][SIZE="4"]config MSM_CORE_CTL
tristate "Core control module"
help
Add support for the Qualcomm core control module[/SIZE][/COLOR]

config MSM_CORE_CTL_HELPER
tristate "Core control helper functions for dynamically hotplug CPUs"
help
Provide helper functions for core control driver. Core control
driver dynamicatlly hotplugs CPUs from kernel based on current
system load and state. It also supports limiting min and
max online CPUs from userspace.

Save and close the file.

C) Open ~/android/device/a32e/drivers/soc/qcom/Makefile in a text editor

Search for obj-$(CONFIG_MSM_CORE_CTL_HELPER) += core_ctl_helper.o

It is about line number 62

add

obj-$(CONFIG_MSM_CORE_CTL) += msm_core_ctl.o
msm_core_ctl-objs := core_ctl_$(ARCH).o

The file should look like this

obj-$(CONFIG_MSM_PERFORMANCE) += msm_performance.o
[COLOR="Green"]obj-$(CONFIG_MSM_CORE_CTL) += msm_core_ctl.o
msm_core_ctl-objs := core_ctl_$(ARCH).o[/COLOR]
obj-$(CONFIG_MSM_CORE_CTL_HELPER) += core_ctl_helper.o

Save and close the file.

D) Open ~/android/device/a32e/arch/arm/configs/Prima_Big-Country_defconfig in a text editor

Search for CONFIG_MSM_CORE_CTL_HELPER

It is about line number 3471

add

CONFIG_MSM_CORE_CTL=m
CONFIG_MSM_CORE_CTL_HELPER=y

The file should look like this

# CONFIG_MSM_SHARED_HEAP_ACCESS is not set
# CONFIG_MSM_SYSTEM_HEALTH_MONITOR is not set
# CONFIG_QCOM_EARLY_RANDOM is not set
# CONFIG_MSM_PACMAN is not set
[COLOR="DarkGreen"]CONFIG_MSM_CORE_CTL=m
CONFIG_MSM_CORE_CTL_HELPER=y[/COLOR]
# CONFIG_MSM_PERFORMANCE is not set
CONFIG_HTC_DEBUG_RIL_PCN0002_DUMP_STACK=y
CONFIG_HTC_DEBUG_RIL_PCN0005_HTC_DUMP_SMSM_LOG=y
CONFIG_HTC_DEBUG_RIL_PCN0006_HTC_DUMP_BAM_DMUX_LOG=y
CONFIG_MEM_SHARE_QMI_SERVICE=y

Save and close the file.

E) DOWNLOAD THE SOURCE FILE.

https://drive.google.com/open?id=0B8jitdIyh2NtNjU3NFBIcU1NY0k

Copy the source to the TREE.

cp -rf ~/Downloads/core_ctl_arm.o_shipped /android/device/a32e/drivers/soc/qcom/core_ctl_arm.o_shipped

Now Go to the Build Prima Module Section on the next page and follow all instructions.