Hailortcli fw-control identify Error

I am trying to install HailoRT using the Hailo-8 M.2 board following the guide at https://hailo.ai/developer-zone/documentation/hailort-v4-18-0/?sp_referrer=install/install.html#installation-on-ubuntu

I tried the following combinations of linux-image, Ubuntu version and hailort versions

Can you provide support?

Ubuntu 24.04, tested with linux-image-6.8.0-41-generic and linux-image-6.8.0-31-generic and got the same behaviour

Hailort 4.18.0

  • Got error while installing hailort-pcie-driver
xor@exor-gs02:~/hailo$ sudo dpkg --install hailort_4.18.0_amd64.deb hailort-pcie-driver_4.18.0_all.deb
Selecting previously unselected package hailort.
(Reading database ... 213456 files and directories currently installed.)
Preparing to unpack hailort_4.18.0_amd64.deb ...
Unpacking hailort (4.18.0) ...
Selecting previously unselected package hailort-pcie-driver.
Preparing to unpack hailort-pcie-driver_4.18.0_all.deb ...
Verifying secureboot is disabled.
Unpacking hailort-pcie-driver (4.18.0) ...
Setting up hailort (4.18.0) ...
Do you wish to activate hailort service? (required for most pyHailoRT use cases) [y/N]:
Starting hailort.service
Created symlink /etc/systemd/system/multi-user.target.wants/hailort.service → /lib/systemd/system/hailort.service.
Setting up hailort-pcie-driver (4.18.0) ...

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

build-essential/jammy,now 12.9ubuntu3 amd64 [installed]
Do you wish to use DKMS? [Y/n]:
Failed to install PCIe driver to the DKMS tree. Trying to install PCIe driver without DKMS
Failed. Exited with status 2. See /var/log/hailort-pcie-driver.deb.log
dpkg: error processing package hailort-pcie-driver (--install):
 installed hailort-pcie-driver package post-installation script subprocess returned error exit status 2
Errors were encountered while processing:
 hailort-pcie-driver

Hailort 4.17.0

  • Succesfully installed hailort and hailort-pcie-driver
  • hailortcli scan
Hailo Devices:
[-] Device: 0000:02:0
  • Encountered an error while hailortcli fw-control identify
exor@exor-gs02:~$ hailortcli fw-control identify
[HailoRT] [error] CHECK failed - Failed in fw_control, errno:110
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_FW_CONTROL_FAILURE(18) - Failed to send fw control
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_FW_CONTROL_FAILURE(18)
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_FW_CONTROL_FAILURE(18)
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_FW_CONTROL_FAILURE(18)
[HailoRT] [error] update_fw_state() failed with status HAILO_FW_CONTROL_FAILURE(18)
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_FW_CONTROL_FAILURE(18) - Failed creating PcieDevice
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_FW_CONTROL_FAILURE(18)
[HailoRT CLI] [error] CHECK_SUCCESS failed with status=HAILO_FW_CONTROL_FAILURE(18)
exor@exor-gs02:~$ hailortcli fw-control identify
[HailoRT] [error] CHECK failed - Failed to open device file /dev/hailo0 with error 5
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_DRIVER_FAIL(36)
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_DRIVER_FAIL(36)
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_DRIVER_FAIL(36)
[HailoRT CLI] [error] CHECK_SUCCESS failed with status=HAILO_DRIVER_FAIL(36)

Ubuntu 22.04, linux-image-6.8.0-40-generic

Hailort 4.18.0

  • Got error while installing hailort-pcie-driver
xor@exor-gs02:~/hailo$ sudo dpkg --install hailort_4.18.0_amd64.deb hailort-pcie-driver_4.18.0_all.deb
Selecting previously unselected package hailort.
(Reading database ... 213456 files and directories currently installed.)
Preparing to unpack hailort_4.18.0_amd64.deb ...
Unpacking hailort (4.18.0) ...
Selecting previously unselected package hailort-pcie-driver.
Preparing to unpack hailort-pcie-driver_4.18.0_all.deb ...
Verifying secureboot is disabled.
Unpacking hailort-pcie-driver (4.18.0) ...
Setting up hailort (4.18.0) ...
Do you wish to activate hailort service? (required for most pyHailoRT use cases) [y/N]:
Starting hailort.service
Created symlink /etc/systemd/system/multi-user.target.wants/hailort.service → /lib/systemd/system/hailort.service.
Setting up hailort-pcie-driver (4.18.0) ...

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

