Kernel Build System and CFLAGS?

Test and fix the Kernel 4.14 features

Moderators: odroid, mdrjr

Kernel Build System and CFLAGS?

Unread postby 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.
ctrlbreak
 
Posts: 20
Joined: Sun May 27, 2018 1:43 am
languages_spoken: english
ODROIDs: XU4, HC2, C2

Re: Kernel Build System and CFLAGS?

Unread postby 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
User avatar
odroid
Site Admin
 
Posts: 27924
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Kernel Build System and CFLAGS?

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

No, I don't believe it does?
ctrlbreak
 
Posts: 20
Joined: Sun May 27, 2018 1:43 am
languages_spoken: english
ODROIDs: XU4, HC2, C2

Re: Kernel Build System and CFLAGS?

Unread postby 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.
User avatar
odroid
Site Admin
 
Posts: 27924
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Kernel Build System and CFLAGS?

Unread postby 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!
ctrlbreak
 
Posts: 20
Joined: Sun May 27, 2018 1:43 am
languages_spoken: english
ODROIDs: XU4, HC2, C2


Return to Linux Kernel 4.14 Debugging Party

Who is online

Users browsing this forum: No registered users and 1 guest