Skip to content
Snippets Groups Projects
  1. Sep 28, 2022
  2. Sep 23, 2022
  3. Jul 27, 2022
  4. Jun 04, 2022
  5. Apr 05, 2022
  6. Apr 01, 2022
  7. Feb 18, 2022
  8. Feb 12, 2022
  9. Feb 10, 2022
  10. Feb 08, 2022
    • Brenda Streiff's avatar
      kconfig: let 'shell' return enough output for deep path names · 8a4c5b2a
      Brenda Streiff authored
      
      The 'shell' built-in only returns the first 256 bytes of the command's
      output. In some cases, 'shell' is used to return a path; by bumping up
      the buffer size to 4096 this lets us capture up to PATH_MAX.
      
      The specific case where I ran into this was due to commit 1e860048
      ("gcc-plugins: simplify GCC plugin-dev capability test"). After this
      change, we now use `$(shell,$(CC) -print-file-name=plugin)` to return
      a path; if the gcc path is particularly long, then the path ends up
      truncated at the 256 byte mark, which makes the HAVE_GCC_PLUGINS
      depends test always fail.
      
      Signed-off-by: default avatarBrenda Streiff <brenda.streiff@ni.com>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      8a4c5b2a
  11. Jan 08, 2022
    • Masahiro Yamada's avatar
      kbuild: do not quote string values in include/config/auto.conf · 129ab0d2
      Masahiro Yamada authored
      
      The previous commit fixed up all shell scripts to not include
      include/config/auto.conf.
      
      Now that include/config/auto.conf is only included by Makefiles,
      we can change it into a more Make-friendly form.
      
      Previously, Kconfig output string values enclosed with double-quotes
      (both in the .config and include/config/auto.conf):
      
          CONFIG_X="foo bar"
      
      Unlike shell, Make handles double-quotes (and single-quotes as well)
      verbatim. We must rip them off when used.
      
      There are some patterns:
      
        [1] $(patsubst "%",%,$(CONFIG_X))
        [2] $(CONFIG_X:"%"=%)
        [3] $(subst ",,$(CONFIG_X))
        [4] $(shell echo $(CONFIG_X))
      
      These are not only ugly, but also fragile.
      
      [1] and [2] do not work if the value contains spaces, like
         CONFIG_X=" foo bar "
      
      [3] does not work correctly if the value contains double-quotes like
         CONFIG_X="foo\"bar"
      
      [4] seems to work better, but has a cost of forking a process.
      
      Anyway, quoted strings were always PITA for our Makefiles.
      
      This commit changes Kconfig to stop quoting in include/config/auto.conf.
      
      These are the string type symbols referenced in Makefiles or scripts:
      
          ACPI_CUSTOM_DSDT_FILE
          ARC_BUILTIN_DTB_NAME
          ARC_TUNE_MCPU
          BUILTIN_DTB_SOURCE
          CC_IMPLICIT_FALLTHROUGH
          CC_VERSION_TEXT
          CFG80211_EXTRA_REGDB_KEYDIR
          EXTRA_FIRMWARE
          EXTRA_FIRMWARE_DIR
          EXTRA_TARGETS
          H8300_BUILTIN_DTB
          INITRAMFS_SOURCE
          LOCALVERSION
          MODULE_SIG_HASH
          MODULE_SIG_KEY
          NDS32_BUILTIN_DTB
          NIOS2_DTB_SOURCE
          OPENRISC_BUILTIN_DTB
          SOC_CANAAN_K210_DTB_SOURCE
          SYSTEM_BLACKLIST_HASH_LIST
          SYSTEM_REVOCATION_KEYS
          SYSTEM_TRUSTED_KEYS
          TARGET_CPU
          UNUSED_KSYMS_WHITELIST
          XILINX_MICROBLAZE0_FAMILY
          XILINX_MICROBLAZE0_HW_VER
          XTENSA_VARIANT_NAME
      
      I checked them one by one, and fixed up the code where necessary.
      
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      129ab0d2
  12. Dec 02, 2021
  13. Oct 11, 2021
  14. Oct 01, 2021
  15. Sep 29, 2021
  16. Sep 25, 2021
    • Ariel Marcovitch's avatar
      kconfig: Create links to main menu items in search · d05377e1
      Ariel Marcovitch authored
      
      When one searches for a main menu item, links aren't created for it like
      with the rest of the symbols.
      
      This happens because we trace the item until we get to the rootmenu, but
      we don't include it in the path of the item. The rationale was probably
      that we don't want to show the main menu in the path of all items,
      because it is redundant.
      
      However, when an item has only the rootmenu in its path it should be
      included, because this way the user can jump to its location.
      
      Add a 'Main menu' entry in the 'Location:' section for the kconfig
      items.
      
      This makes the 'if (i > 0)' superfluous because each item with prompt
      will have at least one menu in its path.
      
      Signed-off-by: default avatarAriel Marcovitch <arielmarcovitch@gmail.com>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      d05377e1
  17. Aug 09, 2021
  18. Jun 29, 2021
  19. Jun 05, 2021
  20. Apr 25, 2021
    • Masahiro Yamada's avatar
      kconfig: refactor .gitignore · 8ac27f2c
      Masahiro Yamada authored
      
      Add '/' prefix to clarify that the generated files exist right under
      scripts/kconfig/, but not in any sub-directory.
      
      Replace '*conf-cfg' with '[gmnq]conf-cfg' to make it explicit, and
      still short enough.
      
      Use '[gmnq]conf' to combine gconf, mconf, nconf, and qconf.
      
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      8ac27f2c
  21. Apr 24, 2021
    • Alexey Dobriyan's avatar
      kbuild: redo fake deps at include/config/*.h · 0e0345b7
      Alexey Dobriyan authored
      
      Make include/config/foo/bar.h fake deps files generation simpler.
      
      * delete .h suffix
      	those aren't header files, shorten filenames,
      
      * delete tolower()
      	Linux filesystems can deal with both upper and lowercase
      	filenames very well,
      
      * put everything in 1 directory
      	Presumably 'mkdir -p' split is from dark times when filesystems
      	handled huge directories badly, disks were round adding to
      	seek times.
      
      	x86_64 allmodconfig lists 12364 files in include/config.
      
      	../obj/include/config/
      	├── 104_QUAD_8
      	├── 60XX_WDT
      	├── 64BIT
      		...
      	├── ZSWAP_DEFAULT_ON
      	├── ZSWAP_ZPOOL_DEFAULT
      	└── ZSWAP_ZPOOL_DEFAULT_ZBUD
      
      	0 directories, 12364 files
      
      Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      0e0345b7
  22. Apr 19, 2021
  23. Apr 16, 2021
    • Mihai Moldovan's avatar
      kconfig: nconf: stop endless search loops · 8c94b430
      Mihai Moldovan authored
      
      If the user selects the very first entry in a page and performs a
      search-up operation, or selects the very last entry in a page and
      performs a search-down operation that will not succeed (e.g., via
      [/]asdfzzz[Up Arrow]), nconf will never terminate searching the page.
      
      The reason is that in this case, the starting point will be set to -1
      or n, which is then translated into (n - 1) (i.e., the last entry of
      the page) or 0 (i.e., the first entry of the page) and finally the
      search begins. This continues to work fine until the index reaches 0 or
      (n - 1), at which point it will be decremented to -1 or incremented to
      n, but not checked against the starting point right away. Instead, it's
      wrapped around to the bottom or top again, after which the starting
      point check occurs... and naturally fails.
      
      My original implementation added another check for -1 before wrapping
      the running index variable around, but Masahiro Yamada pointed out that
      the actual issue is that the comparison point (starting point) exceeds
      bounds (i.e., the [0,n-1] interval) in the first place and that,
      instead, the starting point should be fixed.
      
      This has the welcome side-effect of also fixing the case where the
      starting point was n while searching down, which also lead to an
      infinite loop.
      
      OTOH, this code is now essentially all his work.
      
      Amazingly, nobody seems to have been hit by this for 11 years - or at
      the very least nobody bothered to debug and fix this.
      
      Signed-off-by: default avatarMihai Moldovan <ionic@ionic.de>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      8c94b430
  24. Apr 14, 2021
    • Masahiro Yamada's avatar
      kconfig: split menu.c out of parser.y · a77a05dc
      Masahiro Yamada authored
      
      Compile menu.c as an independent compilation unit.
      
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      a77a05dc
    • Masahiro Yamada's avatar
      kconfig: nconf: refactor in print_in_middle() · 08718745
      Masahiro Yamada authored
      This helper is the same as the sample code in the NCURSES HOWTO [1],
      but it is over-engineering to be used for nconf.
      
      I do not see any good reason to use the 'float' type just for the
      division by 2.
      
      All the call-sites pass a non-NULL pointer to the first argument,
      so 'if (win == NULL) win = stdscr;' is dead code.
      
      'if (startx != 0) x = startx;' is dead code because 'x' will be
      overridden some lines below, by 'x = startx + (int)temp;'.
      
      All the call-sites pass a non-zero value to the second argument,
      so 'if (starty != 0)' is always true.
      
      getyx(win, y, x) is also dead-code because both 'y' and 'x' are
      overridden.
      
      All the call-sites pass 0 to the third parameter, so 'startx' can
      be removed.
      
      All the call-sites pass a non-zero value to the fourth parameter,
      so 'if (width == 0) width = 80;' is dead code.
      
      The window will be refreshed later, so there is no need to call
      refresh() in this function.
      
      Change the type of the last parameter from 'chtype' to 'int' to be
      aligned with the prototype, 'int wattrset(WINDOW *win, int attrs);'
      
      I also slightly cleaned up the indentation style.
      
      [1]: https://tldp.org/HOWTO/NCURSES-Programming-HOWTO/color.html
      
      
      
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      08718745
Loading