All of lore.kernel.org
 help / color / mirror / Atom feed
* Create the patch for the linux kernel module  #dunfell
@ 2022-08-20 18:52 mahendrasondagar08
  2022-08-20 20:51 ` [yocto] " Khem Raj
  0 siblings, 1 reply; 6+ messages in thread
From: mahendrasondagar08 @ 2022-08-20 18:52 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 596 bytes --]

Hi... Community

Hope all are doing well

I'm dealing with the yocto dunfell branch with the STM32MP1

I know, how to create the patch for the device tree source (DTS) and add with the custom image

My intend is to modify the busb.c to work with my bluetooth USB dongle
I have create the patch for the same and adding the same way as i does with the DTS file

But, unfortunately, it's causing the issue wile baking the image!

Can any one redirect me to the tutorial to customize the kernel module via patch under yocto ?

All suggestions and comments welcome

Thanks
Mahendra

[-- Attachment #2: Type: text/html, Size: 690 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [yocto] Create the patch for the linux kernel module #dunfell
  2022-08-20 18:52 Create the patch for the linux kernel module #dunfell mahendrasondagar08
@ 2022-08-20 20:51 ` Khem Raj
  2022-08-22 17:04   ` mahendrasondagar08
  0 siblings, 1 reply; 6+ messages in thread
From: Khem Raj @ 2022-08-20 20:51 UTC (permalink / raw)
  To: mahendrasondagar08; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 1527 bytes --]

On Sat, Aug 20, 2022 at 11:52 AM <mahendrasondagar08@gmail.com> wrote:

> Hi... Community
>
> Hope all are doing well
>
> I'm dealing with the yocto dunfell branch with the STM32MP1
>
> I know, how to create the patch for the device tree source (DTS) and add
> with the custom image
>
> My intend is to modify the busb.c to work with my bluetooth USB dongle
> I have create the patch for the same and adding the same way as i does
> with the DTS file
>
> But, unfortunately, it's causing the issue wile baking the image!
>

If it’s in-tree kernel module then you create a patch with your changes and
apply it via recipe like any other recipe is going to do in metadata

However you need to share specific details on errors so someone can get a
better content to help you

>
> Can any one redirect me to the tutorial to customize the kernel module via
> patch under yocto ?
>
>
>
> All suggestions and comments welcome
>
> Thanks
> Mahendra
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> You automatically follow any topics you start or reply to.
> View/Reply Online (#57866):
> https://lists.yoctoproject.org/g/yocto/message/57866
> Mute This Topic: https://lists.yoctoproject.org/mt/93149593/1997914
> Mute #dunfell:https://lists.yoctoproject.org/g/yocto/mutehashtag/dunfell
> Group Owner: yocto+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [
> raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>

[-- Attachment #2: Type: text/html, Size: 2573 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Create the patch for the linux kernel module #dunfell
  2022-08-20 20:51 ` [yocto] " Khem Raj
@ 2022-08-22 17:04   ` mahendrasondagar08
  2022-08-22 17:18     ` [yocto] " Quentin Schulz
  0 siblings, 1 reply; 6+ messages in thread
From: mahendrasondagar08 @ 2022-08-22 17:04 UTC (permalink / raw)
  To: yocto


