Linux (with GUI) release

https://github.com/MiSTer-devel/Main_MiSTer/wiki

Moderators: Mug UK, Zorro 2, Greenious, spiny, Sorgelig, Moderator Team

Sorgelig
Atari God
Atari God
Posts: 1926
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Linux (with GUI) release

Postby Sorgelig » Thu Mar 22, 2018 5:54 pm

Here is the release with full-featured Linux:
https://mega.nz/#!9QwnVQqB!PKEUgEqRGSRj ... 9CFTnVdCuc

The release format is the same as recent MiSTer release, so you can use included SD install tool to update existing MiSTer SD card or make new one. You can copy files manually, but you need to update boot. So you can update boot in the SD install tool, or using updateboot command from console/ssh.

The release includes latest updates to original MiSTer release.

How it works?
If core (rbf file) has the text file with the same name, then it means MiSTer will reboot and will use additional sets of u-boot commands from that txt file. That's how alternative kernel and linux image are used.
It's not really tied to Linux only. If there will be other cores requiring special code on ARM side, then it will be run the same way. Even bare-metal projects can be loaded this way.

Release includes several versions of FPGA core which is used as a frame buffer. The name shows which resolution will be output on HDMI. But regardless output resolution every version supports any resolution up to 1920x1080. All resolutions will be upscaled/downscaled to output resolution.
By default the Linux resolution equals to output resolution. If you want to use other Linux resolution, then you need to modify TXT file by adding following options:
altvipfb.width - horizontal resolution for Linux.
altvipfb.height - vertical resolution for Linux.
altvipfb.bgwidth - box width.
altvipfb.bgheight - box height.

Box resolution is added around Linux resolution before up/down scaling. It's used to add horizontal/vertical fields in order to correct aspect ratio - i.e. letterboxing.

Example:
mmcboot=setenv bootargs console=ttyS0,115200 $v loop.max_part=8 altvipfb.width=640 altvipfb.height=480 altvipfb.bgwidth=854 root=$mmcroot loop=linux/lxde_linux.img rw rootwait;bootz $loadaddr - $fdt_addr

it will set 640x480 resolution for Linux with left and right black stripes to fit into 16:9 ratio.

Leave other text as-is if you don't know what it does. Text file uses Linux line endings, so you need to use compatible text editor if you edit it on Windows PC.

Note:
Linux image is mounted as read-write, so avoid from turning off or reset without proper shutdown! I suggest to choose "Reboot" instead of "Shutdown" so MiSTer will reboot into MiSTer menu where you can simply turn off the power. DE10-nano board has no power off feature, so if you choose "Shutdown" it will end by black screen and it will be hard to tell if shutdown procedure is finished already or not.
Every reboot from Linux will reboot to Menu core.

Linux is almost the same as the one supplied by Terasic on SD card. I just converted partition to more modern ext4 filesystem and installed Midnight commander. No other modifications have been added. Linux however needs future tweaks like using the same time zone as MiSTer, use the same WiFi settings as MiSTer, and so on.. If someone would like to help with fine tuning the Linux - you are welcome!

Linux is Ubuntu 16.04 and includes working apt environment, so you can add/remove wide range of Ubuntu applications.

Update:
Version with Audio support:
https://mega.nz/#!td5znY7J!1f-gfrmF7811 ... _5YFxHI4aQ
Just replace the files in original release.
Old RBF won't work with new kernel and vice versa. So make sure you use RBF and kernel from the same file set.

What's new:
  • Audio support. Sound card has no control, so need to check if possible to use a digital volume control in Linux on top of the dummy sound card. If not, then i will need to think how to update the sound card driver.
  • Single core for all resolutions. Video resolution can be set in kernel parameters.
    altvipfb.video_mode - video mode - same as in MiSTer.ini (except that custom modes aren't supported). Default is 1280x720@60
  • Automatic box calculation for correct aspect ratio.
    altvipfb.aspect - set to 0 if you want to stretch Linux resolution to full screen. By default aspect=1. If bgwidth or bgheight are set, then aspect ratio is ignored in favor to explicit box dimensions.

Locutus73
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 128
Joined: Wed Feb 07, 2018 6:13 pm

Re: Linux (with GUI) release

Postby Locutus73 » Thu Mar 22, 2018 7:08 pm

Brilliant implementation Sorgelig!
So you didn't end up with a core presenting a multiboot menu, but each core can represent a multiboot main menu entry if paired with a txt file with uboot parameters… so we can have Amiga core, C64 core and Ubuntu core! Very sleek. I suppose the Ubuntu core is Terasic’s soc_system.rbf paired with a txt and your modified Terasic’s second partition.

Thank you (as usual)

Locutus73

NegSol
Captain Atari
Captain Atari
Posts: 208
Joined: Sat Dec 05, 2015 9:22 pm

Re: Linux (with GUI) release

Postby NegSol » Thu Mar 22, 2018 7:57 pm

Thanks Sorgelig - Really innovative thinking! I like it :mrgreen:

:D

Sorgelig
Atari God
Atari God
Posts: 1926
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Linux (with GUI) release

Postby Sorgelig » Thu Mar 22, 2018 8:07 pm

Locutus73 wrote:I suppose the Ubuntu core is Terasic’s soc_system.rbf paired with a txt and your modified Terasic’s second partition.

almost. Modified kernel and completely different FPGA core.
Try to use Terasic's RBF with different resolutions ;)

NML32
Captain Atari
Captain Atari
Posts: 459
Joined: Tue Mar 11, 2014 1:54 am
Location: USA/Florida

Re: Linux (with GUI) release

Postby NML32 » Thu Mar 22, 2018 8:17 pm

Thank you sorgelig :cheers: this is very cool being able to boot into Linux.

https://youtu.be/F9LWOwfZLqk

Sorgelig
Atari God
Atari God
Posts: 1926
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Linux (with GUI) release

Postby Sorgelig » Thu Mar 22, 2018 8:21 pm

By the way, VGA output is also supported.

Sorgelig
Atari God
Atari God
Posts: 1926
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Linux (with GUI) release

Postby Sorgelig » Thu Mar 22, 2018 8:28 pm

What need to be solved is audio. It's unimplemented currently.

NML32
Captain Atari
Captain Atari
Posts: 459
Joined: Tue Mar 11, 2014 1:54 am
Location: USA/Florida

Re: Linux (with GUI) release

Postby NML32 » Thu Mar 22, 2018 8:30 pm

Sorgelig wrote:What need to be solved is audio. It's unimplemented currently.

Sound would be a great addition, along with the others you mentioned above.

Locutus73
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 128
Joined: Wed Feb 07, 2018 6:13 pm

Re: Linux (with GUI) release

Postby Locutus73 » Thu Mar 22, 2018 9:45 pm

Sorgelig wrote:
Locutus73 wrote:I suppose the Ubuntu core is Terasic’s soc_system.rbf paired with a txt and your modified Terasic’s second partition.

almost. Modified kernel and completely different FPGA core.
Try to use Terasic's RBF with different resolutions ;)

Right, I thought about that as soon as I opened the zip file, all rbf files are different so they cannot be a copy of Terasic’s one. Just out of curiosity, did you reverse engineer Terasic’s rbf somehow, or did you rewrite all from scratch?

Anyway, all these rbf+txt tied to the same boot file system gave me an idea about my old “script menu” proposal... I have to do some tests and I’ll report back.

Locutus73

awestyn
Atarian
Atarian
Posts: 6
Joined: Sat Nov 25, 2017 10:02 pm

Re: Linux (with GUI) release

Postby awestyn » Fri Mar 23, 2018 9:40 pm

I'm curious which architecture is being simulated for Linux to run on? Thanks.

Sorgelig
Atari God
Atari God
Posts: 1926
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Linux (with GUI) release

Postby Sorgelig » Sat Mar 24, 2018 1:14 am

awestyn wrote:I'm curious which architecture is being simulated for Linux to run on? Thanks.

it's ARM. It's not simulated, but using real ARM Cortex A9 dual-core CPU.

alanswx
Atariator
Atariator
Posts: 29
Joined: Sat Nov 25, 2017 4:34 pm

Re: Linux (with GUI) release

Postby alanswx » Sat Mar 24, 2018 1:43 pm

Thank you! The linux release is amazing. It will speed up my work on the web interface.

Sorgelig
Atari God
Atari God
Posts: 1926
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Linux (with GUI) release

Postby Sorgelig » Mon Mar 26, 2018 10:31 am

update with audio support. Info is in first post.

Can anyone check if digital volume control is available or not? It will need additional package installation i believe for GUI update with audio widgets.

Sorgelig
Atari God
Atari God
Posts: 1926
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Linux (with GUI) release

Postby Sorgelig » Mon Mar 26, 2018 1:52 pm

If no one will help me with configuration of Linux, then it will be considered as non-interesting and will be abandoned. No more improvements to Linux(kernel/FPGA core) will be contributed from my side.

desin24
Atarian
Atarian
Posts: 7
Joined: Thu Dec 14, 2017 10:48 pm

Re: Linux (with GUI) release

Postby desin24 » Mon Mar 26, 2018 4:29 pm

hold your horses Sorgelig

alsa-info.txt


hope it helps

thanks for your great work
You do not have the required permissions to view the files attached to this post.

Sorgelig
Atari God
Atari God
Posts: 1926
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Linux (with GUI) release

Postby Sorgelig » Mon Mar 26, 2018 5:17 pm

how it can help? I also can make this file.
Actually i mean help in general. Need a lot of things to tune in Linux.
For example i cannot make neither proftpd nor sftp allow to login root. I know i know it's dangerous and a lot of such crappy explanation. But this is embedded system and ftp/sftp required mostly for maintenance and hence root is always required.
I've tried all solutions i found in internet to allow root in proftpd - nothing helps. Always 530 - Login incorrect.
Something in system prevents root to login. Probably the same problem affects sftp where authentication hangs (using Total Commander).

desin24
Atarian
Atarian
Posts: 7
Joined: Thu Dec 14, 2017 10:48 pm

Re: Linux (with GUI) release

Postby desin24 » Mon Mar 26, 2018 5:27 pm

two reboots later ....

it works !

alsa-info.txt


great
You do not have the required permissions to view the files attached to this post.

Sorgelig
Atari God
Atari God
Posts: 1926
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Linux (with GUI) release

Postby Sorgelig » Mon Mar 26, 2018 6:02 pm

can you be more specific? what exactly works?

Locutus73
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 128
Joined: Wed Feb 07, 2018 6:13 pm

Re: Linux (with GUI) release

Postby Locutus73 » Mon Mar 26, 2018 6:03 pm

Sorgelig wrote:Something in system prevents root to login. Probably the same problem affects sftp where authentication hangs (using Total Commander).

I'm away from MiSTer (I'm not home), but, if I remember correctly, root under Terasic's Linux doesn't have any password. Am I right? If so try setting a password.

