Guidance required to install ardupilot dev environment in kali (ardupilot firmware building)

can anyone guide me on how to install all the devs environment on kali?

I used to have them on my kali linux, but I had an aneurysm and reinstall the whole laptop because I forgot how to use everything. i’m slowly getting back my memory but i got stuck with installing ardupilot environment to build the fw (I used to build custom FW for my little group). the automatic script didn’t really help because it spits out this error :

./waf clean
Waf: The wscript in ‘/home/stoneddawg/git/Ardupilot/ardupilot_fw/ardupilot’ is unreadable
Traceback (most recent call last):
File “/home/stoneddawg/git/Ardupilot/ardupilot_fw/ardupilot/modules/waf/waflib/”, line 140, in waf_entry_point
set_main_module(os.path.normpath(os.path.join(Context.run_dir, Context.WSCRIPT_FILE)))
File “/home/stoneddawg/git/Ardupilot/ardupilot_fw/ardupilot/modules/waf/waflib/”, line 190, in set_main_module
Context.g_module = Context.load_module(file_path)
File “/home/stoneddawg/git/Ardupilot/ardupilot_fw/ardupilot/modules/waf/waflib/”, line 665, in load_module
code = Utils.readf(path, m=‘rU’, encoding=encoding)
File “/home/stoneddawg/git/Ardupilot/ardupilot_fw/ardupilot/modules/waf/waflib/”, line 231, in readf
with open(fname, m) as f:
ValueError: invalid mode: ‘rUb’

please please i’m stuck and I want to be back doing what I used to…