r/kernel • u/Lomios2002 • Dec 19 '22
compiling kernel, it shows error, can anyone help me? I learned how to do it from Youtube, so I don't know much about it
If I have any shortcomings, please help here. I watched clips of both foreigner and Thai, but when compiling, there is an error. The command that I use to compile Kernel of MI A2
1
u/Lomios2002 Dec 19 '22 edited Dec 19 '22
2
u/RandomLurkerName Dec 19 '22
Wow that's a lot of errors. So tell me what exactly are you compiling? Do you have any links I can read? One error that stands out is...
/drivers/acpi/acpica/accommon.h:63:10: fatal error: acclib.h: No such file or directory 63 | #include "acclib.h" /* C library interfaces */Try installing the libacpi-dev package to get past that one, the others may have to do with the config.
1
u/Lomios2002 Dec 19 '22
I am compiling the MI A2 kernel to support Nethunter functions
4
u/RandomLurkerName Dec 19 '22
MI A2 kernel to support Nethunter
Give me sometime tonight and I'll see what I can do. Cross-compiling is tricky business. In all seriousness I wouldn't mix my build/development machine and my kali box. Kali can be ____ sometimes
1
u/Lomios2002 Dec 19 '22
Thank you very much brother I'll keep trying to find a way tomorrow
2
u/RandomLurkerName Dec 19 '22
I have a question. Is this the kernel you're compiliing?
https://github.com/SiddharthBharadwaj/android_kernel_xiaomi_jasmine_sprout
1
1
u/Lomios2002 Dec 20 '22
I try to compile again by using make menuconfig command. The result is 1 problem solved, but the problem encounters the unknown one.
compilation terminated.
make[4]: *** [../scripts/Makefile.build:283: drivers/acpi/acpica/dsargs.o] Error 1
make[3]: *** [../scripts/Makefile.build:489: drivers/acpi/acpica] Error 2
make[2]: *** [../scripts/Makefile.build:489: drivers/acpi] Error 2
make[1]: *** [/home/kali/999/android_kernel_xiaomi_jasmine_sprout/Makefile:1027: drivers] Error 2
make[1]: Leaving directory '/home/kali/999/android_kernel_xiaomi_jasmine_sprout/out'
make: *** [Makefile:152: sub-make] Error 2
1
u/kolorcuk Dec 19 '22
https://phoenixnap.com/kb/build-linux-kernel
Did you "install required packages"?
-1
1
u/Lomios2002 Dec 19 '22
I've been trying to do it for 3-4 days but still getting error. I don't study directly in this area, just want to try to compile custom kernel by myself
1
1
u/pyte_c Dec 20 '22
You may want to have a look into this:
https://wiki.lineageos.org/devices/jasmine_sprout/build
1
u/Lomios2002 Dec 20 '22 edited Dec 21 '22
Now I have successfully compiled the file. but it install with twrp failed showing error
can't define /dev/block/platform/omap/omap_hsmmc.0/by-name/boot
Update process ended with error: 1
1
u/Lomios2002 Dec 20 '22
i compile with source kernel from github https://github.com/LineageOS/android_kernel_xiaomi_sdm660
and it compile successfully
1
u/pyte_c Dec 20 '22
So the issue is resolved?
1
u/Lomios2002 Dec 20 '22
install with twrp not pass
1
u/RandomLurkerName Dec 22 '22 edited Dec 23 '22
Ok with the above kernel and the fine instructions at https://www.kali.org/docs/nethunter/porting-nethunter-kernel-builder/
I have a kernel with the nethunter patches built, but I don't have a device to test it on.
This should work with TWRP
If you'd like to build it yourself I may be convinced to write a tutorial, but let me get some rest. It's been a long night. Let me know if everything works.
Edit: I updated the kernel to include support for cifs nfs and extra file systems like ntfs
0
u/Lomios2002 Dec 19 '22
If I have any shortcomings, please help here. I watched clips of both foreigner and Thai, but when compiling, there is an error.
command that i used to MI A2 compile kernel
export ARCH=arm64
export SUBARCH=arm64
export CROSS_COMPILE=/home/kali/mykernel/android_kernel_xiaomi_jasmine_sprout-Unified/gcc/bin/aarch64-elf-
mkdir -p out
make O=out sdm660_defconfig
make clean && make mrproper
make O=out -j24
6
u/RandomLurkerName Dec 19 '22
You'll probably need to post the whole output, the error may happen earlier. I can't tell from the short snip of the last few lines. Use pastebin.com