Fedora 34 rpmbuild issue

I am trying to build custom kernel image for Fedora IoT. I have a Raspberry-Pi CM3 with Fedora IoT 33 (having kernel 5.10.18) and I want to build kernel image (with kernel version 4.19) for the board. I am following the below article:

I have a Fedora 34 workstation and I am trying to build for kernel 4.19 with target architecture as “armv7hl”. I downloaded the kernel source .rpm from below url:

I am getting the following error when I execute the command ‘rpmbuild -bb --target armv7hl kernel.spec --define “_sourcedir $PWD”’:

gcc: error: unrecognized argument in option ‘-mabi=aapcs-linux’
gcc: note: valid arguments to ‘-mabi=’ are: ms sysv
make[1]: *** [scripts/Makefile.host:90: scripts/basic/fixdep] Error 1
make: *** [Makefile:466: scripts_basic] Error 2

I didn’t find any valueable information over the internet related to error. Any help in this regard? How can I overcome this error?

1 Like