Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

sharp zaurus: prevent killing spitz-en

0 views
Skip to first unread message

Pavel Machek

unread,
Oct 25, 2005, 3:50:16 PM10/25/05
to
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!
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majo...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Ben Dooks

unread,
Oct 25, 2005, 7:00:16 PM10/25/05
to
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 (b...@fluff.org, http://www.fluff.org/)

'a smiley only costs 4 bytes'

David Vrabel

unread,
Oct 25, 2005, 7:20:12 PM10/25/05
to
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

Pavel Machek

unread,
Oct 25, 2005, 7:20:12 PM10/25/05
to
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!

Russell King

unread,
Oct 25, 2005, 8:20:07 PM10/25/05
to
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

0 new messages