Shubhamvis98 / toolchains

12 stars 14 forks source link

Samsung S20 FE kernel #1

Closed privacyguy123 closed 2 months ago

privacyguy123 commented 11 months ago

bro can you link the files needed to compile this kernel? can't get it to work with your files/video

################################################################################
1. How to Build
        - get Toolchain
                From android git serveru, codesourcery and etc ..
                - gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-

        - make output folder 
                EX) OUTPUT_DIR=out
                $ mkdir out

        - edit Makefile
                edit "CROSS_COMPILE" to right toolchain path(You downloaded).
                        EX)  CROSS_COMPILE=<android platform directory you download>/android/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-
                        Ex)  CROSS_COMPILE=/usr/local/toolchain/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android- // check the location of toolchain
                edit "REAL_CC" to right toolchain path(You downloaded).
                        EX)  CC=<android platform directory you download>/android/vendor/qcom/proprietary/llvm-arm-toolchain-ship/10.0/bin/clang
                edit "CLANG_TRIPLE" to right path(You downloaded).

        - to Build
                $ export ARCH=arm64
                $ make -C $(pwd) O=$(pwd)/out DTC_EXT=$(pwd)/tools/dtc CONFIG_BUILD_ARM64_DT_OVERLAY=y CLANG_TRIPLE=aarch64-linux-gnu- vendor/r8q_eur_openx_defconfig
                $ make -C $(pwd) O=$(pwd)/out DTC_EXT=$(pwd)/tools/dtc CONFIG_BUILD_ARM64_DT_OVERLAY=y CLANG_TRIPLE=aarch64-linux-gnu-

2. Output files
        - Kernel : arch/arm64/boot/Image
        - module : drivers/*/*.ko

3. How to Clean
        Change to OUTPUT_DIR folder
        EX) /home/dpi/qb5_8814/workspace/P4_1716/android/out/target/product/r8q/out
        $ make clean
################################################################################
Shubhamvis98 commented 11 months ago

can you try the clang video. and why you're editing makefile. i haven't mentioned these things that you posted above.

privacyguy123 commented 11 months ago

haven't edited anything yet.

I've watched the clang video yes, my kernel is expecting different environment variables than the one in your vid

Only getting errors so far

make[1]: Entering directory '/home/laptop/S20Kernel/Kernel/output'
make[2]: secgetspf: No such file or directory
  HOSTCC  scripts/basic/fixdep
  GEN     ./Makefile
  HOSTCC  scripts/kconfig/conf.o
  YACC    scripts/kconfig/zconf.tab.c
  LEX     scripts/kconfig/zconf.lex.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf  --syncconfig Kconfig
drivers/gps/Kconfig:3:warning: prompt redefined
drivers/gps/Kconfig:1:warning: ignoring type redefinition of 'GPS_BCMxxxxx' from 'tristate' to 'bool'
drivers/gps/Kconfig:10:warning: prompt redefined
drivers/gps/Kconfig:8:warning: ignoring type redefinition of 'GPS_BCM4752' from 'tristate' to 'bool'
drivers/gps/Kconfig:17:warning: prompt redefined
drivers/gps/Kconfig:15:warning: ignoring type redefinition of 'GPS_BCM47521' from 'tristate' to 'bool'
drivers/gps/Kconfig:24:warning: prompt redefined
drivers/gps/Kconfig:22:warning: ignoring type redefinition of 'GPS_BCM4753' from 'tristate' to 'bool'
drivers/gps/Kconfig:31:warning: prompt redefined
drivers/gps/Kconfig:29:warning: ignoring type redefinition of 'GPS_BCM47531' from 'tristate' to 'bool'
drivers/gps/Kconfig:38:warning: prompt redefined
drivers/gps/Kconfig:36:warning: ignoring type redefinition of 'GPS_BCM4773' from 'tristate' to 'bool'
drivers/leds/Kconfig:808:warning: ignoring type redefinition of 'LEDS_KTD2692' from 'tristate' to 'bool'
drivers/sensors/Kconfig:187: warning: 'SENSORS_A96T365IF' defined with blank help text
drivers/samsung/debug/Kconfig:4:warning: ignoring type redefinition of 'SEC_DEBUG' from 'tristate' to 'bool'
'rivers/perf_mgr/Kconfig:1:warning: ignoring unsupported character '
'rivers/perf_mgr/Kconfig:2:warning: ignoring unsupported character '
'rivers/perf_mgr/Kconfig:8:warning: ignoring unsupported character '
drivers/samsung/debug/Kconfig:30:warning: defaults for choice values not supported
drivers/samsung/debug/Kconfig:36:warning: defaults for choice values not supported
***
*** Configuration file ".config" not found!
***
*** Please run some configurator (e.g. "make oldconfig" or
*** "make menuconfig" or "make xconfig").
***
make[4]: *** [../scripts/kconfig/Makefile:69: syncconfig] Error 1
make[3]: *** [../Makefile:545: syncconfig] Error 2
../Makefile:642: include/config/auto.conf.cmd: No such file or directory
make[2]: *** [../Makefile:654: include/config/auto.conf.cmd] Error 2
make[1]: *** [/home/laptop/S20Kernel/Kernel/Makefile:286: __build_one_by_one] Error 2
make[1]: Leaving directory '/home/laptop/S20Kernel/Kernel/output'
make: *** [Makefile:146: sub-make] Error 2
Shubhamvis98 commented 11 months ago

can you post the commands that you've executed before running the compilation and also your make command with all options

Shubhamvis98 commented 11 months ago

as per the logs, seems like you forget to run make defconfig. you can see the error Configuration file ".config" not found!