Help! Try to Build Lineage OS - LineageOS Questions & Answers

Hello I'm "the new"
I was trying to build Lineage OS for a Gigaset GX290 following this Instructions: https://gist.github.com/schoeller/904611a4baa1bae4107a4e3748e4746e
(in this case I try the recipe for 19.1, but with the legacy 17.1 I get the same error)
But it didn't work and brake up by 53% with the following output:
Code:
done
/bin/sh: 8: /home/macbook/android/lineage/kernel/gigaset/gx290/tools/dct/DrvGen.py: not found
make[1]: *** [/home/macbook/android/lineage/kernel/gigaset/gx290/scripts/drvgen/drvgen.mk:63: arch/arm64/boot/dts/k63v2_64_bsp/cust.dtsi] Fehler 127
make[1]: *** Auf noch nicht beendete Prozesse wird gewartet …
HOSTCC scripts/basic/bin2c
make[1]: Verzeichnis „/home/macbook/android/lineage/out/target/product/GX290/obj/DTB_OBJ“ wird verlassen
make: *** [Makefile:152: sub-make] Fehler 2
make: Verzeichnis „/home/macbook/android/lineage/kernel/gigaset/gx290“ wird verlassen
17:45:01 ninja failed with: exit status 1
#### failed to build some targets (03:47:06 (hh:mm:ss)) ####
I try to Build on a fresh System with following specs:
Kubuntu
Macbook Pro mid2012, i5, 16Gb Ram, 400Gb Space
ccache with compression and max 25Gb cache file
I hope anyone has an idea about that..
PS. Here ist the full output since I found the first "FAILED" in it:
Spoiler: Full Code
Code:
[ 53% 73182/137674] Building Kernel Image (Image.gz-dtb)
FAILED: out/target/product/GX290/obj/KERNEL_OBJ/arch/arm64/boot/Image.gz-dtb
/bin/bash -c "(PATH=/home/macbook/android/lineage/out/host/linux-x86/bin:\$PATH PATH=/home/macbook/android/lineage/prebuilts/clang/host/linux-x86/clang-r416183b1/bin:\$PATH LD_LIBRARY_PATH=/home/macbook/android/lineage/prebuilts/clang/host/linux-x86/clang-r416183b1/lib64:\$LD_LIBRARY_PATH PATH=/home/macbook/android/lineage/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin:\$PATH LD_LIBRARY_PATH=/home/macbook/android/lineage/prebuilts/tools-lineage/linux-x86/lib:\$LD_LIBRARY_PATH PERL5LIB=/home/macbook/android/lineage/prebuilts/tools-lineage/common/perl-base PATH=/home/macbook/android/lineage/prebuilts/tools-lineage/linux-x86/bin:/home/macbook/android/lineage/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin:\$PATH BISON_PKGDATADIR=/home/macbook/android/lineage/prebuilts/build-tools/common/bison /home/macbook/android/lineage/prebuilts/build-tools/linux-x86/bin/make -j4 CFLAGS_MODULE=\"-fno-pic\" CPATH=\"/usr/include:/usr/include/x86_64-linux-gnu\" HOSTCFLAGS=\"-fuse-ld=lld\" HOSTLDFLAGS=\"-L/usr/lib/x86_64-linux-gnu -L/usr/lib64 -fuse-ld=lld\" DTC=/home/macbook/android/lineage/prebuilts/misc/linux-x86/dtc/dtc MKDTIMG=/home/macbook/android/lineage/prebuilts/misc/linux-x86/libufdt/mkdtimg HOSTCC=/home/macbook/android/lineage/prebuilts/clang/host/linux-x86/clang-r416183b1/bin/clang HOSTCXX=/home/macbook/android/lineage/prebuilts/clang/host/linux-x86/clang-r416183b1/bin/clang++ LEX=/home/macbook/android/lineage/prebuilts/build-tools/linux-x86/bin/flex YACC=/home/macbook/android/lineage/prebuilts/build-tools/linux-x86/bin/bison M4=/home/macbook/android/lineage/prebuilts/build-tools/linux-x86/bin/m4 -C kernel/gigaset/gx290 O=/home/macbook/android/lineage/out/target/product/GX290/obj/KERNEL_OBJ ARCH=arm64 CROSS_COMPILE=\"/home/macbook/android/lineage/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-\" CROSS_COMPILE_ARM32=\"/home/macbook/android/lineage/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androidkernel-\" CROSS_COMPILE_COMPAT=\"/home/macbook/android/lineage/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androidkernel-\" CLANG_TRIPLE=aarch64-linux-gnu- CC=\" clang\" Image.gz-dtb ) && (if grep -q '^CONFIG_OF=y' out/target/product/GX290/obj/KERNEL_OBJ/.config; then echo \"Building DTBs\"; PATH=/home/macbook/android/lineage/out/host/linux-x86/bin:\$PATH PATH=/home/macbook/android/lineage/prebuilts/clang/host/linux-x86/clang-r416183b1/bin:\$PATH LD_LIBRARY_PATH=/home/macbook/android/lineage/prebuilts/clang/host/linux-x86/clang-r416183b1/lib64:\$LD_LIBRARY_PATH PATH=/home/macbook/android/lineage/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin:\$PATH LD_LIBRARY_PATH=/home/macbook/android/lineage/prebuilts/tools-lineage/linux-x86/lib:\$LD_LIBRARY_PATH PERL5LIB=/home/macbook/android/lineage/prebuilts/tools-lineage/common/perl-base PATH=/home/macbook/android/lineage/prebuilts/tools-lineage/linux-x86/bin:/home/macbook/android/lineage/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin:\$PATH BISON_PKGDATADIR=/home/macbook/android/lineage/prebuilts/build-tools/common/bison /home/macbook/android/lineage/prebuilts/build-tools/linux-x86/bin/make -j4 CFLAGS_MODULE=\"-fno-pic\" CPATH=\"/usr/include:/usr/include/x86_64-linux-gnu\" HOSTCFLAGS=\"-fuse-ld=lld\" HOSTLDFLAGS=\"-L/usr/lib/x86_64-linux-gnu -L/usr/lib64 -fuse-ld=lld\" DTC=/home/macbook/android/lineage/prebuilts/misc/linux-x86/dtc/dtc MKDTIMG=/home/macbook/android/lineage/prebuilts/misc/linux-x86/libufdt/mkdtimg HOSTCC=/home/macbook/android/lineage/prebuilts/clang/host/linux-x86/clang-r416183b1/bin/clang HOSTCXX=/home/macbook/android/lineage/prebuilts/clang/host/linux-x86/clang-r416183b1/bin/clang++ LEX=/home/macbook/android/lineage/prebuilts/build-tools/linux-x86/bin/flex YACC=/home/macbook/android/lineage/prebuilts/build-tools/linux-x86/bin/bison M4=/home/macbook/android/lineage/prebuilts/build-tools/linux-x86/bin/m4 -C kernel/gigaset/gx290 O=/home/macbook/android/lineage/out/target/product/GX290/obj/KERNEL_OBJ ARCH=arm64 CROSS_COMPILE=\"/home/macbook/android/lineage/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-\" CROSS_COMPILE_ARM32=\"/home/macbook/android/lineage/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androidkernel-\" CROSS_COMPILE_COMPAT=\"/home/macbook/android/lineage/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androidkernel-\" CLANG_TRIPLE=aarch64-linux-gnu- CC=\" clang\" dtbs; fi ) && (if grep -q '=m' out/target/product/GX290/obj/KERNEL_OBJ/.config; then echo \"Building Kernel Modules\"; PATH=/home/macbook/android/lineage/out/host/linux-x86/bin:\$PATH PATH=/home/macbook/android/lineage/prebuilts/clang/host/linux-x86/clang-r416183b1/bin:\$PATH LD_LIBRARY_PATH=/home/macbook/android/lineage/prebuilts/clang/host/linux-x86/clang-r416183b1/lib64:\$LD_LIBRARY_PATH PATH=/home/macbook/android/lineage/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin:\$PATH LD_LIBRARY_PATH=/home/macbook/android/lineage/prebuilts/tools-lineage/linux-x86/lib:\$LD_LIBRARY_PATH PERL5LIB=/home/macbook/android/lineage/prebuilts/tools-lineage/common/perl-base PATH=/home/macbook/android/lineage/prebuilts/tools-lineage/linux-x86/bin:/home/macbook/android/lineage/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin:\$PATH BISON_PKGDATADIR=/home/macbook/android/lineage/prebuilts/build-tools/common/bison /home/macbook/android/lineage/prebuilts/build-tools/linux-x86/bin/make -j4 CFLAGS_MODULE=\"-fno-pic\" CPATH=\"/usr/include:/usr/include/x86_64-linux-gnu\" HOSTCFLAGS=\"-fuse-ld=lld\" HOSTLDFLAGS=\"-L/usr/lib/x86_64-linux-gnu -L/usr/lib64 -fuse-ld=lld\" DTC=/home/macbook/android/lineage/prebuilts/misc/linux-x86/dtc/dtc MKDTIMG=/home/macbook/android/lineage/prebuilts/misc/linux-x86/libufdt/mkdtimg HOSTCC=/home/macbook/android/lineage/prebuilts/clang/host/linux-x86/clang-r416183b1/bin/clang HOSTCXX=/home/macbook/android/lineage/prebuilts/clang/host/linux-x86/clang-r416183b1/bin/clang++ LEX=/home/macbook/android/lineage/prebuilts/build-tools/linux-x86/bin/flex YACC=/home/macbook/android/lineage/prebuilts/build-tools/linux-x86/bin/bison M4=/home/macbook/android/lineage/prebuilts/build-tools/linux-x86/bin/m4 -C kernel/gigaset/gx290 O=/home/macbook/android/lineage/out/target/product/GX290/obj/KERNEL_OBJ ARCH=arm64 CROSS_COMPILE=\"/home/macbook/android/lineage/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-\" CROSS_COMPILE_ARM32=\"/home/macbook/android/lineage/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androidkernel-\" CROSS_COMPILE_COMPAT=\"/home/macbook/android/lineage/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androidkernel-\" CLANG_TRIPLE=aarch64-linux-gnu- CC=\" clang\" modules || exit \"\$?\"; echo \"Installing Kernel Modules\"; PATH=/home/macbook/android/lineage/out/host/linux-x86/bin:\$PATH PATH=/home/macbook/android/lineage/prebuilts/clang/host/linux-x86/clang-r416183b1/bin:\$PATH LD_LIBRARY_PATH=/home/macbook/android/lineage/prebuilts/clang/host/linux-x86/clang-r416183b1/lib64:\$LD_LIBRARY_PATH PATH=/home/macbook/android/lineage/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin:\$PATH LD_LIBRARY_PATH=/home/macbook/android/lineage/prebuilts/tools-lineage/linux-x86/lib:\$LD_LIBRARY_PATH PERL5LIB=/home/macbook/android/lineage/prebuilts/tools-lineage/common/perl-base PATH=/home/macbook/android/lineage/prebuilts/tools-lineage/linux-x86/bin:/home/macbook/android/lineage/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin:\$PATH BISON_PKGDATADIR=/home/macbook/android/lineage/prebuilts/build-tools/common/bison /home/macbook/android/lineage/prebuilts/build-tools/linux-x86/bin/make -j4 CFLAGS_MODULE=\"-fno-pic\" CPATH=\"/usr/include:/usr/include/x86_64-linux-gnu\" HOSTCFLAGS=\"-fuse-ld=lld\" HOSTLDFLAGS=\"-L/usr/lib/x86_64-linux-gnu -L/usr/lib64 -fuse-ld=lld\" DTC=/home/macbook/android/lineage/prebuilts/misc/linux-x86/dtc/dtc MKDTIMG=/home/macbook/android/lineage/prebuilts/misc/linux-x86/libufdt/mkdtimg HOSTCC=/home/macbook/android/lineage/prebuilts/clang/host/linux-x86/clang-r416183b1/bin/clang HOSTCXX=/home/macbook/android/lineage/prebuilts/clang/host/linux-x86/clang-r416183b1/bin/clang++ LEX=/home/macbook/android/lineage/prebuilts/build-tools/linux-x86/bin/flex YACC=/home/macbook/android/lineage/prebuilts/build-tools/linux-x86/bin/bison M4=/home/macbook/android/lineage/prebuilts/build-tools/linux-x86/bin/m4 -C kernel/gigaset/gx290 O=/home/macbook/android/lineage/out/target/product/GX290/obj/KERNEL_OBJ ARCH=arm64 CROSS_COMPILE=\"/home/macbook/android/lineage/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-\" CROSS_COMPILE_ARM32=\"/home/macbook/android/lineage/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androidkernel-\" CROSS_COMPILE_COMPAT=\"/home/macbook/android/lineage/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androidkernel-\" CLANG_TRIPLE=aarch64-linux-gnu- CC=\" clang\" INSTALL_MOD_PATH=/home/macbook/android/lineage/out/target/product/GX290/obj/PACKAGING/kernel_modules_intermediates INSTALL_MOD_STRIP=1 modules_install; kernel_release=\$(cat out/target/product/GX290/obj/KERNEL_OBJ/include/config/kernel.release) kernel_modules_dir=/home/macbook/android/lineage/out/target/product/GX290/obj/PACKAGING/kernel_modules_intermediates/lib/modules/\$kernel_release ; modules=\$(find \$kernel_modules_dir -type f -name '*.ko'); ( mkdir -p out/target/product/GX290/vendor/lib/modules ) && (cp \$modules out/target/product/GX290/vendor/lib/modules/ ) && (rm -rf /home/macbook/android/lineage/out/target/product/GX290/obj/PACKAGING/depmod_vendor_intermediates ) && (mkdir -p /home/macbook/android/lineage/out/target/product/GX290/obj/PACKAGING/depmod_vendor_intermediates/lib/modules/0.0/vendor/lib/modules ) && (cp \$modules /home/macbook/android/lineage/out/target/product/GX290/obj/PACKAGING/depmod_vendor_intermediates/lib/modules/0.0/vendor/lib/modules ) && (out/host/linux-x86/bin/depmod -b /home/macbook/android/lineage/out/target/product/GX290/obj/PACKAGING/depmod_vendor_intermediates 0.0 ) && (sed -e 's/\\(.*modules.*\\):/\\/\\1:/g' -e 's/ \\([^ ]*modules[^ ]*\\)/ \\/\\1/g' /home/macbook/android/lineage/out/target/product/GX290/obj/PACKAGING/depmod_vendor_intermediates/lib/modules/0.0/modules.dep > out/target/product/GX290/vendor/lib/modules/modules.dep ) && (cp /home/macbook/android/lineage/out/target/product/GX290/obj/PACKAGING/depmod_vendor_intermediates/lib/modules/0.0/modules.softdep out/target/product/GX290/vendor/lib/modules ) && (cp /home/macbook/android/lineage/out/target/product/GX290/obj/PACKAGING/depmod_vendor_intermediates/lib/modules/0.0/modules.alias out/target/product/GX290/vendor/lib/modules ) && (rm -f out/target/product/GX290/vendor/lib/modules/modules.load ) && (for MODULE in ; do basename \$MODULE >> out/target/product/GX290/vendor/lib/modules/modules.load; done); fi )"
make: Verzeichnis „/home/macbook/android/lineage/kernel/gigaset/gx290“ wird betreten
make[1]: Verzeichnis „/home/macbook/android/lineage/out/target/product/GX290/obj/KERNEL_OBJ“ wird betreten
GEN ./Makefile
scripts/kconfig/conf --silentoldconfig Kconfig
drivers/input/touchscreen/mediatek/hxchipset_spi/Kconfig:95:warning: ignoring type redefinition of 'TOUCHSCREEN_HIMAX_DEBUG' from 'tristate' to 'boolean'
drivers/input/touchscreen/mediatek/hxchipset_spi/Kconfig:112:warning: ignoring type redefinition of 'HMX_DB' from 'tristate' to 'boolean'
CHK include/config/kernel.release
GEN ./Makefile
WRAP arch/arm64/include/generated/asm/bugs.h
WRAP arch/arm64/include/generated/asm/clkdev.h
WRAP arch/arm64/include/generated/asm/cputime.h
WRAP arch/arm64/include/generated/asm/delay.h
WRAP arch/arm64/include/generated/asm/div64.h
WRAP arch/arm64/include/generated/asm/dma.h
WRAP arch/arm64/include/generated/asm/dma-contiguous.h
WRAP arch/arm64/include/generated/asm/early_ioremap.h
WRAP arch/arm64/include/generated/asm/emergency-restart.h
WRAP arch/arm64/include/generated/asm/errno.h
WRAP arch/arm64/include/generated/asm/hw_irq.h
WRAP arch/arm64/include/generated/asm/ioctl.h
WRAP arch/arm64/include/generated/asm/ioctls.h
WRAP arch/arm64/include/generated/asm/ipcbuf.h
CHK include/generated/uapi/linux/version.h
WRAP arch/arm64/include/generated/asm/irq_regs.h
WRAP arch/arm64/include/generated/asm/kdebug.h
UPD include/generated/uapi/linux/version.h
WRAP arch/arm64/include/generated/asm/kmap_types.h
WRAP arch/arm64/include/generated/asm/kvm_para.h
WRAP arch/arm64/include/generated/asm/local.h
WRAP arch/arm64/include/generated/asm/local64.h
WRAP arch/arm64/include/generated/asm/mcs_spinlock.h
WRAP arch/arm64/include/generated/asm/mm-arch-hooks.h
for i in /home/macbook/android/lineage/kernel/gigaset/gx290/arch/arm64/boot/dts/mediatek/k63v2_64_bsp.dts; do \
base_prj=`grep -m 1 '#include [<\"].*\/cust\.dtsi[>\"]' $i | sed 's/#include [<"]//g'\
| sed 's/\/cust\.dtsi[>"]//g' | sed 's/\/\*//g' | sed 's/\*\///g' | sed 's/ //g'`\
prj_path=./arch/arm64/boot/dts/$base_prj ;\
dws_path=/home/macbook/android/lineage/kernel/gigaset/gx290/drivers/misc/mediatek/dws/mt6763/$base_prj.dws ;\
if [ -f $dws_path ] ; then \
mkdir -p $prj_path ;\
/home/macbook/android/lineage/kernel/gigaset/gx290/tools/dct/DrvGen.py $dws_path $prj_path $prj_path cust_dtsi;\
fi \
done
WRAP arch/arm64/include/generated/asm/mman.h
UPD include/config/kernel.release
WRAP arch/arm64/include/generated/asm/msgbuf.h
HOSTCC scripts/basic/fixdep
WRAP arch/arm64/include/generated/asm/msi.h
WRAP arch/arm64/include/generated/asm/mutex.h
WRAP arch/arm64/include/generated/asm/poll.h
WRAP arch/arm64/include/generated/asm/preempt.h
WRAP arch/arm64/include/generated/asm/resource.h
WRAP arch/arm64/include/generated/asm/rwsem.h
for i in /home/macbook/android/lineage/kernel/gigaset/gx290/arch/arm64/boot/dts/mediatek/k63v2_64_bsp.dts; do \
base_prj=`grep -m 1 '#include [<\"].*\/cust\.dtsi[>\"]' $i | sed 's/#include [<"]//g'\
| sed 's/\/cust\.dtsi[>"]//g' | sed 's/\/\*//g' | sed 's/\*\///g' | sed 's/ //g'`\
prj_path=./arch/arm64/boot/dts/$base_prj ;\
dws_path=/home/macbook/android/lineage/kernel/gigaset/gx290/drivers/misc/mediatek/dws/mt6763/$base_prj.dws ;\
if [ -f $dws_path ] ; then \
mkdir -p $prj_path ;\
/home/macbook/android/lineage/kernel/gigaset/gx290/tools/dct/DrvGen.py $dws_path $prj_path $prj_path cust_dtsi;\
fi \
done
WRAP arch/arm64/include/generated/asm/segment.h
WRAP arch/arm64/include/generated/asm/sembuf.h
WRAP arch/arm64/include/generated/asm/serial.h
WRAP arch/arm64/include/generated/asm/shmbuf.h
WRAP arch/arm64/include/generated/asm/simd.h
WRAP arch/arm64/include/generated/asm/sizes.h
/bin/sh: 8: /home/macbook/android/lineage/kernel/gigaset/gx290/tools/dct/DrvGen.py: not found
WRAP arch/arm64/include/generated/asm/socket.h
make[1]: *** [/home/macbook/android/lineage/kernel/gigaset/gx290/scripts/drvgen/drvgen.mk:63: arch/arm64/boot/dts/k63v2_64_bsp/cust.dtsi] Fehler 127
make[1]: *** Auf noch nicht beendete Prozesse wird gewartet …
WRAP arch/arm64/include/generated/asm/sockios.h
WRAP arch/arm64/include/generated/asm/swab.h
WRAP arch/arm64/include/generated/asm/switch_to.h
WRAP arch/arm64/include/generated/asm/termbits.h
WRAP arch/arm64/include/generated/asm/termios.h
WRAP arch/arm64/include/generated/asm/trace_clock.h
WRAP arch/arm64/include/generated/asm/types.h
WRAP arch/arm64/include/generated/asm/unaligned.h
WRAP arch/arm64/include/generated/asm/user.h
WRAP arch/arm64/include/generated/asm/vga.h
WRAP arch/arm64/include/generated/asm/xor.h
WRAP arch/arm64/include/generated/uapi/asm/kvm_para.h
HOSTCC scripts/basic/bin2c
make[1]: Verzeichnis „/home/macbook/android/lineage/out/target/product/GX290/obj/KERNEL_OBJ“ wird verlassen
make: *** [Makefile:152: sub-make] Fehler 2
make: Verzeichnis „/home/macbook/android/lineage/kernel/gigaset/gx290“ wird verlassen
[ 53% 73185/137674] Building dtb.img
FAILED: out/target/product/GX290/dtb.img
/bin/bash -c "(PATH=/home/macbook/android/lineage/out/host/linux-x86/bin:\$PATH PATH=/home/macbook/android/lineage/prebuilts/clang/host/linux-x86/clang-r416183b1/bin:\$PATH LD_LIBRARY_PATH=/home/macbook/android/lineage/prebuilts/clang/host/linux-x86/clang-r416183b1/lib64:\$LD_LIBRARY_PATH PATH=/home/macbook/android/lineage/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin:\$PATH LD_LIBRARY_PATH=/home/macbook/android/lineage/prebuilts/tools-lineage/linux-x86/lib:\$LD_LIBRARY_PATH PERL5LIB=/home/macbook/android/lineage/prebuilts/tools-lineage/common/perl-base PATH=/home/macbook/android/lineage/prebuilts/tools-lineage/linux-x86/bin:/home/macbook/android/lineage/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin:\$PATH BISON_PKGDATADIR=/home/macbook/android/lineage/prebuilts/build-tools/common/bison /home/macbook/android/lineage/prebuilts/build-tools/linux-x86/bin/make -j4 CFLAGS_MODULE=\"-fno-pic\" CPATH=\"/usr/include:/usr/include/x86_64-linux-gnu\" HOSTCFLAGS=\"-fuse-ld=lld\" HOSTLDFLAGS=\"-L/usr/lib/x86_64-linux-gnu -L/usr/lib64 -fuse-ld=lld\" DTC=/home/macbook/android/lineage/prebuilts/misc/linux-x86/dtc/dtc MKDTIMG=/home/macbook/android/lineage/prebuilts/misc/linux-x86/libufdt/mkdtimg HOSTCC=/home/macbook/android/lineage/prebuilts/clang/host/linux-x86/clang-r416183b1/bin/clang HOSTCXX=/home/macbook/android/lineage/prebuilts/clang/host/linux-x86/clang-r416183b1/bin/clang++ LEX=/home/macbook/android/lineage/prebuilts/build-tools/linux-x86/bin/flex YACC=/home/macbook/android/lineage/prebuilts/build-tools/linux-x86/bin/bison M4=/home/macbook/android/lineage/prebuilts/build-tools/linux-x86/bin/m4 -C kernel/gigaset/gx290 O=/home/macbook/android/lineage/out/target/product/GX290/obj/DTB_OBJ ARCH=arm64 CROSS_COMPILE=\"/home/macbook/android/lineage/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-\" CROSS_COMPILE_ARM32=\"/home/macbook/android/lineage/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androidkernel-\" CROSS_COMPILE_COMPAT=\"/home/macbook/android/lineage/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androidkernel-\" CLANG_TRIPLE=aarch64-linux-gnu- CC=\" clang\" gx290_defconfig ) && (PATH=/home/macbook/android/lineage/out/host/linux-x86/bin:\$PATH PATH=/home/macbook/android/lineage/prebuilts/clang/host/linux-x86/clang-r416183b1/bin:\$PATH LD_LIBRARY_PATH=/home/macbook/android/lineage/prebuilts/clang/host/linux-x86/clang-r416183b1/lib64:\$LD_LIBRARY_PATH PATH=/home/macbook/android/lineage/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin:\$PATH LD_LIBRARY_PATH=/home/macbook/android/lineage/prebuilts/tools-lineage/linux-x86/lib:\$LD_LIBRARY_PATH PERL5LIB=/home/macbook/android/lineage/prebuilts/tools-lineage/common/perl-base PATH=/home/macbook/android/lineage/prebuilts/tools-lineage/linux-x86/bin:/home/macbook/android/lineage/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin:\$PATH BISON_PKGDATADIR=/home/macbook/android/lineage/prebuilts/build-tools/common/bison /home/macbook/android/lineage/prebuilts/build-tools/linux-x86/bin/make -j4 CFLAGS_MODULE=\"-fno-pic\" CPATH=\"/usr/include:/usr/include/x86_64-linux-gnu\" HOSTCFLAGS=\"-fuse-ld=lld\" HOSTLDFLAGS=\"-L/usr/lib/x86_64-linux-gnu -L/usr/lib64 -fuse-ld=lld\" DTC=/home/macbook/android/lineage/prebuilts/misc/linux-x86/dtc/dtc MKDTIMG=/home/macbook/android/lineage/prebuilts/misc/linux-x86/libufdt/mkdtimg HOSTCC=/home/macbook/android/lineage/prebuilts/clang/host/linux-x86/clang-r416183b1/bin/clang HOSTCXX=/home/macbook/android/lineage/prebuilts/clang/host/linux-x86/clang-r416183b1/bin/clang++ LEX=/home/macbook/android/lineage/prebuilts/build-tools/linux-x86/bin/flex YACC=/home/macbook/android/lineage/prebuilts/build-tools/linux-x86/bin/bison M4=/home/macbook/android/lineage/prebuilts/build-tools/linux-x86/bin/m4 -C kernel/gigaset/gx290 O=/home/macbook/android/lineage/out/target/product/GX290/obj/DTB_OBJ ARCH=arm64 CROSS_COMPILE=\"/home/macbook/android/lineage/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-\" CROSS_COMPILE_ARM32=\"/home/macbook/android/lineage/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androidkernel-\" CROSS_COMPILE_COMPAT=\"/home/macbook/android/lineage/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androidkernel-\" CLANG_TRIPLE=aarch64-linux-gnu- CC=\" clang\" dtbs ) && (cat \$(find out/target/product/GX290/obj/DTB_OBJ/arch/arm64/boot/dts -type f -name \"*.dtb\" | sort) > out/target/product/GX290/dtb.img )"
make: Verzeichnis „/home/macbook/android/lineage/kernel/gigaset/gx290“ wird betreten
make[1]: Verzeichnis „/home/macbook/android/lineage/out/target/product/GX290/obj/DTB_OBJ“ wird betreten
HOSTCC scripts/basic/fixdep
GEN ./Makefile
HOSTCC scripts/kconfig/conf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/zconf.lex.c
SHIPPED scripts/kconfig/zconf.hash.c
clang-12: warning: argument unused during compilation: '-fuse-ld=lld' [-Wunused-command-line-argument]
HOSTCC scripts/kconfig/zconf.tab.o
clang-12: warning: argument unused during compilation: '-fuse-ld=lld' [-Wunused-command-line-argument]
HOSTLD scripts/kconfig/conf
drivers/input/touchscreen/mediatek/hxchipset_spi/Kconfig:95:warning: ignoring type redefinition of 'TOUCHSCREEN_HIMAX_DEBUG' from 'tristate' to 'boolean'
drivers/input/touchscreen/mediatek/hxchipset_spi/Kconfig:112:warning: ignoring type redefinition of 'HMX_DB' from 'tristate' to 'boolean'
arch/arm64/configs/gx290_defconfig:419:warning: override: reassigning to symbol LCM_HEIGHT
arch/arm64/configs/gx290_defconfig:420:warning: override: reassigning to symbol LCM_WIDTH
arch/arm64/configs/gx290_defconfig:471:warning: unexpected data: CFG_SUPPORT_ROAMING_ENC=y
arch/arm64/configs/gx290_defconfig:472:warning: unexpected data: CFG_SUPPORT_DYNAMOC_ROAM=y
#
# configuration written to .config
#
make[1]: Verzeichnis „/home/macbook/android/lineage/out/target/product/GX290/obj/DTB_OBJ“ wird verlassen
make: Verzeichnis „/home/macbook/android/lineage/kernel/gigaset/gx290“ wird verlassen
make: Verzeichnis „/home/macbook/android/lineage/kernel/gigaset/gx290“ wird betreten
make[1]: Verzeichnis „/home/macbook/android/lineage/out/target/product/GX290/obj/DTB_OBJ“ wird betreten
GEN ./Makefile
scripts/kconfig/conf --silentoldconfig Kconfig
drivers/input/touchscreen/mediatek/hxchipset_spi/Kconfig:95:warning: ignoring type redefinition of 'TOUCHSCREEN_HIMAX_DEBUG' from 'tristate' to 'boolean'
drivers/input/touchscreen/mediatek/hxchipset_spi/Kconfig:112:warning: ignoring type redefinition of 'HMX_DB' from 'tristate' to 'boolean'
CHK include/config/kernel.release
GEN ./Makefile
UPD include/config/kernel.release
WRAP arch/arm64/include/generated/asm/bugs.h
WRAP arch/arm64/include/generated/asm/clkdev.h
WRAP arch/arm64/include/generated/asm/cputime.h
WRAP arch/arm64/include/generated/asm/delay.h
WRAP arch/arm64/include/generated/asm/div64.h
WRAP arch/arm64/include/generated/asm/dma.h
WRAP arch/arm64/include/generated/asm/dma-contiguous.h
WRAP arch/arm64/include/generated/asm/early_ioremap.h
WRAP arch/arm64/include/generated/asm/emergency-restart.h
WRAP arch/arm64/include/generated/asm/errno.h
WRAP arch/arm64/include/generated/asm/hw_irq.h
WRAP arch/arm64/include/generated/asm/ioctl.h
WRAP arch/arm64/include/generated/asm/ioctls.h
WRAP arch/arm64/include/generated/asm/ipcbuf.h
WRAP arch/arm64/include/generated/asm/irq_regs.h
WRAP arch/arm64/include/generated/asm/kdebug.h
CHK include/generated/uapi/linux/version.h
WRAP arch/arm64/include/generated/asm/kmap_types.h
UPD include/generated/uapi/linux/version.h
WRAP arch/arm64/include/generated/asm/kvm_para.h
WRAP arch/arm64/include/generated/asm/local.h
WRAP arch/arm64/include/generated/asm/local64.h
WRAP arch/arm64/include/generated/asm/mcs_spinlock.h
WRAP arch/arm64/include/generated/asm/mm-arch-hooks.h
WRAP arch/arm64/include/generated/asm/mman.h
WRAP arch/arm64/include/generated/asm/msgbuf.h
WRAP arch/arm64/include/generated/asm/msi.h
WRAP arch/arm64/include/generated/asm/mutex.h
WRAP arch/arm64/include/generated/asm/poll.h
WRAP arch/arm64/include/generated/asm/preempt.h
WRAP arch/arm64/include/generated/asm/resource.h
WRAP arch/arm64/include/generated/asm/rwsem.h
WRAP arch/arm64/include/generated/asm/segment.h
WRAP arch/arm64/include/generated/asm/sembuf.h
WRAP arch/arm64/include/generated/asm/serial.h
WRAP arch/arm64/include/generated/asm/shmbuf.h
WRAP arch/arm64/include/generated/asm/simd.h
WRAP arch/arm64/include/generated/asm/sizes.h
WRAP arch/arm64/include/generated/asm/socket.h
WRAP arch/arm64/include/generated/asm/sockios.h
WRAP arch/arm64/include/generated/asm/swab.h
WRAP arch/arm64/include/generated/asm/switch_to.h
WRAP arch/arm64/include/generated/asm/termbits.h
WRAP arch/arm64/include/generated/asm/termios.h
WRAP arch/arm64/include/generated/asm/trace_clock.h
CHK include/generated/utsrelease.h
WRAP arch/arm64/include/generated/asm/types.h
WRAP arch/arm64/include/generated/asm/unaligned.h
WRAP arch/arm64/include/generated/asm/user.h
WRAP arch/arm64/include/generated/asm/vga.h
WRAP arch/arm64/include/generated/asm/xor.h
UPD include/generated/utsrelease.h
WRAP arch/arm64/include/generated/uapi/asm/kvm_para.h
for i in /home/macbook/android/lineage/kernel/gigaset/gx290/arch/arm64/boot/dts/mediatek/k63v2_64_bsp.dts; do \
base_prj=`grep -m 1 '#include [<\"].*\/cust\.dtsi[>\"]' $i | sed 's/#include [<"]//g'\
| sed 's/\/cust\.dtsi[>"]//g' | sed 's/\/\*//g' | sed 's/\*\///g' | sed 's/ //g'`\
prj_path=./arch/arm64/boot/dts/$base_prj ;\
dws_path=/home/macbook/android/lineage/kernel/gigaset/gx290/drivers/misc/mediatek/dws/mt6763/$base_prj.dws ;\
if [ -f $dws_path ] ; then \
mkdir -p $prj_path ;\
/home/macbook/android/lineage/kernel/gigaset/gx290/tools/dct/DrvGen.py $dws_path $prj_path $prj_path cust_dtsi;\
fi \
done
HOSTCC scripts/basic/fixdep
for i in /home/macbook/android/lineage/kernel/gigaset/gx290/arch/arm64/boot/dts/mediatek/k63v2_64_bsp.dts; do \
base_prj=`grep -m 1 '#include [<\"].*\/cust\.dtsi[>\"]' $i | sed 's/#include [<"]//g'\
| sed 's/\/cust\.dtsi[>"]//g' | sed 's/\/\*//g' | sed 's/\*\///g' | sed 's/ //g'`\
prj_path=./arch/arm64/boot/dts/$base_prj ;\
dws_path=/home/macbook/android/lineage/kernel/gigaset/gx290/drivers/misc/mediatek/dws/mt6763/$base_prj.dws ;\
if [ -f $dws_path ] ; then \
mkdir -p $prj_path ;\
/home/macbook/android/lineage/kernel/gigaset/gx290/tools/dct/DrvGen.py $dws_path $prj_path $prj_path cust_dtsi;\
fi \
done
/bin/sh: 8: /home/macbook/android/lineage/kernel/gigaset/gx290/tools/dct/DrvGen.py: not found
make[1]: *** [/home/macbook/android/lineage/kernel/gigaset/gx290/scripts/drvgen/drvgen.mk:63: arch/arm64/boot/dts/k63v2_64_bsp/cust.dtsi] Fehler 127
make[1]: *** Auf noch nicht beendete Prozesse wird gewartet …
HOSTCC scripts/basic/bin2c
make[1]: Verzeichnis „/home/macbook/android/lineage/out/target/product/GX290/obj/DTB_OBJ“ wird verlassen
make: *** [Makefile:152: sub-make] Fehler 2
make: Verzeichnis „/home/macbook/android/lineage/kernel/gigaset/gx290“ wird verlassen
17:45:01 ninja failed with: exit status 1
#### failed to build some targets (03:47:06 (hh:mm:ss)) ####

