IMX93-CUSTOM-BUILD

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IMX93-CUSTOM-BUILD

1,172 Views
Et_MM
Contributor III

I am working with an i.MX93 EVK board. I had flashed the latest NXPs defualt image into the board, it boots correctly and loads kernel modules (like the moal WiFi driver).

I cloned the linux-imx repository (https://github.com/nxp-imx/linux-imx.git) (tag lf-6.6.52), applied custom DTS and menuconfig changes, and built the Image, DTB, and modules manually. After flashing these to the board and transferring the modules via SCP, the system boots, but modprobe fails with 'Module not found.' I noticed under the /lib/modules directory names differs in default and custom image. my custom build is missing the updates folder .

root@imx93evk:/lib/modules# modprobe moal mod_para=nxp/wifi_mod_para.conf

modprobe: FATAL: Module moal not found in directory /lib/modules/6.6.52-g5a0a5e71d2bd

i have used example_kernel_emmc.uuu script file to flash the board, and to build the dtb file and kernel build.sh script file also used. I will share that please have a look at those files.

In the evk board after flashing the custom dtb file and image file we want all the peripherals working (Wi-Fi, BLE, Display everything) to work similarly when we flash the default image.

Can you please help me with this, how to move forward, did i missed some procedure for that. 

Is there official documentation or a reference flow for:

* Custom kernel + DTS + rootfs generation for i.MX93

Tags (1)
0 Kudos
Reply
4 Replies

1,144 Views
Manuel_Salas
NXP TechSupport
NXP TechSupport

Hello @Et_MM 

I hope you are doing very well.

 

It seems that you need compile and run modules_install.

It should generate the modules and then try copying those into your rootfs.

make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- modules_install

 

This should populate:

./lib/modules/6.6.52-<hash>/

 

Best regards,

Salas.

0 Kudos
Reply

1,135 Views
Et_MM
Contributor III

Hi, 

Thank you for the reply.

Regarding modules install in my first post itself i had mentioned like in my script i am having the command to install modules and after install with scp command i am transferring those to /lib/modules/ in the board. Even i attached the relevant screenshot. so could you please check it again. I have attached the same here.

scp 6.6.52-g5a0a5e71d2bd root@<board ip>:/lib/modules/

 Below give the small part in my build.sh file which mentioned about the modules_install.

# Ask if you want to build and install modules
read -rn1 -p "Do you want to build modules? [y/n]: " mn_rslt
echo ""

case $mn_rslt in
y)
make ARCH=${ARCH} CROSS_COMPILE=${CROSS_COMPILE} modules_install INSTALL_MOD_PATH=${MODULES_DIR}
;;
*)
echo "Modules skipped"
;;
esac

Could you please verify this and tell the exact way to clear this issue. As i mentioned in my earlier post, inside the modules folder an update folder is missing. Is it because i had build those modules in a wrong way or did i miss something to include in that?

0 Kudos
Reply

1,084 Views
Manuel_Salas
NXP TechSupport
NXP TechSupport

Hello @Et_MM 

 

One can try following the instructions from the mwifiex repo.

 

Best regards,

Salas.

0 Kudos
Reply

1,064 Views
Et_MM
Contributor III

Hi,

