Author Topic: how to run linux embedded in fpga  (Read 5249 times)

0 Members and 1 Guest are viewing this topic.

Offline SDBFGTopic starter

  • Contributor
  • !
  • Posts: 15
  • Country: in
how to run linux embedded in fpga
« on: April 23, 2018, 10:08:48 am »
hello sir
how to run Xilinx spartan xc3s50 embedded linux....
 

Offline Berni

  • Super Contributor
  • ***
  • Posts: 4946
  • Country: si
Re: how to run linux embedded in fpga
« Reply #1 on: April 23, 2018, 10:11:33 am »
You first need to build a CPU inside that FPGA to do such a thing, and likely need external memory.
 
The following users thanked this post: Mr. Scram

Offline Mr. Scram

  • Super Contributor
  • ***
  • Posts: 9810
  • Country: 00
  • Display aficionado
Re: how to run linux embedded in fpga
« Reply #2 on: April 23, 2018, 10:14:45 am »
Why do you want to run this on an FPGA? Starting with an actual processor is probably a lot easier, unless you have very specific demands or view it as a project for the sake of it. In the case of the latter, it's time to hit Google.
 

Offline SDBFGTopic starter

  • Contributor
  • !
  • Posts: 15
  • Country: in
Re: how to run linux embedded in fpga
« Reply #3 on: April 23, 2018, 01:48:15 pm »
how to program linux in FPGA i have used ubuntu
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: us
Re: how to run linux embedded in fpga
« Reply #4 on: April 23, 2018, 02:09:20 pm »
That seems like a very small chip for such a project - and it's a pretty old Spartan 3.  I built a retro CPU in an XC3S1000 and while I only used 1/3 of the logic (still 6 times as much as the XC3S50 can hold), I used most of the BlockRam and still needed external memory and this was for a machine with just 32K 16 bit words.

Short answer:  It isn't going to fit.

But, if it did, you would need to design a CPU or use something like Microblaze (best choice) with a MMU (Memory Management Unit) and then recompile all of the Linux source for the new processor.  This has been done for larger chips.

If you had enough memory, you could use uClinux without a MMU.

Or, maybe this project:
https://www.xilinx.com/products/design-tools/embedded-software/petalinux-sdk.html

Here is a board that supports the project although it is going obsolete.
https://store.digilentinc.com/atlys-spartan-6-fpga-trainer-board-limited-time-see-nexys-video/
 

Offline Mr. Scram

  • Super Contributor
  • ***
  • Posts: 9810
  • Country: 00
  • Display aficionado
Re: how to run linux embedded in fpga
« Reply #5 on: April 23, 2018, 02:43:59 pm »
how to program linux in FPGA i have used ubuntu
We understand the question. We don't understand your choices. We cannot help you this way.
 

Offline Mr. Scram

  • Super Contributor
  • ***
  • Posts: 9810
  • Country: 00
  • Display aficionado
Re: how to run linux embedded in fpga
« Reply #6 on: April 23, 2018, 03:29:07 pm »
:palm: not answering the question. dont run away please!!!!... keep asking...
There honestly is no viable question to answer. It's like me asking you how to build a car. It's a classic case of garbage in, garbage out.
 

Offline hamster_nz

  • Super Contributor
  • ***
  • Posts: 2803
  • Country: nz
Re: how to run linux embedded in fpga
« Reply #7 on: April 24, 2018, 04:04:06 am »
I have had ucLinux running on the Altera NIOS II CPU, but imagine process for Xilinx would be much the same.

Full documentation for each of these steps would most likely run to many pages, so here is an outline - full notes can be found at http://www.wiki.xilinx.com/MicroBlaze

- Build you FPGA hardware design in a 'SoC builder' application. If you are using the latest Xilinx Vivado tools this would most likely be using the IP integrator. Not sure about the older ISE equivilent

- Implement your FPGA hardware design (i.e. build the configuration bitstream file used by the FPGA)

- Export the hardware configuration into config files for the software build. This might include building device trees and so on

- Install a cross-compile environment on your development system, so you can build binaries for the target CPU architecture.

- Build a minimum viable Linux environment. Usually a boot loader (U-Boot), a kernel, the root file system containing 'busybox'.

- Write the root filesystem to an SD card.

- Run the environment, using JTAG to download the software and FPGA images.

- Package that in s suitable manor to be written to the FPGA's configuration devices and/or an SD card. Usually the FPGA bitstream and boot loader will go into the on-board flash, the root file system and kernel goes onto the SD card. That way you can try different s/w configurations by swapping SD cards.

