Bash version > 1.x is a bloated mess.
They've added two modes of operation which aren't command compatible, so things which are syntactically correct in interactive mode generate errors (or worse just silently operate differently) in a script and vice-versa. They've recently spun out the builtins into a library of script functions, taking CPU power and memory to set up.
Oh, and then there are the "extensions" to the POSIX/Bourne Shell specification which, of course, the current crop of Linux hackers liberally use and flame anyone who points out the problem with this. Gah! People!
TF536 on the STacy
- stephen_usher
- Posts: 5678
- Joined: Mon Nov 13, 2017 7:19 pm
- Location: Oxford, UK.
- Contact:
Re: TF536 on the STacy
Intro retro computers since before they were retro...
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
Re: TF536 on the STacy
Hey Mikro,mikro wrote: ↑Sat Nov 28, 2020 9:50 amIIRC, ST MiNT (https://subsole.org/st_mint) also uses mksh, maybe its newer version supports aliases?Steve wrote: ↑Fri Nov 27, 2020 12:35 pm Hey Mikro are you aware of any lighter weight bash alternatives compiled for mint? I find bash to be very sluggish on my 030's. Of course I have tried mksh from the sparemint repo but it doesn't support bash alias commands. It's kind of funny that Linux distros are not using bash any more because they say it's bloated lol, I think they mainly use 'dash' now. But yeah if you get a spare moment I'd appreciate it if you looked in to it. Thank you
Yeah, dash is an option but it's not 100% bash compatible. But it's a good idea, maybe we should really consider a more lightweight shell.
I tried mksh from that distro, it's seems good! I have a slight issue in mint you might be able to advise:
If I double click mksh and then type 'login' then root, everything works properly
But if I edit my 'passwd' file for bin/mksh instead of bin/bash, upon starting the shell normally though tos2win or taskbar, mksh loads with this error:
'/etc/profile.d/which-2.sh[5]: export: -f: unknown option'
The contents of which-2.sh is:
Code: Select all
# Initialization script for bash and sh
which() {
(alias && declare -f) | /usr/bin/which --tty-only --read-alias --read-functions --show-dot --show-tilde $@
}
export -f which
- stephen_usher
- Posts: 5678
- Joined: Mon Nov 13, 2017 7:19 pm
- Location: Oxford, UK.
- Contact:
Re: TF536 on the STacy
The -f option is not in the POSIX/Bourne Shell standard.
mksh is probably following the Bash extension and allowing the -f option in an interactive session but not in a script.
mksh is probably following the Bash extension and allowing the -f option in an interactive session but not in a script.
Intro retro computers since before they were retro...
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
Re: TF536 on the STacy
Are you aware of any way I can modify the script to make it POSIX/Bourne complaint? Thanksstephen_usher wrote: ↑Sat Nov 28, 2020 6:05 pm The -f option is not in the POSIX/Bourne Shell standard.
mksh is probably following the Bash extension and allowing the -f option in an interactive session but not in a script.
- stephen_usher
- Posts: 5678
- Joined: Mon Nov 13, 2017 7:19 pm
- Location: Oxford, UK.
- Contact:
Re: TF536 on the STacy
The '-f' extension is for exporting functions, which is a bash-only extension. There is no equivalent.Steve wrote: ↑Sat Nov 28, 2020 6:23 pmAre you aware of any way I can modify the script to make it POSIX/Bourne complaint? Thanksstephen_usher wrote: ↑Sat Nov 28, 2020 6:05 pm The -f option is not in the POSIX/Bourne Shell standard.
mksh is probably following the Bash extension and allowing the -f option in an interactive session but not in a script.
You'd have to define the functions you want to use in a file and source it at the top of your script using '.', e.g.
#!/bin/sh
. myshlib
echo "rest of the script here"
Intro retro computers since before they were retro...
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
Re: TF536 on the STacy
@stephen_usher
I'm trying my best but this is stretching my skills already. I don't quite know what information it is pulling in order to do this, but I do appreciate your script explanation.
I'm trying my best but this is stretching my skills already. I don't quite know what information it is pulling in order to do this, but I do appreciate your script explanation.
-
- Posts: 444
- Joined: Tue Aug 22, 2017 4:27 am
Re: TF536 on the STacy
Ok, so I flashed the TF to the latest firmware from @agranlund. Thanks to @stephen_usher for the tip for the USB cable.
MagiC works great! HDDriver 11.00 gives almost 10MBps! And look at Gembench! Why is it not finding Alt Ram though?
MagiC works great! HDDriver 11.00 gives almost 10MBps! And look at Gembench! Why is it not finding Alt Ram though?
Re: TF536 on the STacy
Yeah, Gembench does the same for me under MagiC.
Kronos and sysinfo gets it correct so I always just assumed MagiC is not in agreement with whatever way Gembench is checking for alt-ram? (It also gets the ST-RAM test wrong under MagiC, from the number it looks like it's measuring fastram speed there)
MagiC is definitely using fastram and runs programs from it though
Kronos and sysinfo gets it correct so I always just assumed MagiC is not in agreement with whatever way Gembench is checking for alt-ram? (It also gets the ST-RAM test wrong under MagiC, from the number it looks like it's measuring fastram speed there)
MagiC is definitely using fastram and runs programs from it though
-
- Posts: 444
- Joined: Tue Aug 22, 2017 4:27 am
Re: TF536 on the STacy
Ah, cool. Yes, the regular RAM speed is clearly Alt RAM speed.agranlund wrote: ↑Fri Dec 04, 2020 8:13 pm Yeah, Gembench does the same for me under MagiC.
Kronos and sysinfo gets it correct so I always just assumed MagiC is not in agreement with whatever way Gembench is checking for alt-ram? (It also gets the ST-RAM test wrong under MagiC, from the number it looks like it's measuring fastram speed there)
MagiC is definitely using fastram and runs programs from it though
-
- Posts: 444
- Joined: Tue Aug 22, 2017 4:27 am
Re: TF536 on the STacy
With the latest firmware, everything works except for CosmosEx. CosmosEx ACSI SD works so the ACSI part seems fine. However, loading the CosmosEx driver results in the actual CosmosEx not being found. @derkom Did you encounter issues like this with your setup?