X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=arch%2Fpowerpc%2Fboot%2Fmktree.c;h=c2baae0a3d89da9d9e882d6d0ff99177431ab79b;hb=21ce3cd63365b0d07794adeb4325944bfa86fb4e;hp=4cb89299365163df4e777610129aee67226dbc8f;hpb=463e7c7cf9aaf95dd05e97e1a47854fdf5454cdc;p=pandora-kernel.git diff --git a/arch/powerpc/boot/mktree.c b/arch/powerpc/boot/mktree.c index 4cb892993651..c2baae0a3d89 100644 --- a/arch/powerpc/boot/mktree.c +++ b/arch/powerpc/boot/mktree.c @@ -42,12 +42,12 @@ int main(int argc, char *argv[]) { int in_fd, out_fd; int nblks, i; - uint cksum, *cp; + unsigned int cksum, *cp; struct stat st; boot_block_t bt; - if (argc < 3) { - fprintf(stderr, "usage: %s [entry-point]\n",argv[0]); + if (argc < 5) { + fprintf(stderr, "usage: %s \n",argv[0]); exit(1); } @@ -61,10 +61,8 @@ int main(int argc, char *argv[]) bt.bb_magic = htonl(0x0052504F); /* If we have the optional entry point parameter, use it */ - if (argc == 4) - bt.bb_dest = bt.bb_entry_point = htonl(strtoul(argv[3], NULL, 0)); - else - bt.bb_dest = bt.bb_entry_point = htonl(0x500000); + bt.bb_dest = htonl(strtoul(argv[3], NULL, 0)); + bt.bb_entry_point = htonl(strtoul(argv[4], NULL, 0)); /* We know these from the linker command. * ...and then move it up into memory a little more so the @@ -92,7 +90,7 @@ int main(int argc, char *argv[]) cksum = 0; cp = (void *)&bt; - for (i=0; i