I am a student and I want to try the ARM port and device tree support of GSoC2022 Haiku.
I looked at the mission description and related information, and there are some questions:
The ARM means arm and arm64(aarch64) or just arm?
Is it ok to only use QEMU for testing? I do not have rpi3 for arm.
The port status shows that arm/arm64 completion is relatively low, so how to test my work? Is it possible to just print the information provided by fdt in the kernel?
I am reading the source code, and if there is a question will be put forward here, thanks for help!
It can be either 32bit or 64bit ARM, both are work in progress. @davidkaroly@tqh and @oruizdorantes also recently put some work into them and may have some info as well.
I think it’s fine to use QEMU to start with. It provides an easier platform to debug things, and can be configured to emulate a lot of different hardware.
To start with this project idea, I guess the best thing to do is:
Decide if you want to work on 32 or 64bit ARM first
Make sure you can build the corresponding version of Haiku and boot it in QEMU
Check how far it boots (at the moment neither of these run well enough to give you a GUI or even a shell)
Set up a plan for what needs to be worked on from there, and what can or can’t easily be tested
The first step will indeed be checking that the kernel can properly find the device tree (passed by the bootloader). Then, the main task would be adjusting device drivers to scan for devices in the FDT, in addition to the PCI bus.
On ARM64 it’s also possible that some devices will be discoverable from ACPI.
If the ARM ports are limiting the testing, and you want to focus on the FDT part of the project, working from the RISC-V or even the x86 port (32 or 64bit) is also possible. For example, on x86, we could use an FDT to represent all the legacy ISA devices (serial port, printer port, timer…) of the PC architecture which are currently all hardcoded.
ARM32 port is progressed quite far, you can see progress in this topic. ARM64 (AARCH64) port is still in early stage, progress topic.
I implemented basic FDT support during my RISC-V port work. FDT is integrated with Haiku kernel device manager and FDT device drivers (mostly VirtIO related) are automatically loaded.