From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934680AbcI0Tau (ORCPT ); Tue, 27 Sep 2016 15:30:50 -0400 Received: from mail-lf0-f66.google.com ([209.85.215.66]:32914 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933425AbcI0Tan (ORCPT ); Tue, 27 Sep 2016 15:30:43 -0400 Subject: [PATCH v2 1/2] initramfs: allow again choice of the embedded compression algorithm To: linux-kernel@vger.kernel.org References: <54239E69.4050803@klondike.es> Cc: P J P , Paul Bolle , Andrew Morton From: klondike X-Enigmail-Draft-Status: N1110 Message-ID: <57EAC8CC.3070602@klondike.es> Date: Tue, 27 Sep 2016 21:30:20 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <54239E69.4050803@klondike.es> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="d9lXoLadHVxGINj5SuE5rOMNx7KGiGHWK" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --d9lXoLadHVxGINj5SuE5rOMNx7KGiGHWK Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Select builtin initram compression algorithm on KConfig instead of Makefi= le This patch moves the current builtin initram compression algorithm select= ion from the Makefile into the INITRAMFS_COMPRESSION variable. This makes deciding algorithm precedence easier and would allow for overrides if new algorith= ms want to be tested. Signed-off-by: Francisco Blas Izquierdo Riera (klondike) Cc: P J P Cc: Paul Bolle Cc: Andrew Morton diff --git a/usr/Kconfig b/usr/Kconfig index 572dcf7..bf8e8f1 100644 --- a/usr/Kconfig +++ b/usr/Kconfig @@ -98,3 +98,13 @@ config RD_LZ4 help Support loading of a LZ4 encoded initial ramdisk or cpio buffer If unsure, say N. + +config INITRAMFS_COMPRESSION + string + default ".gz" if RD_GZIP + default ".lz4" if RD_LZ4 + default ".lzo" if RD_LZO + default ".xz" if RD_XZ + default ".lzma" if RD_LZMA + default ".bz2" if RD_BZIP2 + default "" diff --git a/usr/Makefile b/usr/Makefile index e767f01..17a5132 100644 --- a/usr/Makefile +++ b/usr/Makefile @@ -5,25 +5,7 @@ klibcdirs:; PHONY +=3D klibcdirs =20 - -# Bzip2 -suffix_$(CONFIG_RD_BZIP2) =3D .bz2 - -# Lzma -suffix_$(CONFIG_RD_LZMA) =3D .lzma - -# XZ -suffix_$(CONFIG_RD_XZ) =3D .xz - -# Lzo -suffix_$(CONFIG_RD_LZO) =3D .lzo - -# Lz4 -suffix_$(CONFIG_RD_LZ4) =3D .lz4 - -# Gzip -suffix_$(CONFIG_RD_GZIP) =3D .gz - +suffix_y =3D $(CONFIG_INITRAMFS_COMPRESSION) AFLAGS_initramfs_data.o +=3D -DINITRAMFS_IMAGE=3D"usr/initramfs_data.cpio$(suffix_y)" =20 # Generate builtin.o based on initramfs_data.o --d9lXoLadHVxGINj5SuE5rOMNx7KGiGHWK Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCgAGBQJX6sjSAAoJEPLcgKVuD9jN3d4QAIfs9kaK5/TarRPJQ7CfDtGS ckLoUbT0LihxeepxeBlbNke+IbEWN+IWMtBuUtpxDOznEjCg7LxA+8UeZIT1vdpV /6YRWlCYubEODbaS4//r3FI3mL3FcxlpMmp4vMnkobsNM5P4yTHJneDLNQ5L/u7d mKqTD3NE2/8ny598TFVQo5atWoPnsOjS7RuoVBmqTuCcepFj3VLd98g3MVW4wwhB g/yOzuKw5f0crFTVaoJVoT4y3ItKNr3E2XMlQ+nOURItBCOiB5n+70iVHgRfdOyc bsd8OrwZ2kRKtbVCkBYuBYuEipWPTPViZNFsFcd4rKSxC6zVLFuDYUmsy3mSUVtg Ffs19Q5jiQ1qMz3dIGTbuMqnFWhpEtNr4pom1QcryRFOF80mA7sJ/7pL8SgtExTH lRW2QB/sIubciFqMVZmPU9CRPP9E30MjDuWVM6UfbOJQ2f0ZoSQZxFm7EI90YjNF msMN721JjLK2M+IW+xVTH/vPIPb0k/oUkZxHni0PBBOdgIBPoB7p1yu//qq5oePy 0R4Niv2X8+02/IDqYJ6iW7a6JiZV6VopuRaA1RbsPWXyjA8ZXhzUND1gQGXOOCRc doSDMLShKcR5pNtj5AWbiKCGLojI4hCESla1F0Rt8DdXi2wJB1QOe38rINvjsbtt H8O4XwXwMFxskSRNuz3U =Cjtf -----END PGP SIGNATURE----- --d9lXoLadHVxGINj5SuE5rOMNx7KGiGHWK--