hackrf icon indicating copy to clipboard operation
hackrf copied to clipboard

Issues with building firmware

Open THOMPSON832 opened this issue 2 years ago • 5 comments

I have installed all dependencies and followed steps for building the firmware but still cannot get it built. After I cd into:

home/me/hackrf/firmware/hackrf_usb/build

and execute:

sudo cmake /home/me/hackrf/firmware/hackrf_usb/build

this is the output:

-- Cross-compiling with the gcc-arm-embedded toolchain -- Toolchain prefix: / -- The C compiler identification is unknown CMake Error at CmakeLists.txt:26 (project): The CMake_C_Compiler:

    arm-none-eabi-gcc

is not a full path and was not found in the PATH.

Tell CMake where to find the compiler by setting either the environment variable "CC" or the CMake cache entry 
CMAKE_C_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH.

-- Configuring incomplete, errors occurred! See also "/home/me/hackrf/firmware/hackrf_usb/build/CMakeFiles/CMakeOutput.log" See also "/home/me/hackrf/firmware/hackrf_usb/build/CMakeFiles/CMakeError.log"

I am running Dragon OS Focal R24 x86_64

THOMPSON832 avatar Jul 24 '22 01:07 THOMPSON832

You're missing the required compiler. Since Dragon OS is Debian based I'm guessing you can apt install gcc-arm-none-eabi.

There's no need to run cmake under sudo, by the way.

martinling avatar Jul 24 '22 09:07 martinling

You're missing the required compiler. Since Dragon OS is Debian based I'm guessing you can apt install gcc-arm-none-eabi.

There's no need to run cmake under sudo, by the way.

Thank you very much, I was able to build the firmware package and flash it to the hackrf. However it still made me use 'sudo' for 'cmake' and 'make' for the right permissions, does that have something to do with DragonOS?

THOMPSON832 avatar Jul 24 '22 11:07 THOMPSON832

Thank you very much, I was able to build the firmware package and flash it to the hackrf. However it still made me use 'sudo' for 'cmake' and 'make' for the right permissions, does that have something to do with DragonOS?

When you ran cmake under sudo initially it would have created temporary build files as the root user, so then when you ran cmake again without sudo it didn't have permission to modify those files.

If you delete the build directory (with sudo), then re-create it and run cmake again (without sudo) it should all work.

miek avatar Jul 24 '22 12:07 miek

Thank you very much, I was able to build the firmware package and flash it to the hackrf. However it still made me use 'sudo' for 'cmake' and 'make' for the right permissions, does that have something to do with DragonOS?

When you ran cmake under sudo initially it would have created temporary build files as the root user, so then when you ran cmake again without sudo it didn't have permission to modify those files.

If you delete the build directory (with sudo), then re-create it and run cmake again (without sudo) it should all work.

Thank you! I'm still a bit new to linux, so your support is much appreciated!

THOMPSON832 avatar Jul 24 '22 14:07 THOMPSON832

@THOMPSON832 have you successfully built the firmware now?

straithe avatar Jul 25 '22 15:07 straithe

I'm closing this as there hasn't been a response in over 30 days. Please re-open this issue or open a new one if you still need assistance.

straithe avatar Aug 27 '22 18:08 straithe