Page 1 of 1

MiSTer core without make files?

Posted: Sun Apr 11, 2021 5:03 pm
by keilmillerjr
With linux, normally I have a makefile to build/install/clean/uninstall. I see no such thing in the template core or neogeo core. I see a batch file, which is for dos/windows/os2! How are these cores integrated?

Re: MiSTer core without make files?

Posted: Sun Apr 11, 2021 5:13 pm
by dshadoff
The cores are not UNIX executables; they are binary configuration files for FPGA; you will need Quartus 17.x to build.

Start up Quartus, load the appropriate project file, and all of the project information becomes available. Hit the giant green triangle that looks like a cassette player's "Play" button, and the compile will start. Depending on the core and your computer, come back in 10 to 60 minutes.

This is if you wish to make updates (which will be intereactive).
If you just want the latest release, look in the releases/ folder.

Re: MiSTer core without make files?

Posted: Sun Apr 11, 2021 6:21 pm
by keilmillerjr
I assume rbf is the bin file? Can you build it on target? How about building using CI?

Where should the bin be installed to? A makefile can handle this, even if the bin is pre-built.

Re: MiSTer core without make files?

Posted: Sun Apr 11, 2021 6:26 pm
by dshadoff
1) Yes, the RBF is the configuration files which gets downloaded to the FPGA by the 'MiSTer' (Main_MiSTer) process on the device
2) No, Quartus is not intended to run on the SoC portion of the DE10-Nano board - and even if it could be forced to work, it would probably be about 10 times slower than on a PC.
3) The 'update_all' script automatically collects all of the RBF files and places them into their appropriate places by the MiSTer runtime. The developers determine when a core is ready for release.

What are you trying to accomplish ?

Re: MiSTer core without make files?

Posted: Sun Apr 11, 2021 6:57 pm
by keilmillerjr
Just trying to understand the project. Is update_all is an official or 3rd party script? What is the appropriate places that the rbf files go? This seems like a very off workflow.

Re: MiSTer core without make files?

Posted: Sun Apr 11, 2021 7:29 pm
by dshadoff
Sorry, I should have referred you to the update.sh script here, not the update_all (which is not official).
https://github.com/MiSTer-devel/Updater_script_MiSTer

Do you have a MiSTer set up already ?
Have you read the wiki here ?
https://github.com/MiSTer-devel/Main_MiSTer/wiki

If you are interested in being a developer, there is a developer section at the bottom on the right-hand side of the main wiki page which gives a few hints.
Perhaps you should learn a bit more about the system before making judgements on the workflow.


There is also a discord server where you might be able to get more interactive responses.

Here's a link to the post which introduces the server:
viewtopic.php?f=29&t=1964

Re: MiSTer core without make files?

Posted: Sun Apr 11, 2021 7:38 pm
by zakk4223
Quartus for linux has command line tools, so you can theoretically build it via just the command line. The Cave core has a make file, although this is partly due to the developer using something besides quartus for a lot of their development.

If you're thinking of trying to CI this stuff: quartus 'compiles' are very cpu intensive and even on beefy modern hardware can take nearly an hour. I doubt any free-tier CI system (like github actions) can build it in any reasonable amount of time. As a comparison, I do automated Main_Mister builds via github: on my local machine it takes around 30 seconds to build (single threaded). github takes nearly 6 minutes. I can't imagine how long a complicated quartus build would take.

There's also no way to test the resulting artifact, it only runs on the target FPGA.

Re: MiSTer core without make files?

Posted: Sun Apr 11, 2021 8:47 pm
by aberu
zakk4223 wrote: Sun Apr 11, 2021 7:38 pm Quartus for linux has command line tools, so you can theoretically build it via just the command line. The Cave core has a make file, although this is partly due to the developer using something besides quartus for a lot of their development.

If you're thinking of trying to CI this stuff: quartus 'compiles' are very cpu intensive and even on beefy modern hardware can take nearly an hour. I doubt any free-tier CI system (like github actions) can build it in any reasonable amount of time. As a comparison, I do automated Main_Mister builds via github: on my local machine it takes around 30 seconds to build (single threaded). github takes nearly 6 minutes. I can't imagine how long a complicated quartus build would take.

There's also no way to test the resulting artifact, it only runs on the target FPGA.
For reference, the cave core is developed using Scala and Chisel

