第一范文网 - 专业文章范例文档资料分享平台

移植Linux内核到norflash

来源:用户分享 时间:2025/6/6 13:00:24 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

与前面不同的是,它打印了芯片的信息,如厂商ID、芯片ID等等。 这是我想不通的地方,也是我采用新内核的原因。

不过,在这片nor flash上使用jffs2文件系统却不成功,出现了大量的警告信息,提示说制作根文件系统时的erase block有问题。 s3c2440-flash.c源代码: /*

* $Id: s3c2410.c,v 1.00 2006/12/05 10:18:14 gleixner Exp $ *

* Handle mapping of the NOR flash on Cogent S3C2410 boards *

* Copyright 2002 SYSGO Real-Time Solutions GmbH * *

This program is free software; you can redistribute it and/or modify *

it under the terms of the GNU General Public License version 2 as

* published by the Free Software Foundation. */ /*

* Late Lee

*

This file is modified and the file name has changed to ‘s3c2440-flash.c’. *

The SMDK2440 board has only one flash bank which is a 64Mbit(4Mx16) SST SST39VF6401B; * 128 x 64 KiB blocks. *

* This code is GPLed. */

#include #include #include #include #include #include #include #include #ifdef CONFIG_MTD_PARTITIONS #include #endif

#define WINDOW_ADDR 0x01000000 /* physical properties of flash */

#define WINDOW_SIZE 0x800000 /* 8MB */ #define BUSWIDTH 2 /* 2*8 = 16 */

#define FLASH_BLOCKSIZE_MAIN 0x10000 /* 64KB(0x10000) 128 blocks */

#define FLASH_NUMBLOCKS_MAIN 128

/* can be “cfi_probe”, “jedec_probe”, “map_rom”, NULL }; */ #define PROBETYPES { “cfi_probe”, “jedec_probe”, “map_rom”, NULL }

#define MSG_PREFIX “S3C2440-NOR:” /* prefix for our printk()’s */

#define MTDID “s3c2440-nor” /* for mtdparts= partitioning */

#define DEBUG_FLASH #ifdef DEBUG_FLASH

#define flash_debug(fmt, args…) printk(KERN_NOTICE “## LL debug “ MSG_PREFIX fmt, ##args) #else

#define flash_debug(fmt, args…) #endif

static struct mtd_info *mymtd;

struct map_info s3c2440nor_map = {

.name = “NOR Flash(SST39VF6401B) on S3C2440″, .size = WINDOW_SIZE, .bankwidth = BUSWIDTH, .phys = WINDOW_ADDR, };

#ifdef CONFIG_MTD_PARTITIONS /*

* MTD partitioning stuff */

static struct mtd_partition static_partitions[] = { /*0: U-Boot: 0-0x30000 0x30000=192KB*/ {

.name = “U-Boot”, .size = 0x030000, .offset = 0x0, },

/*1: Kernel: 0x30000-0x240000 0x210000=2112KB=2.0625MB*/ {

.name = “Kernel”, .size = 0x210000, .offset = 0x30000,

搜索更多关于: 移植Linux内核到norflash 的文档
移植Linux内核到norflash.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c6i7n393xmz9nplx1m54t1j03v4iv5u00auy_4.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top