brute

1.0.2 • Public • Published

brute

minimalist rootfs building utilities (for initramfs and such)

API

source brute/index.sh
root=/tmp/buildroot
if ! [[ "$(file -b /boot/vmlinuz-linux)" =~ "^Linux kernel[^,]*, version (\S+)" ]]; then
  echo "can't detect kernel version!" >&2
  exit 1
fi
kernel_version="${BASH_REMATCH[1]}"

add [path]

add just the given path to the root. if the parents are missing, they will be added recursively. if the path is a symlink, then the canonical path and a symlink will be added.

add_file [path]

alias to add

add_symlink [target] [source]

adds a relative symlink from source to target to the root.

add_directory [path]

recursively adds the files and subdirectories of the given path.

add_binary [path]

adds the given binary to the root, along with its dependencies (dynamic libraries, or the interpreter if it starts with #!)

add_module [name]

adds the given Linux kernel module to the root, along with its dependencies (firmware and other modules). this uses $kernel_version.

add_firmware [name]

adds /lib/firmware/$name to the root.

Readme

Keywords

none

Package Sidebar

Install

npm i brute

Weekly Downloads

3

Version

1.0.2

License

none

Last publish

Collaborators