Trying to build a custom kernel/boot.img but got no result, won't boot

Hi everyone, I’m new here. So I am trying to build a custom kernel for the Samsung Galaxy A03 (SM-A035F), the OS im using for this is Ubuntu 22.04. First I download the source code from Samsung Open Source and all the required tools for kernel building (Gcc 4.9 and Clang r383902). I only changed the local version in the config file. I ran the build and it success, the output is: a ‘dts’ folder,image.gz and image. After that I get the stock and working boot.img, and to repack/replace it with the new kernel I tried 3 tools: mkboot.img, mkboot, Imgutil. I even tried to replace the kernel with a Hex Editor. And i flashed the new boot.img with proper tool,Odin. But none of them would boot normally, the phone would just bootlooping. The original boot.img is 64mb in size, after repack/replace it’s 24mb. And even if i try to repack the stock boot.img (not changing anything, just unpack and repack it), same thing happens. I would like to know what I did wrong, and how to make a boot.img with the custom kernel. Thank for reading this!

  1. If there was no build and compilation script in the kernel source code, make sure that you did everything correctly, there is an assembly instruction in the compressed kernel if the kernel was taken from samsung open source
  2. Try to replace image (not image.gz )
    cores in the core firmware AP using AIK
  3. Try to flash the kernel using TWRP
  4. Try to flash the kernel using the Magisk module (Magic ToolFlash)

Hello

You check if the Samsung open source community can help you.

Samsung Open Source > Ask the projects / Community