summaryrefslogtreecommitdiff
path: root/packages/linux/compulab-pxa270-2.6.20/0003-ramdisk_load.patch
blob: b96ae410f57fc3beddb9adf0ed2d751cf896c210 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
From nobody Mon Sep 17 00:00:00 2001
From: Cliff Brake <cbrake@happy.dev.bec-systems.com>
Date: Fri Mar 16 23:23:10 2007 -0400
Subject: [PATCH] ramdisk_load

initramfs loading fix

---

 init/initramfs.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

base 32abeb7a135309651fabb41ebfab98c9f6b67dbf
last a34beb5936e5819d8b2d51b153434825700463ef
diff --git a/init/initramfs.c b/init/initramfs.c
index 4fa0f7977de1a16db501d91c3c9b062cb7898c2d..545d1cd9dfffeb88835cc2f219db51497c963449 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -535,6 +535,16 @@ static int __init populate_rootfs(void)
 #ifdef CONFIG_BLK_DEV_INITRD
 	if (initrd_start) {
 #ifdef CONFIG_BLK_DEV_RAM
+ 
+		/* hack to make initramfs work because the 
+		 * compulab BL does not zero out the 
+		 * initrd memory
+		 */
+ 		int initrd_size = *(int *)(0xef9c0000);
+ 		initrd_end = initrd_start + initrd_size;
+ 		//printk("CLIFF: initrd_start = 0x%x\n", initrd_start);
+ 		//printk("CLIFF: initrd_end = 0x%x\n", initrd_end);
+
 		int fd;
 		printk(KERN_INFO "checking if image is initramfs...");
 		err = unpack_to_rootfs((char *)initrd_start,
-- 
1.4.4.4