how to run linux embedded in fpga - Page 1
Forum section: electronics / beginners

author: SDBFG
author_rank: Contributor
timestamp: April 23, 2018, 10:08:48 am
content: hello sirhow to run Xilinx spartan xc3s50 embedded linux....

author: Berni
author_rank: Super Contributor
timestamp: April 23, 2018, 10:11:33 am
content: You first need to build a CPU inside that FPGA to do such a thing, and likely need external memory.

author: Mr. Scram
author_rank: Super Contributor
timestamp: April 23, 2018, 10:14:45 am
content: 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.

author: SDBFG
author_rank: Contributor
timestamp: April 23, 2018, 01:48:15 pm
content: how to program linux in FPGA i have used ubuntu

author: rstofer
author_rank: Super Contributor
timestamp: April 23, 2018, 02:09:20 pm
content: 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.htmlHere 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/

author: Mr. Scram
author_rank: Super Contributor
timestamp: April 23, 2018, 02:43:59 pm
content: Quote from: SDBFG on April 23, 2018, 01:48:15 pmWe understand the question. We don't understand your choices. We cannot help you this way.

author: Mr. Scram
author_rank: Super Contributor
timestamp: April 23, 2018, 03:29:07 pm
content: Quote from: Mechatrommer on April 23, 2018, 03:02:30 pmThere 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.

author: hamster_nz
author_rank: Super Contributor
timestamp: April 24, 2018, 04:04:06 am
content: 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 athttp://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.

author: ebastler
author_rank: Super Contributor
timestamp: April 24, 2018, 10:55:24 am
content: 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.

author: SDBFG
author_rank: Contributor
timestamp: April 24, 2018, 11:25:40 am
content: Quotehello siri want to learn all threewhy we run linux other than simple embedded system?and what does combination of FPGA and external processor can do?

author: ebastler
author_rank: Super Contributor
timestamp: April 24, 2018, 11:33:34 am
content: 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:QuotePlease 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.

author: SDBFG
author_rank: Contributor
timestamp: April 24, 2018, 01:31:32 pm
content: hello sirhow to program fpga with linux code.

author: agehall
author_rank: Frequent Contributor
timestamp: April 24, 2018, 01:34:17 pm
content: Quote from: SDBFG on April 24, 2018, 01:31:32 pmYou 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.

author: ebastler
author_rank: Super Contributor
timestamp: April 24, 2018, 05:18:32 pm
content: 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 doesnotqualify!

author: amyk
author_rank: Super Contributor
timestamp: April 25, 2018, 01:35:52 am
content: Quote from: ebastler on April 24, 2018, 05:18:32 pmFrom his country and past experience, I'm pretty sure that wasunfortunately not a troll.

author: james_s
author_rank: Super Contributor
timestamp: April 25, 2018, 02:05:43 am
content: 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.