4.1 Source organization
A platform support package is composed of:
Implementation of some features provided by the hardware abstraction layer module, stored in header files located in arch/*/include/hexo/.
Optionally, some platform specific definitions, stored in header files located in arch/*/include/arch_name/.
Optionally, some static device declarations for the platform.
Optionally, some board descriptions specific source files with static declarations of relevant devices, located in arch/*/boards.
A linker script, usually based on the generic script provided in arch/common/ldscript.cpp .
Definition for platform specific configuration tokens and features.
Optionally, definition for platform specific initialization tokens and associated initialization functions.
Optionally, some device drivers specific to a particular platform may be found in arch/*/drivers.
A processor support package is composed of:
Implementation of some features provided by the hardware abstraction layer module, stored in header files located in cpu/*/include/hexo/.
Optionally, some processor specific definitions, stored in header files located in cpu/*/include/cpu_name/.
Plain assembly code for processor boot and initialization.
Plain assembly code for interrupts and exceptions handling.
Plain assembly code for context switching.
Some assembly implementations of some library features like the libc setjmp and longjmp functions.
A device driver which implements the processor device class for that processor and optionally some other classes.
Processor dependent compiler options.
Optionally, Definition for processor specific configuration tokens and features.
Optionally, some device drivers specific to a particular processor vendor may be found in cpu/*/drivers.
Optionally, a native bytecode compiler backend for the generic mutekh bytecode in the form of a perl module.
Devices drivers may be processor vendor specific, platform specific or cross-platform. They may be found at different locations in the source tree:
cpu/*/drivers/ : processor vendor related device drivers.
arch/*/drivers/ : platform related device drivers.