2010-07-14 04:52:58 [Patch] Fix kernel_source/usr/Makefile for work with initramfs
Andrew Pushkin (BELARUS)
Message: 91234
This fix is change kernel_source_dir/usr/Makefile. Without this initramfs do not work. Main idea of this fix is
-suffix_$(CONFIG_INITRAMFS_COMPRESSION_GZIP) = .gz
+suffix_$(CONFIG_RD_GZIP) = .gz
Patch in attach
0001-blackfin_initramfsfix.patch
QuoteReplyEditDelete
2010-07-14 05:06:02 Re: [Patch] Fix kernel_source/usr/Makefile for work with initramfs
Andrew Pushkin (BELARUS)
Message: 91235
V2 patch
0001-blackfin_initramfsfix.patch
QuoteReplyEditDelete
2010-07-14 09:44:27 Re: [Patch] Fix kernel_source/usr/Makefile for work with initramfs
Mike Frysinger (UNITED STATES)
Message: 91243
please describe with real details what your perceived problem is and why you think you had to make this change
we build initramfs kernels all the time with gz compression and the current code works fine
QuoteReplyEditDelete
2010-07-14 11:09:06 Re: [Patch] Fix kernel_source/usr/Makefile for work with initramfs
Andrew Pushkin (BELARUS)
Message: 91245
In kernel dir:
$grep -R "CONFIG_INITRAMFS_COMPRESSION_GZIP" .
./usr/Makefile:suffix_$(CONFIG_INITRAMFS_COMPRESSION_GZIP) = .gz
./arch/arm/configs/stmp378x_defconfig:CONFIG_INITRAMFS_COMPRESSION_GZIP=y
./arch/arm/configs/nuc910_defconfig:# CONFIG_INITRAMFS_COMPRESSION_GZIP is not set
./arch/microblaze/configs/mmu_defconfig:CONFIG_INITRAMFS_COMPRESSION_GZIP=y
that means that option CONFIG_INITRAMFS_COMPRESSION_GZIP is nothing to set, and code "suffix_$(CONFIG_INITRAMFS_COMPRESSION_GZIP) = .gz" is never run .
In modern kernels old options "CONFIG_INITRAMFS_COMPRESSION_XXX" named like "CONFIG_RD_XXX":
$cat .config|grep CONFIG_RD_
CONFIG_RD_GZIP=y
# CONFIG_RD_BZIP2 is not set
# CONFIG_RD_LZMA is not set
# CONFIG_RD_LZO is not set
$cat .config|grep CONFIG_INITRAMFS_COMPRESSION_
If you try to use initramfs without previos patch, file "images/uImage.initramfs" in uClinux-dist do not contain iniramfs, only kernel. If you need, I can attach log without patch and with patch.
QuoteReplyEditDelete
2010-07-14 11:35:42 Re: [Patch] Fix kernel_source/usr/Makefile forwork with initramfs
Mike Frysinger (UNITED STATES)
Message: 91248 your grep is incorrect as is your final assumption. Kconfig does not
waste time with prefixing its values with CONFIG_.
the INITRAMFS_xx options select the preference of what compression
scheme to use while RD_xx merely enables support for the compression.
your view of images/ is also incorrect. please read the documentation:
docs.blackfin.uclinux.org/doku.php?id=uclinux-dist:images
QuoteReplyEditDelete
2010-07-14 12:17:54 Re: [Patch] Fix kernel_source/usr/Makefile forwork with initramfs
Andrew Pushkin (BELARUS)
Message: 91250
If option "Initramfs source file" in menuconfig is empty (that is default), I do not check option INITRAMFS_COMPRESSION_GZIP, becouse I do not see this option, and this option nothing to set. How you set this option?
QuoteReplyEditDelete
2010-07-14 15:47:27 Re: [Patch] Fix kernel_source/usr/Makefile forwork with initramfs
Mike Frysinger (UNITED STATES)
Message: 91252
kconfig offers search functions if you hit "/"
Symbol: INITRAMFS_COMPRESSION_GZIP [=n]
Prompt: Gzip
Defined at usr/Kconfig:116
Depends on: <choice> && RD_GZIP [=y]
Location:
-> General setup
-> Initial RAM filesystem and RAM disk (initramfs/initrd) support (BLK_DEV_INITRD [=y])
-> Built-in initramfs compression mode (<choice> [=n])
so you can read usr/Kconfig to see what exactly is going on
the uclinux-dist build system doesnt use these options anyways to generate the images with the initramfs compressed. read vendors/AnalogDevices/vendor.mak.
not that i know what it is you're trying to accomplish in the first place. your thread started at a patch without explanation rather than a question of what you're trying to do.
QuoteReplyEditDelete
2010-07-15 04:38:40 Re: [Patch] Fix kernel_source/usr/Makefile forwork with initramfs
Andrew Pushkin (BELARUS)
Message: 91286
>>the uclinux-dist build system doesnt use these options anyways to generate the images with the initramfs compressed
Yes, uclinux-dist generate rootfs.initramfs and copy it to linux-2.6.x/usr/initramfs_data.cpio.gz . But linux-2.6.x do not attach initramfs_data.cpio.gz to kernel (or may be attach but I do not know how to konfigure kernel to attach). My patch allow to attach initramfs_data.cpio.gz to kernel.
QuoteReplyEditDelete
2010-07-15 10:05:48 Re: [Patch] Fix kernel_source/usr/Makefile forwork with initramfs
Mike Frysinger (UNITED STATES)
Message: 91308
no, the ADI vendor.mak does not copy to cpio.gz. it copies to .cpio.