Thank you for the reply. I will check on the repo you shared.

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2315616%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EIMX93-CUSTOM-BUILD%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2315616%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20am%20working%20with%20an%20i.MX93%20EVK%20board.%20I%20had%20flashed%20the%20latest%20NXPs%20defualt%20image%20into%20the%20board%2C%20it%20boots%20correctly%20and%20loads%20kernel%20modules%20(like%20the%20moal%20WiFi%20driver).%3C%2FP%3E%3CP%3EI%20cloned%20the%20linux-imx%20repository%20(%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fnxp-imx%2Flinux-imx.git%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2Fnxp-imx%2Flinux-imx.git%3C%2FA%3E)%20(tag%20lf-6.6.52)%2C%20applied%20custom%20DTS%20and%20menuconfig%20changes%2C%20and%20built%20the%20Image%2C%20DTB%2C%20and%20modules%20manually.%20After%20flashing%20these%20to%20the%20board%20and%20transferring%20the%20modules%20via%20SCP%2C%20the%20system%20boots%2C%20but%20modprobe%20fails%20with%20'%3CSTRONG%3EModule%20not%20found%3C%2FSTRONG%3E.'%20I%20noticed%20under%20the%20%2Flib%2Fmodules%20directory%20names%20differs%20in%20default%20and%20custom%20image.%20my%20custom%20build%20is%20missing%20the%20updates%20folder%20.%3C%2FP%3E%3CP%20class%3D%22%22%3E%3CSTRONG%3Eroot%40imx93evk%3A%2Flib%2Fmodules%23%20modprobe%20moal%20mod_para%3Dnxp%2Fwifi_mod_para.conf%3C%2FSTRONG%3E%3C%2FP%3E%3CP%20class%3D%22%22%3E%3CSTRONG%3Emodprobe%3A%20FATAL%3A%20Module%20moal%20not%20found%20in%20directory%20%2Flib%2Fmodules%2F6.6.52-g5a0a5e71d2bd%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3Ei%20have%20used%26nbsp%3B%3CSTRONG%3Eexample_kernel_emmc.uuu%3C%2FSTRONG%3E%20script%20file%20to%20flash%20the%20board%2C%20and%20to%20build%20the%20dtb%20file%20and%20kernel%20%3CSTRONG%3Ebuild.sh%3C%2FSTRONG%3E%20script%20file%20also%20used.%20I%20will%20share%20that%20please%20have%20a%20look%20at%20those%20files.%3C%2FP%3E%3CP%20class%3D%22%22%3EIn%20the%20evk%20board%20after%20flashing%20the%20custom%20dtb%20file%20and%20image%20file%20we%20want%20all%20the%20peripherals%20working%20(Wi-Fi%2C%20BLE%2C%20Display%20everything)%20to%20work%20similarly%20when%20we%20flash%20the%20default%20image.%3C%2FP%3E%3CP%20class%3D%22%22%3ECan%20you%20please%20help%20me%20with%20this%2C%20how%20to%20move%20forward%2C%20did%20i%20missed%20some%20procedure%20for%20that.%26nbsp%3B%3C%2FP%3E%3CP%20class%3D%22%22%3EIs%20there%20official%20documentation%20or%20a%20reference%20flow%20for%3A%3C%2FP%3E%3CP%20class%3D%22%22%3E*%20Custom%20kernel%20%2B%20DTS%20%2B%20rootfs%20generation%20for%20i.MX93%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2316028%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20IMX93-CUSTOM-BUILD%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2316028%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20for%20the%20reply.%3C%2FP%3E%3CP%3ERegarding%20modules%20install%20in%20my%20first%20post%20itself%20i%20had%20mentioned%20like%20in%20my%20script%20i%20am%20having%20the%20command%20to%20install%20modules%20and%20after%20install%20with%20scp%20command%20i%20am%20transferring%20those%20to%20%2Flib%2Fmodules%2F%20in%20the%20board.%20Even%20i%20attached%20the%20relevant%20screenshot.%20so%20could%20you%20please%20check%20it%20again.%20I%20have%20attached%20the%20same%20here.%3C%2FP%3E%3CP%3E%3CSTRONG%3Escp%26nbsp%3B6.6.52-g5a0a5e71d2bd%20root%40%3CBOARD%20ip%3D%22%22%3E%3A%2Flib%2Fmodules%2F%3C%2FBOARD%3E%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3BBelow%20give%20the%20small%20part%20in%20my%20build.sh%20file%20which%20mentioned%20about%20the%20modules_install.%3C%2FP%3E%3CP%3E%23%20Ask%20if%20you%20want%20to%20build%20and%20install%20modules%3CBR%20%2F%3Eread%20-rn1%20-p%20%22Do%20you%20want%20to%20build%20modules%3F%20%5By%2Fn%5D%3A%20%22%20mn_rslt%3CBR%20%2F%3Eecho%20%22%22%3C%2FP%3E%3CP%3Ecase%20%24mn_rslt%20in%3CBR%20%2F%3Ey)%3CBR%20%2F%3Emake%20ARCH%3D%24%7BARCH%7D%20CROSS_COMPILE%3D%24%7BCROSS_COMPILE%7D%20modules_install%20INSTALL_MOD_PATH%3D%24%7BMODULES_DIR%7D%3CBR%20%2F%3E%3B%3B%3CBR%20%2F%3E*)%3CBR%20%2F%3Eecho%20%22Modules%20skipped%22%3CBR%20%2F%3E%3B%3B%3CBR%20%2F%3Eesac%3C%2FP%3E%3CP%3ECould%20you%20please%20verify%20this%20and%20tell%20the%20exact%20way%20to%20clear%20this%20issue.%20As%20i%20mentioned%20in%20my%20earlier%20post%2C%20inside%20the%20modules%20folder%20an%20update%20folder%20is%20missing.%20Is%20it%20because%20i%20had%20build%20those%20modules%20in%20a%20wrong%20way%20or%20did%20i%20miss%20something%20to%20include%20in%20that%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2315791%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20IMX93-CUSTOM-BUILD%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2315791%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F242536%22%20target%3D%22_blank%22%3E%40Et_MM%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20hope%20you%20are%20doing%20very%20well.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EIt%20seems%20that%20you%20need%20compile%20and%20run%26nbsp%3B%3CSTRONG%3Emodules_install%3C%2FSTRONG%3E.%3C%2FP%3E%0A%3CP%3EIt%20should%20generate%20the%20modules%20and%20then%20try%20copying%20those%20into%20your%20rootfs.%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3Emake%20ARCH%3Darm64%20CROSS_COMPILE%3Daarch64-linux-gnu-%20modules_install%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CBR%20%2F%3E%0A%3CP%3EThis%20should%20populate%3A%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E.%2Flib%2Fmodules%2F6.6.52-%3CHASH%3E%2F%3C%2FHASH%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CBR%20%2F%3E%0A%3CP%3EBest%20regards%2C%3C%2FP%3E%0A%3CP%3ESalas.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2317356%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20IMX93-CUSTOM-BUILD%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2317356%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F242536%22%20target%3D%22_blank%22%3E%40Et_MM%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EOne%20can%20try%20following%20the%20instructions%20from%20the%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fnxp-imx%2Fmwifiex%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Emwifiex%3C%2FA%3E%20repo.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EBest%20regards%2C%3C%2FP%3E%0A%3CP%3ESalas.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2317733%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20IMX93-CUSTOM-BUILD%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2317733%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EThank%20you%20for%20the%20reply.%20I%20will%20check%20on%20the%20repo%20you%20shared.%3C%2FP%3E%3C%2FLINGO-BODY%3E