Need Help Building MaxLinear Multiport Serial Driver for Toradex Apalis i.MX8QM Yocto Linux Custom Build

Dear Team,

I’m currently working on building the MaxLinear multiport serial driver for the xr17v358 within my development environment, which consists of a custom Yocto Linux distribution based on Toradex Apalis i.MX8QM hardware.

However, I’ve encountered an issue while running the ‘make’ command, as indicated in the following error message:

root@apalis-imx8-07013853:~/xr17-lnx2.6.32-and-newer-pak_ver2.6# make
make -C /lib/modules/`uname -r`/build SUBDIRS=/home/root/xr17-lnx2.6.32-and-newer-pak_ver2.6 modules
make[1]: Entering directory '/lib/modules/5.15.129-6.4.0-devel+git.67c3153d20ff/build'
scripts/ warning: overriding recipe for target 'modules.order'
Makefile:1508: warning: ignoring old recipe for target 'modules.order'
CHK include/generated/compile.h
make[2]: *** No rule to make target 'init/main.o', needed by 'init/built-in.a'. Stop.
make[1]: *** [Makefile:1905: init] Error 2
make[1]: Leaving directory '/lib/modules/5.15.129-6.4.0-devel+git.67c3153d20ff/build'
make: *** [Makefile:13: build] Error 2
root@apalis-imx8-07013853:~/xr17-lnx2.6.32-and-newer-pak_ver2.6# uname -a
Linux apalis-imx8-07013853 5.15.129-6.4.0-devel+git.67c3153d20ff #1 SMP PREEMPT Wed Sep 27 12:30:36 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux

I’ve also noticed that there is no ‘build’ folder under ‘/lib/modules/5.15.129-6.4.0-devel+git.67c3153d20ff/’ after I installed the image on the target device. To resolve this, I need to compile the SDK using the ‘bitbake tdx-reference-multimedia-image -c do_populate_sdk’ command. Then, I can copy the ‘build’ folder from the host location ‘/opt/tdx-xwayland/6.4.0/sysroots/cortexa72-cortexa53-tdx-linux/lib/modules/5.15.129-6.4.0-devel+git.67c3153d20ff/build.’

I made the following changes in the ‘local.conf’ configuration file to ensure that the kernel source is included in the image:

CORE_IMAGE_EXTRA_INSTALL += "kernel-modules"
TOOLCHAIN_TARGET_TASK:append = " kernel-devsrc"

Another finding is, there is no linux-headers folder inside /usr/src/ folder.
In the document provided by Maxlinear, the make entering directory of /usr/share. Please find the reference image below

But in my compiliation, it is entering into /lib/modules/

I’m also attaching the Maxlinear document for your reference,

Any guidance or assistance in resolving this issue would be greatly appreciated. Thank you for your support.

Best regards.

Hareendran M G

Hi @hareendran-tl,
You can not compile directly on apalis imx8 as it does not have any compiler by default.
You need to cross compile on you host PC for arm architecture.

Hi @sahil.tx ,

Thanks for your reply.

Are you referring the below link for kerenl compilation?

Hi @hareendran-tl ,
Yes, I meant that article.
Please read this community post and let me know if you still have query

1 Like

Hi @sahil.tx ,

I’m able to compile the module using the second approch. ie,
Cross compile module using OpenEmbedded SDK which includes kernel sources
and a bit of change in my Makefile.

Earlier it was
$(MAKE) -C $(KERNEL_SRC) SUBDIRS=$(PWD) modules and i changed it to
$(MAKE) -C $(KERNEL_SRC) M=$(PWD) modules.
Now the serial ports are showing in my Apalis i.MX8.

Thank you for your support.