imx390 and ti960 drivers fail to build on iotg_ipu6 branch
- Dominant language
- C
- Stars
- 251
- Forks
- 75
- PR merge metrics
- No merged PRs in 30d
Description
I'd like to build the IMX390 and TI960 drivers. These **are not** supported in [master](https://github.com/intel/ipu6-drivers/tree/master) branch. They **are** supported in [iotg_ipu6](https://github.com/intel/ipu6-drivers/tree/iotg_ipu6) branch which seems to be maintained by @zouxiaoh
The [instructions to build in-tree](https://github.com/intel/ipu6-drivers/tree/iotg_ipu6?tab=readme-ov-file#build-with-kernel-source-tree) produce a kernel build which does not include imx390.ko or ti960.ko. And there are no instructions on how to enable these drivers. The C files exist (imx390.c, ti960.c), but they are not referenced by any Makefiles or Kconfig. If I use instructions from the [tgl_manchester](https://github.com/intel/ipu6-drivers/tree/tgl_manchester?tab=readme-ov-file#1-build-with-kernel-source-tree) branch, the build fails.
[imx390_build_fail.log](https://github.com/intel/ipu6-drivers/files/15193484/imx390_build_fail.log)
It looks like kernel API changes have broken these drivers which have not been updated in a long time. Are they maintained?
What I've tried:
- Created a VM to perform the build using [Intel's IoT flavor of Ubuntu 22.04 Desktop (Jammy)](https://ubuntu.com/download/iot/intel-iot) where `uname -r` returns `5.15.0-1055-intel-iotg`.
- Read the Getting Started Guides for Alder, Raptor, and Meteor Lake to understand the BKC kernel code. The build procedure differs per processor, but the basic process for all is to check out [Intel's linux-kernel-overlay](https://github.com/intel/linux-kernel-overlay) project, switch to a specific branch, and then run the build script. I've tried three branches which all build successfully:
- [lts2021-ubuntu](https://github.com/intel/linux-kernel-overlay/tree/lts2021-ubuntu) (kernel 5.15.137 per Alder Lake Getting Started Guide)
- [lts-overlay-v6.1.65-ubuntu-240109T054526Z](https://github.com/intel/linux-kernel-overlay/tree/lts-overlay-v6.1.65-ubuntu-240109T054526Z) (kernel 6.1.65 per Raptor Lake GSG)
- [mainline-tracking-overlay-v6.5-ubuntu-240122T064042Z](https://github.com/intel/linux-kernel-overlay/tree/mainline-tracking-overlay-v6.5-ubuntu-240122T064042Z) (kernel 6.5 per Meteor Lake GSG).
- After building the base kernel, step 2 is to copy the ipu6-drivers code into the kernel tree and rebuild. This also works.
- However, trying to enable imx390 and ti960 drivers results in a failed build.
```
# Step 1: Build kernel 6.5
cd ~
git clone https://github.com/intel/linux-kernel-overlay.git
cd linux-kernel-overlay/
git checkout mainline-tracking-overlay-v6.5-ubuntu-240122T064042Z
./build.sh # success
```
```bash
# Step 2: Add ipu6-drivers from iotg_ipu6 branch and rebuild kernel 6.5
cd ~
git clone https://github.com/intel/ipu6-drivers.git
cd ipu6-drivers/
git checkout iotg_ipu6
BUILDDIR=~/linux-kernel-overlay/build/linux-kernel-v6.5
cp -r include/ $BUILDDIR
cp -r drivers/ $BUILDDIR
cd $BUILDDIR
make olddefconfig
make -j4 bindeb-pkg # success
```
```bash
# Step 3: Enable IMX390 and TI960 drivers and rebuild kernel 6.5 - fail
nano drivers/media/i2c/Kconfig # Add configs for VIDEO_IMX390 and VIDEO_TI960
nano drivers/media/i2c/Makefile # Add ti960-objs, obj-$(CONFIG_VIDEO_TI960), and obj-$(CONFIG_VIDEO_IMX390)
nano .config # Enable CONFIG_VIDEO_IMX390 and CONFIG_VIDEO_TI960
make olddefconfig
make -j4 bindeb-pkg # Fail
```
Possibly related: I noticed [8 unmerged pull requests](https://github.com/intel/ipu6-drivers/pulls?q=is%3Apr+is%3Aopen+base%3Aiotg_ipu6) directed to the iotg_ipu6 branch courtesy of @dmipx and @mjchen20220511. Would any of these help? They do not seem IMX390/TI960 related.
Contributor guide
Assessment
This issue has not been assessed yet.