rpms/kernel/devel linux-2.6.14-ppc-initrd.patch, NONE, 1.1 Makefile.config, 1.29, 1.30 kernel-2.6.spec, 1.1638, 1.1639

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Wed Nov 2 22:24:58 UTC 2005


Author: dwmw2

Update of /cvs/dist/rpms/kernel/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv14768

Modified Files:
	Makefile.config kernel-2.6.spec 
Added Files:
	linux-2.6.14-ppc-initrd.patch 
Log Message:
Switch ppc to arch/powerpc too

linux-2.6.14-ppc-initrd.patch:
 setup-common.c |   40 ++++++++++++++++++++++++++++++++++++++++
 setup_32.c     |    1 +
 setup_64.c     |   37 -------------------------------------
 3 files changed, 41 insertions(+), 37 deletions(-)

--- NEW FILE linux-2.6.14-ppc-initrd.patch ---
--- linux-2.6.14/arch/powerpc/kernel/setup_64.c~	2005-11-02 16:58:56.000000000 +0000
+++ linux-2.6.14/arch/powerpc/kernel/setup_64.c	2005-11-02 22:15:30.000000000 +0000
@@ -478,43 +478,6 @@ static void __init initialize_cache_info
 	DBG(" <- initialize_cache_info()\n");
 }
 
-static void __init check_for_initrd(void)
-{
-#ifdef CONFIG_BLK_DEV_INITRD
-	u64 *prop;
-
-	DBG(" -> check_for_initrd()\n");
-
-	if (of_chosen) {
-		prop = (u64 *)get_property(of_chosen,
-				"linux,initrd-start", NULL);
-		if (prop != NULL) {
-			initrd_start = (unsigned long)__va(*prop);
-			prop = (u64 *)get_property(of_chosen,
-					"linux,initrd-end", NULL);
-			if (prop != NULL) {
-				initrd_end = (unsigned long)__va(*prop);
-				initrd_below_start_ok = 1;
-			} else
-				initrd_start = 0;
-		}
-	}
-
-	/* If we were passed an initrd, set the ROOT_DEV properly if the values
-	 * look sensible. If not, clear initrd reference.
-	 */
-	if (initrd_start >= KERNELBASE && initrd_end >= KERNELBASE &&
-	    initrd_end > initrd_start)
-		ROOT_DEV = Root_RAM0;
-	else
-		initrd_start = initrd_end = 0;
-
-	if (initrd_start)
-		printk("Found initrd at 0x%lx:0x%lx\n", initrd_start, initrd_end);
-
-	DBG(" <- check_for_initrd()\n");
-#endif /* CONFIG_BLK_DEV_INITRD */
-}
 
 /*
  * Do some initial setup of the system.  The parameters are those which 
--- linux-2.6.14/arch/powerpc/kernel/setup-common.c~	2005-11-02 16:58:56.000000000 +0000
+++ linux-2.6.14/arch/powerpc/kernel/setup-common.c	2005-11-02 22:15:23.000000000 +0000
@@ -410,3 +410,43 @@ static int __init set_preferred_console(
 }
 console_initcall(set_preferred_console);
 #endif /* CONFIG_PPC_MULTIPLATFORM */
+
+void __init check_for_initrd(void)
+{
+#ifdef CONFIG_BLK_DEV_INITRD
+	unsigned long *prop;
+
+	DBG(" -> check_for_initrd()\n");
+
+	if (of_chosen) {
+		prop = (unsigned long *)get_property(of_chosen,
+				"linux,initrd-start", NULL);
+		if (prop != NULL) {
+			initrd_start = (unsigned long)__va(*prop);
+			prop = (unsigned long *)get_property(of_chosen,
+					"linux,initrd-end", NULL);
+			if (prop != NULL) {
+				initrd_end = (unsigned long)__va(*prop);
+				initrd_below_start_ok = 1;
+			} else
+				initrd_start = 0;
+		}
+	}
+
+	/* If we were passed an initrd, set the ROOT_DEV properly if the values
+	 * look sensible. If not, clear initrd reference.
+	 */
+	if (initrd_start >= KERNELBASE && initrd_end >= KERNELBASE &&
+	    initrd_end > initrd_start)
+		ROOT_DEV = Root_RAM0;
+	else {
+		printk("Bogus initrd %08lx %08lx\n", initrd_start, initrd_end);
+		initrd_start = initrd_end = 0;
+	}
+
+	if (initrd_start)
+		printk("Found initrd at 0x%lx:0x%lx\n", initrd_start, initrd_end);
+
+	DBG(" <- check_for_initrd()\n");
+#endif /* CONFIG_BLK_DEV_INITRD */
+}
--- linux-2.6.14/arch/powerpc/kernel/setup_32.c~	2005-11-02 16:58:16.000000000 +0000
+++ linux-2.6.14/arch/powerpc/kernel/setup_32.c	2005-11-02 22:17:38.000000000 +0000
@@ -286,6 +286,7 @@ void __init setup_arch(char **cmdline_p)
 	loops_per_jiffy = 500000000 / HZ;
 
 	unflatten_device_tree();
+	check_for_initrd();
 	finish_device_tree();
 
 #ifdef CONFIG_BOOTX_TEXT


Index: Makefile.config
===================================================================
RCS file: /cvs/dist/rpms/kernel/devel/Makefile.config,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- Makefile.config	2 Nov 2005 17:29:05 -0000	1.29
+++ Makefile.config	2 Nov 2005 22:24:54 -0000	1.30
@@ -104,10 +104,10 @@
 	perl scripts/merge.pl $^ s390 > $@
 
 kernel-$(VERSION)-ppc.config: configs/config-ppc-pmac temp-ppc-generic
-	perl scripts/merge.pl $^ ppc > $@
+	perl scripts/merge.pl $^ powerpc > $@
 
 kernel-$(VERSION)-ppc-smp.config: configs/config-ppc-pmac-smp temp-ppc-generic
-	perl scripts/merge.pl $^ ppc > $@
+	perl scripts/merge.pl $^ powerpc > $@
 
 kernel-$(VERSION)-ia64.config: configs/config-ia64 temp-ia64-generic
 	perl scripts/merge.pl $^ ia64 > $@


Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/dist/rpms/kernel/devel/kernel-2.6.spec,v
retrieving revision 1.1638
retrieving revision 1.1639
diff -u -r1.1638 -r1.1639
--- kernel-2.6.spec	2 Nov 2005 17:15:31 -0000	1.1638
+++ kernel-2.6.spec	2 Nov 2005 22:24:54 -0000	1.1639
@@ -219,6 +219,7 @@
 Patch302: linux-2.6-serial-of.patch
 Patch303: linux-2.6.14-powerpc-build.patch
 Patch304: linux-2.6.14-ppc-nvram.patch
+Patch305: linux-2.6.14-ppc-initrd.patch
 
 # 400 - 499   ia64
 # 500 - 599   s390(x)
@@ -596,6 +597,7 @@
 %patch302 -p1
 %patch303 -p1
 %patch304 -p1
+%patch305 -p1
 
 #
 # Xen
@@ -1274,8 +1276,9 @@
 
 %changelog
 * Wed Nov 02 2005 David Woodhouse <dwmw2 at redhat.com>
-- Switch ppc64 kernel to arch/powerpc, since it appears to work
+- Switch ppc64 and ppc kernels to arch/powerpc
 - Add nvram driver back again
+- Fix ppc32 initrd with arch/powerpc
 
 * Wed Nov 02 2005 David Woodhouse <dwmw2 at redhat.com>
 - 2.6.14-git5




More information about the fedora-cvs-commits mailing list