* sharp zaurus: prevent killing spitz-en
@ 2005-10-25 19:08 Pavel Machek
2005-10-25 22:58 ` Ben Dooks
0 siblings, 1 reply; 5+ messages in thread
From: Pavel Machek @ 2005-10-25 19:08 UTC (permalink / raw)
To: rpurdie, kernel list
Hi!
This is wrong solution, but it prevents breaking flashing mechanism on
spitz with too big kernel. It may be handy to someone...
Pavel
--- clean-rp/arch/arm/boot/Makefile 2004-12-25 13:34:57.000000000 +0100
+++ linux-rp/arch/arm/boot/Makefile 2005-10-25 20:43:58.000000000 +0200
@@ -53,6 +53,12 @@
$(obj)/zImage: $(obj)/compressed/vmlinux FORCE
$(call if_changed,objcopy)
@echo ' Kernel: $@ is ready'
+ @ls -al $@
+ @wc -c $@ | ( read SIZE Y; \
+ if [ $$SIZE -gt 1294336 ]; then \
+ echo ' Kernel is too big, would kill spitz'; \
+ rm $@; \
+ fi )
endif
--
Thanks, Sharp!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: sharp zaurus: prevent killing spitz-en
2005-10-25 19:08 sharp zaurus: prevent killing spitz-en Pavel Machek
@ 2005-10-25 22:58 ` Ben Dooks
2005-10-25 23:14 ` Pavel Machek
2005-10-25 23:18 ` David Vrabel
0 siblings, 2 replies; 5+ messages in thread
From: Ben Dooks @ 2005-10-25 22:58 UTC (permalink / raw)
To: Pavel Machek; +Cc: rpurdie, kernel list
On Tue, Oct 25, 2005 at 09:08:29PM +0200, Pavel Machek wrote:
> Hi!
>
> This is wrong solution, but it prevents breaking flashing mechanism on
> spitz with too big kernel. It may be handy to someone...
>
> Pavel
>
> --- clean-rp/arch/arm/boot/Makefile 2004-12-25 13:34:57.000000000 +0100
> +++ linux-rp/arch/arm/boot/Makefile 2005-10-25 20:43:58.000000000 +0200
> @@ -53,6 +53,12 @@
> $(obj)/zImage: $(obj)/compressed/vmlinux FORCE
> $(call if_changed,objcopy)
> @echo ' Kernel: $@ is ready'
> + @ls -al $@
> + @wc -c $@ | ( read SIZE Y; \
> + if [ $$SIZE -gt 1294336 ]; then \
> + echo ' Kernel is too big, would kill spitz'; \
> + rm $@; \
> + fi )
>
> endif
It would be better for each machine to export an config option
from the Kconfig to specify if they have a maximum size.
--
Ben (ben@fluff.org, http://www.fluff.org/)
'a smiley only costs 4 bytes'
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: sharp zaurus: prevent killing spitz-en
2005-10-25 22:58 ` Ben Dooks
@ 2005-10-25 23:14 ` Pavel Machek
2005-10-25 23:18 ` David Vrabel
1 sibling, 0 replies; 5+ messages in thread
From: Pavel Machek @ 2005-10-25 23:14 UTC (permalink / raw)
To: Ben Dooks; +Cc: rpurdie, kernel list
Hi!
> > This is wrong solution, but it prevents breaking flashing mechanism on
> > spitz with too big kernel. It may be handy to someone...
> >
> > Pavel
> >
> > --- clean-rp/arch/arm/boot/Makefile 2004-12-25 13:34:57.000000000 +0100
> > +++ linux-rp/arch/arm/boot/Makefile 2005-10-25 20:43:58.000000000 +0200
> > @@ -53,6 +53,12 @@
> > $(obj)/zImage: $(obj)/compressed/vmlinux FORCE
> > $(call if_changed,objcopy)
> > @echo ' Kernel: $@ is ready'
> > + @ls -al $@
> > + @wc -c $@ | ( read SIZE Y; \
> > + if [ $$SIZE -gt 1294336 ]; then \
> > + echo ' Kernel is too big, would kill spitz'; \
> > + rm $@; \
> > + fi )
> >
> > endif
>
> It would be better for each machine to export an config option
> from the Kconfig to specify if they have a maximum size.
It is probably best to stop it at the flasher script, but ... this was
quite a quick hack.
Pavel
--
Thanks, Sharp!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: sharp zaurus: prevent killing spitz-en
2005-10-25 22:58 ` Ben Dooks
2005-10-25 23:14 ` Pavel Machek
@ 2005-10-25 23:18 ` David Vrabel
2005-10-26 0:10 ` Russell King
1 sibling, 1 reply; 5+ messages in thread
From: David Vrabel @ 2005-10-25 23:18 UTC (permalink / raw)
To: Ben Dooks; +Cc: Pavel Machek, rpurdie, kernel list
Ben Dooks wrote:
>
> It would be better for each machine to export an config option
> from the Kconfig to specify if they have a maximum size.
Isn't the maximum size a property of the bootloader/other firmware?
i.e., something the kernel build system knows nothing about.
David Vrabel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: sharp zaurus: prevent killing spitz-en
2005-10-25 23:18 ` David Vrabel
@ 2005-10-26 0:10 ` Russell King
0 siblings, 0 replies; 5+ messages in thread
From: Russell King @ 2005-10-26 0:10 UTC (permalink / raw)
To: David Vrabel; +Cc: Ben Dooks, Pavel Machek, rpurdie, kernel list
On Wed, Oct 26, 2005 at 12:18:46AM +0100, David Vrabel wrote:
> Ben Dooks wrote:
> >It would be better for each machine to export an config option
> >from the Kconfig to specify if they have a maximum size.
>
> Isn't the maximum size a property of the bootloader/other firmware?
> i.e., something the kernel build system knows nothing about.
Yes. blob, for instance, aborts an xmodem download if it's too large.
The kernel has no knowledge of what blob classifies as "too large"
which may indeed be different from uboot, bootldr, redboot, or ...
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-10-26 0:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-25 19:08 sharp zaurus: prevent killing spitz-en Pavel Machek
2005-10-25 22:58 ` Ben Dooks
2005-10-25 23:14 ` Pavel Machek
2005-10-25 23:18 ` David Vrabel
2005-10-26 0:10 ` Russell King
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox