WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: 8.x compile amd64 modules  (Read 2661 times)

Offline hiro

  • Hero Member
  • *****
  • Posts: 1229
8.x compile amd64 modules
« on: November 25, 2017, 08:52:14 PM »
i wanted to compile my own ath9k (DFS is missing in the provided wireless module), tried my usual procedure, cross-compiling the provided tarball with the provided .config and only slightly adjusting via make menuconfig.

but when i modprobe the new modules i get a kernel NULL pointer dereference.

for older tc versiosn this worked fine...

i used toolchain64.tcz, no idea where i have it from, can't find it in tce any more...

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11634
Re: 8.x compile amd64 modules
« Reply #1 on: November 25, 2017, 09:22:59 PM »
Hi hiro
i used toolchain64.tcz, no idea where i have it from, can't find it in tce any more...

You probably got it from TC4 or TC5.

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: 8.x compile amd64 modules
« Reply #2 on: November 25, 2017, 10:00:07 PM »
For all kernel modules I use

linux-kernel-sources-env.tcz
compiletc.tcz

However, linux-kernel-sources-env.tcz was updated back in mid October and we're still waiting for it to upload to the repo..  Maybe tomorrow?

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: 8.x compile amd64 modules
« Reply #3 on: November 25, 2017, 10:26:05 PM »
I've attached the latest linux-kernel-sources-env scrip with a few busybox fixes in case it helps



Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: 8.x compile amd64 modules
« Reply #4 on: November 26, 2017, 06:20:55 AM »
toolchain64 was used a few versions ago, but more recent versions had the 64-bit kernel compiled on corepure64. You can check the used gcc version in the first dmesg lines.
The only barriers that can stop you are the ones you create yourself.

Offline hiro

  • Hero Member
  • *****
  • Posts: 1229
Re: 8.x compile amd64 modules
« Reply #5 on: November 26, 2017, 06:34:51 AM »
should i take from this that compiling with a different gcc version might create modules that are not compatible?
i'm currently not on corepure, so i wonder if it's completely impossible for me to create modules and whether it might be easier to just make the whole kernel myself?

otherwise, might there be another reason that the provided .config or the kernel sources from http://tinycorelinux.net/8.x/x86/release/src/kernel/ are not fitting the running kernel/modules?
« Last Edit: November 26, 2017, 06:44:52 AM by hiro »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: 8.x compile amd64 modules
« Reply #6 on: November 26, 2017, 12:57:08 PM »
Yes, the gcc version must match exactly. You can use qemu to run a corepure64 VM; a couple gigs of disk space and >512mb ram for it should do.

Some options also change the base kernel image when enabled as modules; these will create incompatible modules with the old base kernel. There's no quick way to detect one, but they're rare.

Building the entire kernel is always an option, yeah.
The only barriers that can stop you are the ones you create yourself.

Offline hiro

  • Hero Member
  • *****
  • Posts: 1229
Re: 8.x compile amd64 modules
« Reply #7 on: December 08, 2017, 12:06:19 PM »
tried the qemu option, but i think virtio_blk is not in base
now going to try and copy the whole kernel instead.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: 8.x compile amd64 modules
« Reply #8 on: December 08, 2017, 01:10:19 PM »
It is, vda disks show up for me. And Qemu's emulated ide drives work too.
The only barriers that can stop you are the ones you create yourself.