Linux Port
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 ... 20
Timothy Baldwin (184) 242 posts |
Even I was puzzled by that at the weekend. Edit line 4579 of castle/RiscOS/Sources/Kernel/s/ChangeDyn. I think I will change that to 1GB
No, it will happily allocate a wimpslot to 2GB from the command line, which is a bug as there is only 512MB-32K address space for it to fit in. It’s only the Taskmanager user interface that is so limited. As for performance, I have some changes that make ROM builds about twice as fast. I measured 36,692,221 RISC OS SWI calls in an IOMD ROM build, each taking about 6 microseconds. So I have paravirtualised most of the SWI instructions in the Kernel, Fileswitch and the shared C library reducing that count to 442,550. Now, according to perf, it’s spending 42% of it’s time in v7_coherent_kern_range in Linux. This is not entirely explained by the 19696 calls to OS_SynchroniseCodeArea requesting a full sync. |
|||||||||||||||
Timothy Baldwin (184) 242 posts |
I can conform that StrongEd 4.69f9 works provided you extract it from the zip file. It crashes if Filer booted from the distribution zip file using SparkFS. It also crashes if you try to load it’s own wimpslot. |
|||||||||||||||
Jon Abbott (1421) 2651 posts |
That’s a lot of full syncs. Have you done any analysis on where they’re coming from? OS_FSControl for example does a full sync after loading an Absolute or addressed code, instead of just the affected range. I had a lot of performance issues in ADFFS around OS_SynchroniseCodeArea full syncs, in the end I had to ignore them as they were killing JIT performance1 unnecessarily. OS_FSControl was in the end paravirtualized and now doesn’t perform a full cache flush. 1 A full cache flush requires code already interpreted by the JIT to be dropped along with any associated codelets. |
|||||||||||||||
Jeffrey Lee (213) 6048 posts |
That shouldn’t be too tricky to fix; it should be able to skip the call if the service call wasn’t claimed, and although it won’t know the exact range of memory that the service call altered it can at least limit it to within application space. |
|||||||||||||||
Jon Abbott (1421) 2651 posts |
I did a grep on todays source tar (22-02-17) and turned up the following full syncs: /FileSys/FileSwitch/s/FSControl Some even state the programmer was too lazy to narrow down the address range. |
|||||||||||||||
Timothy Baldwin (184) 242 posts |
I added one of syncs in OS_FSControl, and am working on removing them. |
|||||||||||||||
Jon Abbott (1421) 2651 posts |
The full syncs are all OS_FSControl and CLib then?
I removed them completely from OS_FSControl, which I could get away with as I don’t support StrongARM code patching, the JIT being ARM3. I instead sync in the MemCopy routine (covers code coming direct from a floppy image) and OS_File etc sync any areas they touch. A JIT’s syncing requirements are a lot more rigid than a CPU though, as data is always in the cache unless explicitly removed – you can think of the JIT’s memory range as one huge cache with no replacement policy. If I understand the documentation correctly, OS_FSControl shouldn’t need to do a final sync as its the responsibility of the SA patcher to sync anything it’s patched. If there’s no claim of the decompression stage it should sync the range code was loaded into. Full syncs should rarely be necessary in the OS, possibly only once when the cache is enabled during POST; I expect most if not all of those listed above could be ranged. The decision to do a full sync should be left to the ARMOps which can determine if ranged or full is quicker/required on the platform it’s running on. |
|||||||||||||||
Timothy Baldwin (184) 242 posts |
Jan Rinze, with respect to the problem you had building it are the C library stubs not located at exactly AcornC.C++/Libraries/CLib/o/stubs,ffd ? Has ROOL moved them since DDE 24? |
|||||||||||||||
Chris Mahoney (1684) 2165 posts |
I have not looked into this Linux project at all so forgive me if there’s a setup script moving files around… but there is no “Libraries” directory in DDE 27, and I don’t recall one in 25 either. The “stubs” file is in AcornC.C++/Export/APCS-32/Lib/CLib/o. |
|||||||||||||||
Steve Pampling (1551) 8170 posts |
Timothy is quite right about the location in DDE24 for the stubs file. The DDE had various re-arrangements in that period and since with various macros files for example moving or plain disappearing. The Original NutPi DDE and the full DDE 24 for example have different layouts and from descriptions on the forums the DDE25 was different again. |
|||||||||||||||
Timothy Baldwin (184) 242 posts |
I’ve uploaded changes to my Makefile which should work with either AcornC.C++/Export/APCS-32/Lib/CLib/o/stubs and AcornC.C++/Libraries/CLib/o/stubs. I have also changed it to be case insensitive and work with or without filetype suffixes. |
|||||||||||||||
Jan Rinze (235) 368 posts |
This part will get me the proper tree from your git repo. (Textile is quite stubborn when it needs to do verbatim text..) |
|||||||||||||||
Jan Rinze (235) 368 posts |
And it remains sitting there with the cursor. apparently commit c75a9ae833a4d38bec80e655f372508038c408e0 broke building on my ARMLinux machine. The RISC_OS binary in github used to run Acorn binaries under Linux apparently no longer is compatible with my system. Not sure what changed. |
|||||||||||||||
Chris Gransden (337) 1207 posts |
I’m seeing the same hang with ARM linux. (debian Jessie) Still works OK with QEmu on Intel Linux. (debian Stretch) I also tried it on a Chromebook (debian Jessie) which has an aarch64 kernel but it doesn’t recognize ‘RISC_OS’ as being a valid executable. |
|||||||||||||||
Jan Rinze (235) 368 posts |
After replacing with the older RISC_OS binary it still never creates a valid LinuxSyscalls header file or can find where it is located. So the makefiles are not yet in a state where it can be built ‘out-of-the-box’.
|
|||||||||||||||
Jan Rinze (235) 368 posts |
Also since the complexity and dependencies in the makefiles are so big it’s almost not traceable how or why things get built or fail to build. Most large projects I know of build in sequence using make -C ./module/submodule and have a config.mk to ensure that all can be found properly while building. But here it’s all a bit of a mixed bag. Ofcourse the RISC OS build tree by itself is already quite complex. So I am not sure (yet) how to fix the issue properly. I manually copy the LinuxSyscalls header file to a directory hoping that the build will continue.. |
|||||||||||||||
Jan Rinze (235) 368 posts |
It seems that stubs_bootstrap is really not something known to this build. I manually added a link to stubs and then it builds but I am not sure if that is what is intended.
here it has a link to a very unusual /proc/self/.. which really should not be used.
Above is how I think it should look like and what makes the build work.
Above a hint why the headers and LinuxSyscalls don’t get installed or built properly. This tries to outsmart makefiles by using diff on files to see if they changed. Makefiles have dependencies to ensure newer files so we should use that instead. Lastly:
I wonder if c++14 is really necessary to build this. |
|||||||||||||||
Jan Rinze (235) 368 posts |
On a side note: I am very very impressed with all the results so far! |
|||||||||||||||
Jan Rinze (235) 368 posts |
Netsurf starts, no network yet of course but this looks really promising. |
|||||||||||||||
Timothy Baldwin (184) 242 posts |
It works fine with C++11 mode. We should start at the beginning and ask why “stubs_bootstrap” is not a functioning link. Several symbolic links to /proc/self/fd/9/… are created by the make target “stamp-prepare” at the mixed/Linux/Support/build.mk, clearly most of them work as the the build partially works. I can not imagine how the current Makefile (2e0830ecc3c2934552ea9a21d5fa933ccb129c39) could create a broken link, was it left over from a previous attempt? I have just noticed that I have omitted a wildcard so that it only matches Export/APCS-32/Lib/CLib/o/stubs without a filetype suffix or Libraries/CLib/o/stubs with or without a suffix. I have uploaded a fix for that. The failure goes as follows:
Shall I just delete it and replace it with it’s output? It only used as a list Linux system call numbers in ObjAsm format, though I was planning on other things for it.
I used links to /proc/self/fd/.. to prevent one accidental copying the DDE somewhere in violation of it’s licence, I did not want the warning and question ROOL’s InstallTools obey file uses, nor consider it appropriate just to omit the question. |
|||||||||||||||
Kuemmel (439) 384 posts |
@Jan: That whole thing looks really promising, as I really like prototyping stuff in GLSL and still use Risc OS Basic to play around. Do pages like Shadertoy work under Linux ? …and at the same time one can run Basic stuff windowd like my old benchmarks run on Risc OS, see link here ? |
|||||||||||||||
Jan Rinze (235) 368 posts |
@Kuemmel: Yes Shadertoy works too. Your programs for VFP seem to fail with SWI name not known. I have mentioned this laptop here before but I don’t think anyone actually understood what is under the hood. NVidia graphics with 192 cores. So yes OpenGL is really nice on that. @Timothy: using links to /proc/self/fd/… is best defined as a hack. No programs I know of make links to /proc/self/.. in the filingsystem. |
|||||||||||||||
Jan Rinze (235) 368 posts |
/proc/self is a reference for a running program. So Only if that program has the same fd/9/ then the link to /proc/self/fd/9/… can actually work. Any other program trying to access a link pointing to /proc/self/fd/9/.. would get an error. This can be seen in errors like:
because:
Whereas the links should be pointing to the DDE directory which does not reside in /proc/self but in ../../../../../DDE/!SetPaths/Lib32/ which is the correct relative path when DDE is residing next to RISC_OS_Dev. If a symlink RISC_OS_Dev/DDE pointing to the real DDE environment, it can be possible to use links like ../../../../DDE/!SetPaths/Lib32/ which would be convenient. Somehow I wonder if it isn’t possible to make everything work using environment variables. usually ‘PATH’ and the likes are used to find things. So ‘ACORN_DDE_PATH’ should be possible to use and all can be found. Perhaps I am overlooking some things. |
|||||||||||||||
Timothy Baldwin (184) 242 posts |
Hopefully “git bisect” can find the source change which lead to the broken binary (you might want to use “git stash” first):
git bisect run bash -c ‘git checkout 9ce264a3649202aae595666fe338fc0d2d2c94f3 mixed/Linux/Support/RISC_OS.xz castle/RiscOS/BuildSys/Components/ROOL/Linux; make check; ret=$?; git reset —hard; exit $?’ Alternatively the output of strace may be helpful:
|
|||||||||||||||
Jan Rinze (235) 368 posts |
@Timothy: Since RISC_OS.xz is supplied as a binary I don’t see why bisect will actually help me. There is only one change regarding that file. If the file was generated with the Makefiles then I could probably bisect. But binary files usually are built with a specific set of tools which may or may not be supported on other platforms. The RISC_OS.xz file, how is that generated? Somehow I think it is related to the way it handles the terminal since using sdl works fine. |
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 ... 20