[patch 4/5] Add proper node alignment for the powerpc device-tree cmdline.

Geoff Levand geoffrey.levand at am.sony.com
Mon May 7 20:03:00 EDT 2007


Add proper node alignment for the powerpc device-tree cmdline.

Fixes the runtime error 'Invalid tag 3a scanning flattened device tree !'.

Signed-off-by: Geoff Levand <geoffrey.levand at am.sony.com>

---
 kexec/arch/ppc64/fs2dt.c |    4 ++++
 1 file changed, 4 insertions(+)

--- kexec-tools-hacked.orig/kexec/arch/ppc64/fs2dt.c
+++ kexec-tools-hacked/kexec/arch/ppc64/fs2dt.c
@@ -283,6 +283,10 @@ static void putprops(char *fn, struct di
 			strcat(local_cmdline, " ");
 			cmd_len = strlen(local_cmdline);
 			cmd_len = cmd_len + 1;
+			if ((cmd_len >= 8) && ((unsigned long)dt & 0x4)) {
+				fprintf(stderr, "Aligning cmdline %p\n", dt);
+				dt++;
+			}
 			memcpy(dt, local_cmdline,cmd_len);
 			len = cmd_len;
 			*dt_len = cmd_len;

-- 





More information about the kexec mailing list