To compile the kernel, you need the compiletc, perl5, bc, ncurses-dev and libelf-dev extensions.
The link to linux-5.4.51-piCore.tar.xz on the server was broken, it should be OK now.
To build an out of kernel module, you need to configure the kernel with the apropriate piCore config and create a build symlink to your prepare kernel source.