📄 rom_drv.c
字号:
#include <bios/s3c2410x.h>#include <bios/config.h>#include <bios/boot.h>#include <bios/malloc.h>#include <bios/time.h>#include <bios/stdio.h>#include <bios/stdioint.h>#include <bios/string.h>#include <bios/gzip.h>#include <bios/nand.h>/* extern variable */extern int _bss_start;extern unsigned long load_addr;/* global variable */unsigned long kn_src;unsigned long kn_dst;static int rom_probe(void){ return 0 ;}static int rom_start(void){ return 0 ;}static int rom_load(void){ u32 decomp_kernel_end, *free_mem_end; kn_dst = (unsigned long)KERNEL_LOAD_BASE; /* 0x30f00000 */ kn_src = (unsigned long)DOWNLOAD_BASE; /* 0x30300000 */ free_mem_end = (u32 *)&_bss_start;#if defined(CONFIG_BOOT_NAND_SIZE_8MB) nand_flash_control(nand_read, 16, 0, (unsigned char *)kn_dst, (1024-128)*1024);#elif defined(CONFIG_BOOT_NAND_SIZE_32MB) || defined(CONFIG_BOOT_NAND_SIZE_64MB) nand_flash_control(nand_read, 9, 0, (unsigned char *)kn_dst, (1024-128)*1024);#endif return 0 ;}static int rom_stop(void){ return 0 ;}struct bootdev boot_rom = { "rom", rom_probe, rom_start, rom_load, rom_stop};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -