User:Goverp/Genlist

This article contains Article description::a shell script to generate gen_init_cpio input from a configuration file, for use when generating initramfs files or configurations for the linux kernel.

The idea is to create the configuration file to specify the programs used in your /init and list the resources (files, devices etc) that it uses. The script locates the program files, and the libraries on which they depend, and generates the necessary gen_init_cpio instructions to build the appropriate directory tree and files and so forth.

The script works by generating a list of all resources and their dependencies (i.e. libraries, files, and the directories in their paths), and throws the list at "tsort" to generate a minimal ordered set from it, and then expands the results into the gen_init_cpio input.

Usage is to run: and then do whatever is appropriate to your kernel/bootloader configuration.