Changeset 10035


Ignore:
Timestamp:
07/29/08 18:01:09 (5 years ago)
Author:
BrainSlayer
Message:

correct flashmap and kernel config

Location:
src/linux/sl2312/linux-2.6.23
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/linux/sl2312/linux-2.6.23/.config_storm

    r9980 r10035  
    22# Automatically generated make config: don't edit 
    33# Linux kernel version: 2.6.23.17 
    4 # Thu Jul 24 15:50:53 2008 
     4# Tue Jul 29 15:18:19 2008 
    55# 
    66CONFIG_ARM=y 
     
    210210CONFIG_ZBOOT_ROM_TEXT=0 
    211211CONFIG_ZBOOT_ROM_BSS=0 
    212 CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/mtdblock5 rootfstype=squashfs noinitrd" 
     212CONFIG_CMDLINE="console=ttyS0,19200 root=/dev/mtdblock5 rootfstype=squashfs noinitrd" 
    213213# CONFIG_XIP_KERNEL is not set 
    214214# CONFIG_KEXEC is not set 
     
    545545# CONFIG_MTD_CONCAT is not set 
    546546CONFIG_MTD_PARTITIONS=y 
    547 CONFIG_MTD_REDBOOT_PARTS=y 
    548 CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-3 
    549 CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y 
    550 # CONFIG_MTD_REDBOOT_PARTS_READONLY is not set 
     547# CONFIG_MTD_REDBOOT_PARTS is not set 
    551548# CONFIG_MTD_CMDLINE_PARTS is not set 
    552549# CONFIG_MTD_AFS_PARTS is not set 
     
    598595# Mapping drivers for chip access 
    599596# 
    600 CONFIG_MTD_COMPLEX_MAPPINGS=y 
    601 CONFIG_MTD_PHYSMAP=y 
    602 CONFIG_MTD_PHYSMAP_START=0x0 
    603 CONFIG_MTD_PHYSMAP_LEN=0x0 
    604 CONFIG_MTD_PHYSMAP_BANKWIDTH=0 
     597# CONFIG_MTD_COMPLEX_MAPPINGS is not set 
     598# CONFIG_MTD_PHYSMAP is not set 
    605599# CONFIG_MTD_ARM_INTEGRATOR is not set 
    606 # CONFIG_MTD_PCI is not set 
    607600# CONFIG_MTD_PLATRAM is not set 
    608601CONFIG_MTD_SL2312_CFI=y 
     
    10301023CONFIG_PROC_SYSCTL=y 
    10311024CONFIG_DEVFS_FS=y 
    1032 CONFIG_DEVFS_MOUNT=y 
     1025# CONFIG_DEVFS_MOUNT is not set 
    10331026# CONFIG_DEVFS_DEBUG is not set 
    10341027CONFIG_SYSFS=y 
  • src/linux/sl2312/linux-2.6.23/Makefile

    r9991 r10035  
    182182 
    183183ARCH            = $(SUBARCH) 
    184 CROSS_COMPILE   = arm-linux-uclibc- 
     184CROSS_COMPILE   = armeb-linux-uclibc- 
    185185 
    186186# Architecture as present in compile.h 
  • src/linux/sl2312/linux-2.6.23/drivers/mtd/maps/sl2312-flash-cfi.c

    r9980 r10035  
    3434#include <linux/mtd/kvctl.h> 
    3535#include "sl2312_flashmap.h" 
     36#include <linux/squashfs_fs.h> 
    3637 
    3738 
     
    130131        int nr_parts = 0; 
    131132        int ret; 
     133        char *buf; 
     134        unsigned char *p; 
     135        int offset=0; 
    132136#ifndef CONFIG_SL2312_SHARE_PIN 
    133137    unsigned int    reg_val; 
     
    169173//      simple_map_init(&sl2312flash_map); 
    170174 
     175    printk("probe cfi\n"); 
    171176        mtd = do_map_probe("cfi_probe", &sl2312flash_map); 
    172177        if (!mtd) 
     
    182187//    mtd->write = flash_write; 
    183188 
    184     parts = sl2312_partitions; 
     189    printk("scan for squashfs\n"); 
     190       parts = sl2312_partitions; 
    185191        nr_parts = sizeof(sl2312_partitions)/sizeof(*parts); 
     192        buf = sl2312flash_map.virt; 
     193        int erasesize = mtd->erasesize; 
     194        int filesyssize=0; 
     195        int tmplen=0; 
     196        while((offset+erasesize)<mtd->size) 
     197            { 
     198            printk(KERN_EMERG "[0x%08X]\n",offset); 
     199            if (*((__u32 *) buf) == SQUASHFS_MAGIC)  
     200                { 
     201                struct squashfs_super_block *sb = (struct squashfs_super_block *) buf; 
     202                if (*((__u16 *) buf)) 
     203                        { 
     204                        filesyssize = sb->bytes_used; 
     205                        tmplen = offset + filesyssize; 
     206                        tmplen +=  (erasesize - 1); 
     207                        tmplen &= ~(erasesize - 1); 
     208                        filesyssize = tmplen - offset; 
     209                        } 
     210                parts[2].size = filesyssize; 
     211                parts[2].offset = offset; 
     212                parts[3].size = parts[1].size-filesyssize; 
     213                parts[3].offset = offset+filesyssize; 
     214                break; 
     215                } 
     216            offset+=erasesize; 
     217            buf+=erasesize; 
     218            } 
     219 
    186220        ret = add_mtd_partitions(mtd, parts, nr_parts); 
    187221        /*If we got an error, free all resources.*/ 
  • src/linux/sl2312/linux-2.6.23/drivers/mtd/maps/sl2312_flashmap.h

    r9980 r10035  
    1313static struct mtd_partition sl2312_partitions[] = { 
    1414        { name: "RedBoot",       offset: 0x00000000, size: 0x00020000, }, 
    15         { name: "kernel",        offset: 0x00020000, size: 0x00100000, }, 
    16         { name: "rootfs",        offset: 0x00120000, size: 0x00500000, }, 
    17         { name: "rootfs_data",   offset: 0x00620000, size: 0x001A0000, }, 
    18         { name: "VCTL",          offset: 0x007C0000, size: 0x00010000, }, 
    19         { name: "cfg",           offset: 0x007D0000, size: 0x00020000, }, 
     15        { name: "linux",         offset: 0x00020000, size: 0x00760000, }, 
     16        { name: "rootfs",        offset: 0x00000000, size: 0x00000000, }, // variable size 
     17        { name: "ddwrt",         offset: 0x00000000, size: 0x00000000, }, // variable size 
     18        { name: "nvram",         offset: 0x007E0000, size: 0x00010000, }, 
    2019        { name: "FIS directory", offset: 0x007F0000, size: 0x00010000, } 
    2120}; 
Note: See TracChangeset for help on using the changeset viewer.