Jump to content

driver compilation


Alberto

Recommended Posts

Hello everyone.

I have to change drivers code  in

./cache/sources/linux-mainline/linux-5.10.y/sound/soc/codecs/

Which is the best way to compile a single sound driver without building all the kernel and without lost modification. I would like to work in my Ubuntu pc build Armbian directory.

Link to comment
Share on other sites

If the driver is compiled as a module on your system, it's possible to swap out the module with your own copy via DKMS. It involves copying out the driver, and packaging it through the DKMS system. Install on your board and will replace the stock module on future kernel updates (at least given no major changes).

 

If the driver is builtin, you cannot swap it out and must rebuild the whole kernel image.

 

What category you fall into depends on what board you have, what kernel you're using, and what audio codec you want to change. Without additional detail and "armbianmonitor -u", there's no way to guess from your description.

Link to comment
Share on other sites

If you want to continue using the armbian buildscript but want the compilation to run faster (when doing small changes to kernel tree each time), you can also try to call 

./compile.sh CLEAN=""

 

This will skip cleaning the uboot and kernel sources and thus make compilation much faster. Warning, the patches will still be applied and might fail, shouldnt be a problem though.

See https://docs.armbian.com/Developer-Guide_Build-Options/ for more options.

Link to comment
Share on other sites

Thank you all,

I modified pcm5102a.c for capture and I’m working on a new file for TLV320AIC3101 (from tlv320aic31xx).

My knowledge are very low so I start with:

 

./compile.sh  OFFLINE_WORK=yes BOARD=nanopineo3 BRANCH=current RELEASE=focal BUILD_MINIMAL=no BUILD_DESKTOP=no KERNEL_ONLY=no KERNEL_CONFIGURE=yes COMPRESS_OUTPUTIMAGE=sha,gpg,img  

 

The script ./compile.sh replaces all my files in ./cache/sources/linux-mainline/linux-5.10.y/sound/soc/codecs/ so I would like to keep my file, how can I do it?

I replace files in “cache/../codecs/” with my own files every time the Script stops for menuconfig so I am able to compile mine. It works, but I’m sure there will be a better way. Can you suggest it to me, please?

 

Is there a way to compile only files in the directory ./cache/sources/linux-mainline/linux-5.10.y/sound/soc/codecs/ ? (without general rebuilt)

In the case, how can I compile only the files in the boards?

I attached debug info.

 

debuginfo

Link to comment
Share on other sites

2 hours ago, Heisath said:

As I said, try adding CLEAN="" to stop the script from cleaning the kernel tree in cache/

Thank you Heisath,

I tried with:

 

sudo ./compile.sh CLEAN="" OFFLINE_WORK=yes BOARD=nanopineo3 BRANCH=current RELEASE=focal BUILD_MINIMAL=no BUILD_DESKTOP=no KERNEL_ONLY=no KERNEL_CONFIGURE=yes COMPRESS_OUTPUTIMAGE=sha,gpg,img

 

but unfortunately my pcm5102a.c was replaced with the original one after few instructions of the compile script (perhaps from patching?)

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines