Fix 100% initramfs bloat in 2.6.17 versus 2.6.16
PATCH 1/1 Fix 100% initramfs bloat in 2.6.17 versus 2.6.16
When I built 2.6.17 for the first time I was a little surprised to see my kernel putting on >500Kb in weight.
It didn't take long to work out that this was because my initramfs's contents were being included twice in the cpio image.
A make V=1 makes the problem obvious:
/bin/sh /usr/packages/linux/versions/i686-loki/scripts/gen_initramfs_list.sh -l "usr/initramfs" > usr/.initramfs_data.cpio.gz.d
/bin/sh /usr/packages/linux/versions/i686-loki/scripts/gen_initramfs_list.sh -o usr/initramfs_data.cpio.gz -u 0 -g 0 "usr/initramfs" "usr/initramfs"
Note that doubling-up of the "usr/initramfs", which leads to gen_initramfs_list.sh dumping the thing into the cpio archive twice.
The cause is an obvious pasto, fixed thusly:
usr/Makefile +1 -1
@@ -33,7 +33,7 @@ endif quiet_cmd_initfs = GEN $@ - cmd_initfs = $(initramfs) -o $@ $(ramfs-args) $(ramfs-input) + cmd_initfs = $(initramfs) -o $@ $(ramfs-args) targets := initramfs_data.cpio.gz $(deps_initramfs): klibcdirs
Signature · 3 lines
`NB: Anyone suggesting that we should say "Tibibytes" instead of Terabytes there will be hunted down and brutally slain. That is all.' --- Matthew Wilcox
On 21 Jun 2006, [email protected] stipulated:
Quoted 2 lines
It didn't take long to work out that this was because my initramfs's contents were being included twice in the cpio image.
Ping? Anyone?
Signature · 3 lines
`NB: Anyone suggesting that we should say "Tibibytes" instead of Terabytes there will be hunted down and brutally slain. That is all.' --- Matthew Wilcox
Quoted 5 lines · Nix
On 21 Jun 2006, [email protected] stipulated:
Quoted 2 lines
It didn't take long to work out that this was because my initramfs's contents were being included twice in the cpio image.
Ping? Anyone?
It is included in kbuild.git - and Linus has been asked to pull that tree. It is also forwarded to [email protected] for inclusion in next stable release.
Sam
On 26 Jun 2006, Sam Ravnborg moaned:
Quoted 9 lines · Nix
Quoted 5 lines
On 21 Jun 2006, [email protected] stipulated:
Quoted 2 lines
It didn't take long to work out that this was because my initramfs's contents were being included twice in the cpio image.
Ping? Anyone?
It is included in kbuild.git - and Linus has been asked to pull that tree. It is also forwarded to [email protected] for inclusion in next stable release.
Ah. I checked hpa's git tree and the upstream, but for some reason not kbuild.git.
Sorry for the noise.
Signature · 3 lines
`NB: Anyone suggesting that we should say "Tibibytes" instead of Terabytes there will be hunted down and brutally slain. That is all.' --- Matthew Wilcox