Linux Port
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 ... 20
Jan Rinze (235) 368 posts |
The strategy for triple buffering I use is similar. It seems that SDL needs two copy actions. One to copy it to SDL space and one when X updates. Triple buffering is simple in either setup, indeed just a pointer. |
Jan Rinze (235) 368 posts |
on the samsung chromebook. not bad score for this old lappie. |
nemo (145) 2529 posts |
Ooh. Nice! Battery life? |
Timothy Baldwin (184) 242 posts |
I have updated my repository to the current RISC OS 5.25, and included Jan Rinze’s OpenGL front end. The OpenGL frontend does not support palettes in 256 colour modes (yet). Surprisingly it scales the RISC OS screen when the window is resized, unlike my SDL frontend which resizes the RISC OS desktop. An addition to protocol to report the supported modes is possible. There is currently a race condition in that the screen memory may be shrunk whilst the frontend process is reading it, there is already synchronisation for mode changes. Perhaps coping with errors from Linux system calls and mapping some zeros in a signal handler for SIGBUS will suffice. Credit should go to Jan for working out the GraphicsV provides the addresses as offsets into the screen memory. I am working on exporting various interfaces for the HAL as HAL devices. I plan on following HAL devices:
|
Jon Abbott (1421) 2641 posts |
It’s more likely to be the physical address, which just happens to be 0 if it’s the IOMD driver. |
Jeffrey Lee (213) 6048 posts |
GraphicsV certainly does use physical addresses, but on IOMD zero would be ROM, not RAM/VRAM. Internally the kernel tracks them as logical addresses: https://www.riscosopen.org/viewer/view/castle/RiscOS/Sources/Kernel/s/vdu/vduwrch?rev=4.9#l2199 |
Timothy Baldwin (184) 242 posts |
That is not the case for the Linux port, physical addresses are an alien concept to it. I have conditioned out all code that deals with them. |
David Feugey (2125) 2709 posts |
There are talks about the future of RISC OS on incompatible ARM processors and motherboards. The Linux port is definitively a solution. I hope it will be one day an official platform. |
Jon Abbott (1421) 2641 posts |
Are you sure? DA2 translated from logical to physical is always 0 (tested on a Pi):
It way my understanding that on a RiscPC, VRAM is always at physical page 0, so DA2 is always mapped to physical page 0 and up, all other pages are mapped top down. |
Jeffrey Lee (213) 6048 posts |
You’re confusing physical page numbers and physical addresses. The physical address is a property of the hardware. Physical page numbering is an abstract numbering scheme created by the OS to help it keep track of “general purpose” memory (which includes VRAM on IOMD). Pages are numbered sequentially so the OS can just use a big array (the “CAM”) to track their state.
Yes, RISC OS 5 and its predecessors set up the physical page numbering such that video memory starts at physical page 0. However GraphicsV uses physical addresses in its API, so on a real IOMD machine you wouldn’t expect to see addresses of zero being passed across the API. On IOMD, VRAM starts at &02000000, and the first DRAM bank is at &10000000. |
Jon Abbott (1421) 2641 posts |
I’m just going by what the documentation says, both OS_Memory 0 (as in the example above) and GraphicsV 6 state physical addresses. I’ve just tested on a Pi for DA2, OS_Memory 0 returns 0 and GraphicsV 6 (leaving the call unclaimed so it hits the IOMD driver) gets given the logical address of DA2 – which has now totally confused me as I’d expect it to get an address between 0 and the size of DA2 as noted by Tim above. |
Jeffrey Lee (213) 6048 posts |
Which is to be expected, since the Pi does contain RAM at physical address zero (and since the RAM is all in one physically contiguous chunk, the start of that chunk will get used by DA 2).
Say what? There’s no IOMD driver on Pi, and GraphicsV 9 doesn’t accept an address – it returns one. |
Jon Abbott (1421) 2641 posts |
My mistake, GraphicsV 6 – now corrected.
It falls back to DA2 if there’s no other driver – I presumed that was an inbuilt IOMD throwback. |
Jeffrey Lee (213) 6048 posts |
Yeah, the OS basically just “muddles through” and uses DA 2 for a framebuffer if there’s no GraphicsV driver present. But that’s really just an indication of the hap-hazard way in which the HAL/GraphicsV video support was introduced, rather than an intentional design feature (I believe RISC OS 6 is more sensible, in that the VDU system will shut down completely if there’s no video driver). Not sure why you’d see logical addresses being passed into GraphicsV 6. Unless it’s just a coincidence that the logical and physical addresses are very similar on a Pi 2? Under current RISC OS versions I’d expect the start address of DA 2 to be somewhere between &34000000 and &32000000 (depending on the current size of the area). Treated as a physical address, that would correspond to a 1GB Pi with 192MB-224MB (or more) reserved for the GPU. |
Tristan M. (2946) 1039 posts |
Can someone help me out on this? The Linux2 branch has been a little problematic for me, especially with the QEMU and bubblewrap dependencies. Long, long story short I’ve got working ARM RISC_OS and sdl executables now. There is an ARM Linux platform I wanted to use RO linux on, but haven’t been able to build on it. However I found that the two executables run fine on it. I have two problems. 1: Setting up a simple shell script which loads RO, any IXFS entries and whatever else is needed. 2: The keymapping is weird. Non alphanumeric keys don’t seem to be mapped correctly. Changing region or keyboard via TaskWindow didn’t change anything. Because of this I can’t even try to add a TinyDir because there is no ‘\’ that I can find in the keymapping! So what I have is a ROM only Linux RO which I have to manually start the desktop, with no filesystem access. On the bright side it seems to be very fast and can run fullscreen or windowed. It’s also running on a 6+ year old Chinese tablet :) e: I forgot the question! Could I please get some input on a bare minimum script to get the desktop loaded, and a couple of IXFS entries so I can use a self extracting HD4 file? Any suggestions on what’s going on with the keyboard? This is only in RO linux. Key mapping seems fine outside it. e again: Terrible picture! |
Jan Rinze (235) 368 posts |
There is a script Test_Boot
My preference is a less complicated setup. bwrap is intended to ensure a more secure environment. chroot could be used if the RISC_OS executable is fully static compiled. |
Jan Rinze (235) 368 posts |
chroot in userspace is allowed when using Linux kernel namespaces. I’ll take a peek in the bwrap code to see if i can borrow some code to do everything in userspace. |
Jan Rinze (235) 368 posts |
userspace chroot:
And the fork code in the GUI:
the proc and dev directory need to be created in the HardDisc4 directory for this to work. running the GUI and RISC OS: ./Built/opengl ./HardDisc4 ./RISC_OS —nvram /\!Boot/CMOS > /dev/null |
Timothy Baldwin (184) 242 posts |
To start RISC OS without sandboxing (so rogue RISC OS programs can mess up the Linux environment) and with a GUI you can use RISC OS will except input on standard input so you can workaround broken key-mapping by running it in a terminal and typing in the terminal. You can then open a RISC OS filer window with the RISC OS star command To start RISC OS with auto-booting and NVRAM use something like:
|
Timothy Baldwin (184) 242 posts |
You mean without system-wide root privileges. “In userspace” means from software running in USR mode, as opposed to the kernel or kernel modules which run in SVC mode.
You need your own PID and mount namespace to mount RISC OS only uses |
John Williams (567) 768 posts |
So is this the common typo for “rogue” which appears in many of [substitute favourite dyslexic poster)’s postings originator? No criticism,just to be clear! We can all FU! Me, often! John |
Jan Rinze (235) 368 posts |
RISC OS only uses /dev on Linux versions before 3.17 (a clone of CryptRandom reads random numbers from /dev/urandom, after 3.17 the getrandom system call is used). mixed/Linux/CryptRandom/s/Main:135: DCB "/dev/urandom", 0 running with kernel 3.10.18 so it makes sense. The code in my previous post mounts both proc and dev. The latter could be made optional on a check for the kernel version number. Unpriviledged users can run this and have improved security. There should be some more nice checks and possibly fail-overs to make the code reliable and work on various kernel versions. Preferably the RISC_OS binary should not need either to be fully functional. |
Michael Gerbracht (180) 104 posts |
I find the idea of using Linux as some kind of HAL for RISC OS very interesting. I would like to try it out by myself but the fastest ARM device I have is a Raspberry 3. I know that there is a “real” RISC OS version for it but would it still be possible to try it out on this device? Is there a description on how to get started? I know that there are some limitations e.g. networking etc. thanks, |
Tristan M. (2946) 1039 posts |
Michael Gerbracht, I can’t comment with any certainty on the current “Linux2” branch of the RO Linux port on Raspberry Pi 3, however I have built it on an Orange Pi Zero running Armbian based on Ubuntu 16.04.4. |
GavinWraith (26) 1563 posts |
I have two Rpi3 sitting on my desk; one with RISC OS, one with Raspbian. At the moment I transfer data between the two by unplugging and plugging a memory stick. It would be wonderful to have RISC OS running as a process under Raspbian and to be able to use ShareFS. I use Raspbian for printing and browsing, RISC OS for email. One gets set in one’s ways. |
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 ... 20