Arm Development and Raspberry pi

Here you can discuss ReactOS related topics.

Moderator: Moderator Team

Heis Spiter
Posts: 183
Joined: Sun Sep 03, 2006 11:39 am
Location: Paris, France
Contact:

Re: Arm Development and Raspberry pi

Post by Heis Spiter »

BrentNewland wrote:Having an inexpensive and basic hardware platform for testing a ReactOS port on seems like it would be cheaper and easier than waiting to buy an expensive Windows 8 tablet or trying to code on another ARM device (like a cell phone, which would require creating a bunch of drivers from scratch and a lot more work).

So, low price barrier to development = cheap, and minimalistic (and identical) hardware = easy (everything is relative). A cheap device purchased by tens/hundreds of thousands of coders/programmers? Lots of good contributors would certainly make writing an ARM port easier.
Actually, this wouldn't help here.
ARM port targets the ARM9 processors family. Rasberry PI, IIRC, is using an ARM11 processor (ARM11 being some kind of ARM7) processor.
Pierre Schweitzer (aka Heis Spiter)
ReactOS kernel developer.
ReactOS systems administrator.
PascalDragon
Posts: 123
Joined: Wed Aug 04, 2010 7:34 pm

Re: Arm Development and Raspberry pi

Post by PascalDragon »

Heis Spiter wrote:
BrentNewland wrote:Having an inexpensive and basic hardware platform for testing a ReactOS port on seems like it would be cheaper and easier than waiting to buy an expensive Windows 8 tablet or trying to code on another ARM device (like a cell phone, which would require creating a bunch of drivers from scratch and a lot more work).

So, low price barrier to development = cheap, and minimalistic (and identical) hardware = easy (everything is relative). A cheap device purchased by tens/hundreds of thousands of coders/programmers? Lots of good contributors would certainly make writing an ARM port easier.
Actually, this wouldn't help here.
ARM port targets the ARM9 processors family. Rasberry PI, IIRC, is using an ARM11 processor (ARM11 being some kind of ARM7) processor.
But this does not necessarily mean that it won't work. Sure, it would need quite some manpower, but I would not say that it's impossible.
BrentNewland wrote:And of course Windows 8 on ARM will also have the Win32 API.
You do know that this does not mean that Windows on ARM will run x86 applications? "Win32" is merely the name of the API that Windows is using and providing. It's (mostly) not dependend on the platform or bitness (Win64 also uses/provides the Win32 API in 64-Bit mode!).

Regards,
Sven
Free Pascal compiler developer
User avatar
EmuandCo
Developer
Posts: 4723
Joined: Sun Nov 28, 2004 7:52 pm
Location: Germany, Bavaria, Steinfeld
Contact:

Re: Arm Development and Raspberry pi

Post by EmuandCo »

Noone said its impossible, we just desperatly try to explain here, that we do NOT have the manpower to port ROS to any coffe machine out there. First one architecture bundle: i386 and amd64, then we try get it stable and useable and THEN we can discuss about the arm port again. Except you manage to get our ARM Ninjas back to their port.
ReactOS is still in alpha stage, meaning it is not feature-complete and is recommended only for evaluation and testing purposes.

If my post/reply offends or insults you, be sure that you know what sarcasm is...
Haos
Test Team
Posts: 2954
Joined: Thu Mar 22, 2007 5:42 am
Contact:

Re: Arm Development and Raspberry pi

Post by Haos »

You do know that this does not mean that Windows on ARM will run x86 applications? "Win32" is merely the name of the API that Windows is using and providing. It's (mostly) not dependend on the platform or bitness (Win64 also uses/provides the Win32 API in 64-Bit mode!).
You cannot expect x86/x64 binaries to run on ARM, first those would need to be recompiled on new arch. Without sources, this is a moot point.
Techno Mage
Posts: 89
Joined: Mon Nov 28, 2005 2:05 pm

Re: Arm Development and Raspberry pi

Post by Techno Mage »

I remember seeing a video of Steve Ballmer, demoing and "upcoming version of windows" that looked much like Windows 7, where he installed and ran an x86 app on Nvidia Tegra 2 (ARM), I cannot remember if it was a CES or Build video though.
User avatar
Zc456
Posts: 155
Joined: Fri Feb 11, 2011 10:42 pm
Contact:

Re: Arm Development and Raspberry pi

Post by Zc456 »

Techno Mage wrote:I remember seeing a video of Steve Ballmer, demoing and "upcoming version of windows" that looked much like Windows 7, where he installed and ran an x86 app on Nvidia Tegra 2 (ARM), I cannot remember if it was a CES or Build video though.
CES, before they shoved Metro (gag me) onto it.
Stay frosty, Tony Bark.
PascalDragon
Posts: 123
Joined: Wed Aug 04, 2010 7:34 pm

Re: Arm Development and Raspberry pi

Post by PascalDragon »

EmuandCo wrote:Noone said its impossible, we just desperatly try to explain here, that we do NOT have the manpower to port ROS to any coffe machine out there. First one architecture bundle: i386 and amd64, then we try get it stable and useable and THEN we can discuss about the arm port again. Except you manage to get our ARM Ninjas back to their port.
I did not say that YOU (meaning the "ReactOS developers") need to/must do it. I just stated that it isn't impossible in general (what you confirmed) and that it needs quite some amount of man power (which you also confirmed).
Haos wrote:
You do know that this does not mean that Windows on ARM will run x86 applications? "Win32" is merely the name of the API that Windows is using and providing. It's (mostly) not dependend on the platform or bitness (Win64 also uses/provides the Win32 API in 64-Bit mode!).
You cannot expect x86/x64 binaries to run on ARM, first those would need to be recompiled on new arch. Without sources, this is a moot point.
This is what I wanted to tell BrentNewland with my quote above. He sounded as if "availabiltiy of Win32 API" in Windows 8 means "x86 applications will run". So I explained that "Win32 API" does not mean "applications running on x86", but that it's merely the name of the API that Windows provides no matter what platform it runs on.

I'm aware that you can not run applications from one CPU architecture on another one trivially. I did write applications for different platforms already (Win32, Win64, WinCE, Linux (x86, x86_64, ARM)), so I know that you need to recompile applications (Note: I'm also aware of the exceptional role of x86 on x86_64).

Regards,
Sven
Free Pascal compiler developer
BrentNewland
Posts: 176
Joined: Wed Oct 05, 2011 7:32 am

Re: Arm Development and Raspberry pi

Post by BrentNewland »

PascalDragon wrote:
Haos wrote:
You do know that this does not mean that Windows on ARM will run x86 applications? "Win32" is merely the name of the API that Windows is using and providing. It's (mostly) not dependend on the platform or bitness (Win64 also uses/provides the Win32 API in 64-Bit mode!).
You cannot expect x86/x64 binaries to run on ARM, first those would need to be recompiled on new arch. Without sources, this is a moot point.
This is what I wanted to tell BrentNewland with my quote above. He sounded as if "availabiltiy of Win32 API" in Windows 8 means "x86 applications will run". So I explained that "Win32 API" does not mean "applications running on x86", but that it's merely the name of the API that Windows provides no matter what platform it runs on.

I'm aware that you can not run applications from one CPU architecture on another one trivially. I did write applications for different platforms already (Win32, Win64, WinCE, Linux (x86, x86_64, ARM)), so I know that you need to recompile applications (Note: I'm also aware of the exceptional role of x86 on x86_64).

Regards,
Sven
First, I have a nice big post I'll put up tomorrow night.

Second, I only mentioned the Win32 API in windows 8 on ARM to make sure people knew the API is supposed to be available on all platforms. Reading the posts would have cleared that up pretty quickly - nowhere did I say that x86 programs could run on ARM just because ARM would have the Win32 API; instead (and I'll try to make this even clearer in a later post) QEMU would emulate a processor (no other hardware) and run the x86-specific code from the executable (which is supposed to be a small percentage of the overall program). My second post goes into much detail on that, it really is worth a good read (it's compiled from several different authors).

Thirdly, yes, you could run x86 on a version of ReactOS written for ARM, as long as it was designed for that purpose (carefully read the second post at least - it's not your fault, I'm pretty sure no one has actually read those two posts completely, and everyone is just jumping to conclusions. Otherwise they would be providing me with specific points from what I posted).
Aeneas
Posts: 505
Joined: Sat Oct 10, 2009 10:09 pm

Re: Arm Development and Raspberry pi

Post by Aeneas »

As much as I like ARM, this whole discussion is so pointless:

ReactOS tries to correspond to Win2k/XP, from the desktop user's point of view. - At that time, a DECADE AGO, noone gave a damn about ARM except some geeks and specialists creating customized products (such as mobile phones). That's why there is barely software to be of any interest for Windows on ARM, so far - they simply did not create stuff which John Doe would, off the top of his head, name as a useable piece of software.

ReactOS' "chance", if you will, consists in creating "the running ground" for a WEALTH of Windows applications out there. (You might compare it to what Linus did with his kernel - and the already existing GNU tools & X11.) Most of these applications are "simple", given that the computing needs of most people are simple. So the chance to get things done "acceptably" (as perfection is NOT needed!) is, in my opinion, very real, given the progress so far.

As opposed to ReactOS, LINUX CAN be ported on ARM SENSIBLY, same with the BSDs. Why? Because ULTIMATELY, all these unixoids are based on "available source code", the processor does not matter. Windows is NOT: Windows is based on "available binaries", where the processor DOES matter. And that's the difference why the "return on investment" (of time, manpower, money...) is way bigger for ReactOS on x86 or even x64, but not on ARM. On x86 you get a bucket full of apps; on ARM, you get a tap on the shoulder.

Even in the (somewhat unlikely but not impossible) event that ARM entirely displaces x86 for the desktop, then STILL all old applications that might have been of interest in Win2k/WinXP for the desktop user WILL BE "x86". So whatever solutions is found for running x86 code on ARM in that event, be it in a seamless virtual machine, or maybe some hardware-level emulation, that solution will be viable for ReactOS, too.
BrentNewland
Posts: 176
Joined: Wed Oct 05, 2011 7:32 am

Re: Arm Development and Raspberry pi

Post by BrentNewland »

Aeneas wrote:As much as I like ARM, this whole discussion is so pointless
If you feel it is pointless, then you should be in another topic. Posting that is not only non-conducive to a reasonable discussion, I think it's borderline uncivil.
ReactOS tries to correspond to Win2k/XP, from the desktop user's point of view.
Server 2k3
- At that time, a DECADE AGO, noone gave a damn about ARM except some geeks and specialists creating customized products (such as mobile phones). That's why there is barely software to be of any interest for Windows on ARM, so far - they simply did not create stuff which John Doe would, off the top of his head, name as a useable piece of software.
Actually, I think there is no software for Windows on ARM because the only version of Windows for ARM was NT.
ReactOS' "chance", if you will, consists in creating "the running ground" for a WEALTH of Windows applications out there. (You might compare it to what Linus did with his kernel - and the already existing GNU tools & X11.) Most of these applications are "simple", given that the computing needs of most people are simple. So the chance to get things done "acceptably" (as perfection is NOT needed!) is, in my opinion, very real, given the progress so far.
And supporting development for ARM with an x86 compatibility layer is incompatible with this statement... how?
As opposed to ReactOS, LINUX CAN be ported on ARM SENSIBLY, same with the BSDs. Why? Because ULTIMATELY, all these unixoids are based on "available source code", the processor does not matter. Windows is NOT: Windows is based on "available binaries", where the processor DOES matter. And that's the difference why the "return on investment" (of time, manpower, money...) is way bigger for ReactOS on x86 or even x64, but not on ARM. On x86 you get a bucket full of apps; on ARM, you get a tap on the shoulder.
ReactOS can be ported sensibly as well. There's a good chance that with a few fixes (because there's been a lot of changes since ARM work stopped) it will be back at its previous state - getting partway through the boot process.
Even in the (somewhat unlikely but not impossible) event that ARM entirely displaces x86 for the desktop, then STILL all old applications that might have been of interest in Win2k/WinXP for the desktop user WILL BE "x86". So whatever solutions is found for running x86 code on ARM in that event, be it in a seamless virtual machine, or maybe some hardware-level emulation, that solution will be viable for ReactOS, too.
No one is saying that ARM will replace x86 - it will be around forever. And I seriously doubt anyone will create a solution for running x86 programs on ARM (unless a company does it as a commercial project, which would be of no use to ReactOS).

As far as the solution for running x86 code on ARM, I've posted it. I think it is viable for ReactOS and no one has brought up a single point why what I posted is incorrect (besides just saying "no, can't be done" or "no, WE aren't interested in it"). And I don't think it's worth counting on some random other person/group happening to make something that ReactOS can use - it's something that needs to be actively pushed forward for whatever group finishes the ARM port.


BTW, I would like to bring up again something from my first post that no one has mentioned.

Everything I suggested has been partially implemented for DarWINE (WINE for powerpc). The only reason THEY stopped is because Apple dropped PowerPC. So partial code exists to do just what I have suggested.

In other words, I don't see that there's any reason for the ReactOS team NOT to support the concept of other developers porting ARM (as opposed to just saying "there's no reason for an ARM port" or "we don't have the manpower" whenever it comes up, even though it's usually brought up as someone outside ReactOS porting it, and not the developers spending their time on it). But I'll discuss that in my next post.
Bblaauw
Posts: 149
Joined: Mon Aug 03, 2009 12:59 am

Re: Arm Development and Raspberry pi

Post by Bblaauw »

My point of running ReactOS on the Raspberry Pi by using a Linux distro combined with a QEMU binary running on top of the proper ARM architecture but emulating x86 (or maybe even x86-64) is that you have a cheap dedicated machine for testing ReactOS on. It's not native hardware ofcourse, but using ReactOS on a native machine is crazy still. Even on x86 most people run it inside emulators only.
The trick for getting ReactOS to run on QEMU on Linux on ARM is to get some low-overhead distribution.

ReactOS would take 64 to 128MB at least, QEMU has about 40MB overhead according to Windows Task Manager (total memory consumed by emulator, minus amount of memory specified for guest). Then it means the host system has about 100MB to get kernel, drivers and userland (including a (X.org-based?) GUI, if QEMU requires one?) as all Raspberry Pi machines have 256MB RAM.
Benefits would be having a cheap dedicated tiny machine, including logging capabilities on/to the host.

Basicly, same benefits as using this cheap system for a dedicated DOS machine. No native hardware support as it's a different architecture, but can't have it all.
I don't see ReactOS working anymore on a machine like the Bifferboard ( http://blogs.coreboot.org/blog/2012/01/ ... d-porting/ ), a tiny x86 machine with 80486 CPU and 32MB memory.
Powerful modern (yet relatively expensive) machines are Brazos/Llano/Trinity based integrated products.
BrentNewland
Posts: 176
Joined: Wed Oct 05, 2011 7:32 am

Re: Arm Development and Raspberry pi

Post by BrentNewland »

Bblaauw wrote:My point of running ReactOS on the Raspberry Pi by using a Linux distro combined with a QEMU binary running on top of the proper ARM architecture but emulating x86 (or maybe even x86-64) is that you have a cheap dedicated machine for testing ReactOS on.

It's not native hardware ofcourse, but using ReactOS on a native machine is crazy still. Even on x86 most people run it inside emulators only.
The trick for getting ReactOS to run on QEMU on Linux on ARM is to get some low-overhead distribution.
I think running ReactOS inside an emulator on a device with the limited capabilities of the Pi would be too slow, and not really serve a purpose over running inside an emulator on your desktop.

But ReactOS on the Pi, native, for working on ARM compatibility, gives you the same benefits a game console does - it's popular, all the hardware is pretty much the same, it's cheap. You know that if you test ReactOS on a device like that, everyone else with one of those devices should have the same experience.
BrentNewland
Posts: 176
Joined: Wed Oct 05, 2011 7:32 am

Re: Arm Development and Raspberry pi

Post by BrentNewland »

I understand that this is an advanced topic that I have little grasp of (though I am quoting experts in the field), and that I am not qualified to make declatory statements. Please consider what experience you have with this kind of programming and QEMU in general while posting.

Please include specifics with your comments - without specifics, you can't have constructive criticism.


Sure it works with an CPU emulator like the qemu way. I never said this is wrong, but your post sounds like you can just port the stuff around and it will run out of the box, which is plain wrong.
BTW, nice pic of Win8 on the Asus phone ^^ This was a new one to me.
I think by
  • "you can just port the stuff around and it will run out of the box"

you are trying to say
  • "you can just port ReactOS to ARM and x86 programs will work without effort" (and you are right, that would be foolish, except for interpreted language programs, like batch files, or PHP or something)

but it sounds like you're saying
  • "you need to modify programs before they can run on ARM"

(as the quoted post below says)


My first post listed "emulator" and "native code" several times, but I apologise if I wasn't clear enough. As far as working out of the box, yes, ReactOS could be programmed to work out of the box with x86 Win32 programs on an ARM processor. Without altering the program's binary manually.

Perhaps I can sum it up a little better (as best I understand it):
  • All .exe (because I assume ReactOS will choose a different extension for non-x86 processor executables) will be loaded by a stub QEMU (that isn't emulating an entire PC, just the x86 CPU)
  • QEMU will redirect any WIN32API function calls from the program to ARM ReactOS (those function calls will run in the ReactOS ARM code, so QEMU won't have to process them, which will speed it up a lot)
  • QEMU will take all the DLL dependencies needed by the program and check if they have an ARM version available, and use it instead (This is a guess on my part, DLL's are effectively extensions to the Windows API, so as long as the
  • API presented to the program from each DLL is the same, it doesn't matter if the DLL is compiled in the same architecture as the program, as long as the OS can translate between the non-native program and the DLL)
  • QEMU will probably do a lot more checks for different types of code in the binary that can be redirected to the host OS
All the remaining code/calls/functions that haven't been redirected at this point (and hopefully there will not be much) will be processed by QEMU (how much code will that be? could be only 5% of the code needs to be run by QEMU in some programs, and 100% of code in other programs)

The result is that a program that has not been modified in any way by the user is run on a different architecture at high speeds (compared to entirely emulating that architecture - ARM emulators on X86 generally execute at around 10% of their native speed, someone estimated this process may let those programs operate at 50%+ their native speed).
PascalDragon wrote:
BrentNewland wrote:And of course Windows 8 on ARM will also have the Win32 API.
You do know that this does not mean that Windows on ARM will run x86 applications? "Win32" is merely the name of the API that Windows is using and providing. It's (mostly) not dependend on the platform or bitness (Win64 also uses/provides the Win32 API in 64-Bit mode!).
Yes, I do know that (it's explained in the link as well), and Windows definitely won't support x86 natively on ARM like... ever. Whereas the open source community has tons of projects that could be useful to the task, Microsoft can't use them because of the source code license, so Microsoft would have to either buy enough companies to get the code they need to start with, or do it all from scratch. Since they seem to want to obsolete the Win32 API in favor of WinRT anyways, I don't see them ever putting in the effort.
(This wasn't posted entirely earlier, so here's what I got from the wiki, not sure how recent it is)

Currently, testing is done with the "Versatile/PB" platform, but with a modified CPU target being the Cortex A8, an ARMv7-a core, which is being used internally for BeagleBoard and ZoomII-MDK work. Although the original ARM port of ReactOS was designed for ARMv5 and ARMv4, these cores have an MMU that is incompatible with ReactOS/Windows requirements, and lacks instructions needed for synchronization done in user-mode.
Heis Spiter wrote:ARM port targets the ARM9 processors family. Rasberry PI, IIRC, is using an ARM11 processor (ARM11 being some kind of ARM7) processor.

From my first post: RaspberryPi uses an Arm 11 (which is an armv6 processor).
The ReactOS wiki says that work was being done on ARM7 cores. While there are certainly some processor specific changes, from what I've read ARMv6 and ARMv7 are very similar.

ARM11 is kind of an older architecture - the design was released in 2002. But this also means it will be easier to implement later architectures (which should be mostly similar to previous architectures as far as coding compatibility).

You cannot expect x86/x64 binaries to run on ARM, first those would need to be recompiled on new arch. Without sources, this is a moot point.
I can and I do, if you read any of the three posts you can see where I have explained how it can be done, according to the experts. No recompiling needed. Explaining it was the purpose of making these posts.

We dont talk about the hardware needed for a port. Manpower ist expensive too, thats whats the problem here.
Z98 wrote:To rephrase EmuandCo's last statement, since the "cost" of manpower is so much higher than the "cost" of hardware, a decrease in the "cost" of hardware does not make a significant difference in the total "cost" of porting ROS to ARM.
EmuandCo wrote:Noone said its impossible, we just desperatly try to explain here, that we do NOT have the manpower to port ROS to any coffe machine out there. First one architecture bundle: i386 and amd64, then we try get it stable and useable and THEN we can discuss about the arm port again. Except you manage to get our ARM Ninjas back to their port.
First, as far as only focusing on i386 and amd64 (though from what I can see there isn't much of any focus on amd64 at this stage in development): what I read about the other attempted ports of ReactOS said that it revealed a lot of basic problems, allowed the codebase to become more portable for the future, and had other benefits as well. On top of that, the three biggest processor architectures right now seem to be X64, X86, and ARM. (Makes me wonder what effect a Win32 compatible OS that can run x86 programs on different architectures would have on the market - if it's easier to switch, perhaps more people will choose to adopt that architecture. That may even lead to some of those hardware companies recognizing how valuable such an OS would be for their hardware and supporting its development)

The thing is, I wouldn't expect the ReactOS team to port it to this kind of device. My understanding is that it would be the RaspberryPi users/developers who would work on a RaspberryPi port of ReactOS.


To sum it up, as far as how cheap hardware relates to manpower:
  • The hardware is cheaper. Therefore, more people can/will buy it.
  • The primary market for the RaspberryPi is developers; the hardware is simpler than most other ARM devices, which will encourage developers to use it.
  • Therefore, more people can/will buy the RaspberryPi, and those people are more likely to be developers.
That is where you would find the manpower to port ReactOS to the RaspberryPi. By not attempting to woo some developers in the RaspberryPi community, you may be missing out on some valuable assistance

If what I have posted about running x86 programs on ARM architecture is accurate (and I believe it is), then the major reason to not port ReactOS is gone. If that's the case, if someone from ReactOS says "We think this is a good idea and we welcome any developers who wish to contribute to ReactOS", you may get a decent response (even if only a handful of people decide to join), and someone might port ReactOS to the RaspberryPi.

And if ReactOS can boot to the GUI on an ARMv6 processor (who knows, maybe even within a year, it was close to it before), you may attract the interest of people in the Android community (which is mostly for ARM devices, and has many developers experienced with porting operating systems and working on kernels). And that could put ReactOS in the right place at the right time.

Nvidia says a quad-core processor will bring to your phone a level of performance comparable to that of a desktop computer.
“People are going to consider their phones as their primary computer,” says Nick Stam, director of technical marketing at Nvidia. “Phones with a quad-core processor are really full computers that can replace many functions of your laptop or [desktop] computer. It is a level of performance that truly does rival a desktop processor.”
I've often heard about people talking about phones replacing the desktop, but that's not going to happen with current mobile operating systems (which are NOT very good for multitasking). Sure, Android and other mobile operating systems may change in the future (specifically, they need something that functions like a taskbar in Windows for fast task switching and closing unneeded programs). Or a different Linux distro may become popular.

I think that ReactOS is quite suitable for filling that niche (desktop replacement OS for a smartphone). Even if it's not fully functional, or it will be some time before x86 could run on ARM without any user intervention, even if windows code never runs faster than 50% native speeds, getting there first (or at least early) may attract more attention to ReactOS and lead to more assistance, more developers, more donations, and faster development.


Comments and input are appreciated. If supplying criticism, please include specifics.
Techno Mage
Posts: 89
Joined: Mon Nov 28, 2005 2:05 pm

Re: Arm Development and Raspberry pi

Post by Techno Mage »

Some very good points have been brought up, in this thread.
At this point I don't care if it runs ? app
But for testing say USB, video, and OS stability, it would be good, as everyone would have the same device, making it easier to find X problem.
If such a version was made, even I could make some test apps, to test functionality.
Pisarz
Posts: 375
Joined: Sat May 12, 2007 9:29 am

Re: Arm Development and Raspberry pi

Post by Pisarz »

I think that we would need ARM port first, before we could even discuss emulation, because potential dev working on such "translation layer" would need a platform to test it on. I agree with the idea itself, but I think that it's an unreachable goal at the moment.
Post Reply

Who is online

Users browsing this forum: Kornel and 44 guests