Need a little help compiling stock Prusa firmware
 
Notifications
Clear all

Need a little help compiling stock Prusa firmware  

  RSS
prongato
(@prongato)
Active Member
Need a little help compiling stock Prusa firmware

So, I wanted to try out Klipper on my Mini+…. After going through all the headache of installing Klipper, Mainsail, tuning pressure advance and input shaping (with accelerometer) it still doesn’t print as well as the stock Prusa firmware.  Maybe I’m missing something but I want to go back and in the process of flashing dfu with Klipper I erased the bootloader so I am stuck having to generate and flash dfu with bootloader (if I understand it correctly).

problem is, I can’t manage to get the Prusa Github firmware to compile (or llama, same error).  I’ve tried it on two different Raspnerry Pi’s, same error. It downloads and expands everything fine then blows up on building mini_release_boot.  I may be missing something obvious, I haven’t actually written any code in decades.   Thank you in advance for any assistance. 

 

sudo python3 utils/build.py --generate-dfu --bootloader yes
Building mini_release_boot:   0%|                                                       | 0/1 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "utils/build.py", line 666, in 
    main()
  File "utils/build.py", line 638, in main
    output_to_file=args.no_store_output is not False)
  File "utils/build.py", line 284, in build
    check=False)
  File "/usr/lib/python3.7/subprocess.py", line 472, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.7/subprocess.py", line 775, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.7/subprocess.py", line 1522, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: '/home/pi/Prusa-Firmware-Buddy/.dependencies/cmake-3.15.5/bin/cmake'
This topic was modified 2 years temu 3 times by prongato
Opublikowany : 18/11/2022 8:47 am
Zoltan
(@zoltan)
Member Moderator
RE: Need a little help compiling stock Prusa firmware

Which prusa repository do you try to compile? Where did you get the command line?

even an old man can learn new things 🙂
Standard I3 mk3s, MMU2S, Prusa Enclosure, Fusion 360, PrusaSlicer, Windows 10
PRUSA MINI+ Prusalink + Prusa Connect

Opublikowany : 20/11/2022 11:37 am
prongato polubić
prongato
(@prongato)
Active Member
Topic starter answered:
RE: Need a little help compiling stock Prusa firmware

https://github.com/prusa3d/Prusa-Firmware-Buddy

I’ve tried running the commands from two separate raspberry pi’s running Linux (Octoprint image and Mainsail image).  I’ve also now tried on Windows 10 too, after downloading Python and running with elevated privileges, it still errors out while trying to build the files.  All the systems I’ve tried it on download all the files needed and don’t error out until it gets to building the boot file.

I’ve imaged another Linux system and am trying again.  I have another Buddy board that I installed into the printer (I would never have just blown out the firmware without a backup plan) but the other board I have with Prusa firmware is version 1.0.0 and the one I need to flash is 1.0.7.

Posted by: @zoltan

Which prusa repository do you try to compile? Where did you get the command line?

 

Opublikowany : 20/11/2022 8:28 pm
prongato
(@prongato)
Active Member
Topic starter answered:
RE:

Same today on a new pi image

pi@octopi:~/Prusa-Firmware-Buddy $ sudo python3 utils/build.py --preset mini --build-type debug
Downloading ninja-1.10.2
Extracting ninja-1.10.2
Downloading cmake-3.22.5
Extracting cmake-3.22.5
Downloading gcc-arm-none-eabi-10.3.1
Extracting gcc-arm-none-eabi-10.3.1
Downloading clang-format-9.0.0-noext            
Extracting clang-format-9.0.0-noext
Downloading bootloader-mini-2.0.2
Extracting bootloader-mini-2.0.2
Downloading mini404-e72651a
Extracting mini404-e72651a
Installing Python package ecdsa
Installing Python package polib
Installing Python package littlefs-python
Installing openocd user-config to /home/pi/Prusa-Firmware-Buddy/utils/debug/10_custom_config.cfg
Building mini_debug_boot
Traceback (most recent call last):
  File "utils/build.py", line 800, in 
    main()
  File "utils/build.py", line 772, in main
    if args.store_output is not None else False)
  File "utils/build.py", line 308, in build
    check=False)
  File "/usr/lib/python3.7/subprocess.py", line 472, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.7/subprocess.py", line 775, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.7/subprocess.py", line 1522, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: '/home/pi/Prusa-Firmware-Buddy/.dependencies/cmake-3.22.5/bin/cmake'
pi@octopi:~/Prusa-Firmware-Buddy $ 

 

pi@octopi:~/Prusa-Firmware-Buddy $ sudo python3 utils/build.py --generate-dfu --bootloader yes
[sudo] password for pi: 
Building mini_release_boot
Traceback (most recent call last):
  File "utils/build.py", line 800, in <module>
    main()
  File "utils/build.py", line 772, in main
    if args.store_output is not None else False)
  File "utils/build.py", line 308, in build
    check=False)
  File "/usr/lib/python3.7/subprocess.py", line 472, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.7/subprocess.py", line 775, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.7/subprocess.py", line 1522, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: '/home/pi/Prusa-Firmware-Buddy/.dependencies/cmake-3.22.5/bin/cmake'
This post was modified 2 years temu by prongato
Opublikowany : 20/11/2022 8:38 pm
Zoltan
(@zoltan)
Member Moderator
RE:

This will not build you a bootloader, the bootloader parameter only indicates whether you have on the board installed or not installed the bootloader, so the build will take it in account.

It will build you the only non signed fw for which you have to use the buddyboard with broken appendix - loosing the warranty.

even an old man can learn new things 🙂
Standard I3 mk3s, MMU2S, Prusa Enclosure, Fusion 360, PrusaSlicer, Windows 10
PRUSA MINI+ Prusalink + Prusa Connect

Opublikowany : 21/11/2022 8:45 am
prongato
(@prongato)
Active Member
Topic starter answered:
RE: Need a little help compiling stock Prusa firmware

That’s fine, I already broke the appendix to install Klipper. Whether I try with the bootloader option or not, I still get the same error trying to compile. I don’t care whether it’s signed or not. I’d like to use the newer revision board for every day usage but can’t manage to compile the stock Mini firmware on anything with the official repo.  I’ve tried two different Pi Linux installations with the above errors and get errors on windows 10 too.  I guess I’ll wait and hopefully the repo script will be fixed at some point. (Or someone can point out what I am doing wrong)

Opublikowany : 22/11/2022 6:08 am
Zoltan
(@zoltan)
Member Moderator
RE: Need a little help compiling stock Prusa firmware

how do you plan to put the compiled FW to the printer? via dfu, HW programmer or from flashdisk?

having bootloader destroyed you can not flash the FW from flash disk. 

Is there any reason you need the debug FW?

first I would recomend to compile python3 utils/build.py --preset mini  without debug parameter. Not sure you need it, as you probably do not use the debugger and second, the debug package will be larger to share the space with bootloader - it is used by programmers, they can flash the FW directly by HW programmer - do you have this option?

I just run the script without debug parameter and it works (W10) 

 

 

 

 

even an old man can learn new things 🙂
Standard I3 mk3s, MMU2S, Prusa Enclosure, Fusion 360, PrusaSlicer, Windows 10
PRUSA MINI+ Prusalink + Prusa Connect

Opublikowany : 22/11/2022 5:14 pm
prongato
(@prongato)
Active Member
Topic starter answered:
RE:

I have a Pi that I used to flash Klipper in dfu mode.  From my understanding, I will be able to flash the Prusa firmware the same way.  Once the Buddy board is in dfu mode, flash it via the micro USB cable hooked to the Pi.  (Complied as firmware.dfu)  it’s the same process as when I flashed Klipper in dfu mode, is it not?

i get the same error on every machine when trying to compile.

 

pi@octopi:~/Prusa-Firmware-Buddy $ sudo python3 utils/build.py --preset mini
[sudo] password for pi: 
Building mini_release_boot
Traceback (most recent call last):
  File "utils/build.py", line 800, in 
    main()
  File "utils/build.py", line 772, in main
    if args.store_output is not None else False)
  File "utils/build.py", line 308, in build
    check=False)
  File "/usr/lib/python3.7/subprocess.py", line 472, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.7/subprocess.py", line 775, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.7/subprocess.py", line 1522, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: '/home/pi/Prusa-Firmware-Buddy/.dependencies/cmake-3.22.5/bin/cmake'
pi@octopi:~/Prusa-Firmware-Buddy $
This post was modified 2 years temu 3 times by prongato
Opublikowany : 22/11/2022 9:21 pm
Davie
(@davie)
New Member
RE: Need a little help compiling stock Prusa firmware

If you run the 'file' command on the file that throws the OSError:

$ file /home/pi/Prusa-Firmware-Buddy/.dependencies/cmake-3.15.5/bin/cmake
/home/pi/Prusa-Firmware-Buddy/.dependencies/cmake-3.15.5/bin/cmake: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.18, BuildID[sha1]=def01fb69726bbc12fd383b9c5ccab1b2adb1d23, stripped

you'll see that it's recognized as a 'ELF 64-bit LSB executable, x86-64' meaning that it's only going to work on a Linux machine running on an Intel or AMD processor. I ran into the same thing and had to use a VM running linux to build the firmware, then transfer it to my pi for flashing with dfu-util.

 

Opublikowany : 06/01/2023 5:15 pm
Share: