Re: Clear OS / HAL separation
flat view
From: Grant Likely <hidden>
Date: 2006-11-03 06:15:54
On 11/2/06, M Ptich [off-list ref] wrote:
I am porting 2.6 kernel from Freescale onto our PPC platform. This is my first experience with Linux, and I was unpleasantly surprised how poorly OS and platform code are separated. So I have a question: is there a project underway, somewhere, that is trying to separate OS and HAL (or Board Support Package) for the next Linux kernel ?
Can you elaborate on what you mean? From my perspective there is quite well defined separation between the kernel proper, the device drivers, and the board setup code. However, there is no stable kernel API for you to program against, and this is by design. For details, read the following file in the kernel source tree: Documentation/stable_api_nonsense.txt Now, all that being said, there is separation between bootloader and kernel responsibilities that is currently evolving. Linux 32 bit PPC support is slowly being migrated from the arch/ppc directory into arch/powerpc where it is merging with 64 bit ppc support. The arch/powerpc tree also uses a device tree (binary data structure) to pass board configuration information from the bootloader to the kernel. The bootloader is responsible for initializing the board (ie. SDRAM and certain devices). Since the device tree informs the kernel what devices are present, most of the kernel code can be generic and the kernel will only setup device drivers for devices that are actually present. -- Grant Likely, B.Sc. P.Eng. Secret Lab Technologies Ltd. grant.likely@secretlab.ca (403) 399-0195