From: Andre' Draszik <andid@gmx.net>
To: linuxppc-embedded@ozlabs.org
Subject: [PATCH][PPC32] mktree fix
Date: Mon, 07 Feb 2005 05:34:36 +0100 [thread overview]
Message-ID: <4206EFDC.3090904@gmx.net> (raw)
This one fixes mktree. The image size stored in the header is pretty off without
this patch. (yes, it can make a difference of upto almost 64k)
Signed-off-by: Andre' Draszik <andid@gmx.net>
diff -urN linuxppc-2.5.orig/arch/ppc/boot/utils/mktree.c linuxppc-2.5/arch/ppc/boot/utils/mktree.c
--- linuxppc-2.5.orig/arch/ppc/boot/utils/mktree.c 2005-02-03 20:20:39.000000000 +0100
+++ linuxppc-2.5/arch/ppc/boot/utils/mktree.c 2005-02-06 03:13:27.000000000 +0100
@@ -113,7 +113,8 @@
exit(4);
}
- nblks -= (64 * 1024) / IMGBLK;
+ nblks -= (64 * 1024 - sizeof (bt)) / IMGBLK;
+ bt.bb_num_512blocks = htonl(nblks + 1);
/* And away we go......
*/
@@ -122,7 +123,7 @@
exit(5);
}
- while (nblks-- > 0) {
+ while (--nblks > 0) {
if (read(in_fd, tmpbuf, IMGBLK) < 0) {
perror("zImage read");
exit(5);
next reply other threads:[~2005-02-07 4:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-07 4:34 Andre' Draszik [this message]
2005-02-08 22:33 ` [PATCH][PPC32] mktree fix Tom Rini
2005-02-11 8:37 ` Andre' Draszik
2005-02-11 15:20 ` Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4206EFDC.3090904@gmx.net \
--to=andid@gmx.net \
--cc=linuxppc-embedded@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).