From 6dbd594e10a49d47463e086260b3e62c126db9de Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Sun, 30 Apr 2023 18:07:33 +0200 Subject: preinit: load dt-modules when a device-tree is found Now we'll load this before even bootmodules so that we have most of the required devices early. If the variable SKIPMODULES is set to 1, this step will be skipped (e.g. might be needed if one causes trouble). --- .preinit | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.preinit b/.preinit index 9ec55d7..dd2a621 100644 --- a/.preinit +++ b/.preinit @@ -96,6 +96,18 @@ ex /sbin/glinet-button ex /sbin/restore-factory -f } +# load the needed modules for device tree nodes +te SKIPMODULES=1 +|{ + st /sys/firmware/devicetree/ + &st /sbin/dt-modules + &{ + ec "Loading modules for device tree devices..." + ex /sbin/dt-modules + ec "Done." + } +} + # needed for USB keyboards ex /sbin/bootmodules -- 2.35.3