-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document target hardware boards #25
Comments
The following is a suggestion. From http://linuxgizmos.com/linaro-launches-open-arm-sbc-spec-and-an-octa-core-sbc/ "Linaro, the ARM-backed not-for-profit engineering organization that has aimed to standardize open source Linux and Android software for Cortex-A processors, is now trying to do the same thing for hardware. ... Linaro has launched an open-source spec for ARM SBCs called “96Boards,” first available in a $129 “HiKey” SBC, featuring a Huawei octa-core Cortex-A53 SoC." This is likely to turn into the closest thing to standard ARM hardware. These boards will ship with Linux or Android, but that doesn't mean they wouldn't run Darwin. For more information, see https://www.96boards.org |
You can get a list of supported targets by looking at the machine_configuration file. I understand that the information that is provided is ambiguous, and I'll be working on improving documentation when I get the time (school is a priority atm). |
On http://9to5mac.com/2013/11/22/developer-ports-ios-core-to-non-apple-hardware/ some clear text names of boards are mentioned. But I am not sure whether this information is still current.
In any case, it would be great to see the new Raspberry Pi 2 with the Broadcom BCM2836 (quad core Cortex A7 processor at 900 MHz, ARMv7 instruction set) to be supported. |
Thank you very much! It turns out that the hacker responsible for the port joined Apple about a year ago… http://www.cultofmac.com/267419/ios-jailbreak-hacker-winocm-joining-apple-later-year/ http://www.cultofmac.com/267419/ios-jailbreak-hacker-winocm-joining-apple-later-year/ Her GitHub page is here: https://github.com/winocm https://github.com/winocm And her Twitter page is here: https://twitter.com/winocm https://twitter.com/winocm -john
|
cultibot, Indeed. After she was approached by apple she appointed me and several others to carry on the project. Unfortunately I've been the only one in recent months working on this project and now my hands are tied with school and thus progress had stalled. Hopefully by this spring I'll have more time to fix a few more problems (kxld) and work on improving documentation. It would be awesome to get this running on an armv8 system, however current support for armv8 is very minimal and somewhat broken (if anyone is willing to work on fixing this, please do!). probonopd, That list looks about right. One additional board that has been added was the Raspberry Pi A/A+/B/B+ (however support for this board hasn't been tested). Luckily I've recently acquired both a Raspberry Pi B+ and 2 B so I can start debugging support for those boards. A bit more work will need to be done to support SMP but hopefully that won't be too difficult to accomplish. |
At least I’ve located the community at the intersection of Darwin and ARM, which is a huge improvement over where I was a few days ago! -john
|
b-man, I also have RPi Model B and RPi 2 Model B and I am looking forward to running Darwin on them. |
Interesting: So it seems there has been work on the Raspberry Pi some time ago. |
There’s more… https://github.com/darwin-on-arm/xnu/blob/master/pexpert/arm/pe_raspberrypi.c https://github.com/darwin-on-arm/xnu/blob/master/pexpert/arm/pe_raspberrypi.c -john
|
It's really a shame that it's entirely undocumented. |
Platform expert code is a bit of a mess at the moment, I'm also planning on cleaning up bsp code and creating a more consistent set of apis (for misc. tasks such as memory read/write, barriers, ect) and in the process I'll document the code (and reformat the code to be more consistent to the style used in the rest of the kernel). |
Is it possible to build for the raspberry pi B+ at this time? If so what make arguments do I need to pass? I have tried: make TARGET_CONFIGS="release arm RASPBERRYPI" ld: file is universal (6 slices) but does not contain a(n) armv6 slice: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/6.0/lib/darwin/libclang_rt.cc_kext.a file '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/6.0/lib/darwin/libclang_rt.cc_kext.a' for architecture armv6 I think i am runing into a link error because I have xcode 6 and it does not support armv6. I am not sure at this point how to approach getting the right armv6 toolchain from xcode 4.4. |
Unfortunately building for the Raspberry Pi A/A+/B/B+ is broken at this time and as you've guessed this is mainly due to the lack of armv6 support in the Xcode toolchain. Adding support to the Linux-based darwin-sdk shouldn't be too difficult (hopefully), but for Xcode we may need to come up with a custom toolchain bundle to properly support cross compiling armv6 in that environment. Aside from building the kernel for armv6, we will also need to be able to build the userspace components to support armv6. Currently we don't have a method to build any userspace components in a portable way for either armv6 or armv7. One possible solution to this problem would be for us to adapt a bsd-style build system which allows us to build the entire OS in one swath. Unfortunately this means that we would likely need to abandon Apple's style of source code distribution (in the form of entirely independent source trees), but for what we need this would probably be the sanest approach. |
Why not focus on Raspberry Pi 2 with its ARMv7 instruction set? |
While it’s obviously not my place to say this, having contributed nothing at all to the project, except a (possibly misplaced) sense of urgency, it seems to it seems to me that targeting a platform that’s at the beginning of its product cycle and has as much potential as the Raspberry Pi 2, both technologically and in market terms, since it is primed to ride the wave of popularity of earlier Raspberry Pi designs, is sure to generate more interest in this project than a successful port to older versions of that same platform. Say it takes a year to accomplish the port, by that time Darwin on older model Raspberry Pi boards (Arduino, …) will draw a yawn, but ARMv7 will still be current. Just saying. I understand nothing at all about the complexities of actually performing an os port. -john
|
To carry that logic a bit further, (perhaps beyond the breaking point), there will undoubtedly be a Raspberry Pi built on the 64-bit ARMv8-A architecture, probably within that year. So perhaps it would be better to aim directly for that. Single board computers using ARMv8-A chips are already starting to appear, so this wouldn’t have to proceed in a complete vacuum. -john
|
cultibot, I understand what your getting at and I agree with you. I know that when winocm had started this project, she had a (perhaps overly ambitious) goal to have her kernel and OS support a range of subarchitectures and instruction sets (armv5te - armv8). At this time the kernel currently has (untested) support for armv6, bare bones support for armv8, and (almost) full support for armv7. Given the limited time I have to work on this project, and the fact that winocm has had to move on from this project after getting her intern ship at apple, perhaps we should reevaluate our prioritization to hardware support so we don't fall behind.
My major plans for this project going forward will be:
Since I don't own a mac, my development environment has been primarily in Linux. Given that the OSX 10.10 port to the Surface Pro 3 has been making good progress, I may set up a dual boot environment on my machine so I can properly test builds in OSX without relying on a VM. I would also like to make darwin-sdk usable on OSX. Given that I've eliminated the need for a custom toolchain via the use of wrappers that use the host systems' clang toolchain this shouldn't be too difficult of an undertaking. |
Sounds great! May I copy that post over to a couple of forums where it might act to drum up a little assistance from one or more others with the chops to actually contribute substantively? -john
|
Sure, that would be great! :) |
Done. I posted it in a Boulder-centric iOS developer meetup.com http://meetup.com/ group, and in the Macintosh conference on The WELL. Spare time is a rarity these days, of course, but I’m all but certain that both of these forums include a few individuals who could pitch in if they were to decide to make it a priority. Failing that, they might help spread the word. -john
|
Thanks! |
Is this going to work an an i.MX 6Quad PoP CPU form Freescale? (UDOO Quad board) it has 4 Cortex-A9 cores. |
Provided that you've implemented the board-specific initialization code within GenericBooter and pexpert, yes. However, SMP support hasn't been implemented yet so you won't be able to take advantage of those extra cores yet. |
@b-man oh, that are a lot of unknown words for me, i need to study this a little better, any idea if multi core is going to be implemented ever? or if it is hard to learn how to code that myself? thanks for the answer! |
@Floris497 SMP (Symmetric Multi Processing aka multicore) support should be implemented eventually. There are still a few more serious memory corruption bugs that I need to resolve first (MAC label freeing - see security/mac_label.c) and some odd behavior when redirecting output to text files within the bash shell (along with quite a few other things). As for your last question, I can't say unless I know what you are experienced in. :) Implementing SMP support for xnu will require a good amount of knowledge on the ARM architecture as well as a good understanding about how xnu is designed. |
@b-man I think i have 0 experience whit this, I had hoped to compile a standart kernel and get it to boot, maybe whit a kernel panic or not that is not a problem, I want it to boot first. but this might be a little off topic on this issue? is that a problem? i have no idea what kind of boot loader i need/can use. but i think i need to do some reading on boot loaders and how kernels are loaded into memory. |
@Floris497 It's hardware-related, so not a big deal. Since you are new to low-level software development, I would recommend that you read up on what is involved when writing software for the ARM architecture: (http://wiki.osdev.org/ARM_Overview). ARM also provides freely available documents and training materials for the ARM architecture on their website: http://www.arm.com/support/arm-accredited-engineer-program/accreditations/arm-accredited-engineer/aae-learning-resources.php. I would also recommend that you study the relevant documents for your development board on Freescale's website. There are also a lot of great practical examples for low-level programming on an ARM-based system on the Raspberry Pi's bare metal subforum (although a lot of that will be specific to the BCM2835/6 SoC). As for what will be involved to get Darwin booting on your board, as I've explained you will need to port GenericBooter and pexpert (the Platform Expert). GenericBooter is basically a chain loader that gets loaded and executed by u-boot (which normally boots Linux). GenericBooter's primary job at this time is to basically grab the kernel, device tree, and ramdisk, map them into memory, and then execute the kernel. Once the kernel is in control it initializes the rest of the hardware (system timer, interrupt controller, graphical framebuffer (optional), serial uart) through the Platform Expert (pexpert/arm). |
It would be great indeed if there was a step-by-step description of what is needed to boot xnu on the Raspberry Pi 2. I'd be willing to test immediately, as I am sure would be many others. |
Now that I'm done with finals and I have free time, I'll resume work for the RPi2 port this week. |
I have this exact problem: #26 Is there a kernel already supported for cortex-A9 or do i need to make changes to the kernel as well? |
HI b-man. Are you still planning on working on this project this summer? Are you able to boot into the login page yet? Because I just get into panic mode when I try to boot up. @Floris497 Use Image3maker to convert dmg to img3 files. |
@musisat ah, thank you! first need to find time again.. |
Hello musisat, |
Sorry I forgot to reply to this. It was a device tree issue but I fixed it using your other suggestion. |
To come back to the original topic, the README mentions "OMAP3530 OMAP3430_RX51 OMAP335X ARMPBA8 S5L8930X S5L8920X S5L8922X" but fails to say which boards these are for. |
To the best of my knowledge, the following hardware was tested for each configuration listed: OMAP3530: BeagleBoard, BeagleBoard xM |
It would be good to know the target hardware boards one needs to get started.
The text was updated successfully, but these errors were encountered: