Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12589 Discussions

dos2unix fails to change permissions when creating project from template

juschri
Novice
12,430 Views

Hello, I have searched all over for an answer to my problem, and while I've found similar questions none of the answers have worked. I have followed the instructions in "The Nios II Embedded "Hello World" Lab: For the DE10-LiteDevelopment Kit" successfully up to the point where you create a new project in Nios II - Eclipse.

When I fill in the wizard and press Finish I get an error popup that says Failed to execute: wsl dos2unix create-this-bsp; ./create-this-bsp --cpu-name cpu --no-make

I also see the following message printed in the eclipse console window:

dos2unix: Failed to change the permissions of temporary output file ./d2utmpfnPN2u: Operation not permitted

I've tried launching eclipse from the Nios II command shell in several ways.

  1. Running Nios II Command Shell.bat and executing
    • ./eclipse-nios2.exe
  2. Running Nios II Command Shell.bat and executing
    • sudo ./eclipse-nios2.exe
  3. Running Nios II Command Shell.bat as Administrator and executing
    • ./eclipse-nios2.exe
  4. Running Nios II Command Shell.bat as Administrator and executing
    • sudo ./eclipse-nios2.exe

I tried playing around with using elevated command shell and elevated eclipse-nios2 because of the permissions message as well as an answer that said to launch eclipse from the Nios II Command Shell.

https://www.intel.com/content/altera-www/global/en_us/index/support/support-resources/knowledge-base/embedded/2019/error--failed-to-execute--wsl---create-this-bsp-no-make.html

I've also made sure to apt install wsl, dos2unix, and make.

1 Solution
NickWilliams
Novice
11,674 Views

I also ran into this problem. I did some debugging and the problem is that the dos2unix command tries to change the UNIX filesystem permissions of the temporary file it creates; this fails for me in WSL.

You need to tell WSL that it should allow these kinds of operations on the filesystem. You can do this as follows:

  1. Start your Ubuntu 18.04 LTS prompt
  2. Create/edit a file '/etc/wsl.conf'
  3. Add the following to '/etc/wsl.conf':
    [automount]
    options = "metadata"
  4. Save the file.
  5. Reboot your computer.

I have no idea why this works for some people but not others, but this worked for me and fixed the dos2unix permissions error; at which points I was able to create the BSP and everything else in Nios II EDS worked fine.

View solution in original post

9 Replies
juschri
Novice
12,427 Views

It might also be important to know that I am using Quartus Prime Lite v20.1.0 Build 711, and it's installed in C:\intelFPGA_lite\20.1

I also followed the instructions here

https://www.intel.com/content/altera-www/global/en_us/index/support/support-resources/knowledge-base/tools/2019/why-does-the-nios--ii-not-installed-after-full-installation-of-t.html

to install eclipse in the nios2eds/bin directory

0 Kudos
Eliath_G_Intel
Employee
12,401 Views

Hello @juschri Justin,

First of all, thank you for reaching us,

Please try the next KDB (Knowledge DataBase) and let me know who it worked and if you have any questions please do not hesitate to let me know.

 

Regards,

-Eliath Guzman

 

0 Kudos
TrainMan
Novice
12,116 Views

Hi Eliath,

 

I see it has been 2 months since you replied to Justin's question but I don't see a solution.  Have you found one? I have this issue with Quartus lite v20.

NickWilliams
Novice
11,675 Views

I also ran into this problem. I did some debugging and the problem is that the dos2unix command tries to change the UNIX filesystem permissions of the temporary file it creates; this fails for me in WSL.

You need to tell WSL that it should allow these kinds of operations on the filesystem. You can do this as follows:

  1. Start your Ubuntu 18.04 LTS prompt
  2. Create/edit a file '/etc/wsl.conf'
  3. Add the following to '/etc/wsl.conf':
    [automount]
    options = "metadata"
  4. Save the file.
  5. Reboot your computer.

I have no idea why this works for some people but not others, but this worked for me and fixed the dos2unix permissions error; at which points I was able to create the BSP and everything else in Nios II EDS worked fine.

jim12138
Beginner
11,526 Views

Can you please provide how you did it? Is it in the command line? I can't seem to find anything

0 Kudos
juschri
Novice
11,407 Views

@NickWilliams solution worked for me. I followed the instructions on

https://ajeet.dev/how-to-use-windows-subsystem-for-linux/

to create the wsl.conf file. The exact steps I took were:

From within Ubuntu 18.04 LTS (which I already had installed for Windows Subsystem for Linux) I executed the command

explorer.exe .

In the explorer window that opened I went up 2 directories to Ubuntu-18.04

Next I opened the etc directory and created a new file titled "wsl.conf"

Next I opened this with a text editor and edited it to say

[automount]
options = "metadata"

as per @NickWilliams  suggestion.

I saved this file, then restarted my computer.

After restart I reopened my project in quartus, used the tools menu to open "Nios II Software Build Tools for Eclipse" Then following the instructions in the lab tutorial Eclipse was finally able to create my project without errors.

0 Kudos
DawsariM
Beginner
9,721 Views

Hi @juschri,

 

The link you provided to create the file lead me to spam webpage (I think).

 

Could you explain more how exactly you entered the directory "/etc/" ?

this one >> "In the explorer window that opened I went up 2 directories to Ubuntu-18.04".

 

Thank you,

 

0 Kudos
juschri
Novice
9,669 Views

Hello,

I don't know why that link doesn't work anymore. I don't know how to find the page I referenced anymore.

This link explains how to do it though.

 

https://www.howtogeek.com/426749/how-to-access-your-linux-wsl-files-in-windows-10/

 

Inside WSL if you execute the command "explorer.exe ." it will open explorer in the current directory which is your WSL directory. Make sure you don't leave out the space and the period.

From there all you have to do is use the up arrow in the top left corner of the explorer window to reach the root directory and then you can enter the /etc directory.

Once there if you right click in the window you can create a new file.

name it "wsl.conf"

and follow the rest of the instructions above.

0 Kudos
TrainMan
Novice
12,002 Views

I don't know that it will help but my Eclipse build template command started working after I noticed the last line of text above the prompt after running the command "sudo apt update" in the Ubuntu command shell, the first of 4 command lines found in the "Intel FPGA Software Installation and Licensing" guide section 2.3.1.  The text referred to items that needed to be "Upgraded"  The command "sudo apt upgrade" worked for me.  I then re-ran the remaining three command lines and looked for anything else that needed to be upgraded.  There were none.  After that I was suddenly able to create Eclipse project templates, but I had tried everything else I could find before that point and the process woudl fail with the error message failed to execute dos2unix.

Hope it helps you.

0 Kudos
Reply