Linux source compiling error

I’m trying to compile linux source on khadas vim3. (Ubuntu 20.04 installed)

Then ended up with following error,

CC [M]  drivers/amlogic/media_modules/frame_provider/decoder/utils/frame_check.o
drivers/amlogic/media_modules/frame_provider/decoder/utils/frame_check.c: In function ‘write_crc_work’:
drivers/amlogic/media_modules/frame_provider/decoder/utils/frame_check.c:287:12: error: stack usage is 2016 bytes [-Werror=stack-usage=]
  287 | static int write_crc_work(struct pic_check_mgr_t *mgr)
      |            ^~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[6]: *** [scripts/ drivers/amlogic/media_modules/frame_provider/decoder/utils/frame_check.o] Error 1
make[5]: *** [scripts/ drivers/amlogic/media_modules/frame_provider/decoder/utils] Error 2
make[4]: *** [scripts/ drivers/amlogic/media_modules/frame_provider/decoder] Error 2
make[3]: *** [scripts/ drivers/amlogic/media_modules/frame_provider] Error 2
make[2]: *** [scripts/ drivers/amlogic/media_modules] Error 2
make[1]: *** [scripts/ drivers/amlogic] Error 2
make: *** [Makefile:1118: drivers] Error 2

Can anyone plz help me to solve this? (Still im not used fenix to build the kernel, im passionate about build with souce code itself.)

You need to setup the cross compiler youself. And follow the instructions to build the kernel.

$ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- kvims_defconfig
$ make -j8 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- Image dtbs  modules
1 Like

Is this cross-compile part mandatory for compiling the Linux source code inside the khadas board itself?

The instructions above is to build the kernel on your host PC. If you want to build on your VIM3, you can follow these instructions.

$ make kvims_defconfig
$ make -j6 Image dtbs  modules