Skip to content

geertu/linux-scripts

Repository files navigation

  * git-merge-topics

    Read commands from a topicfile for merging branches, and cherry-picking or
    reverting commits:

       git-merge-topics <topicfile>

    Supported commands are:

	merge <branch>
	merge <repo> <branch>
	pick <sha1>
	revert <sha1>
	BREAK
	BRK

    The commands "BREAK" and "BRK" will make the script stop operation at that
    point.  Remove them, and run "git-merge-topics" without parameters to
    resume operation.

    Comments start with a hash mark (#).

    In case of a merge conflict, the script will stop operation.  Resolve the
    conflict, and run "git-merge-topics" without parameters to resume
    operation.

    If you do not want to continue, run "rm -rf .git-merge-topics" manually.

  * linux-analyze-marginal-sizes

    Starting from the current .config file, find out how much space is saved
    in the kernel image by individually disabling each of the currently
    enabled config options. Module support and all modules are disabled first.

    You can pass make options to specify e.g. the target architecture and
    cross compiler.

    Caveats:
      * This is only about static kernel size, not about dynamic memory
	consumption.
      * You cannot just add up the numbers, as some config options depend on
        other config options.
      * It's highly recommended to use ccache or distcc.

    Example: Display the top 10 options to decrease kernel image size:

	linux-analyze-marginal-sizes CROSS_COMPILE=m68k-linux-gnu- \
		ARCH=m68k -j 4 | tee log
	grep -w saves log | sort -nr --key=4 | head -10

  * linux-config-diff

    Show the difference between one or more .config files.

  * linux-config-from-dt

    Generate a list of CONFIG_* options from one or more preprocessed DTS files
    or DTB files.

    Must be run from a Linux kernel git repository.

    Examples:

        linux-config-from-dt arch/arm/boot/dts/.r8a7791-koelsch.dtb.dts.tmp
        linux-config-from-dt arch/arm/boot/dts/*dtb

  * linux-config-merge

    Combine two .config files using an AND or OR operation on each config
    option.

  * linux-config-set-symbol

    Set or clear a specific config symbol in one or more .config files.

  * linux-dmesg-diff

    Compare dmesg output between kernel versions.

    Dmesg output is saved in "dmesg*" files in the current directory, using
    the output of "uname -r" as a suffix.
    You may want to enable CONFIG_LOCALVERSION_AUTO=y and use
    CONFIG_LOCALVERSION to distinguish between kernel flavors.

    Example:

      * Capture the current dmesg and compare it with the previous one:

	    linux-dmesg-diff

      * Compare the last two captured dmesg outputs for kernel flavor
	"koelsch-reference":

            linux-dmesg-diff koelsch-reference

  * linux-log-diff

    Compare two build logs and display a summary of the regressions and
    improvements.
    Line numbers and other locations (e.g. offsets inside a section for
    linker errors) are ignored in the actual comparion, only the number of
    occurencies of each error or warning is compared, to compensate for the
    addition and removal of source lines. The location information is printed
    in the summary, though.
    
      * Show compiler error and warning regressions and improvements between
        yesterday's and today's builds:

	    cat $(find branch9.yesterday -type f) > yesterday.all
	    cat $(find branch9 -type f) > today.all
	    linux-log-diff yesterday.all today.all

  * linux-log-summary

    Display a summary of all errors and warnings in one or more build logs.
    The summary is sorted by the number of occurrences.
    Optionally (using `-v'), the names of the affected build logs can be
    listed for each error or warning.

    Examples:

      * Create a summary of all builds logs:

	    cd branch9 && linux-log-summary $(find * -type f | sort)

      * Create a summary of all builds logs, incl. the list of affected
        logfiles for each error or warning:

	    cd branch9 && linux-log-summary -v $(find * -type f | sort)

      * Create summaries of build logs per architecture:

	    for i in branch9/*; do cat $i/* > $(basename $i); done
	    for i in branch9/*; do linux-log-summary $(basename $i); done

  * linux-next-update-branch9

    Helper script to download the latest available build logs of linux-next
    and store them in branch9/<arch>/<config>

  * soc-dts-diff

    Compare DTS or source files, ignoring SoC part numbers.
    The SoC part number is derived from the file name.

    Examples:

      * Compare the R-aCar H3 ES2.0 and M3-W DTS files:

	    soc-dts-diff arch/arm64/boot/dts/renesas/r8a779{51,60}.dtsi

      * Compare the R-Car H2 and M2-W clock drivers:

	    soc-dts-diff -b drivers/clk/renesas/r8a779[01]-cpg-mssr.c

About

Collection of scripts for Linux kernel development

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published