- With the correct jumper settings on the FPGA board, you should now be able to boot Linux without relying on any external host or hardware.

Gaze not into the abyss, lest you become recognized as an abyss domain expert, and they expect you keep gazing into the damn thing.
 

Online ebastler

  • Super Contributor
  • ***
  • Posts: 6425
  • Country: de
Re: how to run linux embedded in fpga
« Reply #8 on: April 24, 2018, 10:55:24 am »
A great summary by hamster_nz -- but it also gives a good idea of the complexity of this project.

@SDBFG: We don't know your level of experience, but based on your non-specific questions, and on the fact that this is the "Beginner" section of the forum, this may be more than you can chew at the moment. Please let us know what goal you want to achieve with your design, and maybe we can suggest simpler alternatives:

- Do you really need Linux, or is a simple microcontroller enough?
- Do you really need an FPGA, or will a processor alone do?
- Would a combination of FPGA and external processor be easier?

etc.
 

Offline SDBFGTopic starter

  • Contributor
  • !
  • Posts: 15
  • Country: in
Re: how to run linux embedded in fpga
« Reply #9 on: April 24, 2018, 11:25:40 am »
Quote
- Do you really need Linux, or is a simple microcontroller enough?
- Do you really need an FPGA, or will a processor alone do?
- Would a combination of FPGA and external processor be easier?

hello sir
i want to learn all three
why we run linux other than simple embedded system?
and what does combination of FPGA and external processor can do?
 

Online ebastler

  • Super Contributor
  • ***
  • Posts: 6425
  • Country: de
Re: how to run linux embedded in fpga
« Reply #10 on: April 24, 2018, 11:33:34 am »
Sorry, SDBFG, I think you will need to do more homework before posting questions here, and then ask more specific questions. This forum cannot provide custom-made tutorials or classroom-style teaching, prompted by very brief and wide-open questions.

On the main page of this forum, you will find the following hint, in the description of the "Beginners" section:
Quote
Short "How does X work" questions are not proper forum etiquette.

Please keep that in mind. Use Google to look for introductions and tutorials for the topics you are interested in. Including "tutorial" or "introduction" in your Google search terms may help to find the right kind of pages.
 
The following users thanked this post: agehall

Offline SDBFGTopic starter

  • Contributor
  • !
  • Posts: 15
  • Country: in
Re: how to run linux embedded in fpga
« Reply #11 on: April 24, 2018, 01:31:32 pm »
hello sir
how to program fpga with linux code.
 

Offline agehall

  • Frequent Contributor
  • **
  • Posts: 383
  • Country: se
Re: how to run linux embedded in fpga
« Reply #12 on: April 24, 2018, 01:34:17 pm »
hello sir
how to program fpga with linux code.

You don't. You just don't.

You are pretty much asking how to build a spacecraft and how to fly it in half a sentence. There is no way to constructively answer your questions at this point, other than "go read up on basic concepts". I would suggest you invest a few hours in googling FPGAs and watching a few youtube tutorials.
 
The following users thanked this post: daqq, ebastler

Online ebastler

  • Super Contributor
  • ***
  • Posts: 6425
  • Country: de
Re: how to run linux embedded in fpga
« Reply #13 on: April 24, 2018, 05:18:32 pm »
Thank you for the ban, moderators. I am not sure whether there was ill will on the OP's part, or the intent to troll -- but he just did not seem capable or willing to use the forum in a constructive way. The "antimatter" question in the other thread pushed it over the edge for me...

@SDBFG -- if you are still reading this, and meant well with your posts: Please heed the advice given above. Please learn from tutorials first, then ask specific questions. And no, posting a Google search query plus an unspecific question does not qualify!
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8264
Re: how to run linux embedded in fpga
« Reply #14 on: April 25, 2018, 01:35:52 am »
Thank you for the ban, moderators. I am not sure whether there was ill will on the OP's part, or the intent to troll -- but he just did not seem capable or willing to use the forum in a constructive way. The "antimatter" question in the other thread pushed it over the edge for me...
From his country and past experience, I'm pretty sure that was unfortunately not a troll.
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: how to run linux embedded in fpga
« Reply #15 on: April 25, 2018, 02:05:43 am »
That's been my experience too, I've worked with some very sharp Indians, it may be true that only the best of the best end up coming over here to work, I've never been to India so I can't really comment on that.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf