Welcome! Log In Create A New Profile

Advanced

Executables in linux-headers deb pkg are x86-64

Posted by renojim 
Executables in linux-headers deb pkg are x86-64
May 18, 2022 07:59PM
I'm finally getting around to updating the kernel on my Dockstar and I have to rebuild the LKMs I created. Make fails because the executables in /usr/src/linux-headers-5.17.4-kirkwood-tld-1/scripts/ are x86-64. I thought I could just "make" what I needed (it worked for fixdep, not modpost), but that is proving to be troublesome. Looking at the last kernel I had (4.8.3) the executables are ARM. The package on my M300 (5.16.5) has the same problem.

If this is intentional and I just need to rebuild everything I'll continue down that path, but if not, the ARM executables would be nice to have in the package.
Re: Executables in linux-headers deb pkg are x86-64
May 18, 2022 10:34PM
renojim,

> If this is intentional and I just need to rebuild
> everything I'll continue down that path, but if
> not, the ARM executables would be nice to have in
> the package.

Not intentional! thanks for reporting this.

Not sure why that could happen, though. It was built at the same time as linux-image-5.17.4-kirkwood-tld-1 in Linaro cross-compile environment.

I'll take a look.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Executables in linux-headers deb pkg are x86-64
May 19, 2022 03:38PM
renojim,

> > If this is intentional and I just need to
> rebuild
> > everything I'll continue down that path,

I've verified what you saw. But I'm a bit short on time right now to dig deeper, please rebuild the binaries you need. Is that a few or a lot?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Executables in linux-headers deb pkg are x86-64
May 20, 2022 03:20PM
I've rebuild the kernel headers. Will upload it shortly.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Executables in linux-headers deb pkg are x86-64
May 20, 2022 03:30PM
bodhi, thanks for looking into it. The only ones I know that I need are fixdep and modpost and that's because that's where the make fails. I've haven't tried to understand the complexities of what happens when I run make on what on the surface looks like a simple Makfile for LKMs, but clearly there's a lot more going on than what's on the surface.

I copied the binaries from the 4.8.3 kernel files and that may work. I think the output of whatever modpost does gave me an error, but I hacked one of the header files (vermagic.h) to get around it. I don't know if having if using the wrong modpost is really the problem, but I'm going to keep forging ahead. I've been unable to build modpost. Trying to use the various Makefiles in the tree always gives some error or another, but then again I don't really know what I'm doing (I wish I did). At least make produces a .ko file now, but so far it's not usable with an "unknown symbol" error when I try to insmod it.

Interrupt handlers seem to have changed from 4 to 5, so figuring that out will probably keep me busy for a while. There's no rush. I've been meaning to update the kernel for years, so a little longer is no big deal.

Thanks,
-JT
Re: Executables in linux-headers deb pkg are x86-64
May 20, 2022 03:52PM
Give this a try. Purge it and reinstall with the new headers deb.
dpkg --purge linux-headers-5.17.4-kirkwood-tld-1
dpkg -i linux-headers-5.17.4-kirkwood-tld-1_1.0_armel.deb


https://forum.doozan.com/read.php?2,12096,12096#msg-12096

Quote

Updated: apparently the kernel headers has some problem. So I've rebuilt it and uploaded to Dropbox. Please use this headers package instead if you need to build out-of-tree module. Otherwise, ignore this kernel headers update.

https://www.dropbox.com/s/55rsqliecssdphi/linux-headers-5.17.4-kirkwood-tld-1_1.0_armel.deb
md5:
0b2b1e5e5193c247a89eef4680296f20 linux-headers-5.17.4-kirkwood-tld-1_1.0_armel.deb
sha256sum
3da6edcb85bb8869801d40a0b01543364550f355474d36c3fc3dfdf5ada9bded

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Executables in linux-headers deb pkg are x86-64
May 20, 2022 05:15PM
Looks good! I was able to build my "Hello, world!" kernel module without any problem. I'm still having issues with the interrupt handler, but I'm sure that's more about trying to figure out what changed between kernel versions.

Thanks!
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: