* [PATCH] optional use "gzip --rsyncable" for bzImage
@ 2005-11-16 13:08 Ph. Marek
2005-11-17 1:54 ` Andrew Morton
0 siblings, 1 reply; 3+ messages in thread
From: Ph. Marek @ 2005-11-16 13:08 UTC (permalink / raw)
To: linux-kernel; +Cc: akpm
Hello everybody!
As (at least in debian) gzip has the "--rsyncable" parameter included,
I'd like to suggest this patch to (configurable) use this for bzImage creation.
The default is "N" to stay compatible with current behaviour.
I didn't find an entry in MAINTAINERS; and according to git a lot of people
touch arch/i386/Kconfig, so I just send to the l-k.
Andrew, how about an -mm inclusion? Or is the patch too small to warrant that?
Regards,
Phil
From: philipp.marek@bmlv.gv.at
diff -urN linux-2.6.12.orig/arch/i386/boot/compressed/Makefile linux-2.6.12/arch/i386/boot/compressed
/Makefile
--- linux-2.6.12.orig/arch/i386/boot/compressed/Makefile 2005-06-17 21:48:29.000000000 +0200
+++ linux-2.6.12/arch/i386/boot/compressed/Makefile 2005-11-16 13:44:34.000000000 +0100
@@ -4,6 +4,12 @@
# create a compressed vmlinux image from the original vmlinux
#
+ifdef CONFIG_RSYNCABLE
+GZIP_OPT := --rsyncable
+else
+GZIP_OPT :=
+endif
+
targets := vmlinux vmlinux.bin vmlinux.bin.gz head.o misc.o piggy.o
EXTRA_AFLAGS := -traditional
@@ -17,7 +23,7 @@
$(call if_changed,objcopy)
$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
- $(call if_changed,gzip)
+ $(call if_changed,gzip $(CONFIG_RSYNCABLE))
LDFLAGS_piggy.o := -r --format binary --oformat elf32-i386 -T
diff -urN linux-2.6.12.orig/arch/i386/Kconfig linux-2.6.12/arch/i386/Kconfig
--- linux-2.6.12.orig/arch/i386/Kconfig 2005-06-17 21:48:29.000000000 +0200
+++ linux-2.6.12/arch/i386/Kconfig 2005-11-16 13:27:12.000000000 +0100
@@ -922,6 +922,17 @@
generate incorrect output with certain kernel constructs when
-mregparm=3 is used.
+config RSYNCABLE
+ bool "Make bzImage better rsyncable (EXPERIMENTAL)"
+ depends on EXPERIMENTAL
+ default n
+ help
+ Compresses the kernel with "gzip --rsyncable". This makes the kernel
+ slightly larger (1-2%), but allows rsync to synchronize.
+
+
config SECCOMP
bool "Enable seccomp to safely compute untrusted bytecode"
depends on PROC_FS
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] optional use "gzip --rsyncable" for bzImage
2005-11-16 13:08 [PATCH] optional use "gzip --rsyncable" for bzImage Ph. Marek
@ 2005-11-17 1:54 ` Andrew Morton
2005-11-19 0:34 ` Alistair John Strachan
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2005-11-17 1:54 UTC (permalink / raw)
To: Ph. Marek; +Cc: linux-kernel
"Ph. Marek" <philipp.marek@bmlv.gv.at> wrote:
>
> As (at least in debian) gzip has the "--rsyncable" parameter included,
> I'd like to suggest this patch to (configurable) use this for bzImage creation.
I'd doubt if this works with a compressed a.out. Most changes one would
make to a kernel at the source level will cause changes all over the
generated binary, so rsync will send the whole compressed file anyway.
For example, a few-byte change in size of a function will cause a huge
number of `call xxxxxxxx' opcodes to turn into `call xxxxxxxx+N'.
So I'll need some convincing. But even if convinced, this seems like an
exceedingly obscure thing that not many people would be interested in.
echo `/usr/bin/gzip --rsyncable $*' > ~/bin/gzip ;)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] optional use "gzip --rsyncable" for bzImage
2005-11-17 1:54 ` Andrew Morton
@ 2005-11-19 0:34 ` Alistair John Strachan
0 siblings, 0 replies; 3+ messages in thread
From: Alistair John Strachan @ 2005-11-19 0:34 UTC (permalink / raw)
To: Andrew Morton; +Cc: Ph. Marek, linux-kernel
On Thursday 17 November 2005 01:54, Andrew Morton wrote:
> "Ph. Marek" <philipp.marek@bmlv.gv.at> wrote:
> > As (at least in debian) gzip has the "--rsyncable" parameter included,
> > I'd like to suggest this patch to (configurable) use this for bzImage
> > creation.
>
> I'd doubt if this works with a compressed a.out. Most changes one would
> make to a kernel at the source level will cause changes all over the
> generated binary, so rsync will send the whole compressed file anyway.
>
> For example, a few-byte change in size of a function will cause a huge
> number of `call xxxxxxxx' opcodes to turn into `call xxxxxxxx+N'.
>
> So I'll need some convincing. But even if convinced, this seems like an
> exceedingly obscure thing that not many people would be interested in.
Sounds like a patch for the debian kernel team, since GNU's latest alpha gzip
version doesn't support --rsyncable.
[alistair] 00:34 [~] gzip --rsyncable
gzip: unrecognized option `--rsyncable'
gzip 1.3.5
--
Cheers,
Alistair.
'No sense being pessimistic, it probably wouldn't work anyway.'
Third year Computer Science undergraduate.
1F2 55 South Clerk Street, Edinburgh, UK.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-11-19 0:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-16 13:08 [PATCH] optional use "gzip --rsyncable" for bzImage Ph. Marek
2005-11-17 1:54 ` Andrew Morton
2005-11-19 0:34 ` Alistair John Strachan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®