* [PATCH] 2.5.5-pre1, allow RAM disk to be build
@ 2002-02-16 18:07 Rudmer van Dijk
2002-02-16 18:18 ` Dave Jones
0 siblings, 1 reply; 3+ messages in thread
From: Rudmer van Dijk @ 2002-02-16 18:07 UTC (permalink / raw)
To: linux-kernel; +Cc: davej
Hi,
since 2.5.x (can't remember version correctly) the setup for RAM disk changed and I could not build it anymore into the kernel due to compilation errors.
In the latest prepatch (2.5.5-pre1) this is still not fixed. I am using the following patch to fix this and it works from 2.5.x upto 2.5.5-pre1 without any problems.
please apply,
Rudmer
PS. CC me as I am not on the list
--
# diff -uN linux-2.5.5-pre1/arch/i386/kernel/setup.c.orig linux-2.5.5-pre1/arch/i386/kernel/setup.c
--- linux-2.5.5-pre1/arch/i386/kernel/setup.c.orig Thu Feb 14 20:39:00 2002
+++ linux-2.5.5-pre1/arch/i386/kernel/setup.c Thu Feb 14 20:40:17 2002
@@ -661,7 +661,9 @@
unsigned long bootmap_size, low_mem_size;
unsigned long start_pfn, max_low_pfn;
int i;
-
+#ifdef CONFIG_BLK_DEV_RAM
+ extern int rd_image_start, rd_prompt, rd_doload;
+#endif
#ifdef CONFIG_VISWS
visws_get_board_type_and_rev();
#endif
--
Get your free email from www.linuxmail.org
Powered by Outblaze
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] 2.5.5-pre1, allow RAM disk to be build
2002-02-16 18:07 Rudmer van Dijk
@ 2002-02-16 18:18 ` Dave Jones
0 siblings, 0 replies; 3+ messages in thread
From: Dave Jones @ 2002-02-16 18:18 UTC (permalink / raw)
To: Rudmer van Dijk; +Cc: linux-kernel
On Sun, Feb 17, 2002 at 02:07:35AM +0800, Rudmer van Dijk wrote:
> since 2.5.x (can't remember version correctly) the setup for RAM disk changed and I could not build it anymore into the kernel due to compilation errors.
> In the latest prepatch (2.5.5-pre1) this is still not fixed. I am using the following patch to fix this and it works from 2.5.x upto 2.5.5-pre1 without any problems.
The real fix I think is to fix include/linux/blk.h
setup.c uses it inside CONFIG_BLK_DEV_RAM, but blk.h
only defines it with CONFIG_BLK_DEV_INITRD
--
| Dave Jones. http://www.codemonkey.org.uk
| SuSE Labs
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] 2.5.5-pre1, allow RAM disk to be build
@ 2002-02-16 20:41 Rudmer van Dijk
0 siblings, 0 replies; 3+ messages in thread
From: Rudmer van Dijk @ 2002-02-16 20:41 UTC (permalink / raw)
To: davej; +Cc: linux-kernel
From: Dave Jones <davej@suse.de>
> On Sun, Feb 17, 2002 at 02:07:35AM +0800, Rudmer van Dijk wrote:
> > since 2.5.x (can't remember version correctly) the setup for RAM disk changed and I could not build it anymore into the kernel due to compilation errors.
> > In the latest prepatch (2.5.5-pre1) this is still not fixed. I am using the following patch to fix this and it works from 2.5.x upto 2.5.5-pre1 without any problems.
>
> The real fix I think is to fix include/linux/blk.h
> setup.c uses it inside CONFIG_BLK_DEV_RAM, but blk.h
> only defines it with CONFIG_BLK_DEV_INITRD
>
It was a quick fix because I thought someone else was going to fix it...
How about the following patch?
kernel builds and boots with patch (with CONFIG_BLK_DEV_INITRD disabled).
I think this is unrelated but I suddenly got the following messages while trying to build another kernel:
Feb 18 00:02:51 frodo kernel: hdc: lost interrupt
Feb 18 00:03:31 frodo last message repeated 4 times
Feb 18 00:04:31 frodo last message repeated 6 times
Feb 18 00:05:31 frodo last message repeated 6 times
Feb 18 00:06:31 frodo last message repeated 6 times
now my some files (including gcc) are screwed and I cannot test this patch with CONFIG_BLK_DEV_INITRD enabled...
Rudmer
--
frodo:/home/rudmer/linux-2.5.5-pre1 # diff -uN include/linux/blk.h.orig include/linux/blk.h
--- include/linux/blk.h.orig Sun Feb 17 20:27:28 2002
+++ include/linux/blk.h Sun Feb 17 19:49:27 2002
@@ -16,18 +16,24 @@
extern void set_device_ro(kdev_t dev,int flag);
extern void add_blkdev_randomness(int major);
+#ifdef CONFIG_BLK_DEV_RAM
+
+extern int rd_doload; /* 1 = load ramdisk, 0 = don't load */
+extern int rd_prompt; /* 1 = prompt for ramdisk, 0 = don't prompt */
+extern int rd_image_start; /* starting block # of image */
+
#ifdef CONFIG_BLK_DEV_INITRD
#define INITRD_MINOR 250 /* shouldn't collide with /dev/ram* too soon ... */
extern unsigned long initrd_start,initrd_end;
extern int initrd_below_start_ok; /* 1 if it is not an error if initrd_start < memory_start */
-extern int rd_doload; /* 1 = load ramdisk, 0 = don't load */
-extern int rd_prompt; /* 1 = prompt for ramdisk, 0 = don't prompt */
-extern int rd_image_start; /* starting block # of image */
void initrd_init(void);
+#endif /* CONFIG_BLK_DEV_INITRD */
+
#endif
+
/*
* end_request() and friends. Must be called with the request queue spinlock
* acquired. All functions called within end_request() _must_be_ atomic.
--
Get your free email from www.linuxmail.org
Powered by Outblaze
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-02-16 20:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-02-16 20:41 [PATCH] 2.5.5-pre1, allow RAM disk to be build Rudmer van Dijk
-- strict thread matches above, loose matches on Subject: below --
2002-02-16 18:07 Rudmer van Dijk
2002-02-16 18:18 ` Dave Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox