On Sun, Nov 19, 2017 at 10:19:05PM -0800, Paul B. Henson wrote: > On Mon, Nov 20, 2017 at 06:50:30AM +0100, Sebastien Marie wrote: > > > For me, there is currently no way to ask config(8) to alter the right > > file in /usr/share/relink/kernel to "ship" the modification in all > > future generated KARL kernels. > > I thought that might be the case; maybe someday config(8) will be > extended to work with the object files as well as the kernel binary > itself to allow that.
I think it should be possible, but it isn't trivial to implement as it is a binary editing. It needs to locate proper offset of a symbol inside ELF file, and make changes. > > - makes your changes in /usr/src/sys, build and install a new no-GENERIC > > kernel (and do it at each upgrade) > > If I do that, can the resultant object files (which will have my com2 > irq change) be used with KARL? Hmm, it seems like all I really need to > do is compile a new com_isa.o and drop it in to the existing directory? > Or replace whichever object file contains the constant I need to change; > it's not like I'm modifying code or making any drastic changes... Hmm, As long you use standard "make install" to install the kernel, it will do all the stuff for you: installing the /bsd file and generating KARL files for the next boot. > I'll have to compile a new kernel and poke at it; it'll just be a matter > of remembering to redo it after patches, but I already had to redo the > config -e anyway. I use config(8) for some hosts using cupsd with usb printers, so I need to do config(8) stuff each time I upgrade (disabling ulpt(4)). It could be easily instrumented in /upgrade.site. Recompiling a kernel is a more complex task, not really doable in /upgrade.site. -- Sebastien Marie