Hi Mike,

The Kconfig files format is probably as mysterious to me (i.e. I don't know what processes them so they end up in the configuration and has proper dependencies). But you can just look at what the author of the driver added to appropriate 'Kconfig' and 'Makefile'. I.e. open 'gitk' program in linux-xlnx directory and look for commit 5ce32fe84b358a041. Look for what changes it does to driver/misc/Kconfig and driver/misc/Makefile.

For experiments it was better for me to compile NI's kernel manually. If you already performed the build with use of 'kas' then the kernel source is buried somewhere in your build directory. I have it in:
build/tmp-glibc/work/ni_titanium_rev5_mender-oe-linux/linux-x4xx/5.10.37+gitAUTOINC+e97bd1e03e-r0/linux-ni_titanium_rev5_mender-standard-build/source

One level up is build directory of the kernel. So you can make changes in the kernel source and then compile it manually.

To make the kernel for zynq you will need to create SDK installer with use of your yocto build and then install it.
The command that creates the SDK installer is here:
https://github.com/EttusResearch/meta-ettus/blob/kirkstone/contrib/kas_build_imgs_package.sh#L45

But when I try to run that manually (without kas) now, it doesn't work for some reason (in the directory where you have your yocto build and 'oe-core' directory):
. oe-core/oe-init-build-env
bitbake gnuradio-image -cpopulate_sdk


Then you need to install the SDK (I don't remember in which directory it will be stored) and source a bash script from the SDK installation dir:
  source oecore-sdk/environment-setup-aarch64-oe-linux

After that all build tools (compilers, etc) will be replaced temporarily with ARM-compatible ones. So you'll be able to build the kernel with any manual modifications that you make.

Best Regards,
Piotr Krysik


W dniu 10.10.2024 o 18:41, mruane--- via USRP-users pisze:

Hi Piotr,

I’m really glad you mentioned xlnx_dpu.c and xlnx_dpu.h. I found those a few days ago (in the linux-xlnx github repo, I think), and I was trying to find a recipe that installs them, but no luck. I didn’t think of manually copying them to the NI kernel and adding them to the NI recipe.

The CONFIG_XILINX_DPU parameter is an issue. It causes a warning that says it’s an unknown object. I think that’s the parameter that tells “PetaLinux“ to install the DPU drivers, and maybe sets a few other kernel parameters. My assumption is that I have to figure out what kernel options Xilinx enables when that parameter is set, and set those accordingly. Kconfig is a mystery to me, so I’ve been putting it off. :-) I think I need to spend a few hours reading up on Kconfig. Right now, the Kconfig files just look like menu entries to me. I don’t see anything that takes those menu entries and writes to defconfig. Again, I just need to read up on Kconfig while my build is running.

Regarding the patches, I learned how to do that properly during this effort. I‘ve been writing a lot of them for lately, and I can’t believe it took me so long to try them. I have to say that kas makes patching REALLY easy. I used to use ‘repo’ when I had many remote layers or repositories to keep track of. I’m never using ‘repo’ again. Kas is great. Once I fix the image_tar PSEUDO_ABORT issue and can build the Mender images, I’ll set up the Kas docker image, and use the kas_build_imgs_package.sh script.

Thanks for all of the help! I’ve really learned a lot.

Cheers,

Mike

_______________________________________________
USRP-users mailing list -- usrp-users@lists.ettus.com
To unsubscribe send an email to usrp-users-le...@lists.ettus.com

Reply via email to