https://www.youtube.com/watch?v=Wst8IoYRWKo - Here's the dev talking about how he did it.
keilmillerjr wrote: Sun Apr 11, 2021 5:03 pm With linux, normally I have a makefile to build/install/clean/uninstall. I see no such thing in the template core or neogeo core. I see a batch file, which is for dos/windows/os2! How are these cores integrated?
To put it simply from my perspective... you download the source from Github, open up Quartus (version 17.0.x is supported by the all the official cores except Arcade_Cave currently), open the .qpf file, and right click "Compile Design" on the left and click "Start", and wait 10-60 minutes on my i7-4790k.

It's a hardware description language primarily, it's compiling a binary that reprograms the FPGA (which is a device similar to SRAM with logic blocks that are configurable, interconnected and configured by flashing the SRAM). So it's not 1:1 the same as programming in software is.

Re: MiSTer core without make files?

Posted: Sat Apr 24, 2021 4:19 am
by keilmillerjr
My kids filled my root disk with video games. I added a 1TB m.2 ssd. Wow it is small, and cheap! Cloned with gparted. Spent a whole day figuring out that I needed to change the uuid's of partitions, edit fstab and grub.

I downloaded Quartus-lite-17.0.0.595-linux. Install kept hanging. Found this Intel Knowledge Base article, which is incorrect. Help will not install with arch, even separately as instructed. Quartus installing completely into a single directory is odd for linux.

Code: Select all

System:
  Kernel: 5.11.14-1-MANJARO x86_64 bits: 64 compiler: gcc v: 10.2.0 
  Desktop: GNOME 3.38.4 tk: GTK 3.24.28 wm: gnome-shell dm: GDM 40.0 
  Distro: Manjaro Linux base: Arch Linux 
Machine:
  Type: Desktop
  Mobo: Gigabyte model: A320M-S2H-CF v: x.x serial: <filter> 
Memory:
  RAM: total: 15.64 GiB used: 6.6 GiB (42.2%) 
  RAM Report: 
  permissions: Unable to run dmidecode. Root privileges required. 
CPU:
  Info: 6-Core model: AMD Ryzen 5 3600
Graphics:
  Device-1: AMD Tonga PRO [Radeon R9 285/380] 
Info:
  Processes: 379 Uptime: 2d 5h 14m wakeups: 6 Init: systemd v: 247 
  tool: systemctl Compilers: gcc: 10.2.0 clang: 11.1.0 Packages: 1735 
  pacman: 1725 lib: 480 flatpak: 0 snap: 10 Shell: Zsh v: 5.8 
  running-in: gnome-terminal inxi: 3.3.04 
Compiled neogeo core, Commit: 6cc729894f298abf2200b58fb4f855700f51467a, Date: Sun Feb 28 16:45:22 2021 +0100, in 11:33. Not bad.

Re: MiSTer core without make files?

Posted: Sat Apr 24, 2021 6:27 am
by robinsonb5
keilmillerjr wrote: Sat Apr 24, 2021 4:19 am Quartus installing completely into a single directory is odd for linux.
It's also really useful when you need to keep multiple versions around.
(At a minimum I need 13.1 for Cyclone III and 17 for Cyclone V, 10LP and Max10 - and on the rare occasions I want to build for Cyclone II, 13.0sp1 too.)

Re: MiSTer core without make files?

Posted: Sat Apr 24, 2021 7:16 am
by keilmillerjr
robinsonb5 wrote: Sat Apr 24, 2021 6:27 am
keilmillerjr wrote: Sat Apr 24, 2021 4:19 am Quartus installing completely into a single directory is odd for linux.
It's also really useful when you need to keep multiple versions around.
(At a minimum I need 13.1 for Cyclone III and 17 for Cyclone V, 10LP and Max10 - and on the rare occasions I want to build for Cyclone II, 13.0sp1 too.)
Not really. A bin could be placed in path like /usr/bin/quartus131 or /usr/local/bin/quartus131. This would eliminate the need to call an sh script directly to execute quartus cli commands. Same applies to start the gui.

Re: MiSTer core without make files?

Posted: Sat Apr 24, 2021 8:53 am
by Grabulosaure
It's quite common for commercial tools to install to their own directory and not use linux packages. And use scripts for launch.
Same for Xilinx (other FPGA brand).
Several versions can be installed at once (with gigabytes of data, shared libraries), often on a large shared server, with licence files. Sometimes non-admins need to install software. It's the purpose of the "/opt" directory.

But you can copy scripts anywhere on your own computer.