+ if enable_kmod_archive:
+ factory.addStep(ShellCommand(
+ name = "kmoddir",
+ description = "Creating kmod directory",
+ command=["mkdir", "-p", Interpolate("bin/targets/%(kw:target)s/%(kw:subtarget)s%(prop:libc)s/kmods/%(prop:kernelversion)s", target=ts[0], subtarget=ts[1])],
+ haltOnFailure = True
+ ))
+
+ factory.addStep(ShellCommand(
+ name = "kmodprepare",
+ description = "Preparing kmod archive",
+ command=["rsync", "--include=/kmod-*.ipk", "--exclude=*", "-va",
+ Interpolate("bin/targets/%(kw:target)s/%(kw:subtarget)s%(prop:libc)s/packages/", target=ts[0], subtarget=ts[1]),
+ Interpolate("bin/targets/%(kw:target)s/%(kw:subtarget)s%(prop:libc)s/kmods/%(prop:kernelversion)s/", target=ts[0], subtarget=ts[1])],
+ haltOnFailure = True
+ ))
+
+ factory.addStep(ShellCommand(
+ name = "kmodindex",
+ description = "Indexing kmod archive",
+ command=["make", Interpolate("-j%(kw:jobs)s", jobs=GetNumJobs), "package/index", "V=s",
+ Interpolate("PACKAGE_SUBDIRS=bin/targets/%(kw:target)s/%(kw:subtarget)s%(prop:libc)s/kmods/%(prop:kernelversion)s/", target=ts[0], subtarget=ts[1])],
+ env = MakeEnv(),
+ haltOnFailure = True
+ ))
+