Kernel Build System and CFLAGS?

Test and fix the Kernel 4.14 features
Post Reply
ctrlbreak
Posts: 35
Joined: Sun May 27, 2018 1:43 am
languages_spoken: english
ODROIDs: XU4, HC2, C2
Contact:

Kernel Build System and CFLAGS?

Unread post by ctrlbreak » Tue Jun 12, 2018 7:37 am

Hey there,

I'm trying to compile ZFSonLInux on my XU4... which I can succeed in doing; but it appears to build a kernel module that tried to leverage invalid ARM instructions?

https://pastebin.com/mrZt9ZNC

Anyway, how can I tell if the kernel module is being compiled ensuring the proper architecture?

i.e.- -mcpu=cortex-a15.cortex-a7 -mtune=cortex-a15.cortex-a7

...as I understand it. Looking for pointers.

Thanks.

User avatar
odroid
Site Admin
Posts: 30028
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Contact:

Re: Kernel Build System and CFLAGS?

Unread post by odroid » Tue Jun 12, 2018 4:25 pm

Does the ZFSonLinix driver source exist in our current Kernel source tree?
https://github.com/hardkernel/linux/blo ... _defconfig

ctrlbreak
Posts: 35
Joined: Sun May 27, 2018 1:43 am
languages_spoken: english
ODROIDs: XU4, HC2, C2
Contact:

Re: Kernel Build System and CFLAGS?

Unread post by ctrlbreak » Thu Jun 14, 2018 4:17 am

No, I don't believe it does?

User avatar
odroid
Site Admin
Posts: 30028
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Contact:

Re: Kernel Build System and CFLAGS?

Unread post by odroid » Thu Jun 14, 2018 9:14 am

I think our kernel build CFLAGS should have no specific big-little(a15-a7) architecture.
Stock kernel-build has a generic "armv7" flag probably.

ctrlbreak
Posts: 35
Joined: Sun May 27, 2018 1:43 am
languages_spoken: english
ODROIDs: XU4, HC2, C2
Contact:

Re: Kernel Build System and CFLAGS?

Unread post by ctrlbreak » Thu Jun 14, 2018 9:48 pm

Okay. Thanks for that insight. I'm going *to try* to solve this issue with the ZFS build, and there is clearly a lot I'll need to learn, but I _have to start somewhere_. So far, these ODroid forums have been *significantly* more friendly than the ZFSonLinux community.

To my naive eyes "Internal error: Oops - undefined instruction: 0 [#1] PREEMPT SMP ARM" would surely indicate that something in the GCC compiling of the kernel module just doesn't quite match with the Exynos5422 CPU instruction set(?) :-/

Looks like I'll be doing some significant reading this weekend.

Cheers!

Post Reply

Return to “Linux Kernel 4.14 Debugging Party”

Who is online

Users browsing this forum: Bing [Bot] and 0 guests