Skip to content
Snippets Groups Projects
  1. Oct 20, 2023
    • David Bauer's avatar
      build: fix duplicate building of host-tools · 6b22b742
      David Bauer authored
      Upstream introduced two different methods for determining the state of a
      package within the OpenWrt buildsystem. While both are based around the
      md5 hash-function, one taks filename & mtime into account while the
      other one uses the actual md5 hash of the file-content.
      
      Ever wondered why Gluon suddenly took considerably longer to build?
      The messy part is how the build-system chooses which method to use. This
      is based around the AUTOREMOVE configuration. Gluon sets this variable
      conditionally when built with GLUON_AUTOREMOVE set to 1.
      
      Enter the Gluon build-system. It first compiles Lua, without the
      AUTOREMOVE configuration passed to OpenWrt. This compiles the packages
      with the old hash-method based around filename & mtime. Afterwards, it
      builds with AUTOREMOVE enabled, changing the hash-function and
      rebuilding all host-packages.
      
      Fix this by setting AUTOREMOVE for both build-processes according to the
      setting of GLUON_AUTOREMOVE.
      
      Link: https://github.com/openwrt/openwrt/commit/53a08e37437972ba0a8fbf953a93a70a6b784ef4
      
      
      
      Signed-off-by: default avatarDavid Bauer <mail@david-bauer.net>
      6b22b742
  2. Oct 14, 2023
  3. Sep 10, 2023
  4. Jan 15, 2023
  5. Dec 18, 2022
  6. Aug 23, 2022
  7. Mar 24, 2022
  8. Jan 03, 2022
  9. Jan 01, 2022
  10. Dec 31, 2021
  11. Dec 21, 2021
    • Martin Weinelt's avatar
      Add helper to run a containerized build environment (#2292) · 6728c4a1
      Martin Weinelt authored
      Using `make container` or, if you don't have automake/gmake on your host
      system, `./scripts/container.sh` will build an image for the current
      branch your are on and drop you into a shell running inside a container
      using that image.
      
      From there all tooling required to work on Gluon is available.
      
      Supports both podman (preferred) and docker.
      6728c4a1
  12. Oct 07, 2021
  13. Oct 05, 2021
  14. Aug 14, 2021
  15. Aug 10, 2021
  16. Jul 13, 2021
  17. Jul 12, 2021
  18. Jun 12, 2021
  19. Oct 10, 2020
  20. Aug 28, 2020
    • Matthias Schiffer's avatar
      features: handle all feature files in a single pass of feature_lib.get_packages() · a9c2db93
      Matthias Schiffer authored
      All defined features need to be known at the same time, otherwise handling
      a feed-provided feature definition file would add gluon-web-advanced etc.
      to the package list when the corresponding feature flags appear in
      GLUON_FEATURES.
      
      Fixes: ee5ec5af ("build: rewrite features.sh in Lua")
      a9c2db93
    • Matthias Schiffer's avatar
      features: fix handling of logical expressions · 13b743d5
      Matthias Schiffer authored
      The rewrite of the feature handling introduced multiple major bugs. One
      of them was caused by the way Lua's logical operators work:
      
      An expression of the form
      
          _'autoupdater' and _'web-advanced'
      
      would return 'web-advanced' rather than the boolean true when _ returned
      both strings unchanged (because the features are enabled).
      
      As entries with more than a single feature name in their expressions did
      not set no_default, Gluon would then attempt to add gluon-web-advanced to
      the package selection, as web-advanced is a "pure" feature.
      
      To fix this, and get rid of the annoying nodefault, separate handling of
      "pure" feature and handling of logical expressions into two separate
      functions, called feature() and when(). To simplify the feature
      definitions, the package list is now passed directly to these functions
      rather than in a table with a single field 'packages'.
      
      Fixes: ee5ec5af ("build: rewrite features.sh in Lua")
      13b743d5
    • Matthias Schiffer's avatar
      scripts: feature_lib.lua: improve error handling for invalid feature files · 097efa9d
      Matthias Schiffer authored
      Print a proper error message, rather than just
      
          openwrt/staging_dir/hostpkg/bin/lua: scripts/feature_lib.lua:48: bad
          argument #1 to 'setfenv' (integer expected, got nil)
      097efa9d
  21. Aug 15, 2020
    • Matthias Schiffer's avatar
      build: check for unsynced feeds before build (#2092) · ea2b811a
      Matthias Schiffer authored
      Forgetting to `make update` or leaving uncommitted changes in the
      repositories managed by Gluon is a recurring cause of confusion, even
      for experienced developers. Let's print an obvious warning message in
      this case.
      ea2b811a
    • Matthias Schiffer's avatar
      scripts/target_lib.lua: print a meaningful error message for missing site_code (#2094) · bd0133ad
      Matthias Schiffer authored
      site_code is evaluated early during config generation, so a site.conf
      without site_code would hit this assertion that just printed 'Assertion
      failed'. Add a proper error message to tell users what went wrong.
      
      The inner assert() is removed, as it should never be hit (as site.conf
      syntax will have already been validated when this script runs), and it
      doesn't add anything (even without the assert, the attempt to index a
      nil value would throw an error).
      bd0133ad
  22. Jul 04, 2020
  23. Jul 01, 2020
    • Matthias Schiffer's avatar
      build: rewrite features.sh in Lua · ee5ec5af
      Matthias Schiffer authored
      The `features` file is converted to a Lua-based DSL.
      
      A helper function `_` is used in the DSL; this will return the original
      string for enabled features, and nil for disabled features. This allows
      to use boolean operations on features without making the code too
      verbose.
      
      Besides having more readable and robust code, this also fixes the bug
      that all files `packages/*/features` were evaluated instead of only
      using the feature definitions of currently active feeds.
      ee5ec5af
    • Matthias Schiffer's avatar
  24. Jun 12, 2020
  25. Jun 11, 2020
  26. Jun 07, 2020
    • Matthias Schiffer's avatar
      build: target_config_check: make check more lenient · 11beb822
      Matthias Schiffer authored
      Always allow options set to builtin (=y) when modular setting (=m) is
      expected. This can happen when a package is added explicitly (in a
      target defintion or site.mk) that is also pulled in as a dependency of
      another builtin package.
      
      Fixes: 9e23534e ("build: rework config generation")
      Fixes: #2046
      (cherry picked from commit 8b64517f)
      11beb822
  27. Jun 05, 2020
    • Matthias Schiffer's avatar
      build: target_config_check: make check more lenient · 8b64517f
      Matthias Schiffer authored
      Always allow options set to builtin (=y) when modular setting (=m) is
      expected. This can happen when a package is added explicitly (in a
      target defintion or site.mk) that is also pulled in as a dependency of
      another builtin package.
      
      Fixes: 9e23534e ("build: rework config generation")
      Fixes: #2046
      8b64517f
  28. Jun 04, 2020
    • Chrissi^ (Chris Fiege)'s avatar
      openwrt: Store Kernel Debug-Info (#1971) · 1956696d
      Chrissi^ (Chris Fiege) authored
      
      This change stores a Kernel with Debug-Symbols for the current
      architecture in a new output directory '<outputdir>/debug'.
      This allows a developer or operator of a network to store the kernel
      along with the actual images. In case of a kernel oops the debug
      information can be used with the script
      'scripts/decode_stacktrace.sh' in the kernel source tree to get the
      names to the symbols of the stack trace.
      
      OpenWRT already provides the CONFIG_COLLECT_KERNEL_DEBUG -option that
      creates a kernel with debug-symbols in the OpenWRT output directory.
      This change enables this option and copies the generated kernel to the
      gluon output directory.
      
      Signed-off-by: default avatarChrissi^ <chris@tinyhost.de>
      1956696d
  29. May 31, 2020
    • Matthias Schiffer's avatar
      build: target_lib: allow to specify multiple factory_ext values · 7279c401
      Matthias Schiffer authored
      By passing a table instead of a single string, multiple different
      extensions can be specified, each refering to a separate image file
      generated by OpenWrt.
      
      This is not supported for sysupgrade (as there can only be a single
      image in the format expected by OpenWrt).
      7279c401
    • Matthias Schiffer's avatar
      build: target_lib: do not pass manifest_aliases when defining factory and extra images · 8c386719
      Matthias Schiffer authored
      manifest_aliases only make sense for sysupgrade images.
      8c386719
    • Matthias Schiffer's avatar
      build: remove now-unneeded function from target_config_lib.lua · 3ce43329
      Matthias Schiffer authored
      target_config.lua and target_config_check.lua don't pass a table of
      callbacks anymore, so target_config_lib.lua can by simplified by moving
      all the code that was in the returned function to the toplevel.
      3ce43329
    • Matthias Schiffer's avatar
      build: rework config generation · 9e23534e
      Matthias Schiffer authored
      So far, we were using a sort operation on the generated .config to
      implement precedence of =y packages over =m, and =m over unset.
      Unfortunately, this sort not only used for packages, but for all config
      lines. This made it impossible to override settings from targets/generic
      in a target config when the new setting was sorted before the generic
      setting.
      
      To fix this, track configurations by their keys, so we can properly
      override config keys that were set before. Value-based precedence is
      only preserved for package configuration.
      
      The config() and try_config() calls always take key and value as
      separate arguments now. Strings are quoted automatically; the values
      true, nil and false map to y, m and unset for tristate options. config()
      can take an optional third argument to override the error message to
      display when the setting fails to apply.
      
      All existing target configs generate the same .config with the old and the
      new code. The new code is also a bit faster on targets with many devices.
      9e23534e
  30. May 24, 2020
Loading