While building secure bootloader getting error: ‘AP_CheckFirmware’ has not been declared

Hello I’m trying to do secure bootloader by this link ardupilot/Tools/scripts/signing at master · ArduPilot/ardupilot · GitHub and I’m trying to run this command
Tools/scripts/build_bootloaders.py CubeOrange --signing-key=NAME_public_key.dat
I got this following error, please help me out by resolving this error.

[40/95] Compiling libraries/AP_HAL_ChibiOS/sdcard.cpp
[41/95] Compiling libraries/AP_HAL_ChibiOS/Util.cpp
…/…/libraries/AP_HAL_ChibiOS/Util.cpp: In member function ‘virtual AP_HAL::Util::FlashBootloader ChibiOS::Util::flash_bootloader()’:
…/…/libraries/AP_HAL_ChibiOS/Util.cpp:286:10: error: ‘AP_CheckFirmware’ has not been declared
286 | if (!AP_CheckFirmware::check_signed_bootloader(fw, fw_size)) {
| ^~~~~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.

Waf: Leaving directory `/home/ubuntu1/ardupilot/build/CubeOrange’
Build failed
→ task in ‘objs/AP_HAL_ChibiOS’ failed (exit status 1):
{task 140591592616256: cxx Util.cpp → Util.cpp.0.o}
(run with -v to display more information)
Build failed: ./waf bootloader
Failed boards: [‘CubeOrange’]

Is error solved?
I am getting same error.