build-essential/jammy,now 12.9ubuntu3 amd64 [installed]
Do you wish to use DKMS? [Y/n]:
Failed to install PCIe driver to the DKMS tree. Trying to install PCIe driver without DKMS
Failed. Exited with status 2. See /var/log/hailort-pcie-driver.deb.log
dpkg: error processing package hailort-pcie-driver (--install):
 installed hailort-pcie-driver package post-installation script subprocess returned error exit status 2
Errors were encountered while processing:
 hailort-pcie-driver

Hailort 4.17.0

  • Succesfully installed hailort and hailort-pcie-driver
  • hailortcli scan
Hailo Devices:
[-] Device: 0000:02:0
  • Encountered an error while hailortcli fw-control identify
exor@exor-gs02:~$ hailortcli fw-control identify
[HailoRT] [error] CHECK failed - Failed to open device file /dev/hailo0 with error 6
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_DRIVER_FAIL(36)
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_DRIVER_FAIL(36)
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_DRIVER_FAIL(36)
[HailoRT CLI] [error] CHECK_SUCCESS failed with status=HAILO_DRIVER_FAIL(36)
exor@exor-gs02:~$ hailortcli fw-control identify
[HailoRT] [error] CHECK failed - Failed to open device file /dev/hailo0 with error 6
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_DRIVER_FAIL(36)
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_DRIVER_FAIL(36)
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_DRIVER_FAIL(36)
[HailoRT CLI] [error] CHECK_SUCCESS failed with status=HAILO_DRIVER_FAIL(36)

I already noticed some related issues but I was not able to fix my problem with any of them

Related issue list:

Hey @nicola.marchiotto

Welcome to the Hailo Communtiy !

Can you please provide the log for the error of installing the pcie driver ?

As for the FW-control issue , You can check out the fix in here : Model Zoo Model Download HEF Parser Error - #9 by omria

Purging the driver and re-installing the hailort-pcie-driver, as indicated in the link you posted, did not solve my issue

I am leaving the content of /var/log/hailort-pcie-driver.deb.log. I am currently on Ubuntu 22.04 with linux-image-6.8.0-40-generic

######### mer 28 ago 2024, 12:20:44, CEST #########
######### mer 28 ago 2024, 12:20:45, CEST #########
Verifying secureboot is disabled.
######### mer 28 ago 2024, 12:20:50, CEST #########
/share/opt/hailo/linux/pcie /
make[1]: Entering directory '/usr/src/linux-headers-6.8.0-40-generic'
make[1]: Leaving directory '/usr/src/linux-headers-6.8.0-40-generic'
Creating symlink /var/lib/dkms/hailo_pci/4.18.0/source -> /usr/src/hailo_pci-4.18.0

Kernel preparation unnecessary for this kernel. Skipping...

Building module:
cleaning build area...
make -j4 KERNELRELEASE=6.8.0-40-generic -C /lib/modules/6.8.0-40-generic/build M=/var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie modules....(bad exit status: 2)
ERROR (dkms apport): binary package for hailo_pci: 4.18.0 not found
Error! Bad return status for module build on kernel: 6.8.0-40-generic (x86_64)
Consult /var/lib/dkms/hailo_pci/4.18.0/build/make.log for more information.
DKMS make.log for hailo_pci-4.18.0 for kernel 6.8.0-40-generic (x86_64)
mer 28 ago 2024, 12:21:00, CEST
make[1]: Entering directory '/usr/src/linux-headers-6.8.0-40-generic'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
  You are using:           gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/src/pcie.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/src/fops.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/src/utils.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/src/sysfs.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/src/pci_soc_ioctl.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../../common/fw_validation.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../../common/fw_operation.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../../common/pcie_common.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../../common/vdma_common.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../../common/hailo_resource.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../utils/logs.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../vdma/vdma.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../vdma/memory.o
