Linux 移植 (S3C2410)
V1.0
email: mesmerli@hotmail.com
目錄結構:
- rootfs
- linux
- include
- asm-arm
- arch-creator-s3c2410
- vmalloc.h
- uncompress.h.org
- uncompress.h
- timex.h
- time.h
- system.h
- s3c2410ASM.h
- s3c2410_ts.h
- s3c2410_org.h
- s3c2410.h
- power.h
- memory.h
- keyboard.h
- irqs.h
- irq.h
- io.h
- hardware.h
- dma.h
- arch-creator-s3c2410
- asm-arm
- fs
- binfmt_elf.c
- drivers
- net
- Makefile
- Config.in
- net
- arch
- arm
- mach-creator-s3c2410
- Sleep.S
- power_func.c
- power.c
- pcipool.h
- pcipool.c
- mm.c (映射I/O位址)
- Makefile
- leds.c
- kapmd.c
- irq.c (設定中斷向量)
- dma.c
- arch.c (設定實體記憶體位址)
- apm.c
- kernel
- irq.c (matched)
- def-configs
- create-2410-ramdisk (Make XConfig 用的設定檔)
- boot
- compressed
- head-s3c2410.S (啟動程式碼)
- compressed
- Makefikle
- config.in
- mach-creator-s3c2410
- arm
- Makefile
- .config
- include
- ext2
跨平台編譯
/usr/src/creator/s3c2410/linux/Makefile
對 ARM 指令集的編譯要使用 arm-linux-gcc
記憶體位址設定
/usr/src/creator/s3c2410/linux/arch/arm/Makefile
VA 0xC0000000 (3GB) 以上為 Kernel Space,對應到 PA 0x30000000 的 SDRAM
VA Virtual Address
PA Physical Address
arch/arm/vmlinux-armv.ld
linker ld 的腳本
TEXTADDR Kernel 在 VA 的執行位址
ZRELADDR 解壓縮後的 Kernel 在 RAM 的位置 (PA)
PHYS_OFFSET SDRAM 的位址
設定 RAM 的大小 與 週邊暫存器在 VA 的對應位址
arch
static void __init #ifdef CONFIG_BLK_DEV_RAM #ifdef CONFIG_BLK_DEV_RAM_SIZE #ifdef CONFIG_BLK_DEV_INITRD #endif static void __init s3c2410_map_io(void)
|
實際定義週邊暫存器基底位址的地方
arch
static struct map_desc standard_io_desc[] __initdata = {
|
啟動程式碼設定
中斷系統設定
arch
s3c2410_init_irq(void) { request_resource(&iomem_resource, &irq_resource); /* disable all IRQs */ /* all IRQs are IRQ, not FIQ /* clear Source/Interrupt Pending Register */ /* Define irq handler */ irq_desc[IRQ_RESERVED6].valid = 0; irq_desc[IRQ_EINT4_7].valid = 0; irq_desc[IRQ_EINT0].valid = 0; for (irq=NORMAL_IRQ_OFFSET; irq < EXT_IRQ_OFFSET; irq++) { for (irq=EXT_IRQ_OFFSET; irq < SUB_IRQ_OFFSET; irq++) { |
Make xconfig 選單設定
drivers
if [ "$CONFIG_ARCH_CAMELOT" = "y" ]; then
if [ "$CONFIG_NET_PCI" = "y" ]; then dep_tristate ' Apricot Xen-II on board Ethernet' CONFIG_APRICOT $CONFIG_ISA |
drivers
obj-$(CONFIG_CS89x0) += cs89x0.o
|
使用 Domingo 除錯核心
0 意見:
張貼留言