summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAlex Xu (Hello71) <alex_y_xu@yahoo.ca>2020-07-13 23:43:42 -0400
committerAlex Xu (Hello71) <alex_y_xu@yahoo.ca>2020-07-13 23:43:42 -0400
commit80d98ad93aaf8b02bce80dbbac81b2beed518d3a (patch)
tree830420eda23839518485ae6e58e83d2ec5ac4339 /Makefile
parent3a00916f4eb86a96de7f8c94974d20e3ea91c474 (diff)
downloadminitramfs-80d98ad93aaf8b02bce80dbbac81b2beed518d3a.tar.xz
minitramfs-80d98ad93aaf8b02bce80dbbac81b2beed518d3a.zip
add basic module support
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index e408200..f36ca69 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
all: initramfs.img
-initramfs.img: gen_init_cpio dropbear_ed25519_host_key
+initramfs.img: gen_init_cpio dropbear_ed25519_host_key modules.sh
./make
gen_init_cpio: gen_init_cpio.c
@@ -9,6 +9,10 @@ gen_init_cpio: gen_init_cpio.c
dropbear_ed25519_host_key:
dropbearkey -t ed25519 -f $@
+modules.sh: modules
+ printf '%s\n' '#!/bin/sh' 'set -e' > $@
+ xargs -a $< -L1 -r modprobe --show-depends >> $@
+
install: initramfs.img
rm -f /boot/initramfs.img.old /boot/initramfs.img.new
cp initramfs.img /boot/initramfs.img.new || rm -f /boot/initramfs.img.new