Some kernel modules have colliding symbol naming and
can't be loaded at the same time. This was observed
e.g. with qcawifi and mac80211, where function names
overlap. Therefore, the decision which kernel modules
to use has to be made at build time, resulting in
different FW variants.

An alternative approach would be to include both
drivers in an unified FW and to remove / disable
kernel modules within the uci-default processing.

This is working as is, alas since in the boot phase
the uci_apply_defaults is called after kmodloader,
the kernel module remove / disable does not take
effect at the first boot after FW upgrade but at
the next - which in worst case might leave a stale
system.

This commit moves the kmodloader execution after
uci_apply_defaults is done.

Signed-off-by: Zefir Kurtisi <zefir.kurt...@neratec.com>
---
 package/base-files/files/etc/init.d/boot | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/base-files/files/etc/init.d/boot 
b/package/base-files/files/etc/init.d/boot
index 31f245ffc7..ab5ca452d2 100755
--- a/package/base-files/files/etc/init.d/boot
+++ b/package/base-files/files/etc/init.d/boot
@@ -36,8 +36,6 @@ boot() {
        grep -q debugfs /proc/filesystems && /bin/mount -o noatime -t debugfs 
debugfs /sys/kernel/debug
        [ "$FAILSAFE" = "true" ] && touch /tmp/.failsafe
 
-       /sbin/kmodloader
-
        [ ! -f /etc/config/wireless ] && {
                # compat for brcm47xx and mvebu
                sleep 1
@@ -46,6 +44,8 @@ boot() {
        /bin/config_generate
        uci_apply_defaults
        
+       /sbin/kmodloader
+
        # temporary hack until configd exists
        /sbin/reload_config
 }
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to