[yocto] Installing a Kernel module.
Hello All, So I am having a little problem in understanding why I am unable to autoload a module in my image. So I made modifications to 1. KCONFIG, MAKEFILE 2. Added a source and header file to driver/input/touchscreen 3. Added a file in /boot/arm/dts/overlays 4. Created a patch and added that patch in /meta-raspberrypi-warrior/recipes/kernel/linux/linux-raspberrypi_4.19.bb 5. Added the overlay file in rpi_base.inc 6. In my local.conf added it under KERNEL_MODULE_AUTOLOAD_append created the image without any issues. But after I install that Image I do not see the module anymore? Why Is that Am I missing something? Regards, Shravan Singh (239) 243-0838 Blue Sparq, Inc. 928 NE 24th Lane unit 4 and 5. Cape Coral, FL 33993 IMPORTANT: The contents of this email and any attachments are confidential. They are intended for the named recipient(s) only. If you have received this email by mistake, please notify the sender immediately and do not disclose the contents to anyone or make copies thereof. -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] Hycontek Linux Touchscreen Driver
Hello All, I have a 7" inch Display connected to Raspberrypi-cm3 which using hycontex capacitive touch screen driver. hy46xx_ts So my question is. Is there a linux driver for hycontek touchscreen driver? Or would I have to write one for it? I am unable to find any touchscreen driver with the same name under Linux master https://github.com/torvalds/linux On their website they do offer a Linux_driver_sample_code.zip file. But having a quick glance at it. It feels like that's more for Android devices. https://www.hycontek.com/en/category/products-en/touch-en#tab2 So I guess my only reservation in creating one is that, If there is an already existing driver then that would save a considerable amount of time in creating and then testing it. I have attached their linux sample code Regards, Shravan Singh (239) 243-0838 Blue Sparq, Inc. 928 NE 24th Lane unit 4 and 5. Cape Coral, FL 33993 IMPORTANT: The contents of this email and any attachments are confidential. They are intended for the named recipient(s) only. If you have received this email by mistake, please notify the sender immediately and do not disclose the contents to anyone or make copies thereof. /* drivers/input/touchscreen/hy46xx_ts.c * * HYCON hy46xx TouchScreen driver. * * Copyright (c) 2010 Hycon tech Ltd. * * This software is licensed under the terms of the GNU General Public * License version 2, as published by the Free Software Foundation, and * may be copied, distributed, and modified under those terms. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "hy46xx_ts.h" #define hy46xx_ts_suspend NULL #define hy46xx_ts_resumeNULL //static struct i2c_client *this_client; static struct mutex g_device_mutex; // static int i2c_interface_recv(struct i2c_client* client, unsigned char* pbt_buf, int dw_lenth) { int ret; ret=i2c_master_recv(client, pbt_buf, dw_lenth); if(ret<=0) { return 0; } return ret; } // static int i2c_interface_send(struct i2c_client* client, unsigned char* pbt_buf, int dw_lenth) { int ret; ret=i2c_master_send(client, pbt_buf, dw_lenth); if(ret<0) { return 0; } return ret; } /**/ int hy46xx_i2c_Read(struct i2c_client *client, char *writebuf, int writelen, char *readbuf, int readlen) { int ret; if (writelen > 0) { struct i2c_msg msgs[] = { { .addr = client->addr, .flags = 0, .len = writelen, .buf = writebuf, }, { .addr = client->addr, .flags = 1, .len = readlen, .buf = readbuf, }, }; ret = i2c_transfer(client->adapter, msgs, 2); if (ret < 0) dev_err(>dev, "f%s: i2c read error.\n", __func__); } else { struct i2c_msg msgs[] = { { .addr = client->addr, .flags = 1, .len = readlen, .buf = readbuf, }, }; ret = i2c_transfer(client->adapter, msgs, 1); if (ret < 0) dev_err(>dev, "%s:i2c read error.\n", __func__); } return ret; } /**/ int hy46xx_i2c_Write(struct i2c_client *client, char *writebuf, int writelen) { int ret; struct i2c_msg msg[] = { { .addr = client->addr, .flags = 0, .len = writelen, .buf = writebuf, }, }; ret = i2c_transfer(client->adapter, msg, 1); if (ret < 0) dev_err(>dev, "%s i2c write error.\n", __func__); return ret; }
[yocto] minicom hangs when Attempting to communicate with ttyUSB1
Hello All, I have GSM module which enumerates as /dev/ttyUSB0 and ttyUSB1. When I try communicating with the module using minicom. The application hangs. As in, I am unable to send an AT command and I am unable to exit minicom. The command that I am using is *minicom -b 115200 -D /dev/ttyUSB1* So to debug the situation I used Raspberrypi buster image and tried the same steps. And I was able to communicate with it. What could be the problem here? I have usbserial module on both the images installed. Am I missing some other packages. Regards, Shravan Singh (239) 243-0838 Blue Sparq, Inc. 928 NE 24th Lane unit 4 and 5. Cape Coral, FL 33993 IMPORTANT: The contents of this email and any attachments are confidential. They are intended for the named recipient(s) only. If you have received this email by mistake, please notify the sender immediately and do not disclose the contents to anyone or make copies thereof. -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] Building a out of tree kernel module on target system
Hello Bruce, So I was finally able to compile the kernel module by creating a patch and then applying that patch to linux recipe file. However now, I am facing a different issue and have been trying to figure that one out, Hence the delay in my response. After creating an appropriate device tree overlay file. After loading the module, the I2C driver still reads the screen abs_x_max=800 and abs_y_max=480. I have specified the frame_buffer_width and frame_buffer height as 1024 X 600. Also I have specifically provided touchscreen-x-size and touchscreen-y-size in my device tree overlay to match the same. Why could this be happening? Regards, Shravan Singh (239) 243-0838 Blue Sparq, Inc. 928 NE 24th Lane unit 4 and 5. Cape Coral, FL 33993 IMPORTANT: The contents of this email and any attachments are confidential. They are intended for the named recipient(s) only. If you have received this email by mistake, please notify the sender immediately and do not disclose the contents to anyone or make copies thereof. On Fri, Oct 4, 2019 at 1:42 PM Bruce Ashfield wrote: > On Fri, Oct 4, 2019 at 11:40 AM Shravan Singh > wrote: > > > > Hello, > > > > I am trying to build an out of tree service module on a yocto raspberry > pi image(target system). > > I am using yocto version warrior > > and my machine is Raspberrypi-cm3 > > Kernel version is 4.19.58 > > > > I was able to get the build directory by including > > > > IMAGE_INSTALL_append = " kernel-modules kernel-dev kernel-devsrc" > > After that, I saw a build directory on raspberrypi-image > > > > Now I am trying to compile my source file with the command > > > > make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- > KSRC="/lib/modules/4.19.58/source" -C /lib/modules/$(shell uname -r)/build > M=/home/root/tsDriver modules > > > > After that I get an error saying asm/bitsperlong.h: no such file or > directory > > > > Am I missing something in my make command? > > You need to rebuild/regenerate some file on target (they can't be > packaged). > So have you gone to /usr/src/kernel and done a "make scripts prepare" ? > > Bruce > > > > > > > Regards, > > Shravan Singh > > (239) 243-0838 > > > > Blue Sparq, Inc. > > 928 NE 24th Lane unit 4 and 5. > > Cape Coral, FL 33993 > > > > IMPORTANT: The contents of this email and any attachments are > confidential. They are intended for the named recipient(s) only. If you > have received this email by mistake, please notify the sender immediately > and do not disclose the contents to anyone or make copies thereof. > > -- > > ___ > > yocto mailing list > > yocto@yoctoproject.org > > https://lists.yoctoproject.org/listinfo/yocto > > > > -- > - Thou shalt not follow the NULL pointer, for chaos and madness await > thee at its end > - "Use the force Harry" - Gandalf, Star Trek II > -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] Building a out of tree kernel module on target system
Hello, I am trying to build an out of tree service module on a yocto raspberry pi image(target system). I am using yocto version warrior and my machine is Raspberrypi-cm3 Kernel version is 4.19.58 I was able to get the build directory by including IMAGE_INSTALL_append = " kernel-modules kernel-dev kernel-devsrc" After that, I saw a build directory on raspberrypi-image Now I am trying to compile my source file with the command *make* *ARCH*=arm *CROSS_COMPILE*=arm-poky-linux-gnueabi- *KSRC*="/lib/modules/4.19.58/source" -C /lib/modules/$(shell uname -r)/build *M=*/home/root/tsDriver modules After that I get an error saying *asm/bitsperlong.h*: no such file or directory Am I missing something in my make command? Regards, Shravan Singh (239) 243-0838 Blue Sparq, Inc. 928 NE 24th Lane unit 4 and 5. Cape Coral, FL 33993 IMPORTANT: The contents of this email and any attachments are confidential. They are intended for the named recipient(s) only. If you have received this email by mistake, please notify the sender immediately and do not disclose the contents to anyone or make copies thereof. -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] Meta-raspberrypi
Hello All, I am trying to create a base image for raspberry-pi cm3(compute module 3) I am using warrior-21.0.1 I downloaded meta-raspberry-pi from https://git.yoctoproject.org/git/meta-raspberrypi I added the layer in bblayer.conf and I have changed the machine variable in local.conf to *raspberrypi-cm3* I am using oe-init-build script to generate the base files Now when I run the command bitbake core-image-base I get the below mentioned error Error: No recipes available for: /home/blue/yacto/meta-raspberrypi/recipes-bsp/u-boot/u-boot_2019.07.bbappend /home/blue/yacto/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.16%.bbappend Any help with this? Regards, Shravan Singh (239) 243-0838 Blue Sparq, Inc. 928 NE 24th Lane unit 4 and 5. Cape Coral, FL 33993 IMPORTANT: The contents of this email and any attachments are confidential. They are intended for the named recipient(s) only. If you have received this email by mistake, please notify the sender immediately and do not disclose the contents to anyone or make copies thereof. -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto