* [PATCH][PPC32] mktree fix
@ 2005-02-07 4:34 Andre' Draszik
2005-02-08 22:33 ` Tom Rini
0 siblings, 1 reply; 4+ messages in thread
From: Andre' Draszik @ 2005-02-07 4:34 UTC (permalink / raw)
To: linuxppc-embedded
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);
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH][PPC32] mktree fix
2005-02-07 4:34 [PATCH][PPC32] mktree fix Andre' Draszik
@ 2005-02-08 22:33 ` Tom Rini
2005-02-11 8:37 ` Andre' Draszik
0 siblings, 1 reply; 4+ messages in thread
From: Tom Rini @ 2005-02-08 22:33 UTC (permalink / raw)
To: Andre' Draszik; +Cc: linuxppc-embedded
On Mon, Feb 07, 2005 at 05:34:36AM +0100, Andre' Draszik wrote:
> 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>
With this wrong, what breaks? Thanks.
--
Tom Rini
http://gate.crashing.org/~trini/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH][PPC32] mktree fix
2005-02-08 22:33 ` Tom Rini
@ 2005-02-11 8:37 ` Andre' Draszik
2005-02-11 15:20 ` Tom Rini
0 siblings, 1 reply; 4+ messages in thread
From: Andre' Draszik @ 2005-02-11 8:37 UTC (permalink / raw)
To: Tom Rini; +Cc: linuxppc-embedded
Tom Rini wrote:
> On Mon, Feb 07, 2005 at 05:34:36AM +0100, Andre' Draszik wrote:
>
>
>>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>
>
>
> With this wrong, what breaks? Thanks.
I don't think anything breaks but if somebody relies on the image size
stored in the header, up to almost 64k bytes of flash could be wasted.
a.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH][PPC32] mktree fix
2005-02-11 8:37 ` Andre' Draszik
@ 2005-02-11 15:20 ` Tom Rini
0 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2005-02-11 15:20 UTC (permalink / raw)
To: Andre' Draszik; +Cc: linuxppc-embedded
On Fri, Feb 11, 2005 at 09:37:26AM +0100, Andre' Draszik wrote:
> Tom Rini wrote:
> >On Mon, Feb 07, 2005 at 05:34:36AM +0100, Andre' Draszik wrote:
> >
> >
> >>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>
> >
> >
> >With this wrong, what breaks? Thanks.
>
> I don't think anything breaks but if somebody relies on the image size
> stored in the header, up to almost 64k bytes of flash could be wasted.
OK. I'll push this up once 2.6.12-rc1 opens up.
--
Tom Rini
http://gate.crashing.org/~trini/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-02-11 15:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-07 4:34 [PATCH][PPC32] mktree fix Andre' Draszik
2005-02-08 22:33 ` Tom Rini
2005-02-11 8:37 ` Andre' Draszik
2005-02-11 15:20 ` Tom Rini
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).