include/kernel: sort module lists for reproducibility
authorFelix Fietkau <nbd@openwrt.org>
Thu, 28 Jan 2016 22:42:29 +0000 (22:42 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 28 Jan 2016 22:42:29 +0000 (22:42 +0000)
This is to get reproducible builds of, eg, the kmod-sched ipkg.

Locale preferences can change build order, but the locale is already been
defined for the entire build process, so it doesn't need to be specified here.

Signed-off-by: bryan newbold <bnewbold@robocracy.org>
SVN-Revision: 48540

include/kernel.mk

index bb3c97228cccdf350f07a6c26137b2d9c6ad40ab..432e8ce1238acff20823f635e6700119f36d5346 100644 (file)
@@ -90,7 +90,7 @@ define ModuleAutoLoad
                mods="$$$$$$$$1"; \
                boot="$$$$$$$$2"; \
                shift 2; \
-               for mod in $$$$$$$$mods; do \
+               for mod in $(sort $$$$$$$$mods); do \
                        mkdir -p $(2)/etc/modules.d; \
                        echo "$$$$$$$$mod" >> $(2)/etc/modules.d/$(1); \
                done; \
@@ -107,7 +107,7 @@ define ModuleAutoLoad
                mods="$$$$$$$$2"; \
                boot="$$$$$$$$3"; \
                shift 3; \
-               for mod in $$$$$$$$mods; do \
+               for mod in $(sort $$$$$$$$mods); do \
                        mkdir -p $(2)/etc/modules.d; \
                        echo "$$$$$$$$mod" >> $(2)/etc/modules.d/$$$$$$$$priority-$(1); \
                done; \