Compile errors while building custom kernel

Hi all,

I am trying to build a custom kernel on the HiHey board with only USB 2 ports. But unfortunately, I am getting several compile errors which I don’t have a clue how to solve.

To build the kernel first I set the compiler and the architecture

export ARCH=arm64
export CROSS_COMPILE=/root/toolchain/bin/aarch64-linux-gnu-

then I run

make defconfig
make bindeb-pkg LOCALVERSION=-hikey-linaro -j9

below is the terminal output.

Blockquote
UPD include/config/kernel.release
sh ./scripts/package/mkdebian
dpkg-buildpackage -r"fakeroot -u" -a$(cat debian/arch) -b -nc -uc
dpkg-buildpackage: warning: using a gain-root-command while being root
dpkg-buildpackage: info: source package linux-5.7.0-rc4-hikey-linaro-00013-gfa1b808a7694
dpkg-buildpackage: info: source version 5.7.0-rc4-hikey-linaro-00013-gfa1b808a7694-1
dpkg-buildpackage: info: source distribution focal
dpkg-buildpackage: info: source changed by root root@sw-HP-Z400
dpkg-buildpackage: info: host architecture arm64
dpkg-source --before-build .
debian/rules build
make KERNELRELEASE=5.7.0-rc4-hikey-linaro-00013-gfa1b808a7694 ARCH=arm64 KBUILD_BUILD_VERSION=1 -f ./Makefile
UPD include/generated/utsrelease.h
DTC arch/arm64/boot/dts/qcom/apq8016-sbc.dtb
DTC arch/arm64/boot/dts/synaptics/berlin4ct-dmp.dtb
DTC arch/arm64/boot/dts/ti/k3-am654-base-board.dtb
DTC arch/arm64/boot/dts/qcom/apq8096-db820c.dtb
DTC arch/arm64/boot/dts/qcom/apq8096-ifc6640.dtb
DTC arch/arm64/boot/dts/xilinx/avnet-ultra96-rev1.dtb
DTC arch/arm64/boot/dts/zte/zx296718-evb.dtb
DTC arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dtb
DTC arch/arm64/boot/dts/synaptics/berlin4ct-stb.dtb
arch/arm64/boot/dts/qcom/ipq6018.dtsi:127.3-14: Warning (dma_ranges_format): /soc:dma-ranges: empty “dma-ranges” property but its #address-cells (1) differs from / (2)
arch/arm64/boot/dts/qcom/ipq6018.dtsi:127.3-14: Warning (dma_ranges_format): /soc:dma-ranges: empty “dma-ranges” property but its #size-cells (1) differs from / (2)
DTC arch/arm64/boot/dts/zte/zx296718-pcbox.dtb
DTC arch/arm64/boot/dts/qcom/ipq8074-hk01.dtb
DTC arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dtb
DTC arch/arm64/boot/dts/qcom/msm8916-mtp.dtb
DTC arch/arm64/boot/dts/xilinx/zynqmp-zc1232-revA.dtb
CALL scripts/atomic/check-atomics.sh
DTC arch/arm64/boot/dts/xilinx/zynqmp-zc1254-revA.dtb
DTC arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dtb
DTC arch/arm64/boot/dts/qcom/msm8916-samsung-a3u-eur.dtb
DTC arch/arm64/boot/dts/xilinx/zynqmp-zc1275-revA.dtb
DTC arch/arm64/boot/dts/qcom/msm8916-samsung-a5u-eur.dtb
DTC arch/arm64/boot/dts/xilinx/zynqmp-zc1751-xm015-dc1.dtb
DTC arch/arm64/boot/dts/qcom/msm8992-bullhead-rev-101.dtb
DTC arch/arm64/boot/dts/qcom/msm8994-angler-rev-101.dtb
DTC arch/arm64/boot/dts/xilinx/zynqmp-zc1751-xm016-dc2.dtb
CALL scripts/checksyscalls.sh
DTC arch/arm64/boot/dts/xilinx/zynqmp-zc1751-xm017-dc3.dtb
DTC arch/arm64/boot/dts/qcom/msm8996-mtp.dtb
DTC arch/arm64/boot/dts/xilinx/zynqmp-zc1751-xm018-dc4.dtb
DTC arch/arm64/boot/dts/qcom/msm8998-asus-novago-tp370ql.dtb
DTC arch/arm64/boot/dts/xilinx/zynqmp-zc1751-xm019-dc5.dtb
DTC arch/arm64/boot/dts/qcom/msm8998-hp-envy-x2.dtb
DTC arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dtb
DTC arch/arm64/boot/dts/qcom/msm8998-lenovo-miix-630.dtb
DTC arch/arm64/boot/dts/qcom/msm8998-mtp.dtb
DTC arch/arm64/boot/dts/xilinx/zynqmp-zcu102-revA.dtb
DTC arch/arm64/boot/dts/xilinx/zynqmp-zcu102-revB.dtb
DTC arch/arm64/boot/dts/qcom/sc7180-idp.dtb
LDS arch/arm64/kernel/vdso/vdso.lds
DTC arch/arm64/boot/dts/xilinx/zynqmp-zcu102-rev1.0.dtb
DTC arch/arm64/boot/dts/xilinx/zynqmp-zcu104-revA.dtb
CC arch/arm64/kernel/vdso/vgettimeofday.o
Error: arch/arm64/boot/dts/qcom/sc7180.dtsi:1450.33-34 syntax error
FATAL ERROR: Unable to parse input tree
AS arch/arm64/kernel/vdso/note.o
DTC arch/arm64/boot/dts/xilinx/zynqmp-zcu106-revA.dtb
make[5]: *** [scripts/Makefile.lib:296: arch/arm64/boot/dts/qcom/sc7180-idp.dtb] Error 1
make[5]: *** Waiting for unfinished jobs…
DTC arch/arm64/boot/dts/xilinx/zynqmp-zcu111-revA.dtb
AS arch/arm64/kernel/vdso/sigreturn.o
make[4]: *** [scripts/Makefile.build:488: arch/arm64/boot/dts/qcom] Error 2
make[4]: *** Waiting for unfinished jobs…
make[3]: *** [Makefile:1272: dtbs] Error 2
make[3]: *** Waiting for unfinished jobs…
LD arch/arm64/kernel/vdso/vdso.so.dbg
VDSOSYM include/generated/vdso-offsets.h
make[2]: *** [debian/rules:6: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
make[1]: *** [scripts/Makefile.package:83: bindeb-pkg] Error 2
make: *** [Makefile:1453: bindeb-pkg] Error 2

I don’t have any idea how to solve this. Could you please help me?

Regards,
Artur

Well, this custom kernel as some devicetree format issues. Either remove the bad one or disable CONFIG_ARCH_QCOM from your config. Is it a public kernel? do you have an hikey960_defconfig?

Removing the “CONFIG_ARCH_QCOM” helps building thank you. It is a public kernel. I was looking for the “hikey960_defconfig” but didn’t find it, that is why I just use the “defconfig”.