diff options
author | Felix Fietkau <nbd@openwrt.org> | 2007-09-06 16:27:37 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2007-09-06 16:27:37 +0000 |
commit | 92558d67a463bfbb351d30e28648de03b635f024 (patch) | |
tree | a5d41b991a151e72663527a96fbc6c494565d65c /target/linux/etrax/patches/cris/016-auto-detect-ram.patch | |
parent | e1dbce411cd2a3a067f387cee011cd889486a07d (diff) | |
download | master-187ad058-92558d67a463bfbb351d30e28648de03b635f024.tar.gz master-187ad058-92558d67a463bfbb351d30e28648de03b635f024.tar.bz2 master-187ad058-92558d67a463bfbb351d30e28648de03b635f024.zip |
strip the kernel version suffix from target directories, except for brcm-2.4 (the -2.4 will be included in the board name here). CONFIG_LINUX_<ver>_<board> becomes CONFIG_TARGET_<board>, same for profiles.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@8653 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/etrax/patches/cris/016-auto-detect-ram.patch')
-rw-r--r-- | target/linux/etrax/patches/cris/016-auto-detect-ram.patch | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/target/linux/etrax/patches/cris/016-auto-detect-ram.patch b/target/linux/etrax/patches/cris/016-auto-detect-ram.patch new file mode 100644 index 0000000000..51930f2ce2 --- /dev/null +++ b/target/linux/etrax/patches/cris/016-auto-detect-ram.patch @@ -0,0 +1,101 @@ +diff -urN linux-2.6.19.2//arch/cris/arch-v10/boot/compressed/hw_settings.S /tmp/linux-2.6.19.2/arch/cris/arch-v10/boot/compressed/hw_settings.S +--- linux-2.6.19.2//arch/cris/arch-v10/boot/compressed/hw_settings.S 2007-06-01 00:37:57.000000000 +0200 ++++ /tmp/linux-2.6.19.2/arch/cris/arch-v10/boot/compressed/hw_settings.S 2007-06-01 00:34:55.000000000 +0200 +@@ -62,3 +62,5 @@ + .dword 0 ; No more register values + .ascii "ACME_PART_MAGIC" ; Magic number + .dword 0xdeadc0de ++ .ascii "ACME_RAM_MAGIC" ; Magic number ++ .dword 0x2000000 +diff -urN linux-2.6.19.2//arch/cris/arch-v10/boot/compressed/hw_settings_416.S /tmp/linux-2.6.19.2/arch/cris/arch-v10/boot/compressed/hw_settings_416.S +--- linux-2.6.19.2//arch/cris/arch-v10/boot/compressed/hw_settings_416.S 2007-06-01 00:37:57.000000000 +0200 ++++ /tmp/linux-2.6.19.2/arch/cris/arch-v10/boot/compressed/hw_settings_416.S 2007-06-01 00:34:55.000000000 +0200 +@@ -62,3 +62,5 @@ + .dword 0 ; No more register values + .ascii "ACME_PART_MAGIC" ; Magic number + .dword 0xdeadc0de ++ .ascii "ACME_RAM_MAGIC" ; Magic number ++ .dword 0x1000000 +diff -urN linux-2.6.19.2//arch/cris/arch-v10/boot/compressed/hw_settings_816.S /tmp/linux-2.6.19.2/arch/cris/arch-v10/boot/compressed/hw_settings_816.S +--- linux-2.6.19.2//arch/cris/arch-v10/boot/compressed/hw_settings_816.S 2007-06-01 00:37:57.000000000 +0200 ++++ /tmp/linux-2.6.19.2/arch/cris/arch-v10/boot/compressed/hw_settings_816.S 2007-06-01 00:34:55.000000000 +0200 +@@ -62,3 +62,5 @@ + .dword 0 ; No more register values + .ascii "ACME_PART_MAGIC" ; Magic number + .dword 0xdeadc0de ++ .ascii "ACME_RAM_MAGIC" ; Magic number ++ .dword 0x1000000 +diff -urN linux-2.6.19.2//arch/cris/arch-v10/boot/compressed/hw_settings_832.S /tmp/linux-2.6.19.2/arch/cris/arch-v10/boot/compressed/hw_settings_832.S +--- linux-2.6.19.2//arch/cris/arch-v10/boot/compressed/hw_settings_832.S 2007-06-01 00:37:57.000000000 +0200 ++++ /tmp/linux-2.6.19.2/arch/cris/arch-v10/boot/compressed/hw_settings_832.S 2007-06-01 00:34:55.000000000 +0200 +@@ -62,3 +62,5 @@ + .dword 0 ; No more register values + .ascii "ACME_PART_MAGIC" ; Magic number + .dword 0xdeadc0de ++ .ascii "ACME_RAM_MAGIC" ; Magic number ++ .dword 0x2000000 +diff -urN linux-2.6.19.2//arch/cris/arch-v10/boot/compressed/hw_settings_MCM.S /tmp/linux-2.6.19.2/arch/cris/arch-v10/boot/compressed/hw_settings_MCM.S +--- linux-2.6.19.2//arch/cris/arch-v10/boot/compressed/hw_settings_MCM.S 2007-06-01 00:37:57.000000000 +0200 ++++ /tmp/linux-2.6.19.2/arch/cris/arch-v10/boot/compressed/hw_settings_MCM.S 2007-06-01 00:34:55.000000000 +0200 +@@ -62,3 +62,5 @@ + .dword 0 ; No more register values + .ascii "ACME_PART_MAGIC" ; Magic number + .dword 0xdeadc0de ++ .ascii "ACME_RAM_MAGIC" ; Magic number ++ .dword 0x1000000 +--- linux-2.6.19.2//arch/cris/kernel/setup.c 2007-06-01 00:37:55.000000000 +0200 ++++ /tmp/linux-2.6.19.2/arch/cris/kernel/setup.c 2007-06-01 00:34:55.000000000 +0200 +@@ -55,6 +55,13 @@ + * boot code and the system. + * + */ ++#ifdef CONFIG_CRIS_LOW_MAP ++#define FLASH_UNCACHED_ADDR KSEG_8 ++#define FLASH_CACHED_ADDR KSEG_5 ++#else ++#define FLASH_UNCACHED_ADDR KSEG_E ++#define FLASH_CACHED_ADDR KSEG_F ++#endif + + void __init + setup_arch(char **cmdline_p) +@@ -63,15 +70,37 @@ + unsigned long bootmap_size; + unsigned long start_pfn, max_pfn; + unsigned long memory_start; +- ++ unsigned int ram_size = 0; ++ unsigned char *flash_mem = (unsigned char*)(FLASH_CACHED_ADDR); ++ unsigned int ram_scan_count = 0; ++ const char *ram_magic = "ACME_RAM_MAGIC"; ++ unsigned int magic_len = strlen(ram_magic); ++ unsigned long dend; + /* register an initial console printing routine for printk's */ + + init_etrax_debug(); + + /* we should really poll for DRAM size! */ ++ printk(KERN_INFO "Determinig RAM size\n"); ++ for(ram_scan_count = 0; ram_scan_count < 100000; ram_scan_count++){ ++ if(strncmp(&flash_mem[ram_scan_count], ram_magic, magic_len - 1) == 0){ ++ ram_size = flash_mem[ram_scan_count + magic_len ]; ++ ram_size <<= 8; ++ ram_size += flash_mem[ram_scan_count + magic_len + 2]; ++ ram_size <<= 8; ++ ram_size += flash_mem[ram_scan_count + magic_len + 1]; ++ ram_size <<= 8; ++ ram_size += flash_mem[ram_scan_count + magic_len + 3]; ++ printk(KERN_INFO "RAM size is %uMB\n", 16 * ram_size); ++ ram_scan_count = 1100000; ++ } ++ } + + high_memory = &dram_end; +- ++ dend = dram_start + 16 * 1024 * 1024 * ram_size; ++ if(ram_size == 1){ ++ high_memory = 0xc1000000; ++ } + if(romfs_in_flash || !romfs_length) { + /* if we have the romfs in flash, or if there is no rom filesystem, + * our free area starts directly after the BSS |