Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
1,503 Views

DE1-SoC No /dev/fpga0 device on LXDE or Ubuntu

I have been using the basic SD card image but now I need to move to using the LXDE or Ubuntu images supplied for use with the DE1-SoC. 

 

However both these images do not feature a /dev/fpga0 device and so I am unable to program the FPGA from Linux (as opposed to u-boot). 

 

How can I modify the LXDE or Ubuntu images so that:- 

a. U-boot does not configure the FPGA 

b. /dev/fpga0 is present allowing FPGA configuration from Linux 

 

Any help / pointers appreciated . . .
0 Kudos
6 Replies
Altera_Forum
Honored Contributor I
108 Views

OK I managed to fix this. 

 

Take the kernel from the fat partition on the "DE1_SoC_SD" SD card. Filename is zImage. For the zImage kernel to work in the "DE1_SoC_LXDE" SD card it must be converted to uImage format, so in SoC EDS shell type:- 

 

mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n "Linux-3.12.0-00307-g507abb4-dirt" -d ./zImage ./uImage 

 

Now copy the newly created uImage file to the FAT partition on the LXDE SD card. You should have a working /dev/fpga0 where you can dd the the FPGA configuration bitstream to.
Altera_Forum
Honored Contributor I
108 Views

Can you clarify as to how this solves the problem? Booting with the newly created uImage will run linux in console mode, not the LXDE environment? 

I tried this and it did indeed solve the problem of the missing dev/fpga0 device, but I'm looking to actually run an GUI.
Altera_Forum
Honored Contributor I
108 Views

I know that it's an old topic but i had the same issue and i found out something very interesting. For the new Kernel (say 4.4 for example) a "fpgamanager" was introduced and it changed the way you should send the rbf files to the fpga. 

Now you need to make a devicetree overlay in order to load the rbf file, but the fpgamanager will stop the bridges and do all the work for you. 

 

I'm attempting to write a simple tutorial to the process but i'm not that good at writing an i'm not an expert on the subjec, so i'm bound to be mistaken at some things, but i know for sure that i can program de fpga. So i'll post the link here once i finish the tutorial.
Altera_Forum
Honored Contributor I
108 Views

Hello ep1015, 

 

I have the same missing /dev/fpga0 device problem although the context is slightly different. The device is present if I boot from yocto. 

 

I wanted to use ubuntu for package management reasons and have gone for the latest release of ubuntu desktop (http://www.terasic.com.tw/cgi-bin/page/archive.pl?language=english&no=836&partno=4) with the 4.5 kernel. 

 

if I have understood your directions correctly, I took the kernel from the Yocto card, ran mkimage command in the SoC EDS shell and under Windows, dropped the uImage file alonside the zImage file in the FAT32 partition visible under Windows. 

 

However I have had no joy after a reboot in seeing /dev/fpga0 device. 

 

If you have any further ideas or can see fault with what I have done, I'd be most grateful.
Altera_Forum
Honored Contributor I
108 Views

 

--- Quote Start ---  

Hello ep1015, 

 

I have the same missing /dev/fpga0 device problem although the context is slightly different. The device is present if I boot from yocto. 

 

I wanted to use ubuntu for package management reasons and have gone for the latest release of ubuntu desktop (http://www.terasic.com.tw/cgi-bin/page/archive.pl?language=english&no=836&partno=4) with the 4.5 kernel. 

 

if I have understood your directions correctly, I took the kernel from the Yocto card, ran mkimage command in the SoC EDS shell and under Windows, dropped the uImage file alonside the zImage file in the FAT32 partition visible under Windows. 

 

However I have had no joy after a reboot in seeing /dev/fpga0 device. 

 

If you have any further ideas or can see fault with what I have done, I'd be most grateful. 

--- Quote End ---  

 

Well, that was a load of nonsense! 

 

I didn't need to see the /dev/fpga0 device, I have been able to locally compile programs which communicate with the FPGA without /dev/fpga existing using the latest Ubuntu release linked above.
GApts
Beginner
108 Views

4 years in but did you write the tutorial?