Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933174Ab3JOPAY (ORCPT ); Tue, 15 Oct 2013 11:00:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9065 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933176Ab3JOO4D (ORCPT ); Tue, 15 Oct 2013 10:56:03 -0400 Date: Tue, 15 Oct 2013 20:25:57 +0530 (IST) From: P J P X-X-Sender: pjp@javelin.pnq.redhat.com To: linux-kernel@vger.kernel.org cc: Andrew Morton Subject: [Patch] Read CONFIG_RD_ variables for initramfs compression Message-ID: MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-1865401866-1381847858=:7552" Content-ID: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 5918 Lines: 113 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-1865401866-1381847858=:7552 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; format=flowed Content-ID: Hello Andrew, When expert configuration option(CONFIG_EXPERT) is enabled, menuconfig offers choice of compression algorithm, to compress initial ramfs image. This choice is stored into CONFIG_RD_ variables. But, usr/Makefile reads from earlier INITRAMFS_COMPRESSION_* variables to set the ramfs file extension(.gzip/.bz2/...), which is later(in scripts/gen_initramfs_list.sh) used to apply actual compression. Since none of the INITRAMFS_COMPRESSION_* variables are defined, the resulting 'usr/initramfs_data.cpio' file remains un-compressed. The patch attached herein, updates the usr/Makefile to read CONFIG_RD_* variables, and also adds support for the Lz4 compression algorithm. Could you please review it? == PS: IIUC, I think INITRAMFS_COMPRESSION_* variables are not used anywhere at all. Though I'm not sure about the EMBEDDED configurations. But if they are not used, it could be better to remove their description/references from usr/Kconfig and other places. Thank you. -- Prasad J Pandit / Red Hat Security Response Team --0-1865401866-1381847858=:7552 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; NAME=0001-Read-CONFIG_RD_-variables-for-initramfs-compression.patch Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: ATTACHMENT; FILENAME=0001-Read-CONFIG_RD_-variables-for-initramfs-compression.patch RnJvbSAwMzA0ZmI0MDBjMjcyMjcxMDZjMWY5YTU3ZmUzZGUxM2NhMDNjY2Ey IE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQ0KRnJvbTogUCBKIFAgPHByYXNh ZEByZWRoYXQuY29tPg0KRGF0ZTogVHVlLCAxNSBPY3QgMjAxMyAxOToyODo0 MCArMDUzMA0KU3ViamVjdDogUmVhZCBDT05GSUdfUkRfIHZhcmlhYmxlcyBm b3IgaW5pdHJhbWZzIGNvbXByZXNzaW9uDQoNCldoZW4gZXhwZXJ0IGNvbmZp Z3VyYXRpb24gb3B0aW9uKENPTkZJR19FWFBFUlQpIGlzIGVuYWJsZWQsDQpt ZW51Y29uZmlnIG9mZmVycyBhIGNob2ljZSBvZiBjb21wcmVzc2lvbiBhbGdv cml0aG0gdG8gY29tcHJlc3MNCmluaXRpYWwgcmFtZnMgaW1hZ2U7IFRoaXMg Y2hvaWNlIGlzIHN0b3JlZCBpbnRvIENPTkZJR19SRF8qDQp2YXJpYWJsZXMu IEJ1dCB1c3IvTWFrZWZpbGUgdXNlcyBlYXJsaWVyIElOSVRSQU1GU19DT01Q UkVTU0lPTl8qDQptYWNyb3MgdG8gYnVpbGQgaW5pdGlhbCByYW1mcyBmaWxl LiBTaW5jZSBub25lIG9mIHRoZW0gaXMgZGVmaW5lZCwNCnJlc3VsdGluZyAn aW5pdHJhbWZzX2RhdGEuY3BpbycgZmlsZSByZW1haW5zIHVuLWNvbXByZXNz ZWQuDQoNClRoaXMgcGF0Y2ggdXBkYXRlcyB0aGUgTWFrZWZpbGUgdG8gdXNl IENPTkZJR19SRF8qIHZhcmlhYmxlcyBhbmQNCmFkZHMgc3VwcG9ydCBmb3Ig TFo0IGNvbXByZXNzaW9uIGFsZ29yaXRobS4NCg0KU2lnbm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19k YXRhLmNwaW8NCit0YXJnZXRzIDo9IGluaXRyYW1mc19kYXRhLmNwaW8uZ3og aW5pdHJhbWZzX2RhdGEuY3Bpby5iejIgXA0KKwlpbml0cmFtZnNfZGF0YS5j cGlvLmx6bWEgaW5pdHJhbWZzX2RhdGEuY3Bpby54eiBcDQorCWluaXRyYW1m c19kYXRhLmNwaW8ubHpvIGluaXRyYW1mc19kYXRhLmNwaW8ubHo0IFwNCisJ aW5pdHJhbWZzX2RhdGEuY3Bpbw0KICMgZG8gbm90IHRyeSB0byB1cGRhdGUg ZmlsZXMgaW5jbHVkZWQgaW4gaW5pdHJhbWZzDQogJChkZXBzX2luaXRyYW1m cyk6IDsNCiANCkBAIC02Niw0ICs3MiwzIEBAICQoZGVwc19pbml0cmFtZnMp OiBrbGliY2RpcnMNCiAkKG9iaikvaW5pdHJhbWZzX2RhdGEuY3BpbyQoc3Vm Zml4X3kpOiAkKG9iaikvZ2VuX2luaXRfY3BpbyAkKGRlcHNfaW5pdHJhbWZz KSBrbGliY2RpcnMNCiAJJChRKSQoaW5pdHJhbWZzKSAtbCAkKHJhbWZzLWlu cHV0KSA+ICQob2JqKS8uaW5pdHJhbWZzX2RhdGEuY3Bpby5kDQogCSQoY2Fs bCBpZl9jaGFuZ2VkLGluaXRmcykNCi0NCi0tIA0KMS44LjMuMQ0KDQo= --0-1865401866-1381847858=:7552-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/