[-- Attachment #1.1.1: Type: text/plain, Size: 1440 bytes --]

Hi... Khem Raj

First of all, Thanks for the swift reply.
Let me brief the case.

Actually, I'm dealing with the TP-Link Bluetooth dongle
I have been enabled it's suitable drivers
However, the things not working well

After some googling, i got to know that to work with the TP-Link Bluetooth dongle, I'll have to apply the patch by making some changes at the busb.c and hci_ldisc.c files
And that's how, I have created it's patches by *git diff --no-index* command *

* FYI: I have meta-custom layer, in which i have created the recpies-kernel/linux/stm32mp1 directory
I have stored, all 2 patches in to the stm32mp1 files

in linux file, i have created the .bbappend file called *linux-stm32mp_%.bbappend*
For the instance, i have added the all to patches path in to the .bbappend file at *SRC_URI*

Now, My problem is,  during the baking of the custom image I'm getting the following errors
*"can't find file to patch at input line 5"*

*Error logs*

For your reference, i have attached the contents of the .bbappend file and patch here

In above .bbappend file, the last two patches are for this modules which i need to modify

Once of the patch contents are mentioned at here

I have also attached both of these patches here

I guess, there might be some issue with the actual source file location mentioned in to the patches
but, I'm not sure

Pl. suggest me the right solution

Thanks
Mahendra

[-- Attachment #1.1.2: Type: text/html, Size: 1969 bytes --]

[-- Attachment #1.2: Error_logs.png --]
[-- Type: image/png, Size: 21466 bytes --]

[-- Attachment #1.3: Screenshot from 2022-08-21 22-41-28.png --]
[-- Type: image/png, Size: 35277 bytes --]

[-- Attachment #1.4: patch_contents.png --]
[-- Type: image/png, Size: 55296 bytes --]

[-- Attachment #2: stm32mp157a-dk1.dts.orig --]
[-- Type: application/octet-stream, Size: 549 bytes --]

// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
/*
 * Copyright (C) STMicroelectronics 2019 - All Rights Reserved
 * Author: Alexandre Torgue <alexandre.torgue@st.com> for STMicroelectronics.
 */

/dts-v1/;

#include "stm32mp157.dtsi"
#include "stm32mp15xa.dtsi"
#include "stm32mp15-pinctrl.dtsi"
#include "stm32mp15xxac-pinctrl.dtsi"
#include "stm32mp15xx-dkx.dtsi"

/ {
	model = "STMicroelectronics STM32MP157A-DK1 Discovery Board";
	compatible = "st,stm32mp157a-dk1", "st,stm32mp157";

	chosen {
		stdout-path = "serial0:115200n8";
	};
};

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0003-stm32mp157a-dk1-hci_ldisc-fix.patch --]
[-- Type: text/x-patch; name="0003-stm32mp157a-dk1-hci_ldisc-fix.patch", Size: 593 bytes --]

diff --git a/hci_ldisc.c.orig b/hci_ldisc.c
index 637c5b8..49d735d 100644
--- a/drivers/bluetooth/hci_ldisc.c
+++ b/drivers/bluetooth/hci_ldisc.c
@@ -801,8 +801,8 @@ static int hci_uart_tty_ioctl(struct tty_struct *tty, struct file *file,
  * We don't provide read/write/poll interface for user space.
  */
 static ssize_t hci_uart_tty_read(struct tty_struct *tty, struct file *file,
-				 unsigned char *buf, size_t nr,
-				 void **cookie, unsigned long offset)
+                 unsigned char __user *buf, size_t nr,
+                 void **cookie, unsigned long offset)
 {
 	return 0;
 }

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: 0002-stm32mp157a-dk1-btusb-fix.patch --]
[-- Type: text/x-patch; name="0002-stm32mp157a-dk1-btusb-fix.patch", Size: 605 bytes --]

diff --git a/btusb.c.orig b/btusb.c
index afd2b1f..ecf0163 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -341,7 +341,9 @@ static const struct usb_device_id blacklist_table[] = {
 
 	/* Roper Class 1 Bluetooth Dongle (Silicon Wave based) */
 	{ USB_DEVICE(0x1310, 0x0001), .driver_info = BTUSB_SWAVE },
-
+        
+        /* Tp-Link UB500 Device*/
+        { USB_DEVICE(0x2357, 0x0604), .driver_info = BTUSB_REALTEK },
 	/* Digianswer devices */
 	{ USB_DEVICE(0x08fd, 0x0001), .driver_info = BTUSB_DIGIANSWER },
 	{ USB_DEVICE(0x08fd, 0x0002), .driver_info = BTUSB_IGNORE },

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [yocto] Create the patch for the linux kernel module #dunfell
  2022-08-22 17:04   ` mahendrasondagar08
@ 2022-08-22 17:18     ` Quentin Schulz
  2022-08-22 17:39       ` Mahendra Sondagar
  0 siblings, 1 reply; 6+ messages in thread
From: Quentin Schulz @ 2022-08-22 17:18 UTC (permalink / raw)
  To: yocto, mahendrasondagar08

Hi Mahendra,

On August 22, 2022 7:04:46 PM GMT+02:00, mahendrasondagar08@gmail.com wrote:
>Hi... Khem Raj
>
>First of all, Thanks for the swift reply.
>Let me brief the case.
>
>Actually, I'm dealing with the TP-Link Bluetooth dongle
>I have been enabled it's suitable drivers
>However, the things not working well
>
>After some googling, i got to know that to work with the TP-Link Bluetooth dongle, I'll have to apply the patch by making some changes at the busb.c and hci_ldisc.c files
>And that's how, I have created it's patches by *git diff --no-index* command *
>
>* FYI: I have meta-custom layer, in which i have created the recpies-kernel/linux/stm32mp1 directory
>I have stored, all 2 patches in to the stm32mp1 files
>
>in linux file, i have created the .bbappend file called *linux-stm32mp_%.bbappend*
>For the instance, i have added the all to patches path in to the .bbappend file at *SRC_URI*
>
>Now, My problem is,  during the baking of the custom image I'm getting the following errors
>*"can't find file to patch at input line 5"*
>
>*Error logs*
>
>For your reference, i have attached the contents of the .bbappend file and patch here
>
>In above .bbappend file, the last two patches are for this modules which i need to modify
>
>Once of the patch contents are mentioned at here
>
>I have also attached both of these patches here
>
>I guess, there might be some issue with the actual source file location mentioned in to the patches
>but, I'm not sure
>

The issue is that the path in your patch is incorrect, it should not have kernel-source/ in it, just remove it.

Cheers,
Quentin


>Pl. suggest me the right solution
>
>Thanks
>Mahendra


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [yocto] Create the patch for the linux kernel module #dunfell
  2022-08-22 17:18     ` [yocto] " Quentin Schulz
@ 2022-08-22 17:39       ` Mahendra Sondagar
  2022-08-22 19:24         ` Mahendra Sondagar
  0 siblings, 1 reply; 6+ messages in thread
From: Mahendra Sondagar @ 2022-08-22 17:39 UTC (permalink / raw)
  To: Quentin Schulz; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 1932 bytes --]

Hi...Quentin

Thanks for the revert :)
Let me try this

Regards
Mahendra

On Mon, Aug 22, 2022 at 10:49 PM Quentin Schulz <foss+yocto@0leil.net>
wrote:

> Hi Mahendra,
>
> On August 22, 2022 7:04:46 PM GMT+02:00, mahendrasondagar08@gmail.com
> wrote:
> >Hi... Khem Raj
> >
> >First of all, Thanks for the swift reply.
> >Let me brief the case.
> >
> >Actually, I'm dealing with the TP-Link Bluetooth dongle
> >I have been enabled it's suitable drivers
> >However, the things not working well
> >
> >After some googling, i got to know that to work with the TP-Link
> Bluetooth dongle, I'll have to apply the patch by making some changes at
> the busb.c and hci_ldisc.c files
> >And that's how, I have created it's patches by *git diff --no-index*
> command *
> >
> >* FYI: I have meta-custom layer, in which i have created the
> recpies-kernel/linux/stm32mp1 directory
> >I have stored, all 2 patches in to the stm32mp1 files
> >
> >in linux file, i have created the .bbappend file called
> *linux-stm32mp_%.bbappend*
> >For the instance, i have added the all to patches path in to the
> .bbappend file at *SRC_URI*
> >
> >Now, My problem is,  during the baking of the custom image I'm getting
> the following errors
> >*"can't find file to patch at input line 5"*
> >
> >*Error logs*
> >
> >For your reference, i have attached the contents of the .bbappend file
> and patch here
> >
> >In above .bbappend file, the last two patches are for this modules which
> i need to modify
> >
> >Once of the patch contents are mentioned at here
> >
> >I have also attached both of these patches here
> >
> >I guess, there might be some issue with the actual source file location
> mentioned in to the patches
> >but, I'm not sure
> >
>
> The issue is that the path in your patch is incorrect, it should not have
> kernel-source/ in it, just remove it.
>
> Cheers,
> Quentin
>
>
> >Pl. suggest me the right solution
> >
> >Thanks
> >Mahendra
>

[-- Attachment #2: Type: text/html, Size: 2642 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [yocto] Create the patch for the linux kernel module #dunfell
  2022-08-22 17:39       ` Mahendra Sondagar
@ 2022-08-22 19:24         ` Mahendra Sondagar
  0 siblings, 0 replies; 6+ messages in thread
From: Mahendra Sondagar @ 2022-08-22 19:24 UTC (permalink / raw)
  To: Quentin Schulz; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 2224 bytes --]

Hi... Quentin
Yes, it works!

I'm able to customise the kernel module by the patch


Many thanks :)

Regards,
Mahendra

On Mon, Aug 22, 2022 at 11:09 PM Mahendra Sondagar <
mahendrasondagar08@gmail.com> wrote:

> Hi...Quentin
>
> Thanks for the revert :)
> Let me try this
>
> Regards
> Mahendra
>
> On Mon, Aug 22, 2022 at 10:49 PM Quentin Schulz <foss+yocto@0leil.net>
> wrote:
>
>> Hi Mahendra,
>>
>> On August 22, 2022 7:04:46 PM GMT+02:00, mahendrasondagar08@gmail.com
>> wrote:
>> >Hi... Khem Raj
>> >
>> >First of all, Thanks for the swift reply.
>> >Let me brief the case.
>> >
>> >Actually, I'm dealing with the TP-Link Bluetooth dongle
>> >I have been enabled it's suitable drivers
>> >However, the things not working well
>> >
>> >After some googling, i got to know that to work with the TP-Link
>> Bluetooth dongle, I'll have to apply the patch by making some changes at
>> the busb.c and hci_ldisc.c files
>> >And that's how, I have created it's patches by *git diff --no-index*
>> command *
>> >
>> >* FYI: I have meta-custom layer, in which i have created the
>> recpies-kernel/linux/stm32mp1 directory
>> >I have stored, all 2 patches in to the stm32mp1 files
>> >
>> >in linux file, i have created the .bbappend file called
>> *linux-stm32mp_%.bbappend*
>> >For the instance, i have added the all to patches path in to the
>> .bbappend file at *SRC_URI*
>> >
>> >Now, My problem is,  during the baking of the custom image I'm getting
>> the following errors
>> >*"can't find file to patch at input line 5"*
>> >
>> >*Error logs*
>> >
>> >For your reference, i have attached the contents of the .bbappend file
>> and patch here
>> >
>> >In above .bbappend file, the last two patches are for this modules which
>> i need to modify
>> >
>> >Once of the patch contents are mentioned at here
>> >
>> >I have also attached both of these patches here
>> >
>> >I guess, there might be some issue with the actual source file location
>> mentioned in to the patches
>> >but, I'm not sure
>> >
>>
>> The issue is that the path in your patch is incorrect, it should not have
>> kernel-source/ in it, just remove it.
>>
>> Cheers,
>> Quentin
>>
>>
>> >Pl. suggest me the right solution
>> >
>> >Thanks
>> >Mahendra
>>
>

[-- Attachment #2: Type: text/html, Size: 3286 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-08-22 19:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-20 18:52 Create the patch for the linux kernel module #dunfell mahendrasondagar08
2022-08-20 20:51 ` [yocto] " Khem Raj
2022-08-22 17:04   ` mahendrasondagar08
2022-08-22 17:18     ` [yocto] " Quentin Schulz
2022-08-22 17:39       ` Mahendra Sondagar
2022-08-22 19:24         ` Mahendra Sondagar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.