• Just how much bloat can you strip out of a Pi?

    From The Natural Philosopher@3:770/3 to All on Thu Sep 10 12:47:40 2020
    Looking at my 'I only do one thing' Pi running 94 different processes, realistically how many of them do I need? And how could I get rid of them?

    I want to examine the pi as a reasonably real-time signal processing unit.

    I don't need disk access except to load the code. I may not need network access. I don't need logging. I sure don't need systemd. I don't need a
    gui.

    I just want to run one high priority daemon and one lower priority
    demon, with shared memory between them...is there something simpler than
    Linux? More like e.g. DOS?


    --
    When plunder becomes a way of life for a group of men in a society, over
    the course of time they create for themselves a legal system that
    authorizes it and a moral code that glorifies it.

    Frédéric Bastiat

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Folderol@3:770/3 to The Natural Philosopher on Thu Sep 10 12:59:23 2020
    On Thu, 10 Sep 2020 12:47:40 +0100
    The Natural Philosopher <tnp@invalid.invalid> wrote:

    Looking at my 'I only do one thing' Pi running 94 different processes, >realistically how many of them do I need? And how could I get rid of them?

    I want to examine the pi as a reasonably real-time signal processing unit.

    I don't need disk access except to load the code. I may not need network >access. I don't need logging. I sure don't need systemd. I don't need a
    gui.

    I just want to run one high priority daemon and one lower priority
    demon, with shared memory between them...is there something simpler than >Linux? More like e.g. DOS?



    I get pretty good results with the latest version of devuan for the Pi.

    --
    W J G

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Andy Burns@3:770/3 to The Natural Philosopher on Thu Sep 10 13:04:05 2020
    The Natural Philosopher wrote:

    I don't need disk access except to load the code. I may not need network access. I don't need logging. I sure don't need systemd. I don't need a
    gui.

    does systemd have an equivalent of runlevel S ?

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Theo@3:770/3 to Folderol on Thu Sep 10 15:00:23 2020
    Folderol <general@musically.me.uk> wrote:
    On Thu, 10 Sep 2020 12:47:40 +0100
    The Natural Philosopher <tnp@invalid.invalid> wrote:
    I just want to run one high priority daemon and one lower priority
    demon, with shared memory between them...is there something simpler than >Linux? More like e.g. DOS?

    I get pretty good results with the latest version of devuan for the Pi.

    Alpine Linux is popular with containers, because it's extremely stripped
    down:
    https://wiki.alpinelinux.org/wiki/Raspberry_Pi

    For non-Linux, you could try an alternative OS like RISC OS or FreeRTOS.
    You would need to port your apps to those OSes though - it wouldn't be a
    simple recompile.

    Theo

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Ottavio Caruso@3:770/3 to The Natural Philosopher on Thu Sep 10 14:27:48 2020
    On 10/09/2020 12:47, The Natural Philosopher wrote:

    And how could I get rid of them?

    None if you have systemd.


    --
    Ottavio Caruso

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Bryan Hogan@3:770/3 to The Natural Philosopher on Thu Sep 10 16:03:37 2020
    In message <rjd3ot$e45$1@dont-email.me>
    The Natural Philosopher <tnp@invalid.invalid> wrote:

    I don't need disk access except to load the code. I may not need network access. I don't need logging. I sure don't need systemd. I don't need a
    gui.

    I just want to run one high priority daemon and one lower priority
    demon, with shared memory between them...is there something simpler than Linux? More like e.g. DOS?

    RISC OS? Or possibly even RISC OS Pico.

    https://www.riscosopen.org/content/downloads/raspberry-pi

    Good use for an older Pi, as RISC OS doesn't need lots of RAM and is only
    a single core OS.

    Bryan.

    --
    RISC OS User Group Of London - http://www.rougol.jellybaby.net/
    RISC OS London Show - http://www.riscoslondonshow.co.uk/

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From druck@3:770/3 to The Natural Philosopher on Thu Sep 10 15:53:40 2020
    On 10/09/2020 12:47, The Natural Philosopher wrote:
    Looking at my 'I only do one thing' Pi running 94 different processes, realistically how many of them do I need? And how could I get rid of them?

    I want to examine the pi as a reasonably real-time signal processing unit.

    I don't need disk access except to load the code. I may not need network access. I don't need logging. I sure don't need systemd. I don't need a
    gui.

    I just want to run one high priority daemon and one lower priority
    demon, with shared memory between them...is there something simpler than Linux? More like e.g. DOS?

    If you want to cut out all of that, then you probably don't need the Pi
    at all. Have a look at an Arduino, you can either program bare metal, or
    if you don't want to do your own scheduling run under FreeRTOS.

    ---druck

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to druck on Thu Sep 10 17:15:00 2020
    On 10/09/2020 15:53, druck wrote:
    On 10/09/2020 12:47, The Natural Philosopher wrote:
    Looking at my 'I only do one thing' Pi running 94 different processes,
    realistically how many of them do I need? And how could I get rid of
    them?

    I want to examine the pi as a reasonably real-time signal processing
    unit.

    I don't need disk access except to load the code. I may not need
    network access. I don't need logging. I sure don't need systemd. I
    don't need a gui.

    I just want to run one high priority daemon and one lower priority
    demon, with shared memory between them...is there something simpler
    than Linux? More like e.g. DOS?

    If you want to cut out all of that, then you probably don't need the Pi
    at all. Have a look at an Arduino, you can either program bare metal, or
    if you don't want to do your own scheduling run under FreeRTOS.

    ---druck

    I need a fair bit of RAM and a pretty fast floating point processor. But Arduino has some definite pluses.


    --
    "Strange as it seems, no amount of learning can cure stupidity, and
    higher education positively fortifies it."

    - Stephen Vizinczey

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Theo on Thu Sep 10 17:13:24 2020
    On 10/09/2020 15:00, Theo wrote:
    Folderol <general@musically.me.uk> wrote:
    On Thu, 10 Sep 2020 12:47:40 +0100
    The Natural Philosopher <tnp@invalid.invalid> wrote:
    I just want to run one high priority daemon and one lower priority
    demon, with shared memory between them...is there something simpler than >>> Linux? More like e.g. DOS?

    I get pretty good results with the latest version of devuan for the Pi.

    Alpine Linux is popular with containers, because it's extremely stripped down:
    https://wiki.alpinelinux.org/wiki/Raspberry_Pi

    For non-Linux, you could try an alternative OS like RISC OS or FreeRTOS.
    You would need to port your apps to those OSes though - it wouldn't be a simple recompile.


    *grin* I haven't written them yet

    Free RTOS sounds...interesting

    Theo



    --
    No Apple devices were knowingly used in the preparation of this post.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Dennis Lee Bieber@3:770/3 to All on Thu Sep 10 13:24:04 2020
    On Thu, 10 Sep 2020 12:47:40 +0100, The Natural Philosopher <tnp@invalid.invalid> declaimed the following:


    I just want to run one high priority daemon and one lower priority
    demon, with shared memory between them...is there something simpler than >Linux? More like e.g. DOS?

    A microcontroller running barebones -- or with something like FreeRTOS (two tasks, with priority set as needed)?.

    Especially as Linux is not the most "real-time" OS available; I don't even know if an RT kernel is available for the R-Pi (Beaglebones have had
    RT kernel builds, but they aren't the default install).


    --
    Wulfraed Dennis Lee Bieber AF6VN
    wlfraed@ix.netcom.com http://wlfraed.microdiversity.freeddns.org/

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From ray carter@3:770/3 to The Natural Philosopher on Thu Sep 10 17:39:48 2020
    On Thu, 10 Sep 2020 12:47:40 +0100, The Natural Philosopher wrote:

    Looking at my 'I only do one thing' Pi running 94 different processes, realistically how many of them do I need? And how could I get rid of
    them?

    I want to examine the pi as a reasonably real-time signal processing
    unit.

    I don't need disk access except to load the code. I may not need network access. I don't need logging. I sure don't need systemd. I don't need a
    gui.

    I just want to run one high priority daemon and one lower priority
    demon, with shared memory between them...is there something simpler than Linux? More like e.g. DOS?

    I believe there is a real time os in development somewhere - have you
    looked for it? You might also check out arch and gentoo,or maybe risc os.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Dennis Lee Bieber@3:770/3 to All on Thu Sep 10 13:44:44 2020
    On Thu, 10 Sep 2020 17:15:00 +0100, The Natural Philosopher <tnp@invalid.invalid> declaimed the following:

    I need a fair bit of RAM and a pretty fast floating point processor. But >Arduino has some definite pluses.

    So focus on the ARM-based boards, with an "f" suffix on the core -- M4F, say. TIVA-C boards, Adafruit Metro M4 (yeah, they don't list the F on
    the name, but do claim floating point and "DSP" instructions) and Grand
    Central M4. Unfortunately, the Arduino DUE does NOT appear to have hardware floating point.


    --
    Wulfraed Dennis Lee Bieber AF6VN
    wlfraed@ix.netcom.com http://wlfraed.microdiversity.freeddns.org/

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From A. Dumas@3:770/3 to The Natural Philosopher on Thu Sep 10 18:09:25 2020
    The Natural Philosopher <tnp@invalid.invalid> wrote:
    I need a fair bit of RAM and a pretty fast floating point processor. But Arduino has some definite pluses.

    Have a look at the Teensy 4.1 with 600 MHz cortex-m7 and room for extra
    memory: https://www.pjrc.com/store/teensy41.html
    Or perhaps the cheaper 4.0, if the 4.1 is still unavailable.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Martin Gregorie@3:770/3 to ray carter on Thu Sep 10 18:10:21 2020
    On Thu, 10 Sep 2020 17:39:48 +0000, ray carter wrote:

    On Thu, 10 Sep 2020 12:47:40 +0100, The Natural Philosopher wrote:

    Looking at my 'I only do one thing' Pi running 94 different processes,
    realistically how many of them do I need? And how could I get rid of
    them?

    I want to examine the pi as a reasonably real-time signal processing
    unit.

    I don't need disk access except to load the code. I may not need
    network access. I don't need logging. I sure don't need systemd. I
    don't need a gui.

    I just want to run one high priority daemon and one lower priority
    demon, with shared memory between them...is there something simpler
    than Linux? More like e.g. DOS?

    I believe there is a real time os in development somewhere - have you
    looked for it? You might also check out arch and gentoo,or maybe risc
    os.

    Microware OS-9 could be a starter, since it was designed from the ground
    up as an RTOS.

    It was originally released for the 6809 and quickly ported to the 680x0
    where v2.4 was super-stable. Since then seems to have been ported to ARM
    and picked up TCP/IP support, but I can't determine which ARM
    architectures it has been ported to. Its website doesn't mention
    RaspberryPis either. Pity: I used it for years on a 68020 and liked it a
    lot.


    --
    Martin | martin at
    Gregorie | gregorie dot org

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From A. Dumas@3:770/3 to A. Dumas on Thu Sep 10 22:44:34 2020
    A. Dumas <alexandre@dumas.fr.invalid> wrote:
    The Natural Philosopher <tnp@invalid.invalid> wrote:
    I need a fair bit of RAM and a pretty fast floating point processor. But
    Arduino has some definite pluses.

    Have a look at the Teensy 4.1 with 600 MHz cortex-m7 and room for extra memory: https://www.pjrc.com/store/teensy41.html
    Or perhaps the cheaper 4.0, if the 4.1 is still unavailable.

    And yes they have fp units. For doubles! From the 4.0 page, which has the
    same chip: "Teensy 4.0's Cortex-M7 processor includes a floating point unit (FPU) which supports both 64 bit "double" and 32 bit "float". With M4's FPU
    on Teensy 3.5 & 36, and also Atmel SAMD51 chips, only 32 bit float is
    hardware accelerated. Any use of double, double functions like log(),
    sin(), cos() means slow software implemented math. Teensy 4.0 executes all
    of these with FPU hardware."

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Computer Nerd Kev@3:770/3 to The Natural Philosopher on Thu Sep 10 23:33:57 2020
    The Natural Philosopher <tnp@invalid.invalid> wrote:

    Looking at my 'I only do one thing' Pi running 94 different processes, realistically how many of them do I need? And how could I get rid of them?

    I want to examine the pi as a reasonably real-time signal processing unit.

    I don't need disk access except to load the code. I may not need network access. I don't need logging. I sure don't need systemd. I don't need a
    gui.

    Try PiCore, it's as stripped-down as Linux gets for the Pi. Boots
    _way_ quicker than RPi OS on my Pi Zeros. No GUI, or systemd, no
    disk access (runs in RAM). if you want to disable hardware
    drivers, you can do that in config.txt (as you can in Raspberry Pi
    OS).
    http://www.tinycorelinux.net/ports.html

    I just want to run one high priority daemon and one lower priority
    demon, with shared memory between them...is there something simpler than Linux? More like e.g. DOS?

    There are various Bare-Metal environments, such as: https://github.com/rsta2/circle http://www.stevebate.net/chibios-rpi/GettingStarted.html

    --
    __ __
    #_ < |\| |< _#

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to A. Dumas on Fri Sep 11 04:51:33 2020
    On 10/09/2020 19:09, A. Dumas wrote:
    The Natural Philosopher <tnp@invalid.invalid> wrote:
    I need a fair bit of RAM and a pretty fast floating point processor. But
    Arduino has some definite pluses.

    Have a look at the Teensy 4.1 with 600 MHz cortex-m7 and room for extra memory: https://www.pjrc.com/store/teensy41.html
    Or perhaps the cheaper 4.0, if the 4.1 is still unavailable.

    Yes, that is near spec...

    --
    Those who want slavery should have the grace to name it by its proper
    name. They must face the full meaning of that which they are advocating
    or condoning; the full, exact, specific meaning of collectivism, of its
    logical implications, of the principles upon which it is based, and of
    the ultimate consequences to which these principles will lead. They must
    face it, then decide whether this is what they want or not.

    Ayn Rand.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Computer Nerd Kev on Fri Sep 11 05:13:04 2020
    On 11/09/2020 00:33, Computer Nerd Kev wrote:
    The Natural Philosopher <tnp@invalid.invalid> wrote:

    Looking at my 'I only do one thing' Pi running 94 different processes,
    realistically how many of them do I need? And how could I get rid of them? >>
    I want to examine the pi as a reasonably real-time signal processing unit. >>
    I don't need disk access except to load the code. I may not need network
    access. I don't need logging. I sure don't need systemd. I don't need a
    gui.

    Try PiCore, it's as stripped-down as Linux gets for the Pi. Boots
    _way_ quicker than RPi OS on my Pi Zeros. No GUI, or systemd, no
    disk access (runs in RAM). if you want to disable hardware
    drivers, you can do that in config.txt (as you can in Raspberry Pi
    OS).
    http://www.tinycorelinux.net/ports.html

    Ok I will take a look at that - may just be the 'right compromise'
    Mmm. At first glance that is very near the mark. AND I can prototype on
    an old PC *86 chassis...


    I just want to run one high priority daemon and one lower priority
    demon, with shared memory between them...is there something simpler than
    Linux? More like e.g. DOS?

    There are various Bare-Metal environments, such as: https://github.com/rsta2/circle http://www.stevebate.net/chibios-rpi/GettingStarted.html



    --
    “it should be clear by now to everyone that activist environmentalism
    (or environmental activism) is becoming a general ideology about humans,
    about their freedom, about the relationship between the individual and
    the state, and about the manipulation of people under the guise of a
    'noble' idea. It is not an honest pursuit of 'sustainable development,'
    a matter of elementary environmental protection, or a search for
    rational mechanisms designed to achieve a healthy environment. Yet
    things do occur that make you shake your head and remind yourself that
    you live neither in Joseph Stalin’s Communist era, nor in the Orwellian utopia of 1984.”

    Vaclav Klaus

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Martin Gregorie on Fri Sep 11 04:45:53 2020
    On 10/09/2020 19:10, Martin Gregorie wrote:
    On Thu, 10 Sep 2020 17:39:48 +0000, ray carter wrote:

    On Thu, 10 Sep 2020 12:47:40 +0100, The Natural Philosopher wrote:

    Looking at my 'I only do one thing' Pi running 94 different processes,
    realistically how many of them do I need? And how could I get rid of
    them?

    I want to examine the pi as a reasonably real-time signal processing
    unit.

    I don't need disk access except to load the code. I may not need
    network access. I don't need logging. I sure don't need systemd. I
    don't need a gui.

    I just want to run one high priority daemon and one lower priority
    demon, with shared memory between them...is there something simpler
    than Linux? More like e.g. DOS?

    I believe there is a real time os in development somewhere - have you
    looked for it? You might also check out arch and gentoo,or maybe risc
    os.

    Microware OS-9 could be a starter, since it was designed from the ground
    up as an RTOS.

    It was originally released for the 6809 and quickly ported to the 680x0
    where v2.4 was super-stable. Since then seems to have been ported to ARM
    and picked up TCP/IP support, but I can't determine which ARM
    architectures it has been ported to. Its website doesn't mention
    RaspberryPis either. Pity: I used it for years on a 68020 and liked it a
    lot.


    I cant find it for a Pi though sadly. Yes. OS-9 had its adherents. I
    have written my own multitasking OS under DOS 2...its not hard to write
    a basic scheduler good enough for simple work. In fact the application
    could easily run as one foreground task and one interrupt driven
    background task. But networking would be nice and that is a whole new
    can of worms...

    --
    “The ultimate result of shielding men from the effects of folly is to
    fill the world with fools.”

    Herbert Spencer

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Jim Jackson@3:770/3 to The Natural Philosopher on Fri Sep 11 11:56:44 2020
    On 2020-09-10, The Natural Philosopher <tnp@invalid.invalid> wrote:

    Looking at my 'I only do one thing' Pi running 94 different processes, realistically how many of them do I need? And how could I get rid of them?

    I want to examine the pi as a reasonably real-time signal processing unit.

    I don't need disk access except to load the code. I may not need network access. I don't need logging. I sure don't need systemd. I don't need a
    gui.

    I just want to run one high priority daemon and one lower priority
    demon, with shared memory between them...is there something simpler than Linux? More like e.g. DOS?


    You can start what you want. Linux is just the kernel. Alter the
    cmdline.txt to tell the kernel what program to start (init=...), instead
    of systemd or another init process.

    see https://unix.stackexchange.com/questions/428347/how-to-pass-arguments-to-a-linu x-kernel-init-bootparam

    Ok, your code that acts as init would have to start anything else you
    wanted, or set up networking etc. but it can be done. I'm pretty sure
    you could use busybox to form a minimal but adaptable boot environment.

    This maybe of use...

    https://pixelspark.nl/2019/making-your-own-linux-distribution-for-the-raspberry -pi-for-fun-and-profit-part-2

    All the parts are available from the standard Raspbian OS

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Jim Jackson on Sat Sep 12 04:39:03 2020
    On 11/09/2020 12:56, Jim Jackson wrote:
    On 2020-09-10, The Natural Philosopher <tnp@invalid.invalid> wrote:

    Looking at my 'I only do one thing' Pi running 94 different processes,
    realistically how many of them do I need? And how could I get rid of them? >>
    I want to examine the pi as a reasonably real-time signal processing unit. >>
    I don't need disk access except to load the code. I may not need network
    access. I don't need logging. I sure don't need systemd. I don't need a
    gui.

    I just want to run one high priority daemon and one lower priority
    demon, with shared memory between them...is there something simpler than
    Linux? More like e.g. DOS?


    You can start what you want. Linux is just the kernel. Alter the
    cmdline.txt to tell the kernel what program to start (init=...), instead
    of systemd or another init process.

    see
    https://unix.stackexchange.com/questions/428347/how-to-pass-arguments-to-a-linu x-kernel-init-bootparam

    Ok, your code that acts as init would have to start anything else you
    wanted, or set up networking etc. but it can be done. I'm pretty sure
    you could use busybox to form a minimal but adaptable boot environment.

    This maybe of use...


    https://pixelspark.nl/2019/making-your-own-linux-distribution-for-the-raspberry -pi-for-fun-and-profit-part-2

    All the parts are available from the standard Raspbian OS

    Thank you. That is most useful.


    --
    There is something fascinating about science. One gets such wholesale
    returns of conjecture out of such a trifling investment of fact.

    Mark Twain

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From ray carter@3:770/3 to The Natural Philosopher on Sat Sep 12 14:34:41 2020
    On Thu, 10 Sep 2020 12:47:40 +0100, The Natural Philosopher wrote:

    Looking at my 'I only do one thing' Pi running 94 different processes, realistically how many of them do I need? And how could I get rid of
    them?

    I want to examine the pi as a reasonably real-time signal processing
    unit.

    I don't need disk access except to load the code. I may not need network access. I don't need logging. I sure don't need systemd. I don't need a
    gui.

    I just want to run one high priority daemon and one lower priority
    demon, with shared memory between them...is there something simpler than Linux? More like e.g. DOS?

    You could also do LFS (Linux From Scratch) - you'd build up from nothing instead of try to remove. Absolutely nothing in there that you don't want.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Scott Alfter@3:770/3 to ray@zianet.com on Mon Sep 14 17:49:22 2020
    In article <hs44k1FomrmU2@mid.individual.net>,
    ray carter <ray@zianet.com> wrote:
    On Thu, 10 Sep 2020 12:47:40 +0100, The Natural Philosopher wrote:
    I just want to run one high priority daemon and one lower priority
    demon, with shared memory between them...is there something simpler than
    Linux? More like e.g. DOS?

    You could also do LFS (Linux From Scratch) - you'd build up from nothing >instead of try to remove. Absolutely nothing in there that you don't want.

    There's also Gentoo Linux, which you could think of as a more automated LFS. You can even get a proper 64-bit userland under Gentoo on the RPi 3 & 4;
    it's been around for probably at least a year now while Raspbian is just now getting around to a 64-bit beta.

    It's also systemd-free, unless you select otherwise.

    _/_
    / v \ Scott Alfter (remove the obvious to send mail)
    (IIGS( https://alfter.us/ Top-posting!
    \_^_/ >What's the most annoying thing on Usenet?

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Scott Alfter on Tue Sep 15 09:41:24 2020
    On 14/09/2020 18:49, Scott Alfter wrote:
    In article <hs44k1FomrmU2@mid.individual.net>,
    ray carter <ray@zianet.com> wrote:
    On Thu, 10 Sep 2020 12:47:40 +0100, The Natural Philosopher wrote:
    I just want to run one high priority daemon and one lower priority
    demon, with shared memory between them...is there something simpler than >>> Linux? More like e.g. DOS?

    You could also do LFS (Linux From Scratch) - you'd build up from nothing
    instead of try to remove. Absolutely nothing in there that you don't want.

    There's also Gentoo Linux, which you could think of as a more automated LFS. You can even get a proper 64-bit userland under Gentoo on the RPi 3 & 4;
    it's been around for probably at least a year now while Raspbian is just now getting around to a 64-bit beta.

    It's also systemd-free, unless you select otherwise.

    I've been looking at all the options and trying to understand the boot
    process and the kernel threads.
    First of all thank you everyone, because ist been an interesting
    extensions of the knowledge base.

    It seems that the pi boots (via the GPU) some stock boot loader that
    tarts around with the hardware using instructions found in config.txt
    and then boots a default kernel (on my Pi zero its simply kernel.img) -
    or one specified in config.txt in the FAT formatted boot partition. A
    few parameters may be passed to that: device drivers are specified in config.txt and cmdline.txt has a few more boot options like where to
    find the root filesystem.

    Now this is the bit that I am not sure about - the kernel having booted
    from the FAT partition then invokes - I assume - /sbin/init, which in my
    case is linked to systemd.

    I understand that in some sort of way it needn't be, or it could be
    specified to NOT be /sbin/init....(where?)

    So effectively one can intercept the boot process before systemd gets is
    ugly evil claws into the nice shiny Linux, and run something else -
    busybox?

    So in principle one would lose all the daemons spun up by systemd as
    default - logging, hotplugging and so on would all simply never get
    started ... and start only those required - network layer perhaps.
    I wonder what apache needs to start it? Never mind. Don't need it, just
    need a very simple web server for control purposes, could even write one
    that lived in user space so didn't pre-empt valuable real time
    background task cycles.

    And that brings me to the next question.

    Assuming I am just running a kernel, plus networking of some sort, I
    still have all the kernel threads which don't seem to take up CPU time,
    or do they?

    Under systemd on my system (it uses NFS, hence the related daemons,
    these would not be needed in the system I want to build) I have..

    ps -eadf | grep "1 0" | awk '{print $8}'

    /lib/systemd/systemd-journald
    /usr/sbin/blkmapd
    /lib/systemd/systemd-udevd
    /lib/systemd/systemd-timesyncd
    /usr/sbin/rpc.idmapd
    /usr/bin/dbus-daemon
    /usr/sbin/cron
    /usr/sbin/rsyslogd
    /lib/systemd/systemd-logind
    /usr/lib/rtkit/rtkit-daemon
    avahi-daemon:
    /sbin/wpa_supplicant
    /usr/sbin/thd
    wpa_supplicant
    /sbin/dhcpcd
    /sbin/rpcbind
    /usr/sbin/sshd
    /usr/sbin/rpc.mountd
    /sbin/agetty
    /sbin/agetty
    /usr/sbin/apache2
    /usr/sbin/exim4
    /usr/lib/policykit-1/polkitd
    /lib/systemd/systemd
    grep

    The ONLY one of those I might need (this is a pi zero W) is
    wpa-supplicant and children. Or the equivalent on an ethernet equipped Pi...

    So my next questions are:

    1/. How much latency do the kernel thread processes conceivably
    introduce? There are an awful lot of them. If these are insurmountable
    that really rules out Linux altogether.

    2/. How interruptible are they by interrupts coming from the Pi's GPIO
    pins? I want my handler to have top priority for its run - whose length
    is a bit indeterminate till I know how fast the pi executes floating point.

    3/. What have I forgotten that systemD does that I might actually need?

    For the purposes of setting the context for the last question, the Pi
    would be sitting there waiting for a low priority webserver request,
    executing low priority foreground code in an interruptible loop, and responding to time critical interrupts on a GPIO pin.

    Disk access would not be involved in the initial prototype.

    By using suitable buffering I might be able to cope with 50ms max time
    spent by the pi doing housekeeping.


    --
    New Socialism consists essentially in being seen to have your heart in
    the right place whilst your head is in the clouds and your hand is in
    someone else's pocket.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Folderol@3:770/3 to The Natural Philosopher on Tue Sep 15 10:06:56 2020
    On Tue, 15 Sep 2020 09:41:24 +0100
    The Natural Philosopher <tnp@invalid.invalid> wrote:

    On 14/09/2020 18:49, Scott Alfter wrote:
    In article <hs44k1FomrmU2@mid.individual.net>,
    ray carter <ray@zianet.com> wrote:
    On Thu, 10 Sep 2020 12:47:40 +0100, The Natural Philosopher wrote:
    I just want to run one high priority daemon and one lower priority
    demon, with shared memory between them...is there something simpler than >>>> Linux? More like e.g. DOS?

    You could also do LFS (Linux From Scratch) - you'd build up from nothing >>> instead of try to remove. Absolutely nothing in there that you don't want. >>
    There's also Gentoo Linux, which you could think of as a more automated LFS.
    You can even get a proper 64-bit userland under Gentoo on the RPi 3 & 4;
    it's been around for probably at least a year now while Raspbian is just now
    getting around to a 64-bit beta.

    It's also systemd-free, unless you select otherwise.

    I've been looking at all the options and trying to understand the boot >process and the kernel threads.
    First of all thank you everyone, because ist been an interesting
    extensions of the knowledge base.

    It seems that the pi boots (via the GPU) some stock boot loader that
    tarts around with the hardware using instructions found in config.txt
    and then boots a default kernel (on my Pi zero its simply kernel.img) -
    or one specified in config.txt in the FAT formatted boot partition. A
    few parameters may be passed to that: device drivers are specified in >config.txt and cmdline.txt has a few more boot options like where to
    find the root filesystem.

    Now this is the bit that I am not sure about - the kernel having booted
    from the FAT partition then invokes - I assume - /sbin/init, which in my
    case is linked to systemd.

    I understand that in some sort of way it needn't be, or it could be
    specified to NOT be /sbin/init....(where?)

    So effectively one can intercept the boot process before systemd gets is
    ugly evil claws into the nice shiny Linux, and run something else -
    busybox?

    So in principle one would lose all the daemons spun up by systemd as
    default - logging, hotplugging and so on would all simply never get
    started ... and start only those required - network layer perhaps.
    I wonder what apache needs to start it? Never mind. Don't need it, just
    need a very simple web server for control purposes, could even write one
    that lived in user space so didn't pre-empt valuable real time
    background task cycles.

    And that brings me to the next question.

    Assuming I am just running a kernel, plus networking of some sort, I
    still have all the kernel threads which don't seem to take up CPU time,
    or do they?

    Under systemd on my system (it uses NFS, hence the related daemons,
    these would not be needed in the system I want to build) I have..

    ps -eadf | grep "1 0" | awk '{print $8}'

    /lib/systemd/systemd-journald
    /usr/sbin/blkmapd
    /lib/systemd/systemd-udevd
    /lib/systemd/systemd-timesyncd
    /usr/sbin/rpc.idmapd
    /usr/bin/dbus-daemon
    /usr/sbin/cron
    /usr/sbin/rsyslogd
    /lib/systemd/systemd-logind
    /usr/lib/rtkit/rtkit-daemon
    avahi-daemon:
    /sbin/wpa_supplicant
    /usr/sbin/thd
    wpa_supplicant
    /sbin/dhcpcd
    /sbin/rpcbind
    /usr/sbin/sshd
    /usr/sbin/rpc.mountd
    /sbin/agetty
    /sbin/agetty
    /usr/sbin/apache2
    /usr/sbin/exim4
    /usr/lib/policykit-1/polkitd
    /lib/systemd/systemd
    grep

    The ONLY one of those I might need (this is a pi zero W) is
    wpa-supplicant and children. Or the equivalent on an ethernet equipped Pi...

    So my next questions are:

    1/. How much latency do the kernel thread processes conceivably
    introduce? There are an awful lot of them. If these are insurmountable
    that really rules out Linux altogether.

    2/. How interruptible are they by interrupts coming from the Pi's GPIO
    pins? I want my handler to have top priority for its run - whose length
    is a bit indeterminate till I know how fast the pi executes floating point.

    3/. What have I forgotten that systemD does that I might actually need?

    For the purposes of setting the context for the last question, the Pi
    would be sitting there waiting for a low priority webserver request, >executing low priority foreground code in an interruptible loop, and >responding to time critical interrupts on a GPIO pin.

    Disk access would not be involved in the initial prototype.

    By using suitable buffering I might be able to cope with 50ms max time
    spent by the pi doing housekeeping.


    You might like to think about devuan as a base rather than raspbian. It uses SysV for init, so is far more accessible. I use this for a standalone soft-synth. It is dramatically quicker to start and I can run at lower latency.
    The current release is beowulf and runs on the Pi4, as well as the earlier ones.


    --
    W J G

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Andy Burns on Tue Sep 15 11:11:19 2020
    On 15/09/2020 11:07, Andy Burns wrote:
    The Natural Philosopher wrote:

    I understand that in some sort of way it needn't be, or it could be
    specified to NOT be /sbin/init....(where?)

    Normal way on grub based machines is to override init=/bin/bash in the grub.cfg

    Presume cmdline.txt is the equivalent on a pi, can you append init=/bin/bash  there?

    Well that is precisely what I am trying to find out!
    Busybox installs must do something like that



    --
    Climate Change: Socialism wearing a lab coat.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Pancho@3:770/3 to The Natural Philosopher on Tue Sep 15 11:17:21 2020
    On 15/09/2020 11:11, The Natural Philosopher wrote:
    On 15/09/2020 11:07, Andy Burns wrote:
    The Natural Philosopher wrote:

    I understand that in some sort of way it needn't be, or it could be
    specified to NOT be /sbin/init....(where?)

    Normal way on grub based machines is to override init=/bin/bash in the
    grub.cfg

    Presume cmdline.txt is the equivalent on a pi, can you append
    init=/bin/bash  there?

    Well that is precisely what I am trying to find out!
    Busybox installs must do something like that




    <https://pi3g.com/2019/01/10/alpine-boot-process-on-the-raspberry-pi/>

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Andy Burns@3:770/3 to The Natural Philosopher on Tue Sep 15 11:07:23 2020
    The Natural Philosopher wrote:

    I understand that in some sort of way it needn't be, or it could be
    specified to NOT be /sbin/init....(where?)

    Normal way on grub based machines is to override init=/bin/bash in the
    grub.cfg

    Presume cmdline.txt is the equivalent on a pi, can you append
    init=/bin/bash there?

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Pancho on Tue Sep 15 11:30:44 2020
    On 15/09/2020 11:17, Pancho wrote:
    On 15/09/2020 11:11, The Natural Philosopher wrote:
    On 15/09/2020 11:07, Andy Burns wrote:
    The Natural Philosopher wrote:

    I understand that in some sort of way it needn't be, or it could be
    specified to NOT be /sbin/init....(where?)

    Normal way on grub based machines is to override init=/bin/bash in
    the grub.cfg

    Presume cmdline.txt is the equivalent on a pi, can you append
    init=/bin/bash  there?

    Well that is precisely what I am trying to find out!
    Busybox installs must do something like that




    <https://pi3g.com/2019/01/10/alpine-boot-process-on-the-raspberry-pi/>
    Actually doesn't answer the question. It seems to assume the kernel will
    always execute /sbin/init


    --
    Outside of a dog, a book is a man's best friend. Inside of a dog it's
    too dark to read.

    Groucho Marx

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Computer Nerd Kev@3:770/3 to The Natural Philosopher on Tue Sep 15 11:12:07 2020
    The Natural Philosopher <tnp@invalid.invalid> wrote:

    So my next questions are:

    1/. How much latency do the kernel thread processes conceivably
    introduce? There are an awful lot of them. If these are insurmountable
    that really rules out Linux altogether.

    2/. How interruptible are they by interrupts coming from the Pi's GPIO
    pins? I want my handler to have top priority for its run - whose length
    is a bit indeterminate till I know how fast the pi executes floating point.

    I've been dealing a lot with Pi interrupts in Linux lately, but with
    a somewhat different application to yours. In my case I've ended up
    cheating my way out of setting up an interrupt-driven system in Linux
    (for now) by avoiding/disabling the system interrupts and polling an
    input.

    These are my links for when I go back and try to implement things
    "properly" so that I'm not wasting so many cycles polling (I believe
    I'll have to write a Linux kernel driver, but my timing requirements
    are much tighter than 50ms):

    *Interrupts can be used to avoid polling the edge detection register.
    Need to use the Linux GPIO subsystem and poll() in C.
    -A sort-of example:

    https://stackoverflow.com/questions/34808276/poll-on-raspberry-gpio-sysfs-raspb erry
    -Best (fastest) interrupt handling would require a proper Linux
    device driver. Or running bare-metal.
    -Example of the latter: https://github.com/enricorov/Pinterrupt
    -See: https://www.raspberrypi.org/forums/viewtopic.php?p=1149836
    -- Notes some measured interrupt response times
    -Some valuable low-level info:
    http://xinu.mscs.mu.edu/Interrupt_handling_(Raspberry_Pi)
    -Hints at usage with Linux:

    https://www.iot-programmer.com/index.php/books/22-raspberry-pi-and-the-iot-in-c /chapters-raspberry-pi-and-the-iot-in-c/55-raspberry-pi-and-the-iot-in-c-input- and-interrupts?start=1
    -Getting into it properly here:

    https://www.iot-programmer.com/index.php/books/22-raspberry-pi-and-the-iot-in-c /chapters-raspberry-pi-and-the-iot-in-c/55-raspberry-pi-and-the-iot-in-c-input- and-interrupts?start=2

    --
    __ __
    #_ < |\| |< _#

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Jim Jackson@3:770/3 to The Natural Philosopher on Tue Sep 15 11:19:52 2020
    On 2020-09-15, The Natural Philosopher <tnp@invalid.invalid> wrote:
    On 15/09/2020 11:17, Pancho wrote:
    On 15/09/2020 11:11, The Natural Philosopher wrote:
    On 15/09/2020 11:07, Andy Burns wrote:
    The Natural Philosopher wrote:

    I understand that in some sort of way it needn't be, or it could be
    specified to NOT be /sbin/init....(where?)

    Normal way on grub based machines is to override init=/bin/bash in
    the grub.cfg

    Presume cmdline.txt is the equivalent on a pi, can you append
    init=/bin/bash?? there?

    Well that is precisely what I am trying to find out!
    Busybox installs must do something like that




    <https://pi3g.com/2019/01/10/alpine-boot-process-on-the-raspberry-pi/>
    Actually doesn't answer the question. It seems to assume the kernel will always execute /sbin/init

    kernel command line parameter init=/bin/sh or similar. Just specify what
    the kernel will execute as the first userland program. This is generic
    linux.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Computer Nerd Kev on Tue Sep 15 13:04:15 2020
    On 15/09/2020 12:12, Computer Nerd Kev wrote:
    I've been dealing a lot with Pi interrupts in Linux lately, but with
    a somewhat different application to yours. In my case I've ended up
    cheating my way out of setting up an interrupt-driven system in Linux
    (for now) by avoiding/disabling the system interrupts and polling an
    input.

    yuk. No way!

    These are my links for when I go back and try to implement things
    "properly" so that I'm not wasting so many cycles polling (I believe
    I'll have to write a Linux kernel driver, but my timing requirements
    are much tighter than 50ms):

    I don't think you should have to do that. I believe I saw that the gpio interrupts can be handled by a your own routine

    A kernel driver is not the hardest thing to write, anyway.


    *Interrupts can be used to avoid polling the edge detection register.
    Need to use the Linux GPIO subsystem and poll() in C.
    -A sort-of example:

    https://stackoverflow.com/questions/34808276/poll-on-raspberry-gpio-sysfs-raspb erry
    -Best (fastest) interrupt handling would require a proper Linux
    device driver. Or running bare-metal.
    -Example of the latter:https://github.com/enricorov/Pinterrupt

    The advantage of bare metal is that you control the environment totally,
    the disadvantage is you have to write your own networking drivers to use networkimg and usb drivers top use that.


    -See:https://www.raspberrypi.org/forums/viewtopic.php?p=1149836
    -- Notes some measured interrupt response times

    "For the record the normal driver response is about ten to twenty times
    faster than user space .. usual quoted numbers
    Jessie user space: tmin =179 us tave = 280us tmax = 511us
    Jessie driver space: tmin = 6us tave = 12us tmax = 43us"

    Bugger. I really wanted to be in and around 25uS total time to service
    the interrupt.

    Kernel driver at least on i/o to achieve buffering to carry past that
    delay looks needful..


    -Some valuable low-level info:
    http://xinu.mscs.mu.edu/Interrupt_handling_(Raspberry_Pi)

    No link found

    -Hints at usage with Linux:

    https://www.iot-programmer.com/index.php/books/22-raspberry-pi-and-the-iot-in-c /chapters-raspberry-pi-and-the-iot-in-c/55-raspberry-pi-and-the-iot-in-c-input- and-interrupts?start=1
    -Getting into it properly here:

    https://www.iot-programmer.com/index.php/books/22-raspberry-pi-and-the-iot-in-c /chapters-raspberry-pi-and-the-iot-in-c/55-raspberry-pi-and-the-iot-in-c-input- and-interrupts?start=2

    Hmm. So its either code device drivers to get speed, or code your own
    network drivers and write a minimal real time kernel.

    Many thanks for all that. It narrows the options down enough to be of
    use in deciding whether to use a pi at all.


    --
    “The urge to save humanity is almost always only a false face for the
    urge to rule it.”
    – H. L. Mencken

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From A. Dumas@3:770/3 to The Natural Philosopher on Tue Sep 15 13:23:48 2020
    The Natural Philosopher <tnp@invalid.invalid> wrote:
    Bugger. I really wanted to be in and around 25uS total time to service
    the interrupt.

    Microcontroller with networking, like esp32 with wifi, or teensy4 with
    ethernet adapter.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Dennis Lee Bieber@3:770/3 to All on Tue Sep 15 11:29:14 2020
    On Tue, 15 Sep 2020 11:11:19 +0100, The Natural Philosopher <tnp@invalid.invalid> declaimed the following:

    On 15/09/2020 11:07, Andy Burns wrote:

    Presume cmdline.txt is the equivalent on a pi, can you append
    init=/bin/bash there?

    Well that is precisely what I am trying to find out!
    Busybox installs must do something like that

    Based on https://www.raspberrypi.org/documentation/configuration/cmdline-txt.md cmdline.txt is not the file to be modified for this purpose. Nor does config.txt seem to cover it. OTOH:

    pi@rpi3bplus-1:~$ cat /boot/cmdline.txt
    console=tty1 root=/dev/mmcblk0p7 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles

    pi@rpi3bplus-1:~$ cat /proc/cmdline
    coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_headphones=1 bcm2708_fb.fbwidth=1920 bcm2708_fb.fbheight=1280 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 console=tty1 root=/dev/mmcblk0p7 rootfstype=ext4 elevator=deadline fsck.repair=yes
    rootwait quiet splash plymouth.ignore-serial-consoles
    pi@rpi3bplus-1:~$

    shows the contents of cmdline.txt concatenated to the rest of the actual
    boot parameters used, so it may work by just adding init=...

    https://www.debian.org/doc/manuals/debian-reference/ch03.en.html
    """
    The init program is executed as the first program with PID=1 to perform the main boot process of starting many programs. The default file path for the
    init program is "/sbin/init" but it can be changed by the kernel boot
    parameter as "init=/path/to/init_program".
    """
    pi@rpi3bplus-1:~$ ls -l /sbin/init
    lrwxrwxrwx 1 root root 20 May 11 03:06 /sbin/init -> /lib/systemd/systemd pi@rpi3bplus-1:~$

    So... creating a file system where /sbin/init is a link to your desired init process might also be sufficient.


    --
    Wulfraed Dennis Lee Bieber AF6VN
    wlfraed@ix.netcom.com http://wlfraed.microdiversity.freeddns.org/

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From A. Dumas@3:770/3 to The Natural Philosopher on Tue Sep 15 16:10:59 2020
    The Natural Philosopher <tnp@invalid.invalid> wrote:
    Yes. I had more or less got there. As said three options now present themselves- a device driver under stripped down linux, a bare metal
    approach and 'byte' the networking bullet, or use something other than a
    Pi. Maybe an X86 would have better floating point...

    Maybe an almost bare metal PC chassis is the way to go...

    Teensy has 64-bit hardware fp. Of course something like this is on a
    completely different level https://www.seeedstudio.com/ODYSSEY-X86J4105800-p-4445.html

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Dennis Lee Bieber on Tue Sep 15 17:01:40 2020
    On 15/09/2020 16:29, Dennis Lee Bieber wrote:
    On Tue, 15 Sep 2020 11:11:19 +0100, The Natural Philosopher <tnp@invalid.invalid> declaimed the following:

    On 15/09/2020 11:07, Andy Burns wrote:

    Presume cmdline.txt is the equivalent on a pi, can you append
    init=/bin/bash  there?

    Well that is precisely what I am trying to find out!
    Busybox installs must do something like that

    Based on https://www.raspberrypi.org/documentation/configuration/cmdline-txt.md cmdline.txt is not the file to be modified for this purpose. Nor does config.txt seem to cover it. OTOH:

    pi@rpi3bplus-1:~$ cat /boot/cmdline.txt
    console=tty1 root=/dev/mmcblk0p7 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles

    pi@rpi3bplus-1:~$ cat /proc/cmdline
    coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_headphones=1 bcm2708_fb.fbwidth=1920 bcm2708_fb.fbheight=1280 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 console=tty1 root=/dev/mmcblk0p7 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles
    pi@rpi3bplus-1:~$

    shows the contents of cmdline.txt concatenated to the rest of the actual
    boot parameters used, so it may work by just adding init=...

    https://www.debian.org/doc/manuals/debian-reference/ch03.en.html
    """
    The init program is executed as the first program with PID=1 to perform the main boot process of starting many programs. The default file path for the init program is "/sbin/init" but it can be changed by the kernel boot parameter as "init=/path/to/init_program".
    """
    pi@rpi3bplus-1:~$ ls -l /sbin/init
    lrwxrwxrwx 1 root root 20 May 11 03:06 /sbin/init -> /lib/systemd/systemd pi@rpi3bplus-1:~$

    So... creating a file system where /sbin/init is a link to your desired init process might also be sufficient.


    Yes. I had more or less got there. As said three options now present themselves- a device driver under stripped down linux, a bare metal
    approach and 'byte' the networking bullet, or use something other than a
    Pi. Maybe an X86 would have better floating point...


    Maybe an almost bare metal PC chassis is the way to go...


    --
    "The most difficult subjects can be explained to the most slow witted
    man if he has not formed any idea of them already; but the simplest
    thing cannot be made clear to the most intelligent man if he is firmly persuaded that he knows already, without a shadow of doubt, what is laid
    before him."

    - Leo Tolstoy

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Dennis Lee Bieber@3:770/3 to All on Tue Sep 15 11:57:15 2020
    On Tue, 15 Sep 2020 13:04:15 +0100, The Natural Philosopher <tnp@invalid.invalid> declaimed the following:


    Bugger. I really wanted to be in and around 25uS total time to service
    the interrupt.

    Kernel driver at least on i/o to achieve buffering to carry past that
    delay looks needful..


    ...

    Hmm. So its either code device drivers to get speed, or code your own
    network drivers and write a minimal real time kernel.

    Many thanks for all that. It narrows the options down enough to be of
    use in deciding whether to use a pi at all.

    Perhaps you want to explore a Beaglebone Black, putting the interrupt stuff on one of the two PRU-ICSS (Programmable Realtime Unit - Industrial Communication SubSystem) modules. The PRU is basically a microcontroller
    with a fixed instruction cycle time. It does not have what most would call interrupts -- one has to poll the "interrupt bit".

    https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&ved=2ahUKEwip5ca owevrAhVEbKwKHQItDsgQFjADegQIAhAB&url=https%3A%2F%2Felinux.org%2Fimages%2Fd%2Fd a%2FAm335xPruReferenceGuide.pdf&usg=AOvVaw1ki8nYyvKFQ7P-YKGoD2QD
    (note: there is now a C compiler for the PRU, that document is old enough
    to only mention PASM)


    --
    Wulfraed Dennis Lee Bieber AF6VN
    wlfraed@ix.netcom.com http://wlfraed.microdiversity.freeddns.org/

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to A. Dumas on Tue Sep 15 18:20:31 2020
    On 15/09/2020 17:10, A. Dumas wrote:
    The Natural Philosopher <tnp@invalid.invalid> wrote:
    Yes. I had more or less got there. As said three options now present
    themselves- a device driver under stripped down linux, a bare metal
    approach and 'byte' the networking bullet, or use something other than a
    Pi. Maybe an X86 would have better floating point...

    Maybe an almost bare metal PC chassis is the way to go...

    Teensy has 64-bit hardware fp. Of course something like this is on a completely different level https://www.seeedstudio.com/ODYSSEY-X86J4105800-p-4445.html

    Ive got access to plenty of 10 year old PCs for next to no money


    --
    “Puritanism: The haunting fear that someone, somewhere, may be happy.”

    H.L. Mencken, A Mencken Chrestomathy

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Computer Nerd Kev@3:770/3 to The Natural Philosopher on Tue Sep 15 23:17:18 2020
    The Natural Philosopher <tnp@invalid.invalid> wrote:
    On 15/09/2020 12:12, Computer Nerd Kev wrote:
    -Some valuable low-level info:
    http://xinu.mscs.mu.edu/Interrupt_handling_(Raspberry_Pi)

    No link found

    https://embedded-xinu.readthedocs.io/en/latest/arm/rpi/Raspberry-Pi-Interrupt-H andling.html

    -Hints at usage with Linux:
    https://www.iot-programmer.com/index.php/books/22-raspberry-pi-and-the-iot-in-c /chapters-raspberry-pi-and-the-iot-in-c/55-raspberry-pi-and-the-iot-in-c-input- and-interrupts?start=1
    -Getting into it properly here:
    https://www.iot-programmer.com/index.php/books/22-raspberry-pi-and-the-iot-in-c /chapters-raspberry-pi-and-the-iot-in-c/55-raspberry-pi-and-the-iot-in-c-input- and-interrupts?start=2

    Hmm. So its either code device drivers to get speed, or code your own
    network drivers and write a minimal real time kernel.

    Circle claims to support networking. I haven't looked into the
    practicalities of using it too deeply (obviously you'd have to
    look into how it uses interrupts itself).
    https://github.com/rsta2/circle

    Note that the Pi also has a "Fast Interrupt" (FIQ), which might be
    useful for minimising lattency. In Linux, FIQ is used by the Pi
    Foundation's dwc-otg USB driver (and any settings to tell it not to
    use FIQ don't seem to work anymore - I tried hard), but not by the
    standard dwc2 USB driver which can be used instead.

    In my case the Kernel high resolution timer system is also something
    to look into because my requirement is to write to the GPIO at a
    certain time after a previous write. If, like me, you can calculate
    in advance when the external interrupt signal is going to come, then
    that might be something you want to look at too.

    https://www.kernel.org/doc/html/latest/timers/highres.html

    --
    __ __
    #_ < |\| |< _#

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Chris Green@3:770/3 to The Natural Philosopher on Wed Sep 16 09:08:08 2020
    The Natural Philosopher <tnp@invalid.invalid> wrote:
    On 15/09/2020 17:10, A. Dumas wrote:
    The Natural Philosopher <tnp@invalid.invalid> wrote:
    Yes. I had more or less got there. As said three options now present
    themselves- a device driver under stripped down linux, a bare metal
    approach and 'byte' the networking bullet, or use something other than a >> Pi. Maybe an X86 would have better floating point...

    Maybe an almost bare metal PC chassis is the way to go...

    Teensy has 64-bit hardware fp. Of course something like this is on a completely different level https://www.seeedstudio.com/ODYSSEY-X86J4105800-p-4445.html

    Ive got access to plenty of 10 year old PCs for next to no money

    Yes, but more expensive to run if they're on continuously.

    I have an old PC running as a NAS in the garage, it's not *that* old
    so consumes about 40w when idle. I'm about to replace it with a Pi 4
    which is probably nearer 10w or even a bit less when idle. The saving
    isn't huge, I reckon about £1 per watt per year (though it is getting
    more expensive of course) so maybe I'll save the cost of the Pi 4 in
    around a year or a bit more. The old PC was getting a bit creaky too,
    it's not just a power saving exercise.

    --
    Chris Green
    ·

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)