ARIX update?

Samurai_Crow · 3605

Samurai_Crow

  • Junior Member
  • **
    • Posts: 88
    • Karma: +32/-0
  • Hobby coder
on: January 03, 2019, 02:10:22 PM
What's the new ARIX going to run for software if it's not backwards compatible to AROS?



origami

  • Newbie
  • *
    • Posts: 25
    • Karma: +0/-0
Reply #1 on: January 03, 2019, 02:41:25 PM
Of course mschulz is the only person qualified to give the absolute correct answer to that but if i understood correctly: any software that can be compiled for ARIX. Meaning that the new take on ARIX is that API is re-implemented using host. That said, the information i have so far also seems to indicate that it is made API compatible where possible, and where not a recompile and/or minor source adjustments should be able to do the trick.


But in all fairness, it would be a huge task to get things on par with something similar as where AROS is right now. That is probably also the reason why things are done a bit differently. imho when basic things like exec, dos and gfx/intuition are up and running then it could be that things can be implemented in a far better manner then we (used to) do for AROS. I'm also assuming that it is meant to address/highlight shortcomings of AROS. Not having to deal with any restriction such as AROS/Amiga-legacy allows for an approach that has much more freedom (from a developer point of view).

So for now i'll assume that there will be no API compatibility other then trying and also skipping the legacy when it is restricting in nature, allowing for a more matured approach. Since it iseems to be an idea sprouted from mschulz' mind, i'm not going to bother with it unless things are also a bit more clear for himself. because of the past experiences i believe that trying to restict in any way or form would be the end of that project (just as previous attempts in the past).
« Last Edit: January 03, 2019, 02:57:51 PM by origami »



mschulz

  • Newbie
  • *
    • Posts: 12
    • Karma: +80/-0
Reply #2 on: January 03, 2019, 03:13:22 PM
@Samurai_Crow

Exactly as origami said - any software that is compiled for it. The project I'm working on is a set of libraries implementing an API very similar to AROS/AmigaOS, trying to keep the compatibility where possible but also breaking it without looking back if necessary. The project is far from ready yet, I have only few bits and pieces working together: exec.library with memory management, thread creation, process spawning, message passing, bits of utility and dos.library (path resolver, assigns etc), master process maintaining public message ports. Basics such as a way libraries are built are already there, too.

On ARIX every library is a .so library, but the ARIX ones are different since they need to expose basically only one symbol - the LVO containing also bits of library description (name, version). They can be opened using the exec.library/OpenLibrary call or may be resolved during startup by ld-linux (eventually to be replaced in future by my own solution). Any application can also just link the typical linux libraries if necessary. Actually an ARIX executable could be theoretically any linux executable - this is an idea to play with in the future though.

On ARIX every task/process is linux process with separate address space. A process can of course start several threads if necessary. The IPC can be done using message ports though, but there are some slight differences. The MessagePorts are identified not by a pointer to it (it is meaningless when every process lives in separate address space) but rather by uuid. So, in order to send message to a port you need to know the uuid. Messages are passed by value, not by pointer, which means they need to be copied between processes and need to be discarded after being used. Sending a single message involves one single system call. Messages are also allowed to transfer additional payload such as linux file descriptors, which means other ways of IPC such as shared memory areas are still feasible.

Yes, the project resides mostly in my mind, but once it stabilises enough I will write some docs. The source is not hidden though (btw. it's not APL but rather MPL2.0) and if someone looks for it, he will find it :)

BTW, source code of one tiny test in ARIX looks like this:

Code: [Select]
#include <exec/libraries.h>
#include <exec/types.h>
#include <exec/memory.h>
#include <proto/exec.h>
#include <proto/debug.h>

#include <stdarg.h>
#include <stdio.h>

static const char __attribute__((used)) version[] = "\0$VER: DebugTest 60.0 " VERSION_STRING_DATE;

struct Library *DebugBase = NULL;

static inline void Bug(const char *format, ...)
{
    va_list args;
    va_start(args, format);
    VBug(format, args);
    va_end(args);
}

int main(int argc, char **argv)
{
    (void)argc;
    (void)argv;
    // Use c lib's printf. We are allowed to do that.
    printf("debug.library test\n");
    printf("SysBase = %p\n", (void *)ExecBase);

    void *buffer = AllocVec(100, MEMF_CLEAR);
    printf("AllocMem returned %p\n", buffer);

    void *buffer3 = AllocVec(100, MEMF_CLEAR);
    printf("AllocMem returned %p\n", buffer3);

    void *buffer2 = AllocVecAligned(240000, 262144, MEMF_CLEAR);
    printf("AllocMemAligned returned %p\n", buffer2);

    FreeVec(buffer);
    FreeVec(buffer2);
    FreeVec(buffer3);

    DebugBase = OpenLibrary("debug.library", 0);

    printf("After attempting to open debug.library\nDebugBase = %p\n", (void *)DebugBase);
   
    Bug("Hello, world!\n");

    CloseLibrary(DebugBase);

    return 0;
}



PurpleMelbourne

  • Newbie
  • *
    • Posts: 31
    • Karma: +0/-0
Reply #3 on: January 04, 2019, 07:50:31 AM
So am I understanding correctly that ARIX is an AmigaNG type system (forked from AROS) for the future but, probably a side effect of the improvements is that much Amiga software wont work with it?

Will there be some compatibility method of running the old programs which don't work on the new system?

And ARIX will make use of Linux hardware drivers so the Amiga community does not have to write them ourselves?

This sounds like great progress  :)