/var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../../common/pcie_common.c:659:6: error: no previous prototype for ‘hailo_pcie_is_device_ready_for_boot’ [-Werror=missing-prototypes]
  659 | bool hailo_pcie_is_device_ready_for_boot(struct hailo_pcie_resources *resources)
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[3]: *** [scripts/Makefile.build:243: /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../../common/pcie_common.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [/usr/src/linux-headers-6.8.0-40-generic/Makefile:1926: /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie] Error 2
make[1]: *** [Makefile:240: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.8.0-40-generic'
make: *** [Makefile:131: install_dkms] Error 1
make[1]: Entering directory '/usr/src/linux-headers-6.8.0-40-generic'
make[1]: Leaving directory '/usr/src/linux-headers-6.8.0-40-generic'
make[1]: Entering directory '/usr/src/linux-headers-6.8.0-40-generic'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
  You are using:           gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
  CC [M]  /share/opt/hailo/linux/pcie/src/pcie.o
  CC [M]  /share/opt/hailo/linux/pcie/src/fops.o
  CC [M]  /share/opt/hailo/linux/pcie/src/utils.o
  CC [M]  /share/opt/hailo/linux/pcie/src/sysfs.o
  CC [M]  /share/opt/hailo/linux/pcie/src/pci_soc_ioctl.o
  CC [M]  /share/opt/hailo/linux/pcie/../../common/fw_validation.o
  CC [M]  /share/opt/hailo/linux/pcie/../../common/fw_operation.o
  CC [M]  /share/opt/hailo/linux/pcie/../../common/pcie_common.o
/share/opt/hailo/linux/pcie/../../common/pcie_common.c:659:6: error: no previous prototype for ‘hailo_pcie_is_device_ready_for_boot’ [-Werror=missing-prototypes]
  659 | bool hailo_pcie_is_device_ready_for_boot(struct hailo_pcie_resources *resources)
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[3]: *** [scripts/Makefile.build:243: /share/opt/hailo/linux/pcie/../../common/pcie_common.o] Error 1
make[2]: *** [/usr/src/linux-headers-6.8.0-40-generic/Makefile:1926: /share/opt/hailo/linux/pcie] Error 2
make[1]: *** [Makefile:240: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.8.0-40-generic'
make: *** [Makefile:93: all] Error 2
Failed. Exited with status 2. See /var/log/hailort-pcie-driver.deb.log
Failed at 49
   46	
   47	function compile_and_install_pcie_driver_without_dkms() {
   48	    make clean &>> $LOG
   49	    make all &>> $LOG
   50	    make install &>> $LOG
   51	}
   52	
######### mer 28 ago 2024, 12:22:01, CEST #########
######### mer 28 ago 2024, 12:22:04, CEST #########
######### mer 28 ago 2024, 12:22:05, CEST #########
######### mer 28 ago 2024, 12:22:19, CEST #########
######### mer 28 ago 2024, 12:22:20, CEST #########
Verifying secureboot is disabled.
######### mer 28 ago 2024, 12:22:31, CEST #########
/share/opt/hailo/linux/pcie /
make[1]: Entering directory '/usr/src/linux-headers-6.8.0-40-generic'
  CLEAN   /share/opt/hailo/linux/pcie
make[1]: Leaving directory '/usr/src/linux-headers-6.8.0-40-generic'
Creating symlink /var/lib/dkms/hailo_pci/4.17.0/source -> /usr/src/hailo_pci-4.17.0

Kernel preparation unnecessary for this kernel. Skipping...

Building module:
cleaning build area...
make -j4 KERNELRELEASE=6.8.0-40-generic -C /lib/modules/6.8.0-40-generic/build M=/var/lib/dkms/hailo_pci/4.17.0/build/linux/pcie modules.....
Signing module:
Generating a new Secure Boot signing key:
Can't load /var/lib/shim-signed/mok/.rnd into RNG
40671CA1C9720000:error:12000079:random number generator:RAND_load_file:Cannot open file:../crypto/rand/randfile.c:106:Filename=/var/lib/shim-signed/mok/.rnd
....+........+...+....+..+..........+.....+.........+.+...+...+........+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*..+......+..........+...+..+......+....+......+...+..+...+....+............+.........+..+....+.....+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*......+......+.....+......+...+.+......+.....+...+.........................+......+......+......+........+.........+...+.............+..+...+....+.....+...+...............+....+........+.+.........+...+..+.+......+....................+......+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
...+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*....+..+.......+...+...+...........+......+...+.......+...+......+...+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*....+.+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-----
 - /var/lib/dkms/hailo_pci/4.17.0/6.8.0-40-generic/x86_64/module/hailo_pci.ko
Secure Boot not enabled on this system.
cleaning build area...

hailo_pci.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/6.8.0-40-generic/updates/dkms/

depmod...
######### mer 28 ago 2024, 14:39:04, CEST #########
######### mer 28 ago 2024, 14:39:14, CEST #########
######### mer 28 ago 2024, 14:40:35, CEST #########
######### mer 28 ago 2024, 14:41:28, CEST #########
######### mer 28 ago 2024, 14:41:30, CEST #########
Verifying secureboot is disabled.
######### mer 28 ago 2024, 14:41:33, CEST #########
/share/opt/hailo/linux/pcie /
make[1]: Entering directory '/usr/src/linux-headers-6.8.0-40-generic'
make[1]: Leaving directory '/usr/src/linux-headers-6.8.0-40-generic'
Creating symlink /var/lib/dkms/hailo_pci/4.18.0/source -> /usr/src/hailo_pci-4.18.0

Kernel preparation unnecessary for this kernel. Skipping...

Building module:
cleaning build area...
make -j4 KERNELRELEASE=6.8.0-40-generic -C /lib/modules/6.8.0-40-generic/build M=/var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie modules....(bad exit status: 2)
ERROR (dkms apport): binary package for hailo_pci: 4.18.0 not found
Error! Bad return status for module build on kernel: 6.8.0-40-generic (x86_64)
Consult /var/lib/dkms/hailo_pci/4.18.0/build/make.log for more information.
DKMS make.log for hailo_pci-4.18.0 for kernel 6.8.0-40-generic (x86_64)
mer 28 ago 2024, 14:41:40, CEST
make[1]: Entering directory '/usr/src/linux-headers-6.8.0-40-generic'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
  You are using:           gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/src/pcie.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/src/fops.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/src/utils.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/src/sysfs.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/src/pci_soc_ioctl.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../../common/fw_validation.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../../common/fw_operation.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../../common/pcie_common.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../../common/vdma_common.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../../common/hailo_resource.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../utils/logs.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../vdma/vdma.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../vdma/memory.o
/var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../../common/pcie_common.c:659:6: error: no previous prototype for ‘hailo_pcie_is_device_ready_for_boot’ [-Werror=missing-prototypes]
  659 | bool hailo_pcie_is_device_ready_for_boot(struct hailo_pcie_resources *resources)
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[3]: *** [scripts/Makefile.build:243: /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../../common/pcie_common.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [/usr/src/linux-headers-6.8.0-40-generic/Makefile:1926: /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie] Error 2
make[1]: *** [Makefile:240: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.8.0-40-generic'
make: *** [Makefile:131: install_dkms] Error 1
make[1]: Entering directory '/usr/src/linux-headers-6.8.0-40-generic'
make[1]: Leaving directory '/usr/src/linux-headers-6.8.0-40-generic'
make[1]: Entering directory '/usr/src/linux-headers-6.8.0-40-generic'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
  You are using:           gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
  CC [M]  /share/opt/hailo/linux/pcie/src/pcie.o
  CC [M]  /share/opt/hailo/linux/pcie/src/fops.o
  CC [M]  /share/opt/hailo/linux/pcie/src/utils.o
  CC [M]  /share/opt/hailo/linux/pcie/src/sysfs.o
  CC [M]  /share/opt/hailo/linux/pcie/src/pci_soc_ioctl.o
  CC [M]  /share/opt/hailo/linux/pcie/../../common/fw_validation.o
  CC [M]  /share/opt/hailo/linux/pcie/../../common/fw_operation.o
  CC [M]  /share/opt/hailo/linux/pcie/../../common/pcie_common.o
/share/opt/hailo/linux/pcie/../../common/pcie_common.c:659:6: error: no previous prototype for ‘hailo_pcie_is_device_ready_for_boot’ [-Werror=missing-prototypes]
  659 | bool hailo_pcie_is_device_ready_for_boot(struct hailo_pcie_resources *resources)
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[3]: *** [scripts/Makefile.build:243: /share/opt/hailo/linux/pcie/../../common/pcie_common.o] Error 1
make[2]: *** [/usr/src/linux-headers-6.8.0-40-generic/Makefile:1926: /share/opt/hailo/linux/pcie] Error 2
make[1]: *** [Makefile:240: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.8.0-40-generic'
make: *** [Makefile:93: all] Error 2
Failed. Exited with status 2. See /var/log/hailort-pcie-driver.deb.log
Failed at 49
   46	
   47	function compile_and_install_pcie_driver_without_dkms() {
   48	    make clean &>> $LOG
   49	    make all &>> $LOG
   50	    make install &>> $LOG
   51	}
   52	
######### mer 28 ago 2024, 14:42:48, CEST #########
######### mer 28 ago 2024, 14:42:51, CEST #########
######### mer 28 ago 2024, 14:42:51, CEST #########
######### mer 28 ago 2024, 14:42:59, CEST #########
Verifying secureboot is disabled.
######### mer 28 ago 2024, 14:42:59, CEST #########
/share/opt/hailo/linux/pcie /
make[1]: Entering directory '/usr/src/linux-headers-6.8.0-40-generic'
  CLEAN   /share/opt/hailo/linux/pcie
make[1]: Leaving directory '/usr/src/linux-headers-6.8.0-40-generic'
Creating symlink /var/lib/dkms/hailo_pci/4.18.0/source -> /usr/src/hailo_pci-4.18.0

Kernel preparation unnecessary for this kernel. Skipping...

Building module:
cleaning build area...
make -j4 KERNELRELEASE=6.8.0-40-generic -C /lib/modules/6.8.0-40-generic/build M=/var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie modules....(bad exit status: 2)
ERROR (dkms apport): binary package for hailo_pci: 4.18.0 not found
Error! Bad return status for module build on kernel: 6.8.0-40-generic (x86_64)
Consult /var/lib/dkms/hailo_pci/4.18.0/build/make.log for more information.
DKMS make.log for hailo_pci-4.18.0 for kernel 6.8.0-40-generic (x86_64)
mer 28 ago 2024, 14:43:05, CEST
make[1]: Entering directory '/usr/src/linux-headers-6.8.0-40-generic'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
  You are using:           gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/src/pcie.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/src/fops.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/src/utils.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/src/sysfs.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/src/pci_soc_ioctl.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../../common/fw_validation.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../../common/fw_operation.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../../common/pcie_common.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../../common/vdma_common.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../../common/hailo_resource.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../utils/logs.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../vdma/vdma.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../vdma/memory.o
/var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../../common/pcie_common.c:659:6: error: no previous prototype for ‘hailo_pcie_is_device_ready_for_boot’ [-Werror=missing-prototypes]
  659 | bool hailo_pcie_is_device_ready_for_boot(struct hailo_pcie_resources *resources)
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[3]: *** [scripts/Makefile.build:243: /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../../common/pcie_common.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [/usr/src/linux-headers-6.8.0-40-generic/Makefile:1926: /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie] Error 2
make[1]: *** [Makefile:240: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.8.0-40-generic'
make: *** [Makefile:131: install_dkms] Error 1
make[1]: Entering directory '/usr/src/linux-headers-6.8.0-40-generic'
make[1]: Leaving directory '/usr/src/linux-headers-6.8.0-40-generic'
make[1]: Entering directory '/usr/src/linux-headers-6.8.0-40-generic'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
  You are using:           gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
  CC [M]  /share/opt/hailo/linux/pcie/src/pcie.o
  CC [M]  /share/opt/hailo/linux/pcie/src/fops.o
  CC [M]  /share/opt/hailo/linux/pcie/src/utils.o
  CC [M]  /share/opt/hailo/linux/pcie/src/sysfs.o
  CC [M]  /share/opt/hailo/linux/pcie/src/pci_soc_ioctl.o
  CC [M]  /share/opt/hailo/linux/pcie/../../common/fw_validation.o
  CC [M]  /share/opt/hailo/linux/pcie/../../common/fw_operation.o
  CC [M]  /share/opt/hailo/linux/pcie/../../common/pcie_common.o
/share/opt/hailo/linux/pcie/../../common/pcie_common.c:659:6: error: no previous prototype for ‘hailo_pcie_is_device_ready_for_boot’ [-Werror=missing-prototypes]
  659 | bool hailo_pcie_is_device_ready_for_boot(struct hailo_pcie_resources *resources)
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[3]: *** [scripts/Makefile.build:243: /share/opt/hailo/linux/pcie/../../common/pcie_common.o] Error 1
make[2]: *** [/usr/src/linux-headers-6.8.0-40-generic/Makefile:1926: /share/opt/hailo/linux/pcie] Error 2
make[1]: *** [Makefile:240: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.8.0-40-generic'
make: *** [Makefile:93: all] Error 2
Failed. Exited with status 2. See /var/log/hailort-pcie-driver.deb.log
Failed at 49
   46	
   47	function compile_and_install_pcie_driver_without_dkms() {
   48	    make clean &>> $LOG
   49	    make all &>> $LOG
   50	    make install &>> $LOG
   51	}
   52	
######### mer 28 ago 2024, 14:43:25, CEST #########
######### mer 28 ago 2024, 14:43:28, CEST #########
######### mer 28 ago 2024, 14:43:28, CEST #########
######### mer 28 ago 2024, 14:45:20, CEST #########
Verifying secureboot is disabled.
######### mer 28 ago 2024, 14:45:20, CEST #########
/share/opt/hailo/linux/pcie /
make[1]: Entering directory '/usr/src/linux-headers-6.8.0-40-generic'
  CLEAN   /share/opt/hailo/linux/pcie
make[1]: Leaving directory '/usr/src/linux-headers-6.8.0-40-generic'
Creating symlink /var/lib/dkms/hailo_pci/4.17.0/source -> /usr/src/hailo_pci-4.17.0

Kernel preparation unnecessary for this kernel. Skipping...

Building module:
cleaning build area...
make -j4 KERNELRELEASE=6.8.0-40-generic -C /lib/modules/6.8.0-40-generic/build M=/var/lib/dkms/hailo_pci/4.17.0/build/linux/pcie modules.....
Signing module:
 - /var/lib/dkms/hailo_pci/4.17.0/6.8.0-40-generic/x86_64/module/hailo_pci.ko
Secure Boot not enabled on this system.
cleaning build area...

hailo_pci.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/6.8.0-40-generic/updates/dkms/

depmod...
######### mer 28 ago 2024, 15:06:26, CEST #########
######### mer 28 ago 2024, 15:06:39, CEST #########
Verifying secureboot is disabled.
######### mer 28 ago 2024, 15:06:39, CEST #########
######### mer 28 ago 2024, 15:06:39, CEST #########
/share/opt/hailo/linux/pcie /
make[1]: Entering directory '/usr/src/linux-headers-6.8.0-40-generic'
make[1]: Leaving directory '/usr/src/linux-headers-6.8.0-40-generic'
make[1]: Entering directory '/usr/src/linux-headers-6.8.0-40-generic'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
  You are using:           gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
  CC [M]  /share/opt/hailo/linux/pcie/src/pcie.o
  CC [M]  /share/opt/hailo/linux/pcie/src/fops.o
  CC [M]  /share/opt/hailo/linux/pcie/src/utils.o
  CC [M]  /share/opt/hailo/linux/pcie/src/sysfs.o
  CC [M]  /share/opt/hailo/linux/pcie/src/pci_soc_ioctl.o
  CC [M]  /share/opt/hailo/linux/pcie/../../common/fw_validation.o
  CC [M]  /share/opt/hailo/linux/pcie/../../common/fw_operation.o
  CC [M]  /share/opt/hailo/linux/pcie/../../common/pcie_common.o
/share/opt/hailo/linux/pcie/../../common/pcie_common.c:659:6: error: no previous prototype for ‘hailo_pcie_is_device_ready_for_boot’ [-Werror=missing-prototypes]
  659 | bool hailo_pcie_is_device_ready_for_boot(struct hailo_pcie_resources *resources)
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[3]: *** [scripts/Makefile.build:243: /share/opt/hailo/linux/pcie/../../common/pcie_common.o] Error 1
make[2]: *** [/usr/src/linux-headers-6.8.0-40-generic/Makefile:1926: /share/opt/hailo/linux/pcie] Error 2
make[1]: *** [Makefile:240: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.8.0-40-generic'
make: *** [Makefile:93: all] Error 2
Failed. Exited with status 2. See /var/log/hailort-pcie-driver.deb.log
Failed at 49
   46	
   47	function compile_and_install_pcie_driver_without_dkms() {
   48	    make clean &>> $LOG
   49	    make all &>> $LOG
   50	    make install &>> $LOG
   51	}
   52	
######### mer 28 ago 2024, 15:07:09, CEST #########
######### mer 28 ago 2024, 15:07:12, CEST #########
######### mer 28 ago 2024, 15:07:29, CEST #########
######### mer 28 ago 2024, 15:08:12, CEST #########
Verifying secureboot is disabled.
######### mer 28 ago 2024, 15:08:13, CEST #########
/share/opt/hailo/linux/pcie /
make[1]: Entering directory '/usr/src/linux-headers-6.8.0-40-generic'
  CLEAN   /share/opt/hailo/linux/pcie
make[1]: Leaving directory '/usr/src/linux-headers-6.8.0-40-generic'
Creating symlink /var/lib/dkms/hailo_pci/4.17.0/source -> /usr/src/hailo_pci-4.17.0

Kernel preparation unnecessary for this kernel. Skipping...

Building module:
cleaning build area...
make -j4 KERNELRELEASE=6.8.0-40-generic -C /lib/modules/6.8.0-40-generic/build M=/var/lib/dkms/hailo_pci/4.17.0/build/linux/pcie modules....
Signing module:
 - /var/lib/dkms/hailo_pci/4.17.0/6.8.0-40-generic/x86_64/module/hailo_pci.ko
Secure Boot not enabled on this system.
cleaning build area...

hailo_pci.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/6.8.0-40-generic/updates/dkms/

depmod...
######### mer 28 ago 2024, 15:10:59, CEST #########
######### mer 28 ago 2024, 15:15:58, CEST #########
######### mer 28 ago 2024, 15:16:08, CEST #########
######### mer 28 ago 2024, 15:16:09, CEST #########
######### mer 28 ago 2024, 15:17:01, CEST #########
######### mer 28 ago 2024, 15:17:02, CEST #########
Verifying secureboot is disabled.
######### mer 28 ago 2024, 15:17:03, CEST #########
######### mer 28 ago 2024, 15:17:15, CEST #########
######### mer 28 ago 2024, 15:17:16, CEST #########
######### mer 28 ago 2024, 15:17:19, CEST #########
Verifying secureboot is disabled.
######### mer 28 ago 2024, 15:17:19, CEST #########
######### mer 28 ago 2024, 15:17:22, CEST #########
/share/opt/hailo/linux/pcie /
make[1]: Entering directory '/usr/src/linux-headers-6.8.0-40-generic'
make[1]: Leaving directory '/usr/src/linux-headers-6.8.0-40-generic'
Creating symlink /var/lib/dkms/hailo_pci/4.18.0/source -> /usr/src/hailo_pci-4.18.0

Kernel preparation unnecessary for this kernel. Skipping...

Building module:
cleaning build area...
make -j4 KERNELRELEASE=6.8.0-40-generic -C /lib/modules/6.8.0-40-generic/build M=/var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie modules....(bad exit status: 2)
ERROR (dkms apport): binary package for hailo_pci: 4.18.0 not found
Error! Bad return status for module build on kernel: 6.8.0-40-generic (x86_64)
Consult /var/lib/dkms/hailo_pci/4.18.0/build/make.log for more information.
DKMS make.log for hailo_pci-4.18.0 for kernel 6.8.0-40-generic (x86_64)
mer 28 ago 2024, 15:17:27, CEST
make[1]: Entering directory '/usr/src/linux-headers-6.8.0-40-generic'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
  You are using:           gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/src/pcie.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/src/fops.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/src/utils.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/src/sysfs.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/src/pci_soc_ioctl.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../../common/fw_validation.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../../common/fw_operation.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../../common/pcie_common.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../../common/vdma_common.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../../common/hailo_resource.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../utils/logs.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../vdma/vdma.o
  CC [M]  /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../vdma/memory.o
/var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../../common/pcie_common.c:659:6: error: no previous prototype for ‘hailo_pcie_is_device_ready_for_boot’ [-Werror=missing-prototypes]
  659 | bool hailo_pcie_is_device_ready_for_boot(struct hailo_pcie_resources *resources)
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[3]: *** [scripts/Makefile.build:243: /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie/../../common/pcie_common.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [/usr/src/linux-headers-6.8.0-40-generic/Makefile:1926: /var/lib/dkms/hailo_pci/4.18.0/build/linux/pcie] Error 2
make[1]: *** [Makefile:240: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.8.0-40-generic'
make: *** [Makefile:131: install_dkms] Error 1
make[1]: Entering directory '/usr/src/linux-headers-6.8.0-40-generic'
make[1]: Leaving directory '/usr/src/linux-headers-6.8.0-40-generic'
make[1]: Entering directory '/usr/src/linux-headers-6.8.0-40-generic'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
  You are using:           gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
  CC [M]  /share/opt/hailo/linux/pcie/src/pcie.o
  CC [M]  /share/opt/hailo/linux/pcie/src/fops.o
  CC [M]  /share/opt/hailo/linux/pcie/src/utils.o
  CC [M]  /share/opt/hailo/linux/pcie/src/sysfs.o
  CC [M]  /share/opt/hailo/linux/pcie/src/pci_soc_ioctl.o
  CC [M]  /share/opt/hailo/linux/pcie/../../common/fw_validation.o
  CC [M]  /share/opt/hailo/linux/pcie/../../common/fw_operation.o
  CC [M]  /share/opt/hailo/linux/pcie/../../common/pcie_common.o
/share/opt/hailo/linux/pcie/../../common/pcie_common.c:659:6: error: no previous prototype for ‘hailo_pcie_is_device_ready_for_boot’ [-Werror=missing-prototypes]
  659 | bool hailo_pcie_is_device_ready_for_boot(struct hailo_pcie_resources *resources)
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[3]: *** [scripts/Makefile.build:243: /share/opt/hailo/linux/pcie/../../common/pcie_common.o] Error 1
make[2]: *** [/usr/src/linux-headers-6.8.0-40-generic/Makefile:1926: /share/opt/hailo/linux/pcie] Error 2
make[1]: *** [Makefile:240: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.8.0-40-generic'
make: *** [Makefile:93: all] Error 2
Failed. Exited with status 2. See /var/log/hailort-pcie-driver.deb.log
Failed at 49
   46	
   47	function compile_and_install_pcie_driver_without_dkms() {
   48	    make clean &>> $LOG
   49	    make all &>> $LOG
   50	    make install &>> $LOG
   51	}
   52	

Hey @nicola.marchiotto,

Could you try using the kernel version 6.5.0-40-generic? This issue might be related to the kernel you’re currently using. While I can’t say for sure, switching to this kernel has resolved the problem for some users.

Kernel 6.5.0-40-generic is not available for Ubuntu 22.04

I tried with 6.5.0-41-generic and with 6.5.0-45-generic but with both I am not able to boot up my device