/**//********************************************************************************************************** * @Description: linux内核移植相关源代码分析 * * @Author: liyangth@gmail.com * * @Changelog: * 2007-05-30 LiYang First Version * * @FQA: * [0%]Q1: **********************************************************************************************************/ Porting Linux 基本原则和方法: 1 理解OS中硬件相关的部分 1.1Linux 硬件相关源码 1.1.1ARM-specific files |--arch ||--arm |||--kernel //- core kernel code; |||--mm //- memory management code; |||--lib //- ARM-specific or optimised internal library functions ||| (backtrace,memcpy, io functions, bit-twiddling etc); |||--nwfpe and fastfpe //- two different floating-point ||| implementations; |||--boot //- the directory in which the final compiled ||| kernel is left and contains stuff for generating ||| compressed kernels; |||--tools //- has scripts for autogenerating files, such |||as mach-types (see Registering a Machine ID); ||| |||--def-configs //- contains the default configuration ||| files for each machine. ||| |||--mach-xxx //具体的体系架构SOC的相关部分 | |--include ||--asm-arm |||--arch //- the link to the configured machine headers sub- ||| directory arch-XXX; |||--hardware //- headers for ARM-specific companion chips or ||| devices; |||--mach //- generic interface definitions for things used by many ||| machines (irq, dma, pci) and the machine description macros |||--proc //- link to proc-armo or proc-armv appropriate for ||| configured machine |||--proc-armo, and proc-armv -26 and 32-bit versions of core ||| processor-related headers. ||| |||--arch-xxx | |--drivers 1.1.1.1ARM-specific files in linux/arch/arm 2 理解所要移植的硬件 3 理解移植的关键部分 *************************************************************** 注册机器 ID(Register Machine ID) Name: <name of your architecture> ArchDir: <name of include/asm-arm/arch-* directory> Type:<MACH_TYPE_* macro name> Description: <description of your architecture> http://www.armlinux.org.uk/developer/machines/. rmk@arm.linux.org.uk Add info to linux/arch/arm/tools/mach-