mschulz

  • Newbie
  • *
    • Posts: 12
    • Karma: +80/-0
Reply #4 on: January 04, 2019, 08:42:15 AM
Quote
So am I understanding correctly that ARIX is an AmigaNG type system (forked from AROS)

Don't name it so please. Instead, just call it an experiment. It may work, may not. I don't know how far it will go and what it will be. Nevertheless, it's an experiment I wanted to do many many years ago already (around the time when I was making the very first i386 native AROS).

Quote
Will there be some compatibility method of running the old programs which don't work on the new system?

AROS hosted running on it.

Quote
And ARIX will make use of Linux hardware drivers so the Amiga community does not have to write them ourselves?

Yes, but my aim is to use as little dependencies as possible. There is no init, no systemd. The process with pid 1 is ARIX itself. Therefore, currently ARIX has only following deps:
1. Linux kernel (it uses system calls directly whereas possible)
2. libc (for clone() system call, may be removed in future)
3. libdl (for dynamic libraries, OpenLibrary call, and for resolving of dynamic symbols)




Samurai_Crow

  • Junior Member
  • **
    • Posts: 88
    • Karma: +32/-0
  • Hobby coder
Reply #5 on: January 04, 2019, 09:21:18 AM
It sounds to me like a better 64-bit environment than AROS on x86_64 and if it can run a 32-bit hosted AROS on top, that's even better!  If the gold4 or platinum1 core for the Vampire goes 64-bit (which actually wouldn't take much because the registers are internally 64-bit anyway) perhaps it would be better than a next-generation Amiga!



PurpleMelbourne

  • Newbie
  • *
    • Posts: 31
    • Karma: +0/-0
Reply #6 on: January 04, 2019, 09:33:10 AM
Don't name it so please. Instead, just call it an experiment. It may work, may not.
:-X

This sounds like a great idea for an experiment   ;D

It looks like a lot of people have been thinking lately about the Amiga being enhanced.
Maybe the stars or some higher power that so many people now want it...   ;)



hardwaregeek

  • Newbie
  • *
    • Posts: 31
    • Karma: +3/-0
Reply #7 on: January 04, 2019, 08:37:05 PM
If it uses Linux kernel then porting Linux apps would be easier?=for example virtual box, firefox, libre office?



Samurai_Crow

  • Junior Member
  • **
    • Posts: 88
    • Karma: +32/-0
  • Hobby coder
Reply #8 on: January 05, 2019, 01:09:06 AM
If it uses Linux kernel then porting Linux apps would be easier?=for example virtual box, firefox, libre office?
https://www.mozilla.org/en-US/firefox/developer/ is made partially with Rust which depends on LLVM which runs best on POSIX platforms.



mschulz

  • Newbie
  • *
    • Posts: 12
    • Karma: +80/-0
Reply #9 on: January 05, 2019, 03:11:31 AM
That's too much speculation. Let me first do the most basic things. Anyway, AROS port for RasPi has much higher priority.



Samurai_Crow

  • Junior Member
  • **
    • Posts: 88
    • Karma: +32/-0
  • Hobby coder
Reply #10 on: January 05, 2019, 04:12:39 AM
That's too much speculation. Let me first do the most basic things. Anyway, AROS port for RasPi has much higher priority.
Agreed.  Thanks mschultz!



origami

  • Newbie
  • *
    • Posts: 25
    • Karma: +0/-0
Reply #11 on: January 09, 2019, 01:55:34 AM
Thanks for the extended information mschulz

The Arix code you've posted is already looking pretty decent so it would be interresting to see where things lead up to. I hope you have fun exploring and experimenting with it.

Sorry in advance for going off-topic now (i seem unable to locate a dedicated related thread for the question(s)):

With regards to the (new) take on AROS on the pi: Does your efforts imply that (eventually) the current available version of AROS for the pi is going to be retired and replaced with your renewed version ? or do both versions keep existing besides one another ? In case the latter will your fixes (as far as they are relevant) find their way back to the "old" version ?