Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
12 years ago

preloader make problem: socfpga_cyclone5_config, Error 2

Hi all,

My system: Ubuntu 12.04 64 bit, Quartus 13. SoCrates evaluation board.

Being new to soc design I am working through a tutorial. I got the hw source files for the preloader generated and want to build the preloader image. But make exits, here is the output:

....

/bin/sh: 0: Illegal option -

make[1]: *** [socfpga_cyclone5_config] Error 2

....

make: *** [config] Error 2

I don't know what the "Illegal option" could possibly be... any hints or pointers to where the problem could be?

I have installed a bunch of packages in Ubuntu (according to other users of Ubuntu 12.04).

Any help is appreciated!

Thanks and regards,

Lars

5 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Output:

    make CROSS_COMPILE=arm-none-eabi- -C uboot-socfpga socfpga_cyclone5_config

    make[1]: Entering directory `/home/lmh/soctraining/Lab1/software/spl_bsp/uboot-socfpga'

    make[1]: Leaving directory `/home/lmh/soctraining/Lab1/software/spl_bsp/uboot-socfpga'

    make[1]: Entering directory `/home/lmh/soctraining/Lab1/software/spl_bsp/uboot-socfpga'

    /bin/sh: 0: Illegal option -

    make[1]: *** [socfpga_cyclone5_config] Error 2

    make[1]: Leaving directory `/home/lmh/soctraining/Lab1/software/spl_bsp/uboot-socfpga'

    make: *** [config] Error 2
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    Output:

    make CROSS_COMPILE=arm-none-eabi- -C uboot-socfpga socfpga_cyclone5_config

    make[1]: Entering directory `/home/lmh/soctraining/Lab1/software/spl_bsp/uboot-socfpga'

    make[1]: Leaving directory `/home/lmh/soctraining/Lab1/software/spl_bsp/uboot-socfpga'

    make[1]: Entering directory `/home/lmh/soctraining/Lab1/software/spl_bsp/uboot-socfpga'

    /bin/sh: 0: Illegal option -

    make[1]: *** [socfpga_cyclone5_config] Error 2

    make[1]: Leaving directory `/home/lmh/soctraining/Lab1/software/spl_bsp/uboot-socfpga'

    make: *** [config] Error 2

    --- Quote End ---

    Hi,

    What Quartus version are you using: 13.0 or 13.0 with SP1?

    I have similar problem under Win7-64bit by using 13.0 SP1. As I experienced the problem occurs with the BSP generated Makefile. from which the preloader has to be built ('make all'). If you open Makefile. make sure that the definition for $(SOCFPGA_BOARD) global variable exists.

    If it is missed in the generated Makefile, you should change the following lines manually:

    # ####################### # Generated Variables SOCFPGA_BOARD := socfpga_cyclone5

    # ################### # Derived Variables PRELOADER_UPDATE_DIR := $(PRELOADER_SRC_DIR)/board/altera/$(SOCFPGA_BOARD)

    ... # ########### # Configure ... $(MAKE) $(MAKE_ARGS) -C $(PRELOADER_SRC_DIR) $(SOCFPGA_BOARD)_config

    I hope this will help.

    Regards,

    ZS.V.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    voroshazi: Thanks, I will check that variable. I am running the 13.0 version. It is the full version, but the web version behaved the same way. Before that I tried the 13.0 on Win 7 64 bit. Here make also failed. Here the generated make file had Windows style paths which was incompatible with cygwin!? corrected that manually, but still did not work. Our local distributer says it works on his machine.. but that doesn´t help me much.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I was able to do a build after I installed the yocto src package: linux-sofpga-13.02-RC10-bin.tar.gz. Is that package required in order to build the preloader?

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    For anyone that happens to be reading this: make sure your file paths don't have spaces in it.

    I was having a different error but I didn't realize that the eds was obviously having issues w/ the spaces until after I read this and looked back at my output. If someone else is as stupid as I am, maybe I can help you out.