Build Kernel 5.10

How I can build Kernel 5.10?

is your device (m5/m2pro) supported by mainline kernel?

if yes you have to do these things:

  1. set ARCH (armhf/arm64) and your crossompiler

    export ARCH=arm64;export CROSS_COMPILE=‘ccache aarch64-linux-gnu-’

  2. import a defconfig matching your device (on arm64 there is only 1 defconfig for all devices). only filename located in arch/$ARCH/configs

    make defconfig

  3. adjust via menuconfig

    make menuconfig

  4. build (maybe need additional params like dtbs,LOAD_ADDRESS or similar)

    make -j8

  5. sometimes you need to call mkimage (for uImage) or other commands (e.g. for itb) to build the image you want

Hi Frank, thanks for the instructions but I already build the kernel. I used menuconfig to avoid compile some things tha BPI-M5 don’t need, but I don’t know how to make or get the uInitrd file from the builded files. ¿There is some specific commando to do it o is created when I compile the kernel?

This is the commands that I use to compile the kernel:

make -j4 Image dtbs modules -C linux

INSTALL_MOD_PATH=$PWD/output make -j4 modules modules_install -C linux

make headers_install INSTALL_HDR_PATH=$PWD/output -C linux

I’m not sure which imagetype is used on your board and where the kernel/dtb needs to be placed and if uboot config needs to be changed.

Initrd is not part of linux…it is a basic linux userspace system like busybox,buildroot or similar. If you have system on your card,mostly you do not need initrd