Latest patches failing on X1 Carbon Gen 11 using latest Ubuntu 24.04 oem kernel package
- Dominant language
- C
- Stars
- 251
- Forks
- 75
- PR merge metrics
- No merged PRs in 30d
Description
## Summary
Following the discussion in https://github.com/intel/ipu6-drivers/issues/187#issuecomment-2484864556, this documents my attempt to build and use the patched kernel. This is at the request of @sgruszka.
### Steps to build the kernel
1. Begin with a standard Ubuntu 24.04 build environment
2. Add "deb-src" to the types line in the `/etc/apt/sources.list.d/ubuntu.sources` file. Execute `sudo apt update`.
3. Install source and build packages as follows:
```
sudo apt update
sudo apt build-dep -y linux linux-image-unsigned-6.11.0-1007-oem
sudo apt install -y fakeroot llvm libncurses-dev dwarves
```
I'm using an unsigned schema because I can't build the signed Ubuntu package, obviously...
4. Get the source package: `apt source linux-image-unsigned-6.11.0-1007-oem`
5. `cd` to the kernel source directory and apply the following 4 patches using `patch -p1 < file`.
[patch1.txt](https://github.com/user-attachments/files/17821262/patch1.txt)
[patch2.txt](https://github.com/user-attachments/files/17821263/patch2.txt)
[patch3.txt](https://github.com/user-attachments/files/17821264/patch3.txt)
[patch4.txt](https://github.com/user-attachments/files/17821265/patch4.txt)
6. Use the debian scripts to prepare the source:
```
chmod a+x debian/rules
chmod a+x debian/scripts/*
chmod a+x debian/scripts/misc/*
fakeroot debian/rules clean
```
7. Edited the source name in the `debian.oem/changelog` file to build `*.deb` packages with a distinguishing version number. I arbitrarily picked `1000` for this.
8. Build the kernel with the debian scripts. This takes a while, of course:
``
fakeroot debian/rules clean
fakeroot debian/rules binary
``
9. This gives a bunch of `*.deb` files in the `..` directory. I installed these with the command: ```sudo dpkg -i linux-oem-6.11-headers-6.11.0-1007_6.11.0-1007.1000_all.deb linux-headers-6.11.0-1007-oem_6.11.0-1007.1000_amd64.deb linux-modules-6.11.0-1007-oem_6.11.0-1007.1000_amd64.deb linux-modules-ipu6-6.11.0-1007-oem_6.11.0-1007.1000_amd64.deb linux-image-unsigned-6.11.0-1007-oem_6.11.0-1007.1000_amd64.deb```
10. Finally: reboot
11. I need to turn off secure boot in order to launch the unsigned kernel
### Notes/problems/issue with this build
- If I use the Ubuntu noble-proposed kernel packages for `6.11.0-1007-oem`. The kernel modules fail to correctly configure the ov2740 and v4l2_loopback some large fraction of the time, perhaps 50-60% of the time. This can often be recovered by a few `modprobe -r ov2740` + `modprobe ov2740` followed by a `sudo systemctl restart v4l2-relayd.service` to restart the gstreamer.
- While the camera can be used in this state, it is not 100% reliable. It often requires restarts and resets by removing and inserting modules.
- When using the newly compiled kernel with the patches, the `video4linux` virtual devices seem not to be configured and therefore the gstreamer process fails to start from the service file.
- As mentioned in #187, this may be a consequence of using an unsigned kernel package with signed firmware. I'm not sure if this is the root cause of this failure or not.
Contributor guide
Assessment
This issue has not been assessed yet.