MiSTer core without make files?

Kernel, Main, Utilities & Applications, Miscellaneous Devices.
keilmillerjr
Posts: 49
Joined: Wed Mar 24, 2021 12:52 pm
Has thanked: 3 times
Been thanked: 6 times

MiSTer core without make files?

Unread post 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?
dshadoff
Core Developer
Posts: 547
Joined: Sun May 24, 2020 9:30 pm
Has thanked: 20 times
Been thanked: 145 times

Re: MiSTer core without make files?

Unread post 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.
keilmillerjr
Posts: 49
Joined: Wed Mar 24, 2021 12:52 pm
Has thanked: 3 times
Been thanked: 6 times

Re: MiSTer core without make files?

Unread post 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.
dshadoff
Core Developer
Posts: 547
Joined: Sun May 24, 2020 9:30 pm
Has thanked: 20 times
Been thanked: 145 times

Re: MiSTer core without make files?

Unread post 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 ?
keilmillerjr
Posts: 49
Joined: Wed Mar 24, 2021 12:52 pm
Has thanked: 3 times
Been thanked: 6 times

Re: MiSTer core without make files?

Unread post 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.
dshadoff
Core Developer
Posts: 547
Joined: Sun May 24, 2020 9:30 pm
Has thanked: 20 times
Been thanked: 145 times

Re: MiSTer core without make files?

Unread post 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
zakk4223
Posts: 289
Joined: Sun May 24, 2020 10:55 pm
Been thanked: 120 times

Re: MiSTer core without make files?

Unread post 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.
User avatar
aberu
Core Developer
Posts: 1192
Joined: Tue Jun 09, 2020 8:34 pm
Location: Longmont, CO
Has thanked: 247 times
Been thanked: 411 times
Contact:

Re: MiSTer core without make files?

Unread post 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.
birdybro~
keilmillerjr
Posts: 49
Joined: Wed Mar 24, 2021 12:52 pm
Has thanked: 3 times
Been thanked: 6 times

Re: MiSTer core without make files?

Unread post 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.
robinsonb5
Posts: 130
Joined: Fri Jun 19, 2020 8:54 pm
Has thanked: 13 times
Been thanked: 58 times

Re: MiSTer core without make files?

Unread post 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.)
keilmillerjr
Posts: 49
Joined: Wed Mar 24, 2021 12:52 pm
Has thanked: 3 times
Been thanked: 6 times

Re: MiSTer core without make files?

Unread post 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.
User avatar
Grabulosaure
Core Developer
Posts: 79
Joined: Sun May 24, 2020 7:41 pm
Location: Mesozoic
Has thanked: 3 times
Been thanked: 92 times
Contact:

Re: MiSTer core without make files?

Unread post 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.
Post Reply