PDA

View Full Version : nethunter kernel build - clang-10: error



morty luthier
2020-07-30, 15:42
hello,

i'm using Nethunter Kernel builder script to build the kernel for a samsung device .. it is an arm architecture.
I selected the first option in the menu, "N. NetHunter build = Create zip for NH-installer" , half way through building the kernel i get this error:

...
CC kernel/bounds.s
clang-10: error: unknown argument: '-mapcs'
clang-10: error: unknown argument: '-mno-sched-prolog'
clang-10: error: unknown argument: '-mno-thumb-interwork'
make[2]: *** [/home/xtech/Desktop/kernel/sm-700/./Kbuild:36: kernel/bounds.s] Error 1
make[1]: *** [/home/xtech/Desktop/kernel/sm-700/Makefile:1004: prepare0] Error 2
make: *** [Makefile:130: sub-make] Error 2
make: Leaving directory '/home/xtech/Desktop/kernel/sm-700'


real 0m2.555s
user 0m1.508s
sys 0m0.894s
make: Entering directory '/home/xtech/Desktop/kernel/sm-700'
cp: cannot stat '/home/xtech/Desktop/kernel/sm-700/kali-nethunter-kernel/out/modules.builtin': No such file or directory
make[1]: *** [/home/xtech/Desktop/kernel/sm-700/Makefile:1143: _modinst_] Error 1
make: *** [Makefile:130: sub-make] Error 2
make: Leaving directory '/home/xtech/Desktop/kernel/sm-700'


real 0m0.701s
user 0m0.392s
sys 0m0.286s
[ SUCCESS ] Kernel build completed
[ QUESTION ] Save .config as nethunter_defconfig? [y/n]

Arun Biju
2020-07-31, 00:20
Instead of selecting the first option can you select the second one see if you get a successful compilation i.e The test build option

morty luthier
2020-08-01, 11:32
even with the test build same error .. and this warning
/home/xtech/Desktop/kernel/sm-700/scripts/kconfig/confdata.c:705:19: warning: ?%s? directive writing likely 7 or more bytes into a region of size between 1 and 4097 [-Wformat-overflow=]

morty luthier
2020-08-01, 11:39
same error even with test build.

re4son
2020-08-03, 09:31
I can have a look at it if you want. Just post the link to the kernel source and to the local.config you are using.

What device are you building for?

morty luthier
2020-08-03, 12:52
hi the source code is here : https://opensource.samsung.com/uploadSearch?searchValue=sm-t705 =
SM-T705_HK_MM_Opensource.zip , klimtlte_00_defconfig


in the local.config file i just did this:

export ARCH=arm
export SUBARCH=arm
#CCD64="${TD}/aarch64-4.9"
#export CROSS_COMPILE=${CCD64}/bin/aarch64-linux-android-
#CROSS_COMPILE_SRC="https://images.kali.org/nethunter/toolchains/google_aarch64-4.9.tar.xz"
#CROSS_COMPILE_SRC_TYPE="wget"