aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/boot/mktree.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/boot/mktree.c')
-rw-r--r--arch/powerpc/boot/mktree.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/powerpc/boot/mktree.c b/arch/powerpc/boot/mktree.c
index 4cb892993651..45d06a8c7cd1 100644
--- a/arch/powerpc/boot/mktree.c
+++ b/arch/powerpc/boot/mktree.c
@@ -46,8 +46,8 @@ int main(int argc, char *argv[])
46 struct stat st; 46 struct stat st;
47 boot_block_t bt; 47 boot_block_t bt;
48 48
49 if (argc < 3) { 49 if (argc < 5) {
50 fprintf(stderr, "usage: %s <zImage-file> <boot-image> [entry-point]\n",argv[0]); 50 fprintf(stderr, "usage: %s <zImage-file> <boot-image> <load address> <entry point>\n",argv[0]);
51 exit(1); 51 exit(1);
52 } 52 }
53 53
@@ -61,10 +61,8 @@ int main(int argc, char *argv[])
61 bt.bb_magic = htonl(0x0052504F); 61 bt.bb_magic = htonl(0x0052504F);
62 62
63 /* If we have the optional entry point parameter, use it */ 63 /* If we have the optional entry point parameter, use it */
64 if (argc == 4) 64 bt.bb_dest = htonl(strtoul(argv[3], NULL, 0));
65 bt.bb_dest = bt.bb_entry_point = htonl(strtoul(argv[3], NULL, 0)); 65 bt.bb_entry_point = htonl(strtoul(argv[4], NULL, 0));
66 else
67 bt.bb_dest = bt.bb_entry_point = htonl(0x500000);
68 66
69 /* We know these from the linker command. 67 /* We know these from the linker command.
70 * ...and then move it up into memory a little more so the 68 * ...and then move it up into memory a little more so the