Skip to content
Snippets Groups Projects
  1. May 01, 2021
  2. Mar 25, 2020
  3. Jan 15, 2020
    • Masahiro Yamada's avatar
      initramfs: refactor the initramfs build rules · 65e00e04
      Masahiro Yamada authored
      
      Currently, usr/gen_initramfs.sh takes care of all the use-cases:
      
       [1] generates a cpio file unless CONFIG_INITRAMFS_SOURCE points to
           a single cpio archive
      
       [2] If CONFIG_INITRAMFS_SOURCE is the path to a cpio archive,
           use it as-is.
      
       [3] Compress the cpio file according to CONFIG_INITRAMFS_COMPRESSION_*
           unless it is passed a compressed archive.
      
      To simplify the script, move [2] and [3] to usr/Makefile.
      
      If CONFIG_INITRAMFS_SOURCE is the path to a cpio archive, there is
      no need to run this shell script.
      
      For the cpio archive compression, you can re-use the rules from
      scripts/Makefile.lib .
      
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      65e00e04
  4. Jul 08, 2019
    • Masahiro Yamada's avatar
      kbuild: compile-test exported headers to ensure they are self-contained · d6fc9fcb
      Masahiro Yamada authored
      Multiple people have suggested compile-testing UAPI headers to ensure
      they can be really included from user-space. "make headers_check" is
      obviously not enough to catch bugs, and we often leak unresolved
      references to user-space.
      
      Use the new header-test-y syntax to implement it. Please note exported
      headers are compile-tested with a completely different set of compiler
      flags. The header search path is set to $(objtree)/usr/include since
      exported headers should not include unexported ones.
      
      We use -std=gnu89 for the kernel space since the kernel code highly
      depends on GNU extensions. On the other hand, UAPI headers should be
      written in more standardized C, so they are compiled with -std=c90.
      This will emit errors if C++ style comments, the keyword 'inline', etc.
      are used. Please use C style comments (/* ... */), '__inline__', etc.
      in UAPI headers.
      
      There is additional compiler requirement to enable this test because
      many of UAPI headers include <stdlib.h>, <sys/ioctl.h>, <sys/time.h>,
      etc. directly or indirectly. You cannot use kernel.org pre-built
      toolchains [1] since they lack <stdlib.h>.
      
      I reused CONFIG_CC_CAN_LINK to check the system header availability.
      The intention is slightly different, but a compiler that can link
      userspace programs provide system headers.
      
      For now, a lot of headers need to be excluded because they cannot
      be compiled standalone, but this is a good start point.
      
      [1] https://mirrors.edge.kernel.org/pub/tools/crosstool/index.html
      
      
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Reviewed-by: default avatarSam Ravnborg <sam@ravnborg.org>
      d6fc9fcb
  5. Sep 20, 2009
  6. Jul 16, 2007
  7. Oct 18, 2005
Loading