Rockchip-bsp Kernel Build Fail

Hi all,

I am having issues building a kernel image using the rockchip-bsp repository and instructions.

The end goal is to add in the ENC28J60 driver for the rk3566-radxa-cm3-rasp4io def config, but I am starting out just building by the exact instructions.

After cloning the repository, and doing a successful build of the u-boot image using build/, I run the script to build the kernel and get this output with a failure:

Building kernel for rk3568-rock-3a board! 4.19.193 scripts/kconfig/conf --syncconfig Kconfig CALL scripts/ CHK include/generated/compile.h GZIP kernel/config_data.gz MKIMAGE arch/arm64/boot/dts/rockchip/overlay/rockchip-fixup.scr /bin/sh: 1: mkimage: not found scripts/Makefile.lib:330: recipe for target 'arch/arm64/boot/dts/rockchip/overlay/rockchip-fixup.scr' failed make[3]: *** [arch/arm64/boot/dts/rockchip/overlay/rockchip-fixup.scr] Error 127 scripts/ recipe for target 'arch/arm64/boot/dts/rockchip/overlay' failed make[2]: *** [arch/arm64/boot/dts/rockchip/overlay] Error 2 scripts/ recipe for target 'arch/arm64/boot/dts/rockchip' failed make[1]: *** [arch/arm64/boot/dts/rockchip] Error 2 arch/arm64/Makefile:150: recipe for target 'dtbs' failed make: *** [dtbs] Error 2 make: *** Waiting for unfinished jobs.... MAKE KERNEL IMAGE FAILED.

My understanding is that the mkimage is only for the u-boot image. Though the error is specifically calling out rockchip-fixup.scr as an ERROR 127, which I can confirm does exist, and is in the correct directory.

I am finding it impossible to move on to the next step of menuconfig and adding in the ENC28J60 if I cannot get the kernel to build with no modifications whatsoever…

Any help is appreciated!


NOTE: This fix does not work at all, please read on further down this thread

I had the exact same issue today (30/3-2023), and I think I found a temporary solution for the problem.

Make a copy of the rockchip-fixup.scr-cmd fil into a file called rockchip-fixup.scr located in the same directory arch/arm64/boot/dts/rockchip/overlay

I hope this helps you on the short path. Long term fix is still awaited.

Same problem here, have you found the solution? Tried what @Lykkeberg said but still not working…

I’m sorry for having mislead you guys, the fix I suggested turned out to be totally bogus. In my case I found that installing the mkimage tool on the build PC solved the issue for me, since it was the absence of that tool which made the build step with the scr-cmd file fail.

I had to run these commands on my Ubuntu 20.04 build PC:

sudo apt-get update
sudo apt-get install u-boot-tools

this got me the mkimage tool and I was able to successfully build and link the Kernel


It worked, thank you