From b4411d65d19b52eb0389e62205430ee9e2ac3f97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciro=20Santilli=20=E5=85=AD=E5=9B=9B=E4=BA=8B=E4=BB=B6=20?= =?UTF-8?q?=E6=B3=95=E8=BD=AE=E5=8A=9F?= Date: Thu, 25 Mar 2021 00:00:00 +0000 Subject: [PATCH] d769513efc3825ac4321f6a23f5696b3288450b4 --- index.html | 906 ++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 693 insertions(+), 213 deletions(-) diff --git a/index.html b/index.html index 4a7111c..3204859 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ - + Linux Kernel Module Cheat @@ -48,7 +48,7 @@ textarea{overflow:auto;vertical-align:top} table{border-collapse:collapse;border-spacing:0} *,*::before,*::after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box} html,body{font-size:100%} -body{background:#fff;color:rgba(0,0,0,.8);padding:0;margin:0;font-family:"Noto Serif","DejaVu Serif",serif;font-weight:400;font-style:normal;line-height:1;position:relative;cursor:auto;tab-size:4;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased} +body{background:#fff;color:rgba(0,0,0,.8);padding:0;margin:0;font-family:"Noto Serif","DejaVu Serif",serif;font-weight:400;font-style:normal;line-height:1;position:relative;cursor:auto;tab-size:4;word-wrap:anywhere;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased} a:hover{cursor:pointer} img,object,embed{max-width:100%;height:auto} object,embed{height:100%} @@ -63,10 +63,8 @@ img{-ms-interpolation-mode:bicubic} img,object,svg{display:inline-block;vertical-align:middle} textarea{height:auto;min-height:50px} select{width:100%} -.center{margin-left:auto;margin-right:auto} -.stretch{width:100%} .subheader,.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{line-height:1.45;color:#7a2518;font-weight:400;margin-top:0;margin-bottom:.25em} -div,dl,dt,dd,ul,ol,li,h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6,pre,form,p,blockquote,th,td{margin:0;padding:0;direction:ltr} +div,dl,dt,dd,ul,ol,li,h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6,pre,form,p,blockquote,th,td{margin:0;padding:0} a{color:#2156a5;text-decoration:underline;line-height:inherit} a:hover,a:focus{color:#1d4b8f} a img{border:0} @@ -106,19 +104,22 @@ h1{font-size:2.75em} h2{font-size:2.3125em} h3,#toctitle,.sidebarblock>.content>.title{font-size:1.6875em} h4{font-size:1.4375em}} -table{background:#fff;margin-bottom:1.25em;border:solid 1px #dedede} +table{background:#fff;margin-bottom:1.25em;border:solid 1px #dedede;word-wrap:normal} table thead,table tfoot{background:#f7f8f7} table thead tr th,table thead tr td,table tfoot tr th,table tfoot tr td{padding:.5em .625em .625em;font-size:inherit;color:rgba(0,0,0,.8);text-align:left} table tr th,table tr td{padding:.5625em .625em;font-size:inherit;color:rgba(0,0,0,.8)} table tr.even,table tr.alt{background:#f8f8f7} -table thead tr th,table tfoot tr th,table tbody tr td,table tr td,table tfoot tr td{display:table-cell;line-height:1.6} +table thead tr th,table tfoot tr th,table tbody tr td,table tr td,table tfoot tr td{line-height:1.6} h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2;word-spacing:-.05em} h1 strong,h2 strong,h3 strong,#toctitle strong,.sidebarblock>.content>.title strong,h4 strong,h5 strong,h6 strong{font-weight:400} +.center{margin-left:auto;margin-right:auto} +.stretch{width:100%} .clearfix::before,.clearfix::after,.float-group::before,.float-group::after{content:" ";display:table} .clearfix::after,.float-group::after{clear:both} -:not(pre):not([class^=L])>code{font-size:.9375em;font-style:normal!important;letter-spacing:0;padding:.1em .5ex;word-spacing:-.15em;background:#f7f7f8;-webkit-border-radius:4px;border-radius:4px;line-height:1.45;text-rendering:optimizeSpeed;word-wrap:break-word} -:not(pre)>code.nobreak{word-wrap:normal} -:not(pre)>code.nowrap{white-space:nowrap} +:not(pre).nobreak{word-wrap:normal} +:not(pre).nowrap{white-space:nowrap} +:not(pre).pre-wrap{white-space:pre-wrap} +:not(pre):not([class^=L])>code{font-size:.9375em;font-style:normal!important;letter-spacing:0;padding:.1em .5ex;word-spacing:-.15em;background:#f7f7f8;-webkit-border-radius:4px;border-radius:4px;line-height:1.45;text-rendering:optimizeSpeed} pre{color:rgba(0,0,0,.9);font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;line-height:1.45;text-rendering:optimizeSpeed} pre code,pre pre{color:inherit;font-size:inherit;line-height:inherit} pre>code{display:block} @@ -183,7 +184,7 @@ body.toc2.toc-right{padding-left:0;padding-right:20em}} #content #toc{border-style:solid;border-width:1px;border-color:#e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;-webkit-border-radius:4px;border-radius:4px} #content #toc>:first-child{margin-top:0} #content #toc>:last-child{margin-bottom:0} -#footer{max-width:100%;background:rgba(0,0,0,.8);padding:1.25em} +#footer{max-width:none;background:rgba(0,0,0,.8);padding:1.25em} #footer-text{color:rgba(255,255,255,.8);line-height:1.44} #content{margin-bottom:.625em} .sect1{padding-bottom:.625em} @@ -206,7 +207,7 @@ table.tableblock #preamble>.sectionbody>[class="paragraph"]:first-of-type p{font .admonitionblock>table td.icon{text-align:center;width:80px} .admonitionblock>table td.icon img{max-width:none} .admonitionblock>table td.icon .title{font-weight:bold;font-family:"Open Sans","DejaVu Sans",sans-serif;text-transform:uppercase} -.admonitionblock>table td.content{padding-left:1.125em;padding-right:1.25em;border-left:1px solid #dddddf;color:rgba(0,0,0,.6)} +.admonitionblock>table td.content{padding-left:1.125em;padding-right:1.25em;border-left:1px solid #dddddf;color:rgba(0,0,0,.6);word-wrap:anywhere} .admonitionblock>table td.content>:last-child>:last-child{margin-bottom:0} .exampleblock>.content{border-style:solid;border-width:1px;border-color:#e6e6e6;margin-bottom:1.25em;padding:1.25em;background:#fff;-webkit-border-radius:4px;border-radius:4px} .exampleblock>.content>:first-child{margin-top:0} @@ -216,7 +217,7 @@ table.tableblock #preamble>.sectionbody>[class="paragraph"]:first-of-type p{font .sidebarblock>:last-child{margin-bottom:0} .sidebarblock>.content>.title{color:#7a2518;margin-top:0;text-align:center} .exampleblock>.content>:last-child>:last-child,.exampleblock>.content .olist>ol>li:last-child>:last-child,.exampleblock>.content .ulist>ul>li:last-child>:last-child,.exampleblock>.content .qlist>ol>li:last-child>:last-child,.sidebarblock>.content>:last-child>:last-child,.sidebarblock>.content .olist>ol>li:last-child>:last-child,.sidebarblock>.content .ulist>ul>li:last-child>:last-child,.sidebarblock>.content .qlist>ol>li:last-child>:last-child{margin-bottom:0} -.literalblock pre,.listingblock>.content>pre{-webkit-border-radius:4px;border-radius:4px;word-wrap:break-word;overflow-x:auto;padding:1em;font-size:.8125em} +.literalblock pre,.listingblock>.content>pre{-webkit-border-radius:4px;border-radius:4px;overflow-x:auto;padding:1em;font-size:.8125em} @media screen and (min-width:768px){.literalblock pre,.listingblock>.content>pre{font-size:.90625em}} @media screen and (min-width:1280px){.literalblock pre,.listingblock>.content>pre{font-size:1em}} .literalblock pre,.listingblock>.content>pre:not(.highlight),.listingblock>.content>pre[class="highlight"],.listingblock>.content>pre[class^="highlight "]{background:#f7f7f8} @@ -262,21 +263,20 @@ pre.pygments .lineno::before{content:"";margin-right:-.125em} .quoteblock.excerpt,.quoteblock .quoteblock{margin-left:0} .quoteblock.excerpt blockquote,.quoteblock.excerpt p,.quoteblock .quoteblock blockquote,.quoteblock .quoteblock p{color:inherit;font-size:1.0625rem} .quoteblock.excerpt .attribution,.quoteblock .quoteblock .attribution{color:inherit;text-align:left;margin-right:0} -table.tableblock{max-width:100%;border-collapse:separate} p.tableblock:last-child{margin-bottom:0} +td.tableblock>.content{margin-bottom:1.25em;word-wrap:anywhere} td.tableblock>.content>:last-child{margin-bottom:-1.25em} -td.tableblock>.content>:last-child.sidebarblock{margin-bottom:0} table.tableblock,th.tableblock,td.tableblock{border:0 solid #dedede} -table.grid-all>thead>tr>.tableblock,table.grid-all>tbody>tr>.tableblock{border-width:0 1px 1px 0} -table.grid-all>tfoot>tr>.tableblock{border-width:1px 1px 0 0} -table.grid-cols>*>tr>.tableblock{border-width:0 1px 0 0} -table.grid-rows>thead>tr>.tableblock,table.grid-rows>tbody>tr>.tableblock{border-width:0 0 1px} -table.grid-rows>tfoot>tr>.tableblock{border-width:1px 0 0} -table.grid-all>*>tr>.tableblock:last-child,table.grid-cols>*>tr>.tableblock:last-child{border-right-width:0} -table.grid-all>tbody>tr:last-child>.tableblock,table.grid-all>thead:last-child>tr>.tableblock,table.grid-rows>tbody>tr:last-child>.tableblock,table.grid-rows>thead:last-child>tr>.tableblock{border-bottom-width:0} +table.grid-all>*>tr>*{border-width:1px} +table.grid-cols>*>tr>*{border-width:0 1px} +table.grid-rows>*>tr>*{border-width:1px 0} table.frame-all{border-width:1px} +table.frame-ends{border-width:1px 0} table.frame-sides{border-width:0 1px} -table.frame-topbot,table.frame-ends{border-width:1px 0} +table.frame-none>colgroup+*>:first-child>*,table.frame-sides>colgroup+*>:first-child>*{border-top-width:0} +table.frame-none>:last-child>:last-child>*,table.frame-sides>:last-child>:last-child>*{border-bottom-width:0} +table.frame-none>*>tr>:first-child,table.frame-ends>*>tr>:first-child{border-left-width:0} +table.frame-none>*>tr>:last-child,table.frame-ends>*>tr>:last-child{border-right-width:0} table.stripes-all tr,table.stripes-odd tr:nth-of-type(odd),table.stripes-even tr:nth-of-type(even),table.stripes-hover tr:hover{background:#f8f8f7} th.halign-left,td.halign-left{text-align:left} th.halign-right,td.halign-right{text-align:right} @@ -285,7 +285,7 @@ th.valign-top,td.valign-top{vertical-align:top} th.valign-bottom,td.valign-bottom{vertical-align:bottom} th.valign-middle,td.valign-middle{vertical-align:middle} table thead th,table tfoot th{font-weight:bold} -tbody tr th{display:table-cell;line-height:1.6;background:#f7f8f7} +tbody tr th{background:#f7f8f7} tbody tr th,tbody tr th p,tfoot tr th,tfoot tr th p{color:rgba(0,0,0,.8);font-weight:bold} p.tableblock>code:only-child{background:none;padding:0} p.tableblock{font-size:1em} @@ -314,6 +314,7 @@ ol.lowergreek{list-style-type:lower-greek} .hdlist>table>tbody>tr,.colist>table>tbody>tr{background:none} td.hdlist1,td.hdlist2{vertical-align:top;padding:0 .625em} td.hdlist1{font-weight:bold;padding-bottom:1.25em} +td.hdlist2{word-wrap:anywhere} .literalblock+.colist,.listingblock+.colist{margin-top:-.5em} .colist td:not([class]):first-child{padding:.4em .75em 0;line-height:1;vertical-align:top} .colist td:not([class]):first-child img{max-width:none} @@ -386,7 +387,7 @@ a span.icon>.fa{cursor:inherit} .admonitionblock td.icon .icon-warning::before{content:"\f071";color:#bf6900} .admonitionblock td.icon .icon-caution::before{content:"\f06d";color:#bf3400} .admonitionblock td.icon .icon-important::before{content:"\f06a";color:#bf0000} -.conum[data-value]{display:inline-block;color:#fff!important;background:rgba(0,0,0,.8);-webkit-border-radius:100px;border-radius:100px;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold} +.conum[data-value]{display:inline-block;color:#fff!important;background:rgba(0,0,0,.8);-webkit-border-radius:50%;border-radius:50%;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold} .conum[data-value] *{color:#fff!important} .conum[data-value]+b{display:none} .conum[data-value]::after{content:attr(data-value)} @@ -413,6 +414,7 @@ thead{display:table-header-group} svg{max-width:100%} p,blockquote,dt,td.content{font-size:1em;orphans:3;widows:3} h2,h3,#toctitle,.sidebarblock>.content>.title{page-break-after:avoid} +#header,#content,#footnotes,#footer{max-width:none} #toc,.sidebarblock,.exampleblock>.content{background:none!important} #toc{border-bottom:1px solid #dddddf!important;padding-bottom:0!important} body.book #header{text-align:center} @@ -802,7 +804,7 @@ pre{ white-space:pre } @@ -1371,8 +1373,8 @@ pre{ white-space:pre }
  • 23.22.4.8.2. gem5 event queue DerivO3CPU syscall emulation freestanding example analysis: hazard
  • 23.22.4.8.3. gem5 event queue DerivO3CPU syscall emulation freestanding example analysis: hazard4
  • 23.22.4.8.4. gem5 event queue DerivO3CPU syscall emulation freestanding example analysis: stall
  • -
  • 23.22.4.8.5. gem5 event queue DerivO3CPU syscall emulation freestanding example analysis: stall-gain
  • -
  • 23.22.4.8.6. gem5 event queue DerivO3CPU syscall emulation freestanding example analysis: stall-hazard4
  • +
  • 23.22.4.8.5. gem5 event queue DerivO3CPU syscall emulation freestanding example analysis: stall_gain
  • +
  • 23.22.4.8.6. gem5 event queue DerivO3CPU syscall emulation freestanding example analysis: stall_hazard4
  • 23.22.4.8.7. gem5 event queue DerivO3CPU syscall emulation freestanding example analysis: speculative
  • @@ -1497,32 +1499,50 @@ pre{ white-space:pre }
  • 26.3. C++
  • -
  • 26.10. userland/libs directory - -
  • +
  • 26.10. userland/libs directory
  • 26.11. Userland content filename conventions
  • 26.12. Userland content bibliography
  • @@ -1655,6 +1671,7 @@ pre{ white-space:pre }
  • 27.7.2. getcpu system call and the sched_getaffinity glibc wrapper
  • +
  • 27.7.3. perf_event_open system call
  • 27.8. Linux calling conventions @@ -1752,7 +1769,6 @@ pre{ white-space:pre }
  • 28.13.1. x86 RDTSC instruction
  • @@ -1944,24 +1960,29 @@ pre{ white-space:pre }
  • 29.8.1. ARMv8.1 architecture extension
  • -
  • 29.9. ARM assembly bibliography +
  • 29.9. ARM PMU
    -
    26.3.2.1.1. Detailed gem5 analysis of how data races happen
    +
    26.3.4.1.1. Detailed gem5 analysis of how data races happen

    The smallest data race we managed to come up as of LKMC 7c01b29f1ee7da878c7cc9cb4565f3f3cf516a92 and gem5 872cb227fdc0b4d60acc7840889d567a6936b6e1 was with userland/c/atomic.c (see also C multithreading):

    @@ -31850,7 +32062,7 @@ non-atomic 19
    - -
    -

    26.3.4. C++ templates

    +

    26.3.5. C++ templates

    • @@ -31899,7 +32102,7 @@ non-atomic 19
    -

    26.3.6. C++ compile time magic

    +

    26.3.7. C++ compile time magic

    • @@ -31927,7 +32130,7 @@ non-atomic 19
    -
    26.3.6.1. C++ decltype
    +
    26.3.7.1. C++ decltype
    @@ -31942,6 +32145,127 @@ non-atomic 19
    + +
    +

    26.3.9. C++ third-party libraries

    + + +
    +
    26.3.9.2. GoogleTest
    + +
    +

    On Ubuntu 20.04, the package:

    +
    +
    +
    +
    sudo apt install googletest
    +
    +
    +
    +

    does not contain prebuilts, and it is intentional, it is incomprehensible:

    +
    + +
    +

    so you might as well just git clone and build the damned thing yourself:

    +
    +
    +
    +
    git submodule update --init submodules/googletest
    +cd submodules/googletest
    +mkdir build
    +cd build
    +cmake ..
    +make -j`nproc`
    +cd ../../userland/libs/googletest
    +./build
    +
    +
    + +
    +
      +
    • +

      userland/libs/googletest/main.cpp[]

      +
    • +
    +
    +
    + +

    26.4. POSIX

    @@ -32354,6 +32678,9 @@ There are no non-locking atomic types or atomic primitives in POSIX:

    26.7.1. Python

    +

    Examples:

    @@ -32619,6 +32946,9 @@ There are no non-locking atomic types or atomic primitives in POSIX:

    26.7.2. Node.js

    + +
    +
    26.7.2.2. NPM
    @@ -32719,7 +33074,7 @@ There are no non-locking atomic types or atomic primitives in POSIX: -
    26.7.2.1.1. NPM data-files
    +
    26.7.2.2.1. NPM data-files

    Illustrates how to add extra non-code data files to an NPM package, and then use those files at runtime.

    @@ -32732,6 +33087,9 @@ There are no non-locking atomic types or atomic primitives in POSIX:

    26.7.3. Java

    +

    No OpenJDK package as of 2018.08: https://stackoverflow.com/questions/28874150/buildroot-with-jamvm-2-0-for-java-8/59290927#59290927 partly because their build system is shit like the rest of the project’s setup.

    @@ -33191,45 +33549,30 @@ cblas_dgemm( CblasColMajor, CblasNoTrans, CblasTrans,3,3,2 ,1, A,3, B, ./build-userland --package-all
    -
    -

    26.10.1. Boost

    -

    https://en.wikipedia.org/wiki/Boost_(C%2B%2B_libraries)

    +

    As an exception, if you first cd directly into one of the directories and do a native host build, e.g.:

    +
    +
    +
    +
    sudo apt install libeigen3-dev
    +cd userland/libs/eigen
    +./build
    +
    -

    userland/libs/boost

    +

    then that library will be automatically enabled.

    +
    +
    +

    See also:

    - -

    26.11. Userland content filename conventions

    @@ -34579,6 +34922,56 @@ child after parent sleep

    Due to the way that gem5 syscall emulation multithreading however, the output is more deterministic in that case, see that section for further details.

    +

    27.8. Linux calling conventions

    @@ -36313,24 +36706,15 @@ taskset -c 1 ./userland/arch/x86_64/rdtscp.out | tail -n 1

    There is also the RDPID instruction that reads just the processor ID, but it appears to be very new for QEMU 4.0.0 or 2017 Lenovo ThinkPad P51, as it fails with SIGILL on both.

    - -
    -
    28.13.1.2. ARM PMCCNTR register
    -
    -

    TODO We didn’t manage to find a working ARM analogue to x86 RDTSC instruction: kernel_modules/pmccntr.c is oopsing, and even it if weren’t, it likely won’t give the cycle count since boot since it needs to be activate before it starts counting anything:

    +

    Bibliography:

    @@ -38468,9 +38852,84 @@ AArch64, see Procedure Call Standard for the ARM 64-bit Architecture.

    -

    29.9. ARM assembly bibliography

    +

    29.9. ARM PMU

    +
    +

    The PMU (Performance Monitor Unit) is an unit in the ARM CPU that counts performance events of interest. These can be used to benchmark, and sometimes debug, code running on ARM CPUs.

    +
    +
    +

    It is documented at ARMv8 architecture reference manual db Chapter D7 "The Performance Monitors Extension">

    +
    +
    +

    The Linux kernel exposes some (all?) of those events through the arch-agnostic perf_event_open system call system call.

    +
    +
    +

    Exposing the PMU to Linux v5.9.2 requires a DTB entry of type:

    +
    +
    +
    +
    pmu {
    +        compatible = "arm,armv8-pmuv3";
    +        interrupts = <0x01 0x04 0xf04>;
    +};
    +
    +
    +
    +

    and if sucessful, a boot message shows:

    +
    +
    +
    +
    <6>[    0.044391] hw perfevents: enabled with armv8_pmuv3 PMU driver, 32 counters available
    +
    +
    +
    +

    The PMU is exposed through ARM system register instructions, with registers that start with the prefix PM*.

    +
    +
    +

    <6>[ 0.044391] hw perfevents: enabled with armv8_pmuv3 PMU driver, 32 counters available

    +
    +
    +

    ARMv8 architecture reference manual db D7.11.3 "Common event numbers" gives the available standardized events. Address space is also reverved for vendor extensions. For example, from it we see that the instruction count is documented at:

    +
    +
    +
    +
    +

    0x0008, INST_RETIRED, Instruction architecturally executed

    +
    +
    +

    The counter increments for every architecturally executed instruction.

    +
    +
    +
    +
    +

    where "architecturally executed" is a reference to the possibility of Out-of-order execution in the implementation, which leads to some instructions being executed speculatively, but not have any side effects in the end.

    +
    + +
    +
    +

    29.10. ARM assembly bibliography

    +
    +

    29.10.1. ARM non-official bibliography

    Good getting started tutorials:

    @@ -38492,7 +38951,7 @@ AArch64, see Procedure Call Standard for the ARM 64-bit Architecture.

    -

    29.9.2. ARM official bibliography

    +

    29.10.2. ARM official bibliography

    The official manuals were stored in http://infocenter.arm.com but as of 2017 they started to slowly move to https://developer.arm.com.

    @@ -38506,7 +38965,7 @@ AArch64, see Procedure Call Standard for the ARM 64-bit Architecture.

    Bibliography: https://www.quora.com/Where-can-I-find-the-official-documentation-of-ARM-instruction-set-architectures-ISAs

    -
    29.9.2.7. ARM processor documentation
    +
    29.10.2.7. ARM processor documentation

    ARM also releases documentation specific to each given processor.

    @@ -38634,7 +39093,7 @@ AArch64, see Procedure Call Standard for the ARM 64-bit Architecture.

    +

    ARM paging is documented at ARMv8 architecture reference manual db Chapter D5 and is mostly called VMSAv8 in the ARMv8 manual (Virtual Memory System Architecture).

    @@ -40649,7 +41111,7 @@ cntvct_el0 0x3CF516F

    32.10.7. ARM baremetal bibliography

    -

    First, also consider the userland bibliography: Section 29.9, “ARM assembly bibliography”.

    +

    First, also consider the userland bibliography: Section 29.10, “ARM assembly bibliography”.

    The most useful ARM baremetal example sets we’ve seen so far are:

    @@ -43779,7 +44241,8 @@ CACHE2 S nyy
    -
    ./build --download-dependencies --dry-run <some-target> | less
    +
    cat ./setup
    +./build --download-dependencies --dry-run <some-target> | less
    @@ -44972,7 +45435,7 @@ git -C "$(./getvar buildroot_source_dir)" checkout -

    This way you can just hack away the scripts and try them out immediately without any further operations.

    -
    37.15.4.1. out_rootfs_overlay_dir
    +
    37.15.4.1. out_rootfs_overlay_dir

    This path can be found with:

    @@ -45003,6 +45466,15 @@ git -C "$(./getvar buildroot_source_dir)" checkout -

    This does not include native image modification mechanisms such as Buildroot packages, which we let Buildroot itself manage.

    +
    +
    37.15.4.1.1. disk_image_2
    +
    +

    A squashfs of out_rootfs_overlay_dir that gets passed as the second argument.

    +
    +
    +

    Especially useful with gem5 as a way to gem5 checkpoint restore and run a different script via Secondary disk since setting up gem5 9P is slightly laborious.

    +
    +
    @@ -45034,6 +45506,14 @@ git -C "$(./getvar buildroot_source_dir)" checkout -

    We try to keep as much as possible in those files. It bloats builds a little, but just makes everything simpler to understand.

    +
    +

    Link with lkmc.o is enabled with the path_properties.py

    +
    +
    +
    +
    'extra_objs_lkmc_common': False,
    +
    +