ERROR while compiling the linux kernel 4.14.

Hello,

I am encountering errors while compiling the Linux kernel 4.14 and 4.14-rt from the following repositories:

I am using the following toolchain versions:

Initially, I encountered the following error:

In file included from scripts/selinux/genheaders/genheaders.c:19:
./security/selinux/include/classmap.h:247:2: error: #error New address family defined, please update secclass_map.
247 | #error New address family defined, please update secclass_map.
| ^~~~~

I resolved this by following the suggestion from this forum post: New address family defined, please update secclass_map.

After updating the recommended files and recompiling using the following command:

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- uImage dtbs LOADADDR=0x80008000 -j4

I encountered a new set of errors:

/tmp/cc8KpNfC.s: Assembler messages:
/tmp/cc8KpNfC.s:74: Error: selected processor does not support dmb ish' in ARM mode /tmp/cc8KpNfC.s:85: Error: selected processor does not support isb ’ in ARM mode
/tmp/cc8KpNfC.s:88: Error: selected processor does not support mrrc p15,1,r4,r5,c14' in ARM mode /tmp/cc8KpNfC.s:104: Error: selected processor does not support dmb ish’ in ARM mode

make[1]: *** [scripts/Makefile.build:327: arch/arm/vdso/vgettimeofday.o] Error 1
make[1]: *** Waiting for unfinished jobs…
make: *** [Makefile:1039: arch/arm/vdso] Error 2

make[1]: *** [scripts/Makefile.build:326: init/main.o] Error 1
make[1]: *** Waiting for unfinished jobs…

make[1]: *** [scripts/Makefile.build:326: arch/arm/kernel/ptrace.o] Error 1
make: *** [Makefile:1039: arch/arm/kernel] Error 2

The errors indicate that the selected processor does not support several ARM mode instructions such as dmb ish, isb, and others.

Could anyone please assist me in resolving these issues?

Thank you for your help.

Okay…so,

I am not 100% sure here but when I was building for those kernels:

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- uImage dtbs LOADADDR=0x80008000 -j4

Should be something like this instead:

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage dtbs LOADADDR=0x80008000 -j4

Also, on specific development desktops, if you have kernel 4.14.x installed, the CROSS_COMPILE=arm-liinux-gnueabihf- of a specified toolchain should already be installed via apt and that cross-compiler needs to be the correct one.

Seth

P.S. The reason I am not 100% sure of it right now is because this kernel is a bit older and unsupported. I have not been building for this kernel since '17 or '18. I am sorry I cannot be of further help so far. I will look through some older notes and see how far I get. I may not reply, i.e. I am not sure of my older notes thus far.

Also,

I think the LOADADDR= needs to be done in u-boot with the serial device.

So, something like this idea:

That could help a bit and I will keep looking for older notes.

Seth

P.S. Since this is an older kernel, this may help you also:

It’s 4.14, why are you building 4.14?

If you must, build it in a docker or vm from the same time frame. Your fighting ‘hostcc’ and it’s much newer binutls.