-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restructure the source code tree #3
Comments
Mohammad, I realized the same thing when hacking on the aml_fe_XXX module, but it was just a means to an end - verifying our new avl62x1 driver. However, I would like to do it the 'right way' in case it requires changes to our demod driver(s). I'm unsure how to go about this, however, and have many questions - I don't even know what I don't know at this point. Do you know of a good example of this that I can use as reference? Regards, |
Hi Tom, First of all, the usual way to mainline a driver would be to work on a mainline tree and not scattering the work on multiple repos with many pieces.So the first step would be to fork a mainline tree to your github account like https://github.com/torvalds/linux/ and work on that. The hw-demuxer for meson should go into a similar path in the tree (e.g The device tree of a board should then describe the hardware, it should conatain a node for the hw-demux and subnodes for the demod/tuner combination then the kernel will match the For the firmwares you should also clone the mainline linux-firmware tree and add your firmwares to the relevant path with a Regards |
Mohammad, Our intent is to, in the near future, fork media_tree and linux-firmware and integrate our code in there and retire the temporary repos. I looked through the c8sectpfe-dvb.c code and understand it, but I don't see how that fundamentally fixes the "hardcoding" issue. Yes, the device tree defines the peripheral configuration and the driver uses it to configure the hardware, but at the end of the day, c8sectpfe-dvb.c still has hard-coded references to symbols in driver modules for all possible demods and tuners that it might encounter. I believe this means that all of those modules will be loaded into memory as the c8sectpfe-dvb driver needs to be fully linked. I was thinking more along the lines of this: c8sectpfe-dvb loads the needed demux/tuner modules at runtime kind of the way a DLL works, but I don't believe this is possible in the kernel. Since we're not hard-coding things specific to demux/tuners any more, this implies that those drivers then need to examine their own device tree nodes to configure themselves. That would work for static configuration tasks, but precludes configuring something dynamic. Thoughts? I was not aware of the WHENCE file. Thanks for the heads-up. Regards, |
Hi Tom, Yes as I said the Regards |
Hi,
I want to suggest that the source code be splitted according to the linux kernel standards.
The current method of writing a
.c
file to choose the demod+tuner combination and compile it as a module is messy and will not be accepted upstream. The correct way to do this is to split everything,In linux source tree the demodulator drivers should go into
drivers/media/dvb-frontends/
, the tuner drivers should go intodrivers/media/tuners/
and then the kernel should auto-load the suitable drivers for the combination in the system based on the compatible string in the device tree.Regards
The text was updated successfully, but these errors were encountered: