How to compile the kernel to use USB serial adapters?
-
I would like to use a USB serial adapter with Ubuntu Touch installed on a Pixel3A.
The USB serial adapter used is the following CH340.I tried to connect the USB serial adapter to the Pixel3A via a OTG adapter and executed the lsusb command, and it is recognized as follows.
$ susb Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 002: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
However, /dev/serial* and /dev/ttyUSB* do not appear.
$ ls /dev/serial* /dev/ttyUSB* ls: cannot access '/dev/serial*': No such file or directory ls: cannot access '/dev/ttyUSB*': No such file or directory
I have tried using the following two OS versions with the same results.
- ubuntu touch 16.04 (OTA-24)
- ubuntu touch 20.04 (2022-W51)
According to information at the following webpage, the kernel in ubuntu touch does not support the use USB serial adapters and the kernel must be recompiled to use it.
https://askubuntu.com/questions/640003/ubuntu-touch-usb-serial-drivers-modules
I would like to know how to recompile the kernel to use the USB serial adapter with Ubuntu Touch on Pixel 3a.
If anyone knows how to do this, could you please help me? -
@masao616 I don't think there is a brief and concise description of how to specifically rebuild the kernel, but I think you should be able to piece it together:
- there is extensive documentation for how to port to new devices. you don't need to create a port, since it already exists, but part of that whole story is of course compiling and flashing a kernel https://docs.ubports.com/en/latest/porting/introduction/index.html
- as far as I can quickly see the Pixel 3a is in the CI https://gitlab.com/ubports/porting/reference-device-ports/android9/google-pixel-3a https://gitlab.com/ubports/porting/community-ports/jenkins-ci/sargo/-/blob/main/Jenkinsfile even though one of them talks about sargo, the other about bonita
- I suggest to cross read these resources and if you can't figure it out quickly then check in with the good folks in the porting telegram group: https://docs.ubports.com/en/latest/porting/introduction/Intro.html#getting-community-help
-
@doniks
Thanks for your kind advice.
I am trying to go through the link information you referred me to.
I am making some progress and seem to be getting by.
I will succeed in the near future and report the details here. -
@masao616 curious to hear how it goes!
-
This post is deleted! -
This post is deleted! -
This post is deleted! -
This post in particular seems to attract spam bots, so it will be locked now.
-