2

I want to know the difference between architecture and platform in Linux kernel. When I had downloaded the latest kernel tarball, observed that a directory named with arch, it contains different names of processors & inside to any one processor directory again there is a directory called platform.

For example:-

/arch/powerpc is a directory under arch in Linux kernel & /arch/powerpc/platforms is a directory under powerpc.

So, what does this actually mean?

Can anyone explain this in detail, referring from hardware perspective to software perspective, please?

1

The architecture is the processor type. There are only a relatively small number of architectures. All processor types that execute the same user code are classified as the same architecture, even though there may be several different ways to compile the kernel; for example x86 and powerpc are a single architecture but the kernel can be compiled using the 32-bit instruction set or the 64-bit instruction set (and a 32-bit kernel can execute only 32-bit programs, while a 64-bit kernel can execute both 32-bit and 64-bit programs).

The platform describes everything else about the hardware that Linux cares about. This includes variations on the way booting works, on how some peripherals such as a memory controller, a power management coprocessor, cryptographic accelerators and so on work, etc. Whether features are classified according to a platform or are separate drivers or compilation options depends partly on how fundamental the feature is (i.e. how difficult it is to isolate the code that uses it) and partly on how the person who coded support for it decided to do it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.