* 2.6.22 flash boot
@ 2007-07-13 19:40 Marc Leeman
2007-07-13 19:48 ` Sergei Shtylyov
0 siblings, 1 reply; 2+ messages in thread
From: Marc Leeman @ 2007-07-13 19:40 UTC (permalink / raw)
To: linuxppc-dev
[-- Attachment #1.1: Type: text/plain, Size: 871 bytes --]
With the release of the 2.6.22, our boards didn't boot anymore. I traced
the change back to 2.6.21-git10/2.6.21-git11.
The reason they didn't boot was that the kernel didn't detect the flash
where the root filesystem is stored on. The boards boot without an
initrd, directly from flash.
A file was removed (rom.c) and mentioned as obsolete in the ChangeLog.
att'd is the patch to restore the file against 2.6.22 since restoring
this file allow the boards to boot again (i.e. detect mtdblocks as
rootfilesystem).
Am I missing something here?
Judging by the dts files, a number of other boards seem to be using a
similar flash configuration as I do.
--
greetz, marc
That's your plan? Wile E. Coyote would come up with a better plan
than that!
Crichton - Throne for a Loss
chiana 2.6.18-4-ixp4xx #1 Tue Mar 27 18:01:56 BST 2007 GNU/Linux
[-- Attachment #1.2: fix-boot.diff --]
[-- Type: text/x-diff, Size: 1707 bytes --]
---
arch/powerpc/sysdev/Makefile | 1 +
arch/powerpc/sysdev/rom.c | 32 ++++++++++++++++++++++++++++++++
2 files changed, 33 insertions(+)
Index: linux-2.6.22/arch/powerpc/sysdev/Makefile
===================================================================
--- linux-2.6.22.orig/arch/powerpc/sysdev/Makefile
+++ linux-2.6.22/arch/powerpc/sysdev/Makefile
@@ -30,6 +30,7 @@
# Temporary hack until we have migrated to asm-powerpc
ifeq ($(ARCH),powerpc)
+obj-$(CONFIG_MTD) += rom.o
obj-$(CONFIG_CPM2) += cpm2_common.o cpm2_pic.o
obj-$(CONFIG_8xx) += mpc8xx_pic.o commproc.o
obj-$(CONFIG_UCODE_PATCH) += micropatch.o
Index: linux-2.6.22/arch/powerpc/sysdev/rom.c
===================================================================
--- /dev/null
+++ linux-2.6.22/arch/powerpc/sysdev/rom.c
@@ -0,0 +1,32 @@
+/*
+ * ROM device registration
+ *
+ * (C) 2006 MontaVista Software, Inc. This file is licensed under
+ * the terms of the GNU General Public License version 2. This program
+ * is licensed "as is" without any warranty of any kind, whether express
+ * or implied.
+ */
+
+#include <linux/kernel.h>
+#include <asm/of_device.h>
+#include <asm/of_platform.h>
+
+static int __init powerpc_flash_init(void)
+{
+ struct device_node *node = NULL;
+
+ /*
+ * Register all the devices which type is "rom"
+ */
+ while ((node = of_find_node_by_type(node, "rom")) != NULL) {
+ if (node->name == NULL) {
+ printk(KERN_WARNING "powerpc_flash_init: found 'rom' "
+ "device, but with no name, skipping...\n");
+ continue;
+ }
+ of_platform_device_create(node, node->name, NULL);
+ }
+ return 0;
+}
+
+arch_initcall(powerpc_flash_init);
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: 2.6.22 flash boot
2007-07-13 19:40 2.6.22 flash boot Marc Leeman
@ 2007-07-13 19:48 ` Sergei Shtylyov
0 siblings, 0 replies; 2+ messages in thread
From: Sergei Shtylyov @ 2007-07-13 19:48 UTC (permalink / raw)
To: Marc Leeman; +Cc: linuxppc-dev
Hello.
Marc Leeman wrote:
> With the release of the 2.6.22, our boards didn't boot anymore. I traced
> the change back to 2.6.21-git10/2.6.21-git11.
> The reason they didn't boot was that the kernel didn't detect the flash
> where the root filesystem is stored on. The boards boot without an
> initrd, directly from flash.
> A file was removed (rom.c) and mentioned as obsolete in the ChangeLog.
[...]
> Am I missing something here?
It's been removed as conflicting with the new of_device probing code.
You can either register the "rom" device explicitly in your platform code, or
put it on some bus below the ones specified to of_platform_device_probe() --
by your platform code again...
WBR, Sergei
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-07-13 19:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-13 19:40 2.6.22 flash boot Marc Leeman
2007-07-13 19:48 ` Sergei Shtylyov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.