diff options
author | Alex Xu (Hello71) <alex_y_xu@yahoo.ca> | 2020-11-11 08:08:48 -0500 |
---|---|---|
committer | Alex Xu (Hello71) <alex_y_xu@yahoo.ca> | 2020-11-11 08:09:28 -0500 |
commit | 4eb0a578d5a950064b7b75ec26608f0f2687f2a5 (patch) | |
tree | 8442a1f40e26e08eb24b6cddfbbbd26e991fdd7b | |
parent | 3182b56e35e1a07c920ebded54fc55686ced99bf (diff) | |
download | minitramfs-4eb0a578d5a950064b7b75ec26608f0f2687f2a5.tar.xz minitramfs-4eb0a578d5a950064b7b75ec26608f0f2687f2a5.zip |
use latest kernel version, fix awk $$
-rw-r--r-- | Makefile | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -1,6 +1,8 @@ MAKEFLAGS += -r CFLAGS += -Wall -Wextra -KERNVER ?= $(shell uname -r) +null := +space := $(null) $(null) +KERNVER ?= $(lastword $(subst /,$(space),$(wildcard /lib/modules/*/))) all: initramfs.img @@ -16,8 +18,8 @@ dropbear_ed25519_host_key: modules.dep.ver: FORCE if ! [ -f $@ ] || [ "$$(cat $@)" != "$(KERNVER)" ]; then echo $(KERNVER) > $@; fi -modules.dep: modules /lib/modules/$(KERNVER)/modules.dep modules.dep.ver - awk '!/^#/ { print $1 }' modules | xargs modinfo -F filename -k $(KERNVER) | sed -e 's:^/lib/modules/$(KERNVER)/:^:' | grep -f - /lib/modules/$(KERNVER)/modules.dep > $@ +modules.dep: modules modules.dep.ver /lib/modules/$(KERNVER)/modules.dep + awk '!/^#/ { print $$1 }' modules | xargs modinfo -F filename -k $(KERNVER) | sed -e 's:^/lib/modules/$(KERNVER)/:^:' | grep -f - /lib/modules/$(KERNVER)/modules.dep > $@ install: initramfs.img rm -f /boot/initramfs.img.old /boot/initramfs.img.new |