In user space programs, `main()` is the entry point to the program that is called by the libc initialization code is executed on Linux") when the binary is executed. Kernel code does not have the luxury to rely on libc, as libc itself relies on the kernel syscall interface for memory allocation, I/O, process managements etc.
That said, the equivalent of `main()` in kernel code is `start_kernel()`, which is called by the bootloader after having loaded the kernel image, decompressed it into memory and setup essential hardware and memory paging. `start_kernel()` performs the majority of the system setup and eventually spawns the init process.
The entry point to Linux kernel modules is an init function that is registered with the kernel by calling the `module_init()` macro. The registered module init function is then called by kernel code through the `do_initcalls()` function during kernel startup.