git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'topic/asoc' into for-linus
[pandora-kernel.git]
/
arch
/
powerpc
/
boot
/
mktree.c
diff --git
a/arch/powerpc/boot/mktree.c
b/arch/powerpc/boot/mktree.c
index
4cb8929
..
c2baae0
100644
(file)
--- 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;
{
int in_fd, out_fd;
int nblks, i;
- uint cksum, *cp;
+ u
nsigned
int cksum, *cp;
struct stat st;
boot_block_t bt;
struct stat st;
boot_block_t bt;
- if (argc <
3
) {
- fprintf(stderr, "usage: %s <zImage-file> <boot-image>
[entry-point]
\n",argv[0]);
+ if (argc <
5
) {
+ fprintf(stderr, "usage: %s <zImage-file> <boot-image>
<load address> <entry point>
\n",argv[0]);
exit(1);
}
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 */
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
/* 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;
cksum = 0;
cp = (void *)&bt;
- for (i
=0; i<sizeof(bt)/sizeof(u
int); i++)
+ for (i
= 0; i < sizeof(bt) / sizeof(unsigned
int); i++)
cksum += *cp++;
/* Assume zImage is an ELF file, and skip the 64K header.
cksum += *cp++;
/* Assume zImage is an ELF file, and skip the 64K header.
@@
-103,7
+101,7
@@
int main(int argc, char *argv[])
exit(4);
}
exit(4);
}
- if ((*(uint *)tmpbuf) != htonl(0x7f454c46)) {
+ if ((*(u
nsigned
int *)tmpbuf) != htonl(0x7f454c46)) {
fprintf(stderr, "%s is not an ELF image\n", argv[1]);
exit(4);
}
fprintf(stderr, "%s is not an ELF image\n", argv[1]);
exit(4);
}
@@
-127,8
+125,8
@@
int main(int argc, char *argv[])
perror("zImage read");
exit(5);
}
perror("zImage read");
exit(5);
}
- cp = (uint *)tmpbuf;
- for (i
=0; i<sizeof(tmpbuf)/sizeof(u
int); i++)
+ cp = (u
nsigned
int *)tmpbuf;
+ for (i
= 0; i < sizeof(tmpbuf) / sizeof(unsigned
int); i++)
cksum += *cp++;
if (write(out_fd, tmpbuf, sizeof(tmpbuf)) != sizeof(tmpbuf)) {
perror("boot-image write");
cksum += *cp++;
if (write(out_fd, tmpbuf, sizeof(tmpbuf)) != sizeof(tmpbuf)) {
perror("boot-image write");