LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* alpha 2.4.11-pre3: fix bootp initrd
@ 2001-10-05  1:18 Richard Henderson
  0 siblings, 0 replies; only message in thread
From: Richard Henderson @ 2001-10-05  1:18 UTC (permalink / raw)
  To: torvalds, alan; +Cc: linux-kernel

>From Jay Estabrook:

At some point the bootp image builder broke wrt initrd.

There is a definition of INITRD_SIZE in <asm/system.h>
that defines how the running kernel gets hold of this
size, which conflicts with the INITRD_SIZE used in the
bootstrap code.

So rename the variable in the bootstrap code.


r~



diff -rup 2.4.10-dist/arch/alpha/boot/Makefile 2.4.10/arch/alpha/boot/Makefile
--- 2.4.10-dist/arch/alpha/boot/Makefile	Mon Sep 25 12:36:09 2000
+++ 2.4.10/arch/alpha/boot/Makefile	Thu Oct  4 16:05:16 2001
@@ -59,7 +59,7 @@ ksize.h: vmlinux.nh dummy
 	echo "#define KERNEL_SIZE `ls -l vmlinux.nh | awk '{print $$5}'`" > $@T
 ifdef INITRD
 	[ -f $(INITRD) ] || exit 1
-	echo "#define INITRD_SIZE `ls -l $(INITRD) | awk '{print $$5}'`" >> $@T
+	echo "#define INITRD_IMAGE_SIZE `ls -l $(INITRD) | awk '{print $$5}'`" >> $@T
 endif
 	cmp -s $@T $@ || mv -f $@T $@
 	rm -f $@T
diff -rup 2.4.10-dist/arch/alpha/boot/bootp.c 2.4.10/arch/alpha/boot/bootp.c
--- 2.4.10-dist/arch/alpha/boot/bootp.c	Mon Jun 19 17:59:32 2000
+++ 2.4.10/arch/alpha/boot/bootp.c	Thu Oct  4 16:05:16 2001
@@ -147,7 +147,7 @@ start_kernel(void)
 	 */
 	static long nbytes;
 	static char envval[256] __attribute__((aligned(8)));
-#ifdef INITRD_SIZE
+#ifdef INITRD_IMAGE_SIZE
 	static unsigned long initrd_start;
 #endif
 
@@ -164,7 +164,7 @@ start_kernel(void)
 	}
 	pal_init();
 
-#ifdef INITRD_SIZE
+#ifdef INITRD_IMAGE_SIZE
 	/* The initrd must be page-aligned.  See below for the 
 	   cause of the magic number 5.  */
 	initrd_start = ((START_ADDR + 5*KERNEL_SIZE) | (PAGE_SIZE-1)) + 1;
@@ -192,17 +192,17 @@ start_kernel(void)
 	 *
 	 * Sigh...  */
 
-#ifdef INITRD_SIZE
-	load(initrd_start, KERNEL_ORIGIN+KERNEL_SIZE, INITRD_SIZE);
+#ifdef INITRD_IMAGE_SIZE
+	load(initrd_start, KERNEL_ORIGIN+KERNEL_SIZE, INITRD_IMAGE_SIZE);
 #endif
         load(START_ADDR+(4*KERNEL_SIZE), KERNEL_ORIGIN, KERNEL_SIZE);
         load(START_ADDR, START_ADDR+(4*KERNEL_SIZE), KERNEL_SIZE);
 
 	memset((char*)ZERO_PGE, 0, PAGE_SIZE);
 	strcpy((char*)ZERO_PGE, envval);
-#ifdef INITRD_SIZE
+#ifdef INITRD_IMAGE_SIZE
 	((long *)(ZERO_PGE+256))[0] = initrd_start;
-	((long *)(ZERO_PGE+256))[1] = INITRD_SIZE;
+	((long *)(ZERO_PGE+256))[1] = INITRD_IMAGE_SIZE;
 #endif
 
 	runkernel();

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-10-05  1:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-05  1:18 alpha 2.4.11-pre3: fix bootp initrd Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).