HAL to be separate from rest of OS
Jess Hampshire (158) 865 posts |
Currently the OS is supplied as complete ROM images. I would like to see it supplied in two parts, machine specific HAL (and loader) and core OS. That way, if there were a new version of the OS it could be used without having to wait for a specific version to be made for that machine. It could also make it simpler to comply with licenses. (eg the whole HAL could be GPL if needed.) |
andrew k (267) 76 posts |
Well im not sure im qualified enough to be make an educated response but what your suggesting sounds like it would work in theory and allow people to upgrade to the latest OS release without waiting for a new build of the ROM for each specific platform. Though would this save much time in waiting for all the builds to be released? |
Jess Hampshire (158) 865 posts |
At present I doubt it, but what happens if a few more platforms get supported? It should also mean that an emulator could provide the HAL interface instead of hardware emulation and become a platform in its own right. |
Steve Revill (20) 1361 posts |
This is a non-starter – there is more to the hardware dependencies than the HAL. For example, some code in the ROM will be optimised for the CPU architecture – e.g. on Beagle, we can assume an ARM v7 instruction set and optimise code using that. This will affect all modules in the ROM. If you tried to execute that code on even an XScale, it would end badly. In addition to that, different ROM images include different sets of driver modules (and module stacks) such as PS2 mouse and keyboard support, USB mouse/keyboard support, different IIC modules, different serial drivers, etc. The idea of stuffing all possible versions of all modules into a single one-size-fits all ROM image simply wouldn’t work. So, the only alternative would be to build code to the lowest possible denominator (ARM2?) and include all the modules possible after doing extensive modifications so that the right one gets initialised during ROM boot. It’s not going to happen. To be brutally honest, legacy hardware isn’t a priority for ROOL. We’ve said this all along – we are most interested in Iyonix, virtual platforms and future hardware ports. The RiscPC and A7000 class machines are a bonus that comes out of the fact that the only viable emulators out there are emulating RiscPC hardware. If there had been an open source Iyonix emulator, we’d not have released any RiscPC/A7000 ROM build (experimental or otherwise) yet. Once work on publishing the full sources to the Iyonix ROM and disc image is complete, and we’re happy that everything is tidy, we will focus more on RiscPC/A7000 ROMs so that people can run them in RPCemu. So if you are concerned that the Iyonix ROM is marching on ahead of the RiscPC ROM at the moment and if only you could load it with a different HAL onto your RiscPC, I’m afraid you’ll have to keep waiting for a better RiscPC ROM release. On the plus side, 90% of the ROMs are built from the same source tree, so at some point in the future, we’ll be able to automatically build new ROMs for the full set of supported hardware from our repository and pop them up on our site in one go. |
John-Mark Bell (94) 36 posts |
Something I played with over last Christmas: http://jmb.drobe.co.uk/gxemul-ix.tar.bz2 Unfortunately, I’ve not had time to make it more useful. |
Jess Hampshire (158) 865 posts |
Would this change make the idea viable? The HAL/loader part would have to also have other hardware specific modules supplied with it. The main OS part would be available optimised for different processors, and you would chose the correct one for best performance. As an aside, does this optimisation also apply to programs, or is it only significant for operating system level code? |
Ben Avison (25) 445 posts |
I’m not sure what problem you’re trying to solve here. In theory we could distribute plain HALs, plus partially-linked core and platform-specific modules. But then end users would have to link them together themselves, which means they’d need a copy of the toolchain – in which case they could have compiled them from source to begin with. For most people, a complete ROM image for their platform is quite sufficient. |
Jess Hampshire (158) 865 posts |
What I would like to see is the HAL (or machine specific part) being separate set of modules. The idea being that, any suitable OS could be loaded and work. This would give ROL the option to produce a version of RO 6 for all machines with the HAL. It would also allow emulators to have their own optimised HAL, which could possibly run in native code. The other thing is it would prevent machines with a HAL becoming obsolete (to a degree), although an autobuilder could achieve the same. |