Preloader Compiling Error in Windows 10

#1

Hello!
I’m using DE0 Atlas SoC development for my undergraduate project. I was able to generate preloader by referring the GSRD 17.1(https://rocketboards.org/foswiki/Documentation/GSRDPreloader)However when I try to compile it using the Makefile given, it gave me this error

$ make
tar zxf /cygdrive/c/intelFPGA/17.1/embedded/host_tools/altera/preloader/uboot-socfpga.tar.gz
tar: Error opening archive: Failed to open ‘/cygdrive/c/intelFPGA/17.1/embedded/host_tools/altera/preloader/uboot-socfpga.tar.gz’
make: *** [uboot-socfpga/.untar] Error 1

I manually checked in this directory for uboot-socfpga.tar.gz and that file is there.

How can I resolve this error?

#2

Hello,
I use to start Intel EDS command shell in Windows as Administrator, because it has to do some actions which needs permissions of the Administrator.
The second possibility could be try to untar the tar-archiv manualy - it might be corrupted and the solution would be reinstallation of the Intel Embedded Development Studio.
I will look forward to reading from You :slight_smile:
Best wishes,
Jan Konečný.

1 Like
#3

Thank you for your response!
I tried running as administrator and also I reinstalled and tried again. But the same error exists. But also I can untar the archive manually without an issue.
So if I’m using manually untared archive, which means I have to edit the Makefile script accordingly… Am I right?
Or is there any thing that I’m still missing?

#4

Well, it is quite strange.
At this point I recommend try to do commands in Makefile manually until find the real source of problem (or until possible) - because it seems me that untarring is not the source but consequence only. Even more, make checkes which parts are already done by comparing the time of the last change of every file. So, if the source of the problem would be in untarring, doing untar manually at the place specified at Makefile would solve this. However, I thing You would get another error instead.
As far as You describe Your problem, I do not thing You are missing something.
Untarring is being done at the very start of making, so could You place here an output of make command into Your terminal window, please? And, if possible, also content of the PATH variable (I mean ouptput of ‘echo $PATH’ command).

#5

Hello,
Sorry for taking a while to update this thread.
I’ve been trying things…
As you said I tried manually untar-ing, But it didn’t shortened the makefile life cycle. Also echos show that it isn’t going anywhere from Untar-ing command. So I investigated the error code (ERROR 1) in makefile documentaion. After reffering this I put a minus in front of the recipe to ignore any error in the recipe(Now it obviously skipping Untar). Then I Untar-ed archive.
But now, It looks like immediate next command(CHMOD) can’t access that untar-ed folder.
I was running SoC EDS shell as the administrator all the time :man_shrugging:
Also I tried make command this waycygstart --action=runas make

#6

You can flow this thread: http://www.alteraforum.com/forum/showthread.php?t=58997&s=c033dffba0a7be1a4c8845d9c7197b3d

#7

!! That bobharris. What a guy.

Same boat. Preloader gen broke for me in 18? Somewhere it broke.
It had been working in 17.1.

#8

Hello,
the link to AlteraForum.com above does not direct to the proper page any more due to moving forum to forum.Intel.com. So, the solution could be found here:
https://forums.intel.com/s/question/0D50P00003yyTozSAE/preloader-make-untar-failing?t=1549519913714
The problem is that Windows 10 also have its native version of tar.exe at C:\Windows\system32 which seems to be used instead of the tar of cygwin at /bin.
The problem could be solved with editing variable $PATH of Cygwin:
export PATH=/bin:$PATH
Cygwin then finds make and tar at /bin for the first time and does not continue in looking for at other directories with wrong version of tar.
Or path to system directories of Windows could be also removed from $PATH variable, of course. You can observe all directories where Cygwin looks for programs with
echo $PATH
(separated with :).
I hope this will help someone.
Best wishes.

Libusb support on Intel SoC EDS DS-5
Please help with compiling preloader for Cyclone V SoC FPGA GHRD project
#9

One of the simple solutions that worked for me was that just go to your folder sockit_ghrd/software/spl_bsp folder using embedded command shell and instead of writing “make” write “/usr/bin/make”. You will then see the path where your cygwin make.exe file is “tar zxf /cygdrive/c/altera/15.1/embedded/host_tools/altera/preloader/uboot-socfpga.tar.gz”
Just press enter then.