initramfs: refactor the initramfs build rules
Currently, usr/gen_initramfs.sh takes care of all the use-cases:
[1] generates a cpio file unless CONFIG_INITRAMFS_SOURCE points to
a single cpio archive
[2] If CONFIG_INITRAMFS_SOURCE is the path to a cpio archive,
use it as-is.
[3] Compress the cpio file according to CONFIG_INITRAMFS_COMPRESSION_*
unless it is passed a compressed archive.
To simplify the script, move [2] and [3] to usr/Makefile.
If CONFIG_INITRAMFS_SOURCE is the path to a cpio archive, there is
no need to run this shell script.
For the cpio archive compression, you can re-use the rules from
scripts/Makefile.lib .
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
diff --git a/usr/.gitignore b/usr/.gitignore
index be5eae1..610de73 100644
--- a/usr/.gitignore
+++ b/usr/.gitignore
@@ -1,9 +1,3 @@
-#
-# Generated files
-#
gen_init_cpio
initramfs_data.cpio
-initramfs_data.cpio.gz
-initramfs_data.cpio.bz2
-initramfs_data.cpio.lzma
-initramfs_list
+/initramfs_inc_data