mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ppc32: fix mktree utility in 64-bit cross-compile environment
@ 2004-08-03 22:01 Zink, Dan
  2004-08-04 15:45 ` Hollis Blanchard
  2004-08-04 15:48 ` Tom Rini
  0 siblings, 2 replies; 4+ messages in thread
From: Zink, Dan @ 2004-08-03 22:01 UTC (permalink / raw)
  To: akpm, linuxppc-dev; +Cc: linux-kernel

The mktree utility is using "unsigned long" in the definition of a boot
block structure.  This is bad when cross compiling from a 64-bit
architecture...

Thanks,
Dan


--- arch/ppc/boot/utils/mktree.c.old	2004-08-03 16:31:09.568992888
-0500
+++ arch/ppc/boot/utils/mktree.c	2004-08-03 16:32:26.773256056
-0500
@@ -15,19 +15,20 @@
 #include <sys/stat.h>
 #include <unistd.h>
 #include <netinet/in.h>
+#include <asm/types.h>
 
 /* This gets tacked on the front of the image.  There are also a few
  * bytes allocated after the _start label used by the boot rom (see
  * head.S for details).
  */
 typedef struct boot_block {
-	unsigned long bb_magic;		/* 0x0052504F */
-	unsigned long bb_dest;		/* Target address of the image
*/
-	unsigned long bb_num_512blocks;	/* Size, rounded-up, in 512 byte
blks */
-	unsigned long bb_debug_flag;	/* Run debugger or image after
load */
-	unsigned long bb_entry_point;	/* The image address to start */
-	unsigned long bb_checksum;	/* 32 bit checksum including
header */
-	unsigned long reserved[2];
+	__u32 bb_magic;		/* 0x0052504F */
+	__u32 bb_dest;		/* Target address of the image */
+	__u32 bb_num_512blocks;	/* Size, rounded-up, in 512 byte blks */
+	__u32 bb_debug_flag;	/* Run debugger or image after load */
+	__u32 bb_entry_point;	/* The image address to start */
+	__u32 bb_checksum;	/* 32 bit checksum including header */
+	__u32 reserved[2];
 } boot_block_t;
 
 #define IMGBLK	512

^ permalink raw reply	[flat|nested] 4+ messages in thread
* RE: [PATCH] ppc32: fix mktree utility in 64-bit cross-compile environment
@ 2004-08-04 15:25 Zink, Dan
  0 siblings, 0 replies; 4+ messages in thread
From: Zink, Dan @ 2004-08-04 15:25 UTC (permalink / raw)
  To: akpm, linuxppc-dev; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1819 bytes --]

Resending as an attachment because of unwanted line wrapping by my
mailer.

Dan

-----Original Message-----
From: Zink, Dan 
Sent: Tuesday, August 03, 2004 5:01 PM
To: 'akpm@osdl.org'; 'linuxppc-dev@lists.linuxppc.org'
Cc: 'linux-kernel@vger.kernel.org'
Subject: [PATCH] ppc32: fix mktree utility in 64-bit cross-compile
environment

The mktree utility is using "unsigned long" in the definition of a boot
block structure.  This is bad when cross compiling from a 64-bit
architecture...

Thanks,
Dan


--- arch/ppc/boot/utils/mktree.c.old	2004-08-03 16:31:09.568992888
-0500
+++ arch/ppc/boot/utils/mktree.c	2004-08-03 16:32:26.773256056
-0500
@@ -15,19 +15,20 @@
 #include <sys/stat.h>
 #include <unistd.h>
 #include <netinet/in.h>
+#include <asm/types.h>
 
 /* This gets tacked on the front of the image.  There are also a few
  * bytes allocated after the _start label used by the boot rom (see
  * head.S for details).
  */
 typedef struct boot_block {
-	unsigned long bb_magic;		/* 0x0052504F */
-	unsigned long bb_dest;		/* Target address of the image
*/
-	unsigned long bb_num_512blocks;	/* Size, rounded-up, in 512 byte
blks */
-	unsigned long bb_debug_flag;	/* Run debugger or image after
load */
-	unsigned long bb_entry_point;	/* The image address to start */
-	unsigned long bb_checksum;	/* 32 bit checksum including
header */
-	unsigned long reserved[2];
+	__u32 bb_magic;		/* 0x0052504F */
+	__u32 bb_dest;		/* Target address of the image */
+	__u32 bb_num_512blocks;	/* Size, rounded-up, in 512 byte blks */
+	__u32 bb_debug_flag;	/* Run debugger or image after load */
+	__u32 bb_entry_point;	/* The image address to start */
+	__u32 bb_checksum;	/* 32 bit checksum including header */
+	__u32 reserved[2];
 } boot_block_t;
 
 #define IMGBLK	512

[-- Attachment #2: ppcfix.patch --]
[-- Type: application/octet-stream, Size: 1260 bytes --]

--- arch/ppc/boot/utils/mktree.c.old	2004-08-03 16:31:09.568992888 -0500
+++ arch/ppc/boot/utils/mktree.c	2004-08-03 16:32:26.773256056 -0500
@@ -15,19 +15,20 @@
 #include <sys/stat.h>
 #include <unistd.h>
 #include <netinet/in.h>
+#include <asm/types.h>
 
 /* This gets tacked on the front of the image.  There are also a few
  * bytes allocated after the _start label used by the boot rom (see
  * head.S for details).
  */
 typedef struct boot_block {
-	unsigned long bb_magic;		/* 0x0052504F */
-	unsigned long bb_dest;		/* Target address of the image */
-	unsigned long bb_num_512blocks;	/* Size, rounded-up, in 512 byte blks */
-	unsigned long bb_debug_flag;	/* Run debugger or image after load */
-	unsigned long bb_entry_point;	/* The image address to start */
-	unsigned long bb_checksum;	/* 32 bit checksum including header */
-	unsigned long reserved[2];
+	__u32 bb_magic;		/* 0x0052504F */
+	__u32 bb_dest;		/* Target address of the image */
+	__u32 bb_num_512blocks;	/* Size, rounded-up, in 512 byte blks */
+	__u32 bb_debug_flag;	/* Run debugger or image after load */
+	__u32 bb_entry_point;	/* The image address to start */
+	__u32 bb_checksum;	/* 32 bit checksum including header */
+	__u32 reserved[2];
 } boot_block_t;
 
 #define IMGBLK	512

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-08-04 15:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-03 22:01 [PATCH] ppc32: fix mktree utility in 64-bit cross-compile environment Zink, Dan
2004-08-04 15:45 ` Hollis Blanchard
2004-08-04 15:48 ` Tom Rini
2004-08-04 15:25 Zink, Dan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®