全部博文(160)
分类: LINUX
2013-07-29 14:28:33
原文地址:files change for linux porting 作者:YSLAU
==================================================================
STEP 0: Configuration 1.
# machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number
ks8695 ARCH_KS8695 KS8695 180
The above file is needed so that the cript
linux/arch/arm/tools/gen-mach-types can generate
linux/include/asm-arm/mach-types.h
2.
When you do make
to build a kernel,then the file corresponding to the first part of
the parameter is copied out of linux/arch/arm/def-configs/ to linux/.config
3.
config ARCH_KS8695
bool "Micrel/Kendin KS8695" help Support for Micrel/Kendin KS8695 "Centaur" (ARM922T) based System-on-Chip devices. 4.
1."Processor Type"
# Select CPU types depending on the architecture selected. This
selects which CPUs we support in the kernel image, and the
compiler instruction optimiser behaviour.
# ARM922T
config CPU_ARM922T bool "Support ARM922T processor" if ARCH_INTEGRATOR depends on ARCH_LH7A40X || ARCH_INTEGRATOR || ARCH_KS8695 default y if ARCH_LH7A40X || ARCH_KS8695 select CPU_32v4T select CPU_ABRT_EV4T select CPU_CACHE_V4WT select CPU_CACHE_VIVT select CPU_CP15_MMU select CPU_COPY_V4WB if MMU select CPU_TLB_V4WBI if MMU help The ARM922T is a version of the ARM920T, but with smaller instruction and data caches. It is used in Altera's Excalibur XA device family and Micrel's KS8695 Centaur. Say Y if you want support for the ARM922T processor.
Otherwise, say N. 2."Processor Features"
config CPU_BIG_ENDIAN
bool "Build big-endian kernel"
depends on ARCH_SUPPORTS_BIG_ENDIAN help Say Y if you plan on running a kernel in big-endian mode. Note that your board must be properly built and your board port must properly enable any big-endian related features of your chipset/board/processor. =================================================================
================================================================= STEP 1: make files
0.
(zreladdr-y)
(params_phys-y) (initrd_phys-y) 1.
machine-$(CONFIG_ARCH_KS8695) := ks8695
ifneq ($(machine-y),)
MACHINE := arch/arm/mach-$(machine-y)/ 2. ifneq ($(MACHINE),)
include $(srctree)/$(MACHINE)/Makefile.boot endif # Note: the following conditions must always be true:
# ZRELADDR == virt_to_phys(PAGE_OFFSET + TEXT_OFFSET) # PARAMS_PHYS must be within 4MB of ZRELADDR # INITRD_PHYS must be in RAM ZRELADDR := $(zreladdr-y) PARAMS_PHYS := $(params_phys-y) INITRD_PHYS := $(initrd_phys-y) export ZRELADDR INITRD_PHYS PARAMS_PHYS
targets := Image zImage xipImage bootpImage uImage
=================================================================
STEP 2: .C .S files 1.
-- Low-level IRQ helper macros
-- Debug output macros -- Irq number definations irq.c -- DMA definations dma.h -- Memory mapping/translation arch.c -- Reset operation system.h -- IDLE function makefile.boot define macros zreladdr-y
entry-macro.S Low-level IRQ helper macros for machine
get_irqnr_and_base
disable_irq
debug-macro.S
these are low level debug function, which talk to a
serial port without relying on interrupts and any other
kernel functionality
Reference:
head.S
entry-header.S
entry-armv.S
entry-common.S
arch.c /*may be use other file name.: board-micrel.c*/
define structure machie_desc map_desc and map_io function
This should contain the architecture-specific fix ups and IO
MACHINE_START(KS8695, "KS8695 Centaur Development Board")
/* Maintainer: Micrel Semiconductor Inc. */ .phys_io = KS8695_IO_PA, .io_pg_offst = (KS8695_IO_VA >> 18) & 0xfffc, .boot_params = KS8695_SDRAM_PA + 0x100, .map_io = ks8695_map_io, .init_irq = ks8695_init_irq, .init_machine = micrel_init, .timer = &ks8695_timer, MACHINE_END ks8695_map_io()->iotable_init()
will be called in pageing_init/devicemaps_init in arch/mm.c
static struct __initdata map_desc ks8695_io_desc[] = {
{ .virtual = KS8695_IO_VA, .pfn = __phys_to_pfn(KS8695_IO_PA), .length = KS8695_IO_SIZE, .type = MT_DEVICE, } }; irq.c
You should provide the XXX_init_irq function here. This sets
up the interrupt controller.Interrupt mask and unmask func- tions
=================================================================
=================================================================
STEP 3: include files
[asm-arm/arch-ks8695/]|[asm-arm/]memroy.h
PHYS_OFFSET
refer to /documents/arm/porting and documents/arm/memory.txt | |
|