mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-24 03:11:32 +02:00
[rdc] provide the correct flash mapping on non airlink devices, remove the rootfs_type hacks, patch from sn9
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@18327 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
80bb9da84f
commit
6832337740
@ -35,7 +35,7 @@ CONFIG_BOUNCE=y
|
|||||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||||
# CONFIG_CC_STACKPROTECTOR is not set
|
# CONFIG_CC_STACKPROTECTOR is not set
|
||||||
CONFIG_CLOCKSOURCE_WATCHDOG=y
|
CONFIG_CLOCKSOURCE_WATCHDOG=y
|
||||||
CONFIG_CMDLINE="console=ttyS0,38400"
|
CONFIG_CMDLINE="console=ttyS0,38400 rootfstype=squashfs,jffs2"
|
||||||
CONFIG_CMDLINE_BOOL=y
|
CONFIG_CMDLINE_BOOL=y
|
||||||
# CONFIG_CMDLINE_OVERRIDE is not set
|
# CONFIG_CMDLINE_OVERRIDE is not set
|
||||||
# CONFIG_COMPAT_NET_DEV_OPS is not set
|
# CONFIG_COMPAT_NET_DEV_OPS is not set
|
||||||
@ -191,13 +191,9 @@ CONFIG_MODULE_FORCE_UNLOAD=y
|
|||||||
# CONFIG_MTD_CFI_INTELEXT is not set
|
# CONFIG_MTD_CFI_INTELEXT is not set
|
||||||
# CONFIG_MTD_COMPLEX_MAPPINGS is not set
|
# CONFIG_MTD_COMPLEX_MAPPINGS is not set
|
||||||
# CONFIG_MTD_NETSC520 is not set
|
# CONFIG_MTD_NETSC520 is not set
|
||||||
|
CONFIG_MTD_PHYSMAP=y
|
||||||
# CONFIG_MTD_R8610 is not set
|
# CONFIG_MTD_R8610 is not set
|
||||||
CONFIG_MTD_RDC3210=y
|
# CONFIG_MTD_RDC3210 is not set
|
||||||
CONFIG_MTD_RDC3210_ALLOW_JFFS2=y
|
|
||||||
CONFIG_MTD_RDC3210_BUSWIDTH=2
|
|
||||||
# CONFIG_MTD_RDC3210_FACTORY_PRESENT is not set
|
|
||||||
CONFIG_MTD_RDC3210_SIZE=0x400000
|
|
||||||
# CONFIG_MTD_RDC3210_STATIC_MAP is not set
|
|
||||||
# CONFIG_MTD_TS5500 is not set
|
# CONFIG_MTD_TS5500 is not set
|
||||||
# CONFIG_MTRR is not set
|
# CONFIG_MTRR is not set
|
||||||
# CONFIG_MVIAC3_2 is not set
|
# CONFIG_MVIAC3_2 is not set
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Generic RDC321x platform devices
|
* Generic RDC321x platform devices
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007-2008 OpenWrt.org
|
* Copyright (C) 2007-2009 OpenWrt.org
|
||||||
* Copyright (C) 2007 Florian Fainelli <florian@openwrt.org>
|
* Copyright (C) 2007 Florian Fainelli <florian@openwrt.org>
|
||||||
* Copyright (C) 2008 Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
|
* Copyright (C) 2008-2009 Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
@ -157,7 +157,7 @@ static int __init rdc_board_setup(void)
|
|||||||
{
|
{
|
||||||
#ifndef CONFIG_MTD_RDC3210
|
#ifndef CONFIG_MTD_RDC3210
|
||||||
struct map_info rdc_map_info;
|
struct map_info rdc_map_info;
|
||||||
u32 the_header[4];
|
u32 the_header[8];
|
||||||
|
|
||||||
ROOT_DEV = 0;
|
ROOT_DEV = 0;
|
||||||
rdc_map_info.name = rdc_flash_device.name;
|
rdc_map_info.name = rdc_flash_device.name;
|
||||||
@ -181,10 +181,36 @@ static int __init rdc_board_setup(void)
|
|||||||
the_header[2] = ((u32 *)rdc_map_info.virt)[2];
|
the_header[2] = ((u32 *)rdc_map_info.virt)[2];
|
||||||
the_header[3] = ((u32 *)rdc_map_info.virt)[3];
|
the_header[3] = ((u32 *)rdc_map_info.virt)[3];
|
||||||
iounmap(rdc_map_info.virt);
|
iounmap(rdc_map_info.virt);
|
||||||
|
rdc_map_info.virt = ioremap_nocache(rdc_map_info.phys + 0x8000, 0x10);
|
||||||
|
if (rdc_map_info.virt == NULL)
|
||||||
|
panic("Could not ioremap to read device magic!");
|
||||||
|
the_header[4] = ((u32 *)rdc_map_info.virt)[0];
|
||||||
|
the_header[5] = ((u32 *)rdc_map_info.virt)[1];
|
||||||
|
the_header[6] = ((u32 *)rdc_map_info.virt)[2];
|
||||||
|
the_header[7] = ((u32 *)rdc_map_info.virt)[3];
|
||||||
|
iounmap(rdc_map_info.virt);
|
||||||
if (!memcmp(the_header, "GMTK", 4)) { /* Gemtek */
|
if (!memcmp(the_header, "GMTK", 4)) { /* Gemtek */
|
||||||
/* TODO */
|
/* TODO */
|
||||||
} else if (!memcmp(the_header, "CSYS", 4)) { /* Sitecom */
|
} else if (!memcmp(the_header + 4, "CSYS", 4)) { /* Sitecom */
|
||||||
/* TODO */
|
rdc_flash_parts[0].name = "system";
|
||||||
|
rdc_flash_parts[0].offset = 0;
|
||||||
|
rdc_flash_parts[0].size = rdc_map_info.size - 0x10000;
|
||||||
|
rdc_flash_parts[1].name = "config";
|
||||||
|
rdc_flash_parts[1].offset = 0;
|
||||||
|
rdc_flash_parts[1].size = 0x8000;
|
||||||
|
rdc_flash_parts[2].name = "magic";
|
||||||
|
rdc_flash_parts[2].offset = 0x8000;
|
||||||
|
rdc_flash_parts[2].size = 0x14;
|
||||||
|
rdc_flash_parts[3].name = "kernel";
|
||||||
|
rdc_flash_parts[3].offset = 0x8014;
|
||||||
|
rdc_flash_parts[3].size = the_header[5];
|
||||||
|
rdc_flash_parts[4].name = "rootfs";
|
||||||
|
rdc_flash_parts[4].offset = 0x8014 + the_header[5];
|
||||||
|
rdc_flash_parts[4].size = rdc_flash_parts[0].size - rdc_flash_parts[4].offset;
|
||||||
|
rdc_flash_parts[5].name = "bootloader";
|
||||||
|
rdc_flash_parts[5].offset = rdc_flash_parts[0].size;
|
||||||
|
rdc_flash_parts[5].size = 0x10000;
|
||||||
|
rdc_flash_data.nr_parts = 6;
|
||||||
} else if (!memcmp(((u8 *)the_header) + 14, "Li", 2)) { /* AMIT */
|
} else if (!memcmp(((u8 *)the_header) + 14, "Li", 2)) { /* AMIT */
|
||||||
rdc_flash_parts[0].name = "kernel_parthdr";
|
rdc_flash_parts[0].name = "kernel_parthdr";
|
||||||
rdc_flash_parts[0].offset = 0;
|
rdc_flash_parts[0].offset = 0;
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
--- a/init/do_mounts.c
|
|
||||||
+++ b/init/do_mounts.c
|
|
||||||
@@ -191,6 +191,8 @@ static void __init get_fs_names(char *pa
|
|
||||||
{
|
|
||||||
char *s = page;
|
|
||||||
|
|
||||||
+ if (!root_fs_names)
|
|
||||||
+ root_fs_names = "squashfs,jffs2";
|
|
||||||
if (root_fs_names) {
|
|
||||||
strcpy(page, root_fs_names);
|
|
||||||
while (*s++) {
|
|
Loading…
Reference in New Issue
Block a user