Locutus73

Sorgelig
Atari God
Atari God
Posts: 1926
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Linux (with GUI) release

Postby Sorgelig » Mon Mar 26, 2018 6:08 pm

Locutus73 wrote:
Sorgelig wrote:Something in system prevents root to login. Probably the same problem affects sftp where authentication hangs (using Total Commander).

I'm away from MiSTer (I'm not home), but, if I remember correctly, root under Terasic's Linux doesn't have any password. Am I right? If so try setting a password.
Locutus73

of course i've set the password.

desin24
Atarian
Atarian
Posts: 7
Joined: Thu Dec 14, 2017 10:48 pm

Re: Linux (with GUI) release

Postby desin24 » Mon Mar 26, 2018 8:55 pm

apt-get install pulseaudio pavucontrol


https://forum.backbox.org/howtos/pulsea ... p-as-root/


there seems to be no other way ...

alanswx
Atariator
Atariator
Posts: 29
Joined: Sat Nov 25, 2017 4:34 pm

Re: Linux (with GUI) release

Postby alanswx » Tue Mar 27, 2018 12:23 am

Sorelig - send us a list of features that you want in linux and I will try to get them working. What is the best way to share this configuration?

How are you building the linux image now? Do you have a shell script or ansible script?

Sorgelig
Atari God
Atari God
Posts: 1926
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Linux (with GUI) release

Postby Sorgelig » Tue Mar 27, 2018 10:45 am

desin24 wrote:apt-get install pulseaudio pavucontrol
https://forum.backbox.org/howtos/pulsea ... p-as-root/
there seems to be no other way ...

thanks for info! I was thinking about pulseaudio, but wasn't sure. After your confirmation i've started to work on it and succeeded, although it turned out that LXDE is very sensitive when pulseaudio TSR is started. After tweaking i've got standard volume control widget working on panel.
Not sure how much CPU processing occupied by pulseaudio layer.

alanswx wrote:Sorelig - send us a list of features that you want in linux and I will try to get them working. What is the best way to share this configuration?
How are you building the linux image now? Do you have a shell script or ansible script?

I'm using existing Terasic linux image. I modify it by hands. At the final i hope to get pre-configured Linux image ~3.2GB.
This linux has a working standard Ubuntu (LUbintu) apt package manager, so i can add/remove the packages without searching it on internet or compiling them.
Idea is to get the image tuned to MiSTer features, using the same WiFi settings, ftp, time zone, etc. It should have only minimal set of packages for correct working. Later, user will be able to add more package to his flavor.

alanswx
Atariator
Atariator
Posts: 29
Joined: Sat Nov 25, 2017 4:34 pm

Re: Linux (with GUI) release

Postby alanswx » Tue Mar 27, 2018 2:51 pm

Sorgelig wrote:I'm using existing Terasic linux image. I modify it by hands. At the final i hope to get pre-configured Linux image ~3.2GB.
This linux has a working standard Ubuntu (LUbintu) apt package manager, so i can add/remove the packages without searching it on internet or compiling them.
Idea is to get the image tuned to MiSTer features, using the same WiFi settings, ftp, time zone, etc. It should have only minimal set of packages for correct working. Later, user will be able to add more package to his flavor.


I suggest we build a shell script that we can put into github with the changes. ie: we can start with the standard Terasic image for now, and then run the shell script which will do some apt-get installs as well as configure the wifi, ftp, time zone, etc. I will have time next week to start work on this.

Sorgelig
Atari God
Atari God
Posts: 1926
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Linux (with GUI) release

Postby Sorgelig » Tue Mar 27, 2018 3:41 pm

I suggest even better - make a LUbuntu 16.04 LTS (same as Terasic's one) installation from scratch. I believe there should be LUbuntu armhf installer.
I just don't want to participate to it as i have many other tasks already.


Return to “MiSTer”

Who is online

Users browsing this forum: Cebion and 3 guests