/bin/sh: 1: bison: not found while compiling own kernel module with poky-dunfell #bitbake


@prashant2314
 

hello team,
I'm trying to build my own kernel module with yocto for raspberry-pi kernel, but it's giving me error that "bison not found", as-

DEBUG: Executing shell function do_compile
NOTE: make -j 12 KERNEL_SRC=/home/dialtronics/DIALT_WORK/RPI_YOCTO/PS_RPI_BUILD/FXS_BSP/workspace/FXS/tmp/work-shared/raspberrypi3/kernel-source KSRC=/home/dialtronics/DIALT_WORK/RPI_YOCTO/PS_RPI_BUILD/FXS_BSP/workspace/FXS/tmp/work-shared/raspberrypi3/kernel-build-artifacts KERNEL_PATH=/home/dialtronics/DIALT_WORK/RPI_YOCTO/PS_RPI_BUILD/FXS_BSP/workspace/FXS/tmp/work-shared/raspberrypi3/kernel-source KERNEL_VERSION=5.4.72-v7 CC=arm-poky-linux-gnueabi-gcc  -mno-thumb-interwork -marm -fuse-ld=bfd -fmacro-prefix-map=/home/dialtronics/DIALT_WORK/RPI_YOCTO/PS_RPI_BUILD/FXS_BSP/workspace/FXS/tmp/work/raspberrypi3-poky-linux-gnueabi/ax88772/1.0-r0=/usr/src/debug/ax88772/1.0-r0                      -fdebug-prefix-map=/home/dialtronics/DIALT_WORK/RPI_YOCTO/PS_RPI_BUILD/FXS_BSP/workspace/FXS/tmp/work/raspberrypi3-poky-linux-gnueabi/ax88772/1.0-r0=/usr/src/debug/ax88772/1.0-r0                      -fdebug-prefix-map=/home/dialtronics/DIALT_WORK/RPI_YOCTO/PS_RPI_BUILD/FXS_BSP/workspace/FXS/tmp/work/raspberrypi3-poky-linux-gnueabi/ax88772/1.0-r0/recipe-sysroot=                      -fdebug-prefix-map=/home/dialtronics/DIALT_WORK/RPI_YOCTO/PS_RPI_BUILD/FXS_BSP/workspace/FXS/tmp/work/raspberrypi3-poky-linux-gnueabi/ax88772/1.0-r0/recipe-sysroot-native=  -fdebug-prefix-map=/home/dialtronics/DIALT_WORK/RPI_YOCTO/PS_RPI_BUILD/FXS_BSP/workspace/FXS/tmp/work-shared/raspberrypi3/kernel-source=/usr/src/kernel LD=arm-poky-linux-gnueabi-ld.bfd   AR=arm-poky-linux-gnueabi-ar  O=/home/dialtronics/DIALT_WORK/RPI_YOCTO/PS_RPI_BUILD/FXS_BSP/workspace/FXS/tmp/work-shared/raspberrypi3/kernel-build-artifacts KBUILD_EXTRA_SYMBOLS=
make -C /home/dialtronics/DIALT_WORK/RPI_YOCTO/PS_RPI_BUILD/FXS_BSP/workspace/FXS/tmp/work-shared/raspberrypi3/kernel-build-artifacts SUBDIRS=/home/dialtronics/DIALT_WORK/RPI_YOCTO/PS_RPI_BUILD/FXS_BSP/workspace/FXS/tmp/work/raspberrypi3-poky-linux-gnueabi/ax88772/1.0-r0 modules
make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
make[1]: Entering directory '/home/dialtronics/DIALT_WORK/RPI_YOCTO/PS_RPI_BUILD/FXS_BSP/workspace/FXS/tmp/work-shared/raspberrypi3/kernel-build-artifacts'
  GEN     Makefile
  YACC    scripts/kconfig/parser.tab.[ch]
/bin/sh: 1: bison: not found
make[4]: *** [scripts/Makefile.host:17: scripts/kconfig/parser.tab.h] Error 127
make[3]: *** [/home/dialtronics/DIALT_WORK/RPI_YOCTO/PS_RPI_BUILD/FXS_BSP/workspace/FXS/tmp/work-shared/raspberrypi3/kernel-source/Makefile:590: syncconfig] Error 2
make[2]: *** [/home/dialtronics/DIALT_WORK/RPI_YOCTO/PS_RPI_BUILD/FXS_BSP/workspace/FXS/tmp/work-shared/raspberrypi3/kernel-source/Makefile:696: include/config/auto.conf.cmd] Error 2
make[1]: *** [/home/dialtronics/DIALT_WORK/RPI_YOCTO/PS_RPI_BUILD/FXS_BSP/workspace/FXS/tmp/work-shared/raspberrypi3/kernel-source/Makefile:179: sub-make] Error 2
make[1]: Leaving directory '/home/dialtronics/DIALT_WORK/RPI_YOCTO/PS_RPI_BUILD/FXS_BSP/workspace/FXS/tmp/work-shared/raspberrypi3/kernel-build-artifacts'
make: *** [Makefile:19: default] Error 2
ERROR: oe_runmake failed
WARNING: exit code 1 from a shell command.


Here is my bb file for the same-

SUMMARY = "WAN IC asix kernel module"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://LICENSE;md5=014e508ee78ef83e5007b9cb3834f0e9"

DEPENDS = "virtual/kernel bc bison"

inherit module

PR = "r0"
PV = "1.0"

SRC_URI = "file://Makefile \
          file://asix.c \
          file://asix.h \
          file://axusbnet.c \
          file://axusbnet.h \
          file://command.h \
          file://debug.txt \
          file://eeprom_data.tar.bz2 \
          file://ioctl.c \
          file://ioctl.h \
          file://ioctl_readme \
          file://readme \
          file://readme \
          file://LICENSE \
"

S = "${WORKDIR}"

export TARGET_SYS
EXTRA_OEMAKE += "KSRC=${STAGING_KERNEL_BUILDDIR}"

do_compile_append() {
        ${CC} ioctl.c -o ioctl
}

do_install_prepend() {
        export DESTDIR="${D}"
}




# The inherit of module.bbclass will automatically name module packages with
# "kernel-module-" prefix as required by the oe-core build environment.



Same kernel module with poky zeus and rpi kernel 4.19 got compiled successfully, but here I'm getting issue with poky dunfell with Rpi kernel 5.4

Please help me resolve this issue.

Thanks.

Join {yocto@lists.yoctoproject.org to automatically receive all group messages.