Fixed it, see here: https://github.com/MiCode/Xiaomi_Kernel_OpenSource/issues/2371

Related

Building Kernel Error | Please Help | Dev.ChaosFirZen

I Get This Problem Please Help Me...
[email protected]:~/kernel$ ARCH=arm CROSS_COMPILE=/opt/arm-2011.09/bin/arm-none-eabi make
make: /opt/arm-2011.09/bin/arm-none-eabigcc: Command not found
CHK include/linux/version.h
make[1]: `include/asm-arm/mach-types.h' is up to date.
CHK include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-arm
CC kernel/bounds.s
/bin/sh: /opt/arm-2011.09/bin/arm-none-eabigcc: not found
make[1]: *** [kernel/bounds.s] Error 127
make: *** [prepare0] Error 2
i think u missing some libraries. u on 64 bit ? maybe u need install 32 libraries
what kind of linux u have?
ChaosFirZen said:
[email protected]:~/kernel$ ARCH=arm CROSS_COMPILE=/opt/arm-2011.09/bin/arm-none-eabi make
Click to expand...
Click to collapse
You forgot about export:
Code:
export ARCH=arm
export CROSS_COMPILE=/opt/arm-2011.09/bin/arm-none-eabi
and double check if CROSS_COMPILE should be arm-none-eabi or arm-none-eabi- (with a minus at the end)
denisl78 said:
i think u missing some libraries. u on 64 bit ? maybe u need install 32 libraries
what kind of linux u have?
Click to expand...
Click to collapse
Im on 32bit ubuntu..
Sent from my LT18i using XDA App
This What Shows and it doesnt reponse at
export ARCH=arm
export CROSS_COMPILE=/opt/arm-2011.09/bin/arm-none-eabi
Click to expand...
Click to collapse
[email protected]:~$ cd kernel
[email protected]:~/kernel$ export ARCH=arm
[email protected]:~/kernel$ export CROSS_COMPILE=/opt/arm-2011.09/bin/arm-none-eabi
[email protected]:~/kernel$ setprop persist.world.domination 1
setprop: command not found
[email protected]:~/kernel$ ARCH=arm CROSS_COMPILE=/opt/arm-2011.09/bin/arm-none-eabi- make
make: /opt/arm-2011.09/bin/arm-none-eabi-gcc: Command not found
scripts/kconfig/conf -s arch/arm/Kconfig
make: /opt/arm-2011.09/bin/arm-none-eabi-gcc: Command not found
CHK include/linux/version.h
make[1]: `include/asm-arm/mach-types.h' is up to date.
CHK include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-arm
CC kernel/bounds.s
/bin/sh: /opt/arm-2011.09/bin/arm-none-eabi-gcc: not found
make[1]: *** [kernel/bounds.s] Error 127
make: *** [prepare0] Error 2
[email protected]:~/kernel$ export ARCH=arm CROSS_COMPILE=/opt/arm-2011.09/bin/arm-none-eabi make
[email protected]:~/kernel$ export ARCH=arm CROSS_COMPILE=/opt/arm-2011.09/bin/arm-none-eabi- make
[email protected]:~/kernel$ cd
[email protected]:~$ cd
[email protected]:~$ cd
[email protected]:~$ cd
[email protected]:~$ cd
[email protected]:~$ cd
[email protected]:~$ cd
[email protected]:~$ cd kernel
[email protected]:~/kernel$ export ARCH=arm
[email protected]:~/kernel$ export CROSS_COMPILE=/opt/arm-2011.09/bin/arm-none-eabi make
[email protected]:~/kernel$ export CROSS_COMPILE=/opt/arm-2011.09/bin/arm-none-eabi- make
[email protected]:~/kernel$ export arm-none-eabi=/opt/arm-2011.09/bin/arm-none-eabi- make
bash: export: `arm-none-eabi=/opt/arm-2011.09/bin/arm-none-eabi-': not a valid identifier
[email protected]:~/kernel$
what u get with :
Code:
file /opt/arm-2011.09/bin/arm-none-eabi-gcc
?
do u installed all build packages ?
i not fluent with deb distributions (more rpm), but maybe
Code:
sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev pngcrush schedtool
may help
and
Code:
export ARCH=arm
export CROSS_COMPILE=/opt/arm-2011.09/bin/arm-none-eabi
export KERNEL_DIR=/full/path/to/kernel
make
ChaosFirZen said:
[email protected]:~/kernel$ setprop persist.world.domination 1
setprop: command not found
Click to expand...
Click to collapse
OMGLOL, it's my signature (setprop is android specific)
Anyway, if any packages would be missing make would whine about them first. Just to be sure check official docs
As for exports- I use envsetup.sh-s like this one:
Code:
export ARCH=arm
export CC=arm-spica-linux-uclibcgnueabi-gcc
export CXX=arm-spica-linux-uclibcgnueabi-gcc
export CROSS_COMPILE=arm-spica-linux-uclibcgnueabi-
export PATH=$PATH:${HOME}/x-tools/bin:${HOME}/x-tools/arm-spica-linux-uclibcgnueabi/bin
(this one is for crosstools-ng, you have to adjust names and paths for your environment)
usage:
Code:
. ./envsetup.sh
Please give Me The Full View Of The Script On Your terminal ..
ChaosFirZen said:
Please give Me The Full View Of The Script On Your terminal ..
Click to expand...
Click to collapse
What do you mean by 'full view'?
Command
Code:
. ./envsetup.sh
does not produse any visible output, script just sets variables
tapatalked from Desire
Error During Cross compile
Sir after giving the bellow cmd
make ARCH=arm CROSS_COMPILE=/home/digvijay/Desktop/5-4-12/toolchain/arm-2011.03/bin/arm-none-linux-gnueabi-
I am getting folloeing error
#
# configuration written to .config
#
include/config/auto.conf:15:warning: symbol value 'arch/x86/configs/x86_64_defconfig' invalid for ARCH_DEFCONFIG
include/config/auto.conf:106:warning: symbol value 'elf64-x86-64' invalid for OUTPUT_FORMAT
make: execvp: /home/digvijay/Desktop/5-4-12/toolchain/arm-2011.03/bin/arm-none-linux-gnueabi-gcc: Permission denied
CHK include/linux/version.h
UPD include/linux/version.h
CHK include/generated/utsrelease.h
UPD include/generated/utsrelease.h
Generating include/generated/mach-types.h
CC kernel/bounds.s
/bin/sh: /home/digvijay/Desktop/5-4-12/toolchain/arm-2011.03/bin/arm-none-linux-gnueabi-gcc: Permission denied
make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2
Please help me out.. pleas its urgent. ASAP
It seems that you don't have ARM config, make still tries to build x86.
Do exports and 'make menuconfig' first to check if config is correct
tapatalked from Xperia Arc S
Hey all, i get the same error
I close the terminal and re-open it and i get rid of this but now i've foud another error
>ARCH=arm CROSS_COMPILER=$CCOMPILER make
scripts/kconfig/conf -s arch/arm/Kconfig
arch/arm/mach-msm/Kconfig:1509:warning: multi-line strings not supported
CHK include/linux/version.h
UPD include/linux/version.h
CHK include/generated/utsrelease.h
UPD include/generated/utsrelease.h
Generating include/generated/mach-types.h
CC kernel/bounds.s
cc1: erreur: unrecognized command line option ‘-mlittle-endian’
cc1: erreur: unrecognized command line option ‘-mno-thumb-interwork’
kernel/bounds.c:1:0: erreur: unknown ABI (aapcs-linux) for -mabi= switch
kernel/bounds.c:1:0: erreur: bad value (armv5t) for -march= switch
make[1]: *** [kernel/bounds.s] Erreur 1
make: *** [prepare0] Erreur 2
cc1: erreur: unrecognized command line option ‘-mlittle-endian’
cc1: erreur: unrecognized command line option ‘-mno-thumb-interwork’
Can someone help me ?
arc_u said:
Hey all, i get the same error
I close the terminal and re-open it and i get rid of this but now i've foud another error
>ARCH=arm CROSS_COMPILER=$CCOMPILER make
Click to expand...
Click to collapse
IIRC it should be: make ARCH=arm [...] (make first, then arguments)
arc_u said:
scripts/kconfig/conf -s arch/arm/Kconfig
arch/arm/mach-msm/Kconfig:1509:warning: multi-line strings not supported
CHK include/linux/version.h
UPD include/linux/version.h
CHK include/generated/utsrelease.h
UPD include/generated/utsrelease.h
Generating include/generated/mach-types.h
CC kernel/bounds.s
cc1: erreur: unrecognized command line option ‘-mlittle-endian’
cc1: erreur: unrecognized command line option ‘-mno-thumb-interwork’
kernel/bounds.c:1:0: erreur: unknown ABI (aapcs-linux) for -mabi= switch
kernel/bounds.c:1:0: erreur: bad value (armv5t) for -march= switch
make[1]: *** [kernel/bounds.s] Erreur 1
make: *** [prepare0] Erreur 2
Click to expand...
Click to collapse
You have errors in kernel config
-kernel is NOT compiled for arm
-cpu is armv7, not armv5t
Do exports and
Code:
make menuconfig
before you try to compile
>make menuconfig
*** Unable to find the ncurses libraries or the
*** required header files.
*** 'make menuconfig' requires the ncurses libraries.
***
*** Install ncurses (ncurses-devel) and try again.
***
make[1]: *** [scripts/kconfig/dochecklxdialog] Erreur 1
make: *** [menuconfig] Erreur 2
EDIT: installed the libncurses5-dev and it seems to work now, i've to configure now
But what config i've to do
ARCH=arm CROSS_COMPILE=/opt/arm-2010q1/bin/arm-none-eabi- make semc_anzu_defconfig
or
make menuconfig (and what i have to do exactly in menuconfig?)
arc_u said:
EDIT: installed the libncurses5-dev and it seems to work now, i've to configure now
But what config i've to do
ARCH=arm CROSS_COMPILE=/opt/arm-2010q1/bin/arm-none-eabi- make semc_anzu_defconfig
or
make menuconfig (and what i have to do exactly in menuconfig?)
Click to expand...
Click to collapse
1. Do required exports
2. make semc_anzu_defconfig (this will create kernel config required for make- copy of semc_anzu_defconfig)
3. If you want to make any changes (drivers/options/modules/whatever) in config- make menuconfig
4. make
A lot of thanks for your help
I do the following export
export ARCH=arm
export CROSS_COMPILE=/usr/bin/arm-linux-gnueabi-
then
make semc_anzu_defconfig
make
make
CHK include/linux/version.h
make[1]: « include/asm-arm/mach-types.h » est à jour.
CHK include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-arm
CC kernel/bounds.s
GEN include/linux/bounds.h
CC arch/arm/kernel/asm-offsets.s
GEN include/asm/asm-offsets.h
CALL scripts/checksyscalls.sh
CC scripts/mod/empty.o
HOSTCC scripts/mod/mk_elfconfig
MKELF scripts/mod/elfconfig.h
HOSTCC scripts/mod/file2alias.o
HOSTCC scripts/mod/modpost.o
scripts/mod/modpost.c: In function ‘get_markers’:
scripts/mod/modpost.c:1562:12: attention : ignoring return value of ‘asprintf’, declared with attribute warn_unused_result [-Wunused-result]
scripts/mod/modpost.c: In function ‘add_marker’:
scripts/mod/modpost.c:1982:10: attention : ignoring return value of ‘asprintf’, declared with attribute warn_unused_result [-Wunused-result]
HOSTCC scripts/mod/sumversion.o
HOSTLD scripts/mod/modpost
HOSTCC scripts/kallsyms
scripts/kallsyms.c: In function ‘read_symbol’:
scripts/kallsyms.c:112:9: attention : ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
HOSTCC scripts/conmakehash
HOSTCC scripts/bin2c
CC init/main.o
In file included from include/linux/mempolicy.h:62:0,
from init/main.c:52:
include/linux/pagemap.h: In function ‘fault_in_pages_readable’:
include/linux/pagemap.h:415:16: erreur: variable ‘c’ set but not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors
make[1]: *** [init/main.o] Erreur 1
make: *** [init] Erreur 2
very disappointed
arc_u said:
very disappointed
Click to expand...
Click to collapse
This needs to be added in Makefile :
Code:
# This warning generated too much noise in a regular build.
KBUILD_CFLAGS += $(call cc-option, -Wno-unused-but-set-variable)
By default the toolchain stops compiling on all errors.

Compiling AOKP JellyBean from source

Hi,
I've been trying to build a rom from Lord ClockaN´s repo but I run into some issues when trying to embed the kernel.
I've done the following:
$ mkdir ~/src/android
$ cd ~/src/android
$ repo init -u git://github.com/IceColdJelly/platform_manifest.git -b jb
$ repo sync -j16
$ mkdir -p kernel/htc
$ cd kernel/htc
$ git clone git://github.com/TeamNDVRu/htc-kernel-endeavoru.git endeavoru
$ cd endeavoru
$ git checkout -b jellybean origin/jellybean
$ cd ~/src/android
$ cat device/htc/endeavoru/BoardConfig.mk | tail -3
# Kernel building
TARGET_KERNEL_SOURCE := kernel/htc/endeavoru
TARGET_KERNEL_CONFIG := arch/arm/configs/endeavoru_android_config
I copied the kernel config from my running IceColdJelly 0.3 to endeavoru_android_config
Within BoardConfig.mk, I changed endeavoru_android_defconfig to arch/arm/configs/endeavoru_android_config
$ . build/envsetup.sh
$ lunch aokp_endeavoru-userdebug
$ make bacon (or mka)
...
make -f /home/archv/src/android/kernel/htc/endeavoru/Makefile silentoldconfig
make -f /home/archv/src/android/kernel/htc/endeavoru/scripts/Makefile.build obj=scripts/basic
rm -f .tmp_quiet_recordmcount
ln -fsn /home/archv/src/android/kernel/htc/endeavoru source
/bin/sh /home/archv/src/android/kernel/htc/endeavoru/scripts/mkmakefile \
/home/archv/src/android/kernel/htc/endeavoru /home/archv/src/android/out/target/product/endeavoru/obj/KERNEL_OBJ 2 6
GEN /home/archv/src/android/out/target/product/endeavoru/obj/KERNEL_OBJ/Makefile
mkdir -p include/linux include/config
make -f /home/archv/src/android/kernel/htc/endeavoru/scripts/Makefile.build obj=scripts/kconfig silentoldconfig
mkdir -p include/generated
scripts/kconfig/conf --silentoldconfig Kconfig
***
*** Configuration file ".config" not found!
***
*** Please run some configurator (e.g. "make oldconfig" or
*** "make menuconfig" or "make xconfig").
***
make[4]: *** [silentoldconfig] Error 1
make[3]: *** [silentoldconfig] Error 2
make[2]: *** No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'. Stop.
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/home/archv/src/android/kernel/htc/endeavoru'
make: *** [TARGET_KERNEL_BINARIES] Error 2
I get this error whether I have the kernel already compiled or not.
What is the supposed way to correctly embed the kernel with the ROM image, keeping the source in sync with
the repo command, just like everything else?
do it the easy way and copy your endeavoru_android_config to <kernel_dir>/.config.
seadersn said:
do it the easy way and copy your endeavoru_android_config to <kernel_dir>/.config.
Click to expand...
Click to collapse
It doesn´t make any difference. I tried compiling the kernel before building the rom, hence the <kernel_dir>/.config
already exists but I get the same error.

[TUTORIAL] Complete Galaxy Nexus Kernel Development

I know a lot of this has been posted before in other locations, but recently I have found some of that data to be incomplete when I was building a custom kernel for my GNex, so just bear with me.
--The Build Environment--
Operating System: Xubuntu 12.04 x86 (I haven't tested it on the x64 version yet)
Dependencies: (using sudo-apt get install)
Code:
git git-core gnupg flex bison gperf build-essential zip hexdump gedit \
curl libc6-dev libncurses5-dev:i386 x11proto-core-dev libx11-dev:i386 gcc \
libreadline6-dev:i386 libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib \
mingw32 tofrodos
Other Files Needed:
unpack-mkbootimg - Which I have forked from work4blue@github.
You can grab the modified version from: https://github.com/ClimberTy/unpack-mkbootimg.git
The mkbootimg.c has been modified to fix the default load addresses of the kernel with the GNex (See below for more details).
Android SDK - You just need the Android Debug Bridge (ADB) from the SDK.
Or you can grab a toolkit from here: http://forum.xda-developers.com/showthread.php?t=1848036 for a script that will get you the files you need (Internet connection required).
Needed:
Samsung Galaxy Nexus Prime (I9250)
The GNex Bootloader to be Unlocked (http://www.android.gs/how-to-unlock-galaxy-nexus-bootloader/)
Kernel files (See Kernel Source area for locations)
ADB and Fastboot
ARM Cross Compiler - grab from here. NOTE: You'll need the ARM EABI Release. You can also get the ARM Cross Compiler by following the "Downloading a prebuilt gcc" instructions from Google as well.
Place either of these ARM Compilers in the folder you are using to build your KERNELSOURCE.
Linux USB Driver Rules:
Open Terminal and type:
Code:
$ vim /etc/udev/rules.d/70-android.rules
You can use gEdit if you prefer.
Paste in (Ensuring that <username> is the name of your Linux profile):
Code:
# adb protocol on passion (Nexus One)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e12", MODE="0600", OWNER="<username>"
# fastboot protocol on passion (Nexus One)
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0fff", MODE="0600", OWNER="<username>"
# adb protocol on crespo/crespo4g (Nexus S)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e22", MODE="0600", OWNER="<username>"
# fastboot protocol on crespo/crespo4g (Nexus S)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e20", MODE="0600", OWNER="<username>"
# adb protocol on stingray/wingray (Xoom)
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", ATTR{idProduct}=="70a9", MODE="0600", OWNER="<username>"
# fastboot protocol on stingray/wingray (Xoom)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="708c", MODE="0600", OWNER="<username>"
# adb protocol on maguro/toro (Galaxy Nexus)
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", ATTR{idProduct}=="6860", MODE="0600", OWNER="<username>"
# fastboot protocol on maguro/toro (Galaxy Nexus)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e30", MODE="0600", OWNER="<username>"
# adb protocol on panda (PandaBoard)
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d101", MODE="0600", OWNER="<username>"
# fastboot protocol on panda (PandaBoard)
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d022", MODE="0600", OWNER="<username>"
# usbboot protocol on panda (PandaBoard)
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d00f", MODE="0600", OWNER="<username>"
# usbboot protocol on panda (PandaBoard ES)
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d010", MODE="0600", OWNER="<username>"
# adb protocol on grouper/tilapia (Nexus 7)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e42", MODE="0600", OWNER="<username>"
# fastboot protocol on grouper/tilapia (Nexus 7)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e40", MODE="0600", OWNER="<username>"
# adb protocol on manta (Nexus 10)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee2", MODE="0600", OWNER="<username>"
# fastboot protocol on manta (Nexus 10)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee0", MODE="0600", OWNER="<username>"
Kernel Source:
It is important that you make separate folders to put everything in. Keeping the DEV area organized will help out in the long run.
Code:
$ mkdir -p ~/Documents/Kernel/Source
CyanogenMod 10.1 Kernel from GitHub
Google's Android Kernel (See Downloading Android Kernel section below for more details)
Downloading the Android Kernel:
To download the kernel directly from Google enter in these commands.
Code:
$ git clone https://android.googlesource.com/kernel/omap.git
$ cd omap/
$ git branch -a
What you'll see in response:
Code:
* master
remotes/origin/HEAD -> origin/master
remotes/origin/android-omap-3.0
remotes/origin/android-omap-panda-3.0
remotes/origin/android-omap-steelhead-3.0-ics-aah
remotes/origin/android-omap-tuna-3.0
remotes/origin/android-omap-tuna-3.0-ics-mr1
remotes/origin/android-omap-tuna-3.0-jb-mr0
remotes/origin/android-omap-tuna-3.0-jb-mr1
remotes/origin/android-omap-tuna-3.0-jb-mr1.1
remotes/origin/android-omap-tuna-3.0-jb-pre1
remotes/origin/android-omap-tuna-3.0-mr0
remotes/origin/android-omap-tuna-3.0-mr0.1
remotes/origin/linux-omap-3.0
remotes/origin/master
remotes/origin/sph-l700-fh05
To grab the (at this time) latest Jellybean source:
Code:
$ git checkout remotes/origin/android-omap-tuna-3.0-jb-mr1.1
Otherwise just use:
Code:
$ git clone https://github.com/CyanogenMod/android_kernel_samsung_tuna.git
--Building the Kernel--
In the ~/Documents/Kernel/KERNELSOURCE (varies depending on which kernel you downloaded. For this build I used android_kernel_samsung_tuna-jb as my source directory. The ARM Cross Compiler that I downloaded from the CodeSourcery site is located inside this folder.
In the terminal type:
Code:
$ export ARCH=arm
$ export SUBARCH=arm
$ export CROSS_COMPILE=/home/user/Documents/Kernel/KERNELSOURCE/arm-2011.03/bin/arm-none-eabi-
$ make tuna_defconfig
$ make
NOTE: The [...]/arm-none-eabi- is how it is supposed to be.
Now go grab some lunch or drink a beer or two, it could take about 30-45 mins to compile. You'll know when it is finished when you see:
Code:
OBJCOPY arch/arm/boot/Image
Kernel: arch/arm/boot/Image is ready
AS arch/arm/boot/compressed/head.o
GZIP arch/arm/boot/compressed/piggy.gzip
AS arch/arm/boot/compressed/piggy.gzip.o
CC arch/arm/boot/compressed/misc.o
CC arch/arm/boot/compressed/decompress.o
SHIPPED arch/arm/boot/compressed/lib1funcs.S
AS arch/arm/boot/compressed/lib1funcs.o
LD arch/arm/boot/compressed/vmlinux
OBJCOPY arch/arm/boot/zImage
Kernel: arch/arm/boot/zImage is ready
Building modules, stage 2.
MODPOST 4 modules
CC crypto/ansi_cprng.mod.o
LD [M] crypto/ansi_cprng.ko
CC drivers/rpmsg/rpmsg_client_sample.mod.o
LD [M] drivers/rpmsg/rpmsg_client_sample.ko
CC drivers/rpmsg/rpmsg_server_sample.mod.o
LD [M] drivers/rpmsg/rpmsg_server_sample.ko
CC drivers/scsi/scsi_wait_scan.mod.o
LD [M] drivers/scsi/scsi_wait_scan.ko
The zImage is what we need because it is the compressed Linux kernel. Note the path of where the zImage is located. We also need the *.ko files (Kernel Modules). Remember their paths because you'll need to create those same paths later when you rebuild the kernel. Probably best to move these files to a new folder, I have used /home/user/Documents/Kernel/CompiledKernel/.
--Backing Up the Original Kernel--
It is important that we save a backup of the original kernel just in case there are errors in the kernel you are creating and we need to revert. Each device has their images saved in somwhat similar spots but they can change depending on device or OS.
Before these images were located on /proc/mnt location but with this model/OS they are stored elsewhere. Your phone will most likely need to be rooted prior to this operation. So either push the SuperUser app to your phone or grab Koushik Dutta's version from ROM Manager in ClockworkMod (http://download.clockworkmod.com/test/superuser-2.zip).
How to grab the images:
Code:
$ adb shell
$ su
$ ls -l /dev/block/platform/omap/omap_hsmmc.0/by-name
Result:
Code:
lrwxrwxrwx root root 2013-02-20 06:38 boot -> /dev/block/mmcblk0p7
lrwxrwxrwx root root 2013-02-20 06:38 cache -> /dev/block/mmcblk0p11
lrwxrwxrwx root root 2013-02-20 06:38 dgs -> /dev/block/mmcblk0p6
lrwxrwxrwx root root 2013-02-20 06:38 efs -> /dev/block/mmcblk0p3
lrwxrwxrwx root root 2013-02-20 06:38 metadata -> /dev/block/mmcblk0p13
lrwxrwxrwx root root 2013-02-20 06:38 misc -> /dev/block/mmcblk0p5
lrwxrwxrwx root root 2013-02-20 06:38 param -> /dev/block/mmcblk0p4
lrwxrwxrwx root root 2013-02-20 06:38 radio -> /dev/block/mmcblk0p9
lrwxrwxrwx root root 2013-02-20 06:38 recovery -> /dev/block/mmcblk0p8
lrwxrwxrwx root root 2013-02-20 06:38 sbl -> /dev/block/mmcblk0p2
lrwxrwxrwx root root 2013-02-20 06:38 system -> /dev/block/mmcblk0p10
lrwxrwxrwx root root 2013-02-20 06:38 userdata -> /dev/block/mmcblk0p12
lrwxrwxrwx root root 2013-02-20 06:38 xloader -> /dev/block/mmcblk0p1
We need to backup the boot and recovery images.
Copying the Android Images:
Code:
cat /dev/block/mmcblk0p7 > /sdcard/boot
cat /dev/block/mmcblk0p8 > /sdcard/recovery
Pulling the Images Off the Device:
Code:
$ dab pull /sdcard/IMAGE_NAME ~/Documents/Kernel/OriginalKernel/
NOTE: This assumes you have this folder already created.
--Unpacking the Kernel--
Splitting the Image:
Using the unpack-mkbootimg-master kit you can split the image by using the ./unpackbootimg binary. The command is:
Code:
$ ./unpackbootimg -i ~/Documents/Kernel/OriginalKernel/boot
The results should be similar to this:
Code:
BOARD_KERNEL_CMDLINE
BOARD_KERNEL_BASE 80000000
BOARD_OAGE_SIZE 2048
The output files in your unpack-mkbootimg-master folder should be similar to this:
Code:
drwxrwxr-x 4 user user 4.0K Mar 3 11:22 .
drwxr-xr-x 3 user user 4.0K Mar 3 11:15 ..
-rw-rw-r-- 1 user user 9 Mar 3 11:22 boot-base
-rw-rw-r-- 1 user user 1 Mar 3 11:22 boot-cmdline
-rw-rw-r-- 1 user user 2.9K Feb 28 18:00 bootimg.h
-rw-rw-r-- 1 user user 5 Mar 3 11:22 boot-pagesize
-rw-rw-r-- 1 user user 344K Mar 3 11:22 boot-ramdisk.gz
-rw-rw-r-- 1 user user 4.0M Mar 3 11:22 boot-zImage
drwxrwxr-x 2 user user 4.0K Mar 3 11:15 libmincrypt
-rw-rw-r-- 1 user user 7.3K Mar 3 11:15 libmincrypt.a
-rwxr-xr-x 1 user user 622 Feb 28 18:00 Makefile
drwxrwxr-x 2 user user 4.0K Feb 28 18:00 mincrypt
-rwxrwxr-x 1 user user 789K Mar 3 11:15 mkbootimg
-rw-rw-r-- 1 user user 7.4K Feb 28 18:00 mkbootimg.c
-rw-rw-r-- 1 user user 8.5K Mar 3 11:15 mkbootimg.o
-rw-rw-r-- 1 user user 1.1K Feb 28 18:00 README
-rwxrwxr-x 1 user user 789K Mar 3 11:15 unpackbootimg
-rw-rw-r-- 1 user user 3.9K Feb 28 18:00 unpackbootimg.c
-rw-rw-r-- 1 user user 6.6K Mar 3 11:15 unpackbootimg.o
NOTE: This is for the Samsung Galaxy Nexus (Maguro & Tuna, possibly Toro & Toroplus)
A simple hexdump (using "hex dump -n 40") of the boot image from the GNex phone should give us the results of:
Code:
0000000 41 4e 44 52 4f 49 44 21 68 54 3f 00 00 80 00 80
0000010 4d 5c 05 00 00 00 00 81 00 00 00 00 00 00 f0 80
0000020 00 01 00 80 00 08 00 00
0000028
Results may vary between Android versions. These numbers will help us in verifying that your kernel that you're creating is indeed correct.
What is needed to be taken away from this is the so called "Android Magic" which are the first four bytes of data in the hex dump.
Code:
Android Magic = 4e41 5244 494f 2144
The next two bytes are the kernel size, in this case (0x5468 0x003f).
The rest of the byes are as follows:
Code:
Kernel Base = 8000 8000
Ramdisk Address = 8100 0000
Secondary Address = 80f0 0000
Tags Address = 8000 0100
These values are what I had to change in the mkbootimg application in the unpack-mkbootimg-master. Otherwise the kernel images would be off and they would not load correctly on the device. Look at https://github.com/ClimberTy/unpack-mkbootimg/blob/master/mkbootimg.c for more details.
Splitting the Ramdisk
For organizations sake move the boot-* files to a new folder. From here we need to open the boot-ramdisk.gz.
Code:
$ mkdir UnpackedKernel
$ mv boot-* UnpackedKernel/
$ cd UnpackedKernel/
$ gunzip -c boot-ramdisk.gz | cpio -i
This splits open the boot-ramdisk.gz file so we can place our newly created kernel modules (anything listed as .KO) in their appropriate folders or make modifications to any of the other files in the UnpackedKernel/ folder.
Remember these, we'll need them later.
--Rebuilding the Kernel--
After making the modifications and placing the kernel modules in the UnpackedKernel/ folders . Again you may need to create the directories for these kernel module locations. See your compiled kernel printout for the correct paths. Now that everything is in place you need to rebuild the boot-ramdisk.gz:
Code:
$ pwd
[…]/UnpackedKernel/
$ find . | cpio -o -H newc | gzip > ../newramdisk.cpio.gz
$ cd ..
Now copy in the /CompiledKernel/zImage into the /unpack-mkbootimg-master/ folder and run this command to build the kernel:
Code:
$ ./mkbootimg --kernel zImage --ramdisk newramdisk.cpio.gz --base 80000000 --pagesize 2048 -o newKernel.img
Now to verify that the compiled kernel is right on par with the original kernel you need to do a hexdump.
Code:
$ hex dump -n 40 newKernel.img
Should print out results similar to this:
Code:
0000000 4e41 5244 494f 2144 cee4 0044 8000 8000
0000010 3e08 004b 0000 8100 0000 0000 0000 80f0
0000020 0100 8000 0800 0000
0000028
And as you can see all the addresses line up as they should, the only thing that should have changed is the kernel size which is expected.
--Test Flashing to the Device--
Move your newKernel.img image file into its own folder (e.g. ~/Documents/Kernel/NewKernel/) then put your device into the recovery mode to test and see if it boots, if it doesn't then "wash, rinse, and repeat".
To put your device into recovery mode, first power it off then power it back on and immediately hold down the POWER, VOLUME UP and VOLUME DOWN buttons. Select RECOVERY from the menu and press POWER to enter.
Code:
$ fastboot flash boot ~/Documents/Kernel/NewKernel/newKernel.img
$ fastboot reboot
Wait a few seconds till it boots up. If you don't receive any device response after a minute or so then put your phone back into recovery and flash the original kernel. If it works then, congratulations! If not try, try rebuilding it again and verifying you have the correct addresses or all the kernel modules installed properly.
Could not be explained better .... thanks a lot ... have included the link to your guide into my thread. :good:
Amazing job dude! Thanks for the TUT. Maybe one time in my free life time... I will try something :good:
Seems very good (because Anarkia sad it :victory: ) ... but my english is bad ...
COULD YOU translate it in german language, please ?
JOOOOKE :laugh:
Thank you for you work :good: :highfive:
Thanks for this great tutorial... Just opening a thread with all that useful info and such excellently organized need a lot of time...
Sent from my Galaxy Nexus using Tapatalk 2
salahmed said:
Thanks for this great tutorial... Just opening a thread with all that useful info and such excellently organized need a lot of time...
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
Thanks I just got tired of trying to outsource my info through so many different sites, not to mention the conflicting or out of date information.
bvt-1 said:
JOOOOKE :laugh:
Click to expand...
Click to collapse
Good show ol' chap!
anarkia1976 said:
Could not be explained better .... thanks a lot ... have included the link to your guide into my thread. :good:
Click to expand...
Click to collapse
Thanks, I appreciate the work you guys are doing as well. Maybe one day I'll step up and do some ROM development and write a better tutorial about that as well. But for now I am happy just doing the kernel work.
Great guide , all the info I need in one thread , I got this one tagged
Sent from my Galaxy Nexus using Xparent Cyan Tapatalk 2
Climber Ty said:
Thanks, I appreciate the work you guys are doing as well. Maybe one day I'll step up and do some ROM development and write a better tutorial about that as well. But for now I am happy just doing the kernel work.
Click to expand...
Click to collapse
I think a tutorial for create a modded ROM step by step will be a great job for xda community. :thumbup:
Sent from my Galaxy Nexus using xda app-developers app
I always get the same error, no matter which toolchain I try
Any suggestions?
See screenshot..
t0wlie said:
I always get the same error, no matter which toolchain I try
Any suggestions?
See screenshot..
Click to expand...
Click to collapse
Your path is wrong.
Wrote "export" on terminal and verify.
Copy complete link from export and do:
ll <complite link>
If there is an error your path is wrong.
[email protected]:~/Dokumente/Kernel/maguro/omap$ make
make: /home/marc/Dokumente/Kernel/maguro/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc: Kommando nicht gefunden
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: »include/generated/mach-types.h« ist bereits aktualisiert.
CC kernel/bounds.s
/bin/sh: 1: /home/marc/Dokumente/Kernel/maguro/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc: not found
make[1]: *** [kernel/bounds.s] Fehler 127
make: *** [prepare0] Fehler 2
[email protected]:~/Dokumente/Kernel/maguro/omap$ ll /home/marc/Dokumente/Kernel/maguro/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc
-rwxr-xr-x 1 marc marc 323104 Dez 4 10:58 /home/marc/Dokumente/Kernel/maguro/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc*
[email protected]:~/Dokumente/Kernel/maguro/omap$
t0wlie said:
I always get the same error, no matter which toolchain I try
Any suggestions?
See screenshot..
Click to expand...
Click to collapse
t0wlie said:
[email protected]:~/Dokumente/Kernel/maguro/omap$ make
make: /home/marc/Dokumente/Kernel/maguro/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc: Kommando nicht gefunden
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: »include/generated/mach-types.h« ist bereits aktualisiert.
CC kernel/bounds.s
/bin/sh: 1: /home/marc/Dokumente/Kernel/maguro/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc: not found
make[1]: *** [kernel/bounds.s] Fehler 127
make: *** [prepare0] Fehler 2
[email protected]:~/Dokumente/Kernel/maguro/omap$ ll /home/marc/Dokumente/Kernel/maguro/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc
-rwxr-xr-x 1 marc marc 323104 Dez 4 10:58 /home/marc/Dokumente/Kernel/maguro/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc*
[email protected]:~/Dokumente/Kernel/maguro/omap$
Click to expand...
Click to collapse
Can you post export command please.
You can try to modify:
/arm-linux-androideabi-gcc
to
/arm-linux-androideabi-
I tried (on antoher user)
export PATH=/home/marc/Dokumente/Kernel/maguro/prebuilt/linux-x86/bin:$PATH
export CROSS_COMPILE=/home/marc/Dokumente/Kernel/maguro/prebuilt/linux-x86/bin/arm-linux-androideabi-
make: /home/marc/Dokumente/Kernel/maguro/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc: Kommando nicht gefunden
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: »include/generated/mach-types.h« ist bereits aktualisiert.
CC kernel/bounds.s
/bin/sh: 1: /home/marc/Dokumente/Kernel/maguro/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc: not found
make[1]: *** [kernel/bounds.s] Fehler 127
make: *** [prepare0] Fehler 2
Try using the CodeSourcery ARM Compilers instead of the prebuilts (http://www.mentor.com/embedded-software/sourcery-tools/sourcery-codebench/editions/lite-edition/). The version you want are the EABI release under the ARM Processors section. These compilers haven't failed me once since I've used them. Let me know if that works for you.
Thank you so much for this guide! I've been compiling my own ROM for a while now, and I feel like taking another step in development, by building my own kernel. I'm running into the following make error(s) though. I'm completely new to kernel development, so I figured I'd fire out my questions here, and hope that you guys can help me out. Below is my entire build environment (as far as I could get) - from the 'mkdir' commands to the *make* errors I'm experiencing... As you'll see, I haven't gotten very far, so I'm clearly doing something wrong at an elementary level. Any help would be appreciated. :good:
Code:
[email protected]:~$ mkdir Blowfish
[email protected]:~$ cd Blowfish
[email protected]:~/Blowfish$ mkdir kernel
[email protected]:~/Blowfish$ cd kernel
[email protected]:~/Blowfish/kernel$ mkdir source
[email protected]:~/Blowfish/kernel$ cd kerne
bash: cd: kerne: No such file or directory
[email protected]:~/Blowfish/kernel$ cd kernel
bash: cd: kernel: No such file or directory
[email protected]:~/Blowfish/kernel$ git clone https://android.googlesource.com/kernel/omap.git
Cloning into 'omap'...
remote: Sending approximately 439.05 MiB ...
remote: Counting objects: 64780, done
remote: Finding sources: 100% (18264/18264)
remote: Getting sizes: 100% (2126/2126)
remote: Compressing objects: 99% (26370/26371)
remote: Total 2138198 (delta 1785247), reused 2137592 (delta 1785041)
Receiving objects: 100% (2138198/2138198), 446.32 MiB | 340 KiB/s, done.
Resolving deltas: 100% (1786095/1786095), done.
[email protected]:~/Blowfish/kernel$ cd omap
[email protected]:~/Blowfish/kernel/omap$ git branch -a
* master
remotes/origin/HEAD -> origin/master
remotes/origin/android-omap-3.0
remotes/origin/android-omap-panda-3.0
remotes/origin/android-omap-steelhead-3.0-ics-aah
remotes/origin/android-omap-tuna-3.0
remotes/origin/android-omap-tuna-3.0-ics-mr1
remotes/origin/android-omap-tuna-3.0-jb-mr0
remotes/origin/android-omap-tuna-3.0-jb-mr1
remotes/origin/android-omap-tuna-3.0-jb-mr1.1
remotes/origin/android-omap-tuna-3.0-jb-pre1
remotes/origin/android-omap-tuna-3.0-mr0
remotes/origin/android-omap-tuna-3.0-mr0.1
remotes/origin/glass-omap-xrr02
remotes/origin/glass-omap-xrr35
remotes/origin/glass-omap-xrr64b
remotes/origin/linux-omap-3.0
remotes/origin/master
remotes/origin/sph-l700-fh05
[email protected]:~/Blowfish/kernel/omap$ git checkout remotes/origin/android-omap-tuna-3.0-jb-pre1
Checking out files: 100% (37659/37659), done.
Note: checking out 'remotes/origin/android-omap-tuna-3.0-jb-pre1'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b new_branch_name
HEAD is now at e8de0e2... video: sii9234: dynamically register and unregister input device
[email protected]:~/Blowfish/kernel/omap$ export ARCH=arm
[email protected]:~/Blowfish/kernel/omap$ export SUBARCH=arm
[email protected]:~/Blowfish/kernel/omap$ export CROSS_COMPILE='/home/jjhiza/Blowfish/arm-2013.05-23-arm-none-eabi.bin'
[email protected]:~/Blowfish/kernel/omap$ make tuna_deconfig
HOSTCC scripts/basic/fixdep
make[1]: *** No rule to make target `tuna_deconfig'. Stop.
make: *** [tuna_deconfig] Error 2
[email protected]:~/Blowfish/kernel/omap$ make
make: /home/jjhiza/Blowfish/arm-2013.05-23-arm-none-eabi.bingcc: Command not found
HOSTCC scripts/kconfig/conf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/lex.zconf.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf --silentoldconfig Kconfig
***
*** Configuration file ".config" not found!
***
*** Please run some configurator (e.g. "make oldconfig" or
*** "make menuconfig" or "make xconfig").
***
make[2]: *** [silentoldconfig] Error 1
make[1]: *** [silentoldconfig] Error 2
make: *** No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'. Stop.
[email protected]:~/Blowfish/kernel/omap$
jjhiza said:
Code:
[email protected]:~/Blowfish/kernel/omap$ git checkout remotes/origin/android-omap-tuna-3.0-jb-pre1
Checking out files: 100% (37659/37659), done.
Note: checking out 'remotes/origin/android-omap-tuna-3.0-jb-pre1'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b new_branch_name
HEAD is now at e8de0e2... video: sii9234: dynamically register and unregister input device
[email protected]:~/Blowfish/kernel/omap$ export ARCH=arm
[email protected]:~/Blowfish/kernel/omap$ export SUBARCH=arm
[email protected]:~/Blowfish/kernel/omap$ export CROSS_COMPILE='/home/jjhiza/Blowfish/arm-2013.05-23-arm-none-eabi.bin'
[email protected]:~/Blowfish/kernel/omap$ make tuna_deconfig
HOSTCC scripts/basic/fixdep
make[1]: *** No rule to make target `tuna_deconfig'. Stop.
make: *** [tuna_deconfig] Error 2
[email protected]:~/Blowfish/kernel/omap$ make
make: /home/jjhiza/Blowfish/arm-2013.05-23-arm-none-eabi.bingcc: Command not found
HOSTCC scripts/kconfig/conf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/lex.zconf.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf --silentoldconfig Kconfig
***
*** Configuration file ".config" not found!
***
*** Please run some configurator (e.g. "make oldconfig" or
*** "make menuconfig" or "make xconfig").
***
make[2]: *** [silentoldconfig] Error 1
make[1]: *** [silentoldconfig] Error 2
make: *** No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'. Stop.
[email protected]:~/Blowfish/kernel/omap$
Click to expand...
Click to collapse
I have run into this issue before, and I believe what I did to solve this was delete all the files in the build directory and re-git them from a specific branch. For example building ICS I used:
Code:
$ git branch -a
$ git checkout remotes/origin/android-omap-tuna-3.0-ics-mr1
Try it and see if that works for your JB files. I think for you it's:
Code:
$ git checkout remotes/origin/android-omap-tuna-3.0-jb-mr1.1
jjhiza said:
Thank you so much for this guide! I've been compiling my own ROM for a while now, and I feel like taking another step in development, by building my own kernel. I'm running into the following make error(s) though. I'm completely new to kernel development, so I figured I'd fire out my questions here, and hope that you guys can help me out. Below is my entire build environment (as far as I could get) - from the 'mkdir' commands to the *make* errors I'm experiencing... As you'll see, I haven't gotten very far, so I'm clearly doing something wrong at an elementary level. Any help would be appreciated. :good:
Code:
[email protected]:~$ mkdir Blowfish
[email protected]:~$ cd Blowfish
[email protected]:~/Blowfish$ mkdir kernel
[email protected]:~/Blowfish$ cd kernel
[email protected]:~/Blowfish/kernel$ mkdir source
[email protected]:~/Blowfish/kernel$ cd kerne
bash: cd: kerne: No such file or directory
[email protected]:~/Blowfish/kernel$ cd kernel
bash: cd: kernel: No such file or directory
[email protected]:~/Blowfish/kernel$ git clone https://android.googlesource.com/kernel/omap.git
Cloning into 'omap'...
remote: Sending approximately 439.05 MiB ...
remote: Counting objects: 64780, done
remote: Finding sources: 100% (18264/18264)
remote: Getting sizes: 100% (2126/2126)
remote: Compressing objects: 99% (26370/26371)
remote: Total 2138198 (delta 1785247), reused 2137592 (delta 1785041)
Receiving objects: 100% (2138198/2138198), 446.32 MiB | 340 KiB/s, done.
Resolving deltas: 100% (1786095/1786095), done.
[email protected]:~/Blowfish/kernel$ cd omap
[email protected]:~/Blowfish/kernel/omap$ git branch -a
* master
remotes/origin/HEAD -> origin/master
remotes/origin/android-omap-3.0
remotes/origin/android-omap-panda-3.0
remotes/origin/android-omap-steelhead-3.0-ics-aah
remotes/origin/android-omap-tuna-3.0
remotes/origin/android-omap-tuna-3.0-ics-mr1
remotes/origin/android-omap-tuna-3.0-jb-mr0
remotes/origin/android-omap-tuna-3.0-jb-mr1
remotes/origin/android-omap-tuna-3.0-jb-mr1.1
remotes/origin/android-omap-tuna-3.0-jb-pre1
remotes/origin/android-omap-tuna-3.0-mr0
remotes/origin/android-omap-tuna-3.0-mr0.1
remotes/origin/glass-omap-xrr02
remotes/origin/glass-omap-xrr35
remotes/origin/glass-omap-xrr64b
remotes/origin/linux-omap-3.0
remotes/origin/master
remotes/origin/sph-l700-fh05
[email protected]:~/Blowfish/kernel/omap$ git checkout remotes/origin/android-omap-tuna-3.0-jb-pre1
Checking out files: 100% (37659/37659), done.
Note: checking out 'remotes/origin/android-omap-tuna-3.0-jb-pre1'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b new_branch_name
HEAD is now at e8de0e2... video: sii9234: dynamically register and unregister input device
[email protected]:~/Blowfish/kernel/omap$ export ARCH=arm
[email protected]:~/Blowfish/kernel/omap$ export SUBARCH=arm
[email protected]:~/Blowfish/kernel/omap$ export CROSS_COMPILE='/home/jjhiza/Blowfish/arm-2013.05-23-arm-none-eabi.bin'
[email protected]:~/Blowfish/kernel/omap$ make tuna_deconfig
HOSTCC scripts/basic/fixdep
make[1]: *** No rule to make target `tuna_deconfig'. Stop.
make: *** [tuna_deconfig] Error 2
[email protected]:~/Blowfish/kernel/omap$ make
make: /home/jjhiza/Blowfish/arm-2013.05-23-arm-none-eabi.bingcc: Command not found
HOSTCC scripts/kconfig/conf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/lex.zconf.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf --silentoldconfig Kconfig
***
*** Configuration file ".config" not found!
***
*** Please run some configurator (e.g. "make oldconfig" or
*** "make menuconfig" or "make xconfig").
***
make[2]: *** [silentoldconfig] Error 1
make[1]: *** [silentoldconfig] Error 2
make: *** No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'. Stop.
[email protected]:~/Blowfish/kernel/omap$
Click to expand...
Click to collapse
If you haven't had luck figuring out the problem , you need to add a hyphen at the end of your toolchain , so it would be
" export CROSS_COMPILE=~/home/jjhiza/Blowfish/arm-2013.05-23-arm-none-eabi- "
that just tells it to use all the binary files that start with eabi-
Sent from my Galaxy Nexus using Tapatalk
Climber Ty said:
I know a lot of this has been posted before in other locations, but recently I have found some of that data to be incomplete when I was building a custom kernel for my GNex, so just bear with me.
Click to expand...
Click to collapse
Dude, this tutorial is f'king amazing.
For some odd reason, my kernel will boot and run just fine temporarily using the "fastboot boot" command, but I get write errors when trying to "fastboot flash" it, and flashing the new kernel fails. I've tried in xubuntu 12.04 x86, Windows 7 x64 using command line and Windows x64 using Wug's Nexus toolkit.
Any ideas?
I tried repacking the ROM that I'm using (Shiny 4.3 10/11/13 build) with my kernel and reflashing it, but no joy. I'm sure there's more to making kernel into a flashable .zip than I realize...

