1. 29 Dec, 2023 6 commits
    • Dmitry Safonov's avatar
      gen_init_cpio: Apply mtime supplied by user to all file types · f3b2306b
      Dmitry Safonov authored
      Currently gen_init_cpio -d <timestamp> is applied to symlinks,
      directories and special files. These files are created by
      gen_init_cpio from their description. Without <timestamp> option
      current time(NULL) is used. And regular files that go in initramfs
      are created before cpio generation, so their mtime(s) are preserved.
      
      This is usually not an issue as reproducible builds should rebuild
      everything in the distribution, including binaries, configs and whatever
      other regular files may find their way into kernel's initramfs.
      
      On the other hand, gen_initramfs.sh usage claims:
      >	-d <date>      Use date for all file mtime values
      
      Ar Arista initramfs files are managed with version control system
      that preserves mtime. Those are configs, boot parameters, init scripts,
      version files, platform-specific files, probably some others, too.
      
      While it's certainly possible to work this around by copying the file
      into temp directory and adjusting mtime prior to gen_init_cpio call,
      I don't see why it needs workarounds.
      
      The intended user of -d <date> option is the one that needs to create
      a reproducible build, see commit a8b8017c ("initramfs: Use
      KBUILD_BUILD_TIMESTAMP for generated entries"). If a user wants
      the build reproduction, they use -d <date>, which can be set on all
      types of files, without surprising exceptions and workarounds.
      Let's KISS here and just apply the time that user specified
      with -d option.
      Based-on-a-patch-by: default avatarBaptiste Covolato <baptiste@arista.com>
      Link: https://lore.kernel.org/lkml/20181025215133.20138-1-baptiste@arista.com/Signed-off-by: default avatarDmitry Safonov <dima@arista.com>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      f3b2306b
    • Masahiro Yamada's avatar
      kbuild: resolve symlinks for O= properly · 7beba04e
      Masahiro Yamada authored
      Currently, Kbuild follows the logical chain of directories for the O=
      option, just like 'cd' (or 'realpath --logical') does.
      
      Example:
      
          $ mkdir -p /tmp/a /tmp/x/y
          $ ln -s /tmp/x/y /tmp/a/b
          $ realpath /tmp/a/b/..
          /tmp/x
          $ realpath --logical /tmp/a/b/..
          /tmp/a
          $ make O=/tmp/a/b/.. defconfig
          make[1]: Entering directory '/tmp/a'
            [snip]
          make[1]: Leaving directory '/tmp/a'
      
      'make O=/tmp/a/b/.. defconfig' creates the kernel configuration in
      /tmp/a instead of /tmp/x despite /tmp/a/b/.. resolves to /tmp/x.
      
      This is because Kbuild internally uses the 'cd ... && pwd' for the
      path resolution, but this behavior is not predictable for users.
      Additionally, it is not consistent with how the Kbuild handles the
      M= option or GNU Make works with 'make -C /tmp/a/b/..'.
      
      Using the physical directory structure for the O= option seems more
      reasonable.
      
      The comment says "expand a shell special character '~'", but it has
      already been expanded to the home directory in the command line.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Reviewed-by: default avatarNicolas Schier <n.schier@avm.de>
      7beba04e
    • John Moon's avatar
      docs: dev-tools: Add UAPI checker documentation · 8c88bc5b
      John Moon authored
      Add detailed documentation for scripts/check-uapi.sh.
      Signed-off-by: default avatarJohn Moon <quic_johmoo@quicinc.com>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      8c88bc5b
    • John Moon's avatar
      check-uapi: Introduce check-uapi.sh · 1f7f31bf
      John Moon authored
      While the kernel community has been good at maintaining backwards
      compatibility with kernel UAPIs, it would be helpful to have a tool
      to check if a commit introduces changes that break backwards
      compatibility.
      
      To that end, introduce check-uapi.sh: a simple shell script that
      checks for changes to UAPI headers using libabigail.
      
      libabigail is "a framework which aims at helping developers and
      software distributors to spot some ABI-related issues like interface
      incompatibility in ELF shared libraries by performing a static
      analysis of the ELF binaries at hand."
      
      The script uses one of libabigail's tools, "abidiff", to compile the
      changed header before and after the commit to detect any changes.
      
      abidiff "compares the ABI of two shared libraries in ELF format. It
      emits a meaningful report describing the differences between the two
      ABIs."
      
      The script also includes the ability to check the compatibility of
      all UAPI headers across commits. This allows developers to inspect
      the stability of the UAPIs over time.
      Signed-off-by: default avatarJohn Moon <quic_johmoo@quicinc.com>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      1f7f31bf
    • Leonardo Bras's avatar
      scripts: Introduce a default git.orderFile · 67f8f1e7
      Leonardo Bras authored
      When reviewing patches, it looks much nicer to have some changes shown
      before others, which allow better understanding of the patch before the
      the .c files reviewing.
      
      Introduce a default git.orderFile, in order to help developers getting the
      best ordering easier.
      Signed-off-by: default avatarLeonardo Bras <leobras@redhat.com>
      Acked-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      67f8f1e7
    • Sergey Senozhatsky's avatar
      kconfig: WERROR unmet symbol dependency · 15d3f766
      Sergey Senozhatsky authored
      When KCONFIG_WERROR env variable is set treat unmet direct
      symbol dependency as a terminal condition (error).
      Suggested-by: default avatarStefan Reinauer <reinauer@google.com>
      Signed-off-by: default avatarSergey Senozhatsky <senozhatsky@chromium.org>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      15d3f766
  2. 28 Dec, 2023 6 commits
  3. 10 Dec, 2023 11 commits
  4. 03 Dec, 2023 4 commits
  5. 28 Nov, 2023 13 commits