minor fixes

This commit is contained in:
illiliti 2020-03-07 22:24:59 +03:00
parent ea4bc83b6e
commit ea46267e85
4 changed files with 25 additions and 32 deletions

View File

@ -1,5 +1,5 @@
# initramfs
Just another one implemetation of initramfs
Tiny initramfs for suckless systems
Features
--------
@ -7,7 +7,7 @@ Features
- Easy configuration
- LUKS
- LVM
- mdev,mdevd and eudev
- mdev, mdevd, eudev
Installation
------------
@ -15,7 +15,6 @@ Requirements:
* busybox
- --install [-s] [DIR]
- mdev
- uevent
- switch_root
- mount
- umount

7
config
View File

@ -14,6 +14,9 @@
# custom output name
#initramfs=""
# custom drivers directory
#moddir=""
# custom kernel version
#kernel=""
@ -30,9 +33,7 @@
# root options
#root_opts=""
# disable this if you want to get rid of util-linux
# NOTE busybox util-linux implemetation doesn't have
# PARTUUID support and proper filesystem type autodetection
# util-linux binaries
#util_linux=0
# device manager ( mdev,mdevd,udev )

View File

@ -6,7 +6,7 @@ panic() {
printf "panic >> %s\n" "$1"
# TODO fix job control
sh -l
sh
}
parse_cmdline() {
@ -37,9 +37,9 @@ parse_cmdline() {
luks.args) luks_args="$value" ;;
# TODO implement
#lvm.discard) ;;
#lvm.conf) ;;
#luks_header) ;;
#luks_keyfile) ;;
#lvm.config) ;;
#luks.header) ;;
#luks.keyfile) ;;
esac
done
}
@ -59,17 +59,10 @@ setup_devmgr() {
udevadm settle
;;
mdev)
uevent mdev &
mdev -s
for device in /sys/bus/usb/devices/*; do
case "${device##*/}" in [0-9]*-[0-9]*)
printf add > "${device}/uevent" ;;
esac
done
mdev -df &
find /sys -name modalias -type f -exec sort -u {} + |
xargs modprobe -b > /dev/null 2>&1
xargs modprobe -ba
;;
mdevd)
mdevd &
@ -134,7 +127,7 @@ mount_rootfs() {
cleanup() {
case "$devmgr" in
udev) udevadm control -e ;;
mdev) killall uevent ;;
mdev) killall mdev ;;
mdevd) killall mdevd ;;
esac

View File

@ -28,11 +28,11 @@ usage() {
cat << EOF
usage: $0 [options]
-o, --output <file> set initramfs image path
-o, --output <file> set initramfs image name
-c, --config <file> set config file path
-m, --moddir <dir> specify drivers directory
-m, --moddir <dir> set drivers directory
-k, --kernel <ver> set kernel version
-F, --files <dir> specify files directory
-F, --files <dir> set files directory
-d, --debug enable debug mode
-f, --force overwrite existing initramfs image
@ -470,8 +470,6 @@ trap "remove_workdir && trap - EXIT && exit" EXIT INT TERM HUP
create_workdir
create_structure
create_symlinks
install_requirements
install_devmgr
[ "$lvm" = 1 ] && install_lvm
[ "$luks" = 1 ] && install_luks
@ -491,7 +489,9 @@ else
msg warn "looks like you have monolithic kernel"
fi
install_devmgr
install_files
install_requirements
create_initramfs
msg info "done! check out $initramfs"