LineageOS source compilation fails

I'm trying to build Lineage 14.1 for serranoltexx (for 5 days now).
When I started the compilation using "breakfast serranoltexx" an error appears after the 7 percent mark (~2minutes).
I followed this guide: wiki.lineageos. org/devices/serranoltexx/build
with a fresh Ubuntu 17.04 VM Box installation two times but that error always appears.
The only thing I still could mention is that pulled the proprietary blobs using my phone as stated in the instructions not with the stock Rom but Lineage 14.1 already installed.
Full console output:
(error at line #321) pastebin. com/vC06fV36
Error:
Code:
make: Leaving directory '/home/mrglue/android/lineage/kernel/samsung/msm8930-common'
[ 7% 2535/34256] Building Kernel
FAILED: /bin/bash -c "(make -j4 CFLAGS_MODULE=\"-fno-pic\" -C kernel/samsung/msm8930-common O=/home/mrglue/android/lineage/out/target/product/serranoltexx/obj/KERNEL_OBJ ARCH=arm CROSS_COMPILE=\"/home/mrglue/android/lineage/prebuilts/misc/linux-x86/ccache/ccache arm-linux-androidkernel-\" zImage ) && (if grep -q 'CONFIG_OF=y' /home/mrglue/android/lineage/out/target/product/serranoltexx/obj/KERNEL_OBJ/.config ; then echo \"Building DTBs\" ; make -j4 CFLAGS_MODULE=\"-fno-pic\" -C kernel/samsung/msm8930-common O=/home/mrglue/android/lineage/out/target/product/serranoltexx/obj/KERNEL_OBJ ARCH=arm CROSS_COMPILE=\"/home/mrglue/android/lineage/prebuilts/misc/linux-x86/ccache/ccache arm-linux-androidkernel-\" dtbs ; else echo \"DTBs not enabled\" ; fi ) && (if grep -q 'CONFIG_MODULES=y' /home/mrglue/android/lineage/out/target/product/serranoltexx/obj/KERNEL_OBJ/.config ; then echo \"Building Kernel Modules\" ; make -j4 CFLAGS_MODULE=\"-fno-pic\" -C kernel/samsung/msm8930-common O=/home/mrglue/android/lineage/out/target/product/serranoltexx/obj/KERNEL_OBJ ARCH=arm CROSS_COMPILE=\"/home/mrglue/android/lineage/prebuilts/misc/linux-x86/ccache/ccache arm-linux-androidkernel-\" modules && make -j4 CFLAGS_MODULE=\"-fno-pic\" -C kernel/samsung/msm8930-common O=/home/mrglue/android/lineage/out/target/product/serranoltexx/obj/KERNEL_OBJ INSTALL_MOD_PATH=../../system ARCH=arm CROSS_COMPILE=\"/home/mrglue/android/lineage/prebuilts/misc/linux-x86/ccache/ccache arm-linux-androidkernel-\" modules_install && mdpath=\`find /home/mrglue/android/lineage/out/target/product/serranoltexx/system/lib/modules -type f -name modules.order\`; if [ \"\$mdpath\" != \"\" ];then mpath=\`dirname \$mdpath\`; ko=\`find \$mpath/kernel -type f -name *.ko\`; for i in \$ko; do arm-linux-androidkernel-strip --strip-unneeded \$i; mv \$i /home/mrglue/android/lineage/out/target/product/serranoltexx/system/lib/modules/; done; fi && mdpath=\`find /home/mrglue/android/lineage/out/target/product/serranoltexx/system/lib/modules -type f -name modules.order\`; if [ \"\$mdpath\" != \"\" ];then mpath=\`dirname \$mdpath\`; rm -rf \$mpath; fi ; else echo \"Kernel Modules not enabled\" ; fi )"

[Q] Help to compile the Mi A3 kernel?

Hi, I'm wanting to compile the mi-a3 kernel to use with GrapheneOs(as it needs to be compiled before the rom compilation).
I'm trying to compile it with this script:
Code:
#!/bin/bash
set -o errexit -o pipefail
[[ $# -eq 1 ]] || exit 1
DEVICE=$1
if [[ $DEVICE != laurel_sprout && $DEVICE != blueline && $DEVICE != crosshatch && $DEVICE != bonito ]]; then
echo invalid device codename
exit 1
fi
ROOT_DIR=$(realpath ../../..)
export KBUILD_BUILD_VERSION=1
export KBUILD_BUILD_USER=grapheneos
export KBUILD_BUILD_HOST=grapheneos
export KBUILD_BUILD_TIMESTAMP="$(date -d "@$(git --no-pager show -s --format=%ct)")"
PATH="$ROOT_DIR/prebuilts/build-tools/linux-x86/bin:$PATH"
PATH="$ROOT_DIR/prebuilts/build-tools/path/linux-x86:$PATH"
PATH="$ROOT_DIR/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin:$PATH"
PATH="$ROOT_DIR/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin:$PATH"
PATH="$ROOT_DIR/prebuilts/clang/host/linux-x86/clang-r383902/bin:$PATH"
PATH="$ROOT_DIR/prebuilts/misc/linux-x86/lz4:$PATH"
PATH="$ROOT_DIR/prebuilts/misc/linux-x86/dtc:$PATH"
PATH="$ROOT_DIR/prebuilts/misc/linux-x86/libufdt:$PATH"
export LD_LIBRARY_PATH="$ROOT_DIR/prebuilts/clang/host/linux-x86/clang-r383902/lib64:$LD_LIBRARY_PATH"
chrt -bp 0 $$
make \
O=out \
ARCH=arm64 \
CC=clang \
HOSTCC=clang \
HOSTCXX=clang++ \
CLANG_TRIPLE=aarch64-linux-gnu- \
CROSS_COMPILE=aarch64-linux-android- \
CROSS_COMPILE_ARM32=arm-linux-androideabi- \
vendor/laurel_sprout-perf_defconfig
make -j$(nproc) \
O=out \
ARCH=arm64 \
CC=clang \
HOSTCC=clang \
HOSTCXX=clang++ \
CLANG_TRIPLE=aarch64-linux-gnu- \
CROSS_COMPILE=aarch64-linux-android- \
CROSS_COMPILE_ARM32=arm-linux-androideabi-
mkdir -p "$ROOT_DIR/device/xiaomi/$DEVICE-kernel"
cp out/arch/arm64/boot/{dtbo.img,Image.lz4} "$ROOT_DIR/device/xiaomi/$DEVICE-kernel"
which I modified from the one at kernel/google/crosshatch/build.sh on the grapheneOs android 10 repo.
But when I run the script I get an make error, this is the last few lines from the script when it throws the error out:
Code:
../drivers/usb/phy/phy-msm-qusb.c:1086:4: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation]
dev_err(dev, "couldn't get iface_clk(%d)\n", ret);
^
../drivers/usb/phy/phy-msm-qusb.c:1084:3: note: previous statement is here
if (ret == -EPROBE_DEFER)
^
CC drivers/usb/storage/transport.o
1 warning generated.
CC drivers/usb/storage/usb.o
CC drivers/usb/storage/initializers.o
AR drivers/usb/phy/built-in.o
CC drivers/usb/storage/sierra_ms.o
CC drivers/usb/storage/option_ms.o
CC drivers/usb/storage/usual-tables.o
AR drivers/usb/storage/usb-storage.o
AR drivers/usb/storage/built-in.o
AR drivers/usb/built-in.o
AR drivers/built-in.o
make[1]: Saindo do diretório '/run/media/cota/47053fcc-4636-4d26-8e40-bb11fa4e2e05/Android/grapheneos-RP1A.201105.002.2020.11.03.03/kernel/xiaomi/laurel_sprout/out'
make: *** [Makefile:146: sub-make] Erro 2
I think the problem with this is the defconfig I used, which was located at arch/arm64/configs/vendor/laurel_sprout-perf_defconfig as I don't know which one I should use but can anyone help me into compiling the kernel?
kernel link
thanks.

Categories

Resources