From nobody Mon Sep 17 00:00:00 2001 From: Cliff Brake 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