Bug 6743

Summary: Size of initramfs_data.cpio.gz is doubled.
Product: Other Reporter: thomas (tdinfo)
Component: klibc/kinitAssignee: other_klibc-kinit
Status: REJECTED DUPLICATE    
Severity: normal    
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.6.17 Subsystem:
Regression: --- Bisected commit-id:

Description thomas 2006-06-24 05:05:50 UTC
Most recent kernel where this bug did not occur:2.6.16
Distribution:
Hardware Environment:
Software Environment:
Problem Description:
gen_initramfs_list.sh concatenates two identical cpio-archives.

Bug in usr/Makefile:
ramfs-input := $(if $(filter-out "",$(CONFIG_INITRAMFS_SOURCE)), \
                    $(CONFIG_INITRAMFS_SOURCE),-d)
ramfs-args  := \
        $(if $(CONFIG_INITRAMFS_ROOT_UID), -u $(CONFIG_INITRAMFS_ROOT_UID)) \
        $(if $(CONFIG_INITRAMFS_ROOT_GID), -g $(CONFIG_INITRAMFS_ROOT_GID)) \
        $(ramfs-input)


# .initramfs_data.cpio.gz.d is used to identify all files included
# in initramfs and to detect if any files are added/removed.
# Removed files are identified by directory timestamp being updated
# The dependency list is generated by gen_initramfs.sh -l
ifneq ($(wildcard $(obj)/.initramfs_data.cpio.gz.d),)
        include $(obj)/.initramfs_data.cpio.gz.d
endif

quiet_cmd_initfs = GEN     $@
      cmd_initfs = $(initramfs) -o $@ $(ramfs-args) $(ramfs-input)
                                                    ^^^^^^^^^^^^^^

Patch:
--- Makefile.orig       2006-06-24 11:04:58.060163593  0200
    Makefile    2006-06-24 10:35:52.551677940  0200
@@ -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



Steps to reproduce: ...
Comment 1 Nishanth Aravamudan 2006-06-24 09:08:52 UTC

*** This bug has been marked as a duplicate of 6740 ***