MichaIng / DietPi

Lightweight justice for your single-board computer!
https://dietpi.com/
GNU General Public License v2.0
4.79k stars 494 forks source link

DietPi-Software | Update Amiberry to v2.1 #756

Closed midwan closed 7 years ago

midwan commented 7 years ago

@Fourdee I've just released a new stable version of Amiberry, it would be great if we could update the DietPi repo with it (through dietpi-update).

The current version of Amiberry (v2.1) can now be found here: https://github.com/midwan/amiberry/releases/tag/v2.1

I'm working on getting the SDL2 version ready, which is currently sitting on it's own branch. Once that is ready, I'll notify you for another update as well. :)

A few notes, regarding the keyboard LED functionality that we talked about earlier (https://github.com/midwan/amiberry/issues/3). In order for this to work properly, we'll need to make sure of the following:

Fourdee commented 7 years ago

@midwan

I've just released a new stable version of Amiberry, it would be great if we could update the DietPi repo with it (through dietpi-update).

Excellent 👍

Yep, i'll add this to v144, will get round to it ASAP.

Fourdee commented 7 years ago

A few notes, regarding the keyboard LED functionality that we talked about earlier (midwan/amiberry#3). In order for this to work properly, we'll need to make sure of the following:

Fourdee commented 7 years ago

@midwan

Can I see your service for fastboot uae4arm under user pi?


cat << _EOF_ > /etc/systemd/system/uae4arm-rpi.service
[Unit]
Description=AmiBerry (uae4ARM) Amiga Emulator
DefaultDependencies=no
#After=dietpi-service.service
#After=After=remote-fs.target

[Service]
Type=simple
User=amiberry
WorkingDirectory=/etc/uae4arm-rpi
ExecStart=/bin/bash -c './uae4arm-rpi -f conf/autostart.uae'

[Install]
WantedBy=local-fs.target
_EOF_
            systemctl daemon-reload

            # - Setup amiberry underpriv user for runtime
            mkdir -p /home
            useradd -m amiberry

            #   Same groups as user pi
            usermod -a -G adm amiberry
            usermod -a -G dialout amiberry
            usermod -a -G cdrom amiberry
            usermod -a -G sudo amiberry
            usermod -a -G audio amiberry
            usermod -a -G video amiberry
            usermod -a -G plugdev amiberry
            usermod -a -G games amiberry
            usermod -a -G users amiberry
            usermod -a -G input amiberry
            usermod -a -G netdev amiberry
            usermod -a -G spi amiberry
            usermod -a -G i2c amiberry
            usermod -a -G gpio amiberry
            usermod -a -G tty amiberry

Results in:

root@DietPisystemctl status uae4arm-rpi.service -l
● uae4arm-rpi.service - AmiBerry (uae4ARM) Amiga Emulator
   Loaded: loaded (/etc/systemd/system/uae4arm-rpi.service; enabled)
   Active: failed (Result: signal) since Sat 2017-02-11 16:35:15 UTC; 26s ago
  Process: 101 ExecStart=/bin/bash -c ./uae4arm-rpi -f conf/autostart.uae (code=killed, signal=ABRT)
 Main PID: 101 (code=killed, signal=ABRT)

Feb 11 16:35:15 DietPi bash[101]: Amiberry build 2017-01-08, by Dimitris (MiDWaN) Panokostas and Olly Aigner
Feb 11 16:35:15 DietPi bash[101]: Based on previous work by Chips and TomB (Pandora)
Feb 11 16:35:15 DietPi bash[101]: SDL could not initialize! SDL_Error: Unable to open a console terminal
Feb 11 16:35:15 DietPi bash[101]: Internal error; file src/main.cpp, line 645
Feb 11 16:35:15 DietPi systemd[1]: uae4arm-rpi.service: main process exited, code=killed, status=6/ABRT
Feb 11 16:35:15 DietPi systemd[1]: Unit uae4arm-rpi.service entered failed state.

Fourdee commented 7 years ago

@midwan

Can I see your service for fastboot uae4arm under user pi?

Never mind, sussed it StandardInput=tty, all lock keys now functional, running under user amiberry 👍 :

cat << _EOF_ > /etc/systemd/system/uae4arm-rpi.service
[Unit]
Description=AmiBerry (uae4ARM) Amiga Emulator
DefaultDependencies=no
#After=dietpi-boot.service
#After=remote-fs.target

[Service]
Type=simple
User=amiberry
StandardInput=tty
StandardOuput=tty
#TTYPath=/dev/tty1
TTYReset=yes
WorkingDirectory=/etc/uae4arm-rpi
ExecStart=/etc/uae4arm-rpi/uae4arm-rpi -f conf/autostart.uae
# ExecStart=/bin/bash -c './uae4arm-rpi -f conf/autostart.uae'

[Install]
WantedBy=local-fs.target
_EOF_
            systemctl daemon-reload

Amiberry user tests:

🈴 No scroll lock:

cat << _EOF_ > /etc/systemd/system/uae4arm-rpi.service
[Unit]
Description=AmiBerry (uae4ARM) Amiga Emulator
DefaultDependencies=no
#After=dietpi-boot.service
#After=remote-fs.target

[Service]
Type=simple
User=amiberry
WorkingDirectory=/etc/uae4arm-rpi
ExecStart=/bin/bash uae4arm-rpi_run.sh

[Install]
WantedBy=local-fs.target
_EOF_
            systemctl daemon-reload

            cat << _EOF_ > /etc/uae4arm-rpi/uae4arm-rpi_run.sh
#!/bin/bash
sudo chmod 0660 /dev/tty2
xinit ./uae4arm-rpi -f conf/autostart.uae
_EOF_

            chmod +x /etc/uae4arm-rpi/uae4arm-rpi_run.sh
            systemctl restart uae4arm-rpi

🈴 No input from keyboard, input goes to rear FB:

cat << _EOF_ > /etc/systemd/system/uae4arm-rpi.service
[Unit]
Description=AmiBerry (uae4ARM) Amiga Emulator
DefaultDependencies=no
#After=dietpi-boot.service
#After=remote-fs.target

[Service]
Type=simple
User=amiberry
StandardInput=tty
WorkingDirectory=/etc/uae4arm-rpi
ExecStart=/bin/bash uae4arm-rpi_run.sh

[Install]
WantedBy=local-fs.target
_EOF_
            systemctl daemon-reload

            cat << _EOF_ > /etc/uae4arm-rpi/uae4arm-rpi_run.sh
#!/bin/bash
./uae4arm-rpi -f conf/autostart.uae
_EOF_

            chmod +x /etc/uae4arm-rpi/uae4arm-rpi_run.sh
            systemctl restart uae4arm-rpi

🈴 Login as user amiberry, manually launch via cmdline | Lock keys not functional.

Root user tests:

🈴 No lock keys functional:

cat << _EOF_ > /etc/systemd/system/uae4arm-rpi.service
[Unit]
Description=AmiBerry (uae4ARM) Amiga Emulator
DefaultDependencies=no
#After=dietpi-boot.service
#After=remote-fs.target

[Service]
Type=simple
User=root
WorkingDirectory=/etc/uae4arm-rpi
ExecStart=/bin/bash uae4arm-rpi_run.sh

[Install]
WantedBy=local-fs.target
_EOF_
            systemctl daemon-reload

            cat << _EOF_ > /etc/uae4arm-rpi/uae4arm-rpi_run.sh
#!/bin/bash
./uae4arm-rpi -f conf/autostart.uae
_EOF_

            chmod +x /etc/uae4arm-rpi/uae4arm-rpi_run.sh
            systemctl restart uae4arm-rpi

https://forums.libsdl.org/viewtopic.php?p=44221#44221

Fine under user amiberry:

udevadm info --path=/sys/class/input/event0
Fourdee commented 7 years ago

@midwan

Ok, i'am going to release this with the following known issues:

I'll create another ticket for running under another user, as this is starting to hold up v144's release. I will run further tests and hopefully get that patched in for v145.

Let me know if you disagree with this, and/or, would rather delay the 2.1 update until lock keys are functional (this will then be reverted and nudged to v145)

midwan commented 7 years ago

@Fourdee Sorry, I've been a little busy and I couldn't help much these days... :(

Are the lock keys not functional at all, or just their LEDs ?

Fourdee commented 7 years ago

@midwan

Sorry, I've been a little busy and I couldn't help much these days... :(

No worries, know the feeling 👍

Are the lock keys not functional at all, or just their LEDs ?

LEDS are not functional, i'll test the other now.

midwan commented 7 years ago

@Fourdee Ok, if the LEDs are not functional but the Caps Lock key does work (that's the only key that we use in the Amiga anyway, AFAIK) then we could release this with a fix later on.

If the Caps Lock does not function properly (no effect in the text) then I'd prefer we delay this release until v145, so we have enough time to fix it.

Fourdee commented 7 years ago

@midwan

Yep, caps lock works, just the LED has no effect, tested in AmigaDos 1.3.

Ok, so will release updated 2.1 with v144, known issue with keyboard LEDs, attempt resolve in v145. You ok with that?

midwan commented 7 years ago

@Fourdee Yes, let's go with that :)

Fourdee commented 7 years ago

@midwan

As existing .uae configs are not compatible with the 2.1 update. We'll skip the patch for automatic upgrade with existing installations. Wouldn't be nice for us to break users config files that they spent time setting up ;)

Existing installations will need to manually reinstall AmiBerry to receive the update.

New installations after v144, will always install AmiBerry 2.1.

midwan commented 7 years ago

@Fourdee I wasn't aware of any compatibility issues, could you please let me know what you saw? The config file uses the same settings as the previous version, besides a few new ones (that will default to being disabled if not found anyway), regarding the mapping of controller buttons to enter the GUI or Shutdown the host system.

Fourdee commented 7 years ago

@midwan

Strange, ran a test on current master install, upgraded to 2.1, config seems fine. Not sure what happened before (probably user error ;)).

Ok, lets get this upgraded during v144 update.

Fourdee commented 7 years ago

Ok, all done, test install successful. Minus the LEDs which i'll take a look at in v145: https://github.com/Fourdee/DietPi/issues/760

Great work, excellent update @midwan , the best Amiga experience yet 👍

On a personal note: I just lost 20 minutes playing Stunt Car Racer lol. So easy to get pulled in 😉