Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabling touchscreen and wifi modules of pixel3a by default #3

Open
yanivagman opened this issue Oct 1, 2020 · 3 comments
Open

Enabling touchscreen and wifi modules of pixel3a by default #3

yanivagman opened this issue Oct 1, 2020 · 3 comments

Comments

@yanivagman
Copy link

Hi,

I'm so glad I found this repo, as I wanted to experiment running bpf code on a pixel3a phone I have,
and didn't know how to port the bpf code to 4.9.

I understand that touchscreen and wifi are kernel modules in pixel3a, which require the use of adb and remounting to copy the updated modules (every time phone is restarted?)
but if I change:
CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_CORE_v27=m
CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_RMI_DEV_v27=m
CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE_v27=m
CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_TEST_REPORTING_v27=m

in bonito_defconfig to 'y', touchscreen is now enabled without the need for a kernel module!

so I wanted to ask:

  1. Is there a reason not to change this from 'm' to 'y'?
  2. Wifi code is available out of tree in google sources - do you think it should be easy to put it in the kernel sources and also compile it with the kernel? I tried to do that and failed :-(

Thanks,
Yaniv

@michalgr
Copy link
Contributor

michalgr commented Oct 1, 2020

Hi,

This is a great suggestion, thanks. Having to update modules manually is a pain. I don't know how to build the wifi driver not as a standalone module, but I'll look around.

From my experience it's enough to copy modules once and then the files stay there in the vendor partition, even if I restart the phone. Is that not the case for you ?

@yanivagman
Copy link
Author

Hi,

The thing is that I'm trying to avoid compiling a user-debug android image,
and only use fastboot to boot to the compiled kernel.
Using android production build, I can't remount the vendor partition,
so I'm trying to workaround this by compiling the modules directly to the kernel image.

I can see in the pixel 3a wifi sources path 'android-kernel/private/msm-google-modules/wlan/qcacld-3.0'
that it already has Kconfig, Kbuild, and Android.mk - so I'm sure it should be possible to compile it as part of the kernel image.

I also see in:
https://android.googlesource.com/kernel/msm/+/android-msm-wahoo-4.4-oreo-m4/drivers/staging/qcacld-3.0
that this driver was part of the 'drivers/staging' in the past - not sure why the decided to put it as a module.
I tried to put it in the same directory and add its configs, but the build failed (I don't remember the exact reason).

If you'll have any other ideas for how to do this, I'll really appreciate it.

I have another question, if you don't mind.
BCC fails to find the kernel headers - do you know how can I tell it where to find them?

modprobe: chdir '/lib/modules/4.9.165-01459-ge33b0b6ac10b': No such file or directory
Unable to find kernel headers. Try rebuilding kernel with CONFIG_IKHEADERS=m (module) or installing the kernel development package for your running kernel version.
chdir(/lib/modules/4.9.165-01459-ge33b0b6ac10b/build): No such file or directory

Thanks,
Yaniv

@michalgr
Copy link
Contributor

michalgr commented Oct 1, 2020

You can point BCC and bpftrace to the right directory by setting these env variables:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants