Create the patch for the linux kernel module #dunfell
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
Quoted 6 lines · On Sat, Aug 20, 2022 at 11:52 AM <[email protected]> wrote:
Hi... Community
Hope all are doing well
I'm dealing with the yocto dunfell branch with the STM32MP1
Quoted 9 lines
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.cto 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 fileBut, 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
Quoted 24 lines
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: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
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
drivers/bluetooth/hci_ldisc.c +2 -2
@@ -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 ; }
drivers/bluetooth/btusb.c +3 -1
@@ -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 },
Hi Mahendra,
Quoted 25 lines · On August 22, 2022 7:04:46 PM GMT+02:00, [email protected] 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.candhci_ldisc.cfiles 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
Quoted 9 lines
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
Quoted 4 lines
Pl. suggest me the right solution
Thanks
Mahendra
Hi...Quentin
Thanks for the revert :)
Let me try this
Regards
Mahendra
Quoted 61 lines · Quentin Schulz
Hi Mahendra,
Quoted 10 lines · On August 22, 2022 7:04:46 PM GMT+02:00, [email protected] 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.candhci_ldisc.cfilesQuoted 1 line
And that's how, I have created it's patches by *git diff --no-index*
command *
Quoted 2 lines
* FYI: I have meta-custom layer, in which i have created the
recpies-kernel/linux/stm32mp1 directory
Quoted 3 lines
I have stored, all 2 patches in to the stm32mp1 files
in linux file, i have created the .bbappend file called
*linux-stm32mp_%.bbappend*
Quoted 1 line
For the instance, i have added the all to patches path in to the
.bbappend file at *SRC_URI*
Quoted 2 lines
Now, My problem is, during the baking of the custom image I'm getting
the following errors
Quoted 5 lines
*"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
Quoted 2 lines
In above .bbappend file, the last two patches are for this modules which
i need to modify
Quoted 6 lines
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
Quoted 2 lines
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,
QuentinQuoted 4 lines
Pl. suggest me the right solution
Thanks
Mahendra
Hi... Quentin
Yes, it works!
I'm able to customise the kernel module by the patch
Many thanks :)
Regards,
Mahendra
Quoted 73 lines · Mahendra Sondagar
Hi...Quentin
Thanks for the revert :)
Let me try thisRegards
MahendraQuoted 61 lines · Quentin Schulz
Hi Mahendra,
Quoted 10 lines · On August 22, 2022 7:04:46 PM GMT+02:00, [email protected] 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.candhci_ldisc.cfilesQuoted 1 line
And that's how, I have created it's patches by *git diff --no-index*
command *
Quoted 2 lines
* FYI: I have meta-custom layer, in which i have created the
recpies-kernel/linux/stm32mp1 directory
Quoted 3 lines
I have stored, all 2 patches in to the stm32mp1 files
in linux file, i have created the .bbappend file called
*linux-stm32mp_%.bbappend*
Quoted 1 line
For the instance, i have added the all to patches path in to the
.bbappend file at *SRC_URI*
Quoted 2 lines
Now, My problem is, during the baking of the custom image I'm getting
the following errors
Quoted 5 lines
*"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
Quoted 2 lines
In above .bbappend file, the last two patches are for this modules which
i need to modify
Quoted 6 lines
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
Quoted 2 lines
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,
QuentinQuoted 4 lines
Pl. suggest me the right solution
Thanks
Mahendra