mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-24 18:51:36 +01:00
This commit is contained in:
254
index.html
254
index.html
@@ -1888,95 +1888,96 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#clean-the-build">33.7. Clean the build</a></li>
|
||||
<li><a href="#ccache">33.8. ccache</a></li>
|
||||
<li><a href="#rebuild-buildroot-while-running">33.9. Rebuild Buildroot while running</a></li>
|
||||
<li><a href="#simultaneous-runs">33.10. Simultaneous runs</a></li>
|
||||
<li><a href="#build-variants">33.11. Build variants</a>
|
||||
<li><a href="#custom-build-directory">33.8. Custom build directory</a></li>
|
||||
<li><a href="#ccache">33.9. ccache</a></li>
|
||||
<li><a href="#rebuild-buildroot-while-running">33.10. Rebuild Buildroot while running</a></li>
|
||||
<li><a href="#simultaneous-runs">33.11. Simultaneous runs</a></li>
|
||||
<li><a href="#build-variants">33.12. Build variants</a>
|
||||
<ul class="sectlevel3">
|
||||
<li><a href="#linux-kernel-build-variants">33.11.1. Linux kernel build variants</a></li>
|
||||
<li><a href="#qemu-build-variants">33.11.2. QEMU build variants</a></li>
|
||||
<li><a href="#gem5-build-variants">33.11.3. gem5 build variants</a>
|
||||
<li><a href="#linux-kernel-build-variants">33.12.1. Linux kernel build variants</a></li>
|
||||
<li><a href="#qemu-build-variants">33.12.2. QEMU build variants</a></li>
|
||||
<li><a href="#gem5-build-variants">33.12.3. gem5 build variants</a>
|
||||
<ul class="sectlevel4">
|
||||
<li><a href="#gem5-worktree">33.11.3.1. gem5 worktree</a></li>
|
||||
<li><a href="#gem5-private-source-trees">33.11.3.2. gem5 private source trees</a></li>
|
||||
<li><a href="#gem5-worktree">33.12.3.1. gem5 worktree</a></li>
|
||||
<li><a href="#gem5-private-source-trees">33.12.3.2. gem5 private source trees</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#buildroot-build-variants">33.11.4. Buildroot build variants</a></li>
|
||||
<li><a href="#buildroot-build-variants">33.12.4. Buildroot build variants</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#directory-structure">33.12. Directory structure</a>
|
||||
<li><a href="#directory-structure">33.13. Directory structure</a>
|
||||
<ul class="sectlevel3">
|
||||
<li><a href="#lkmc-directory">33.12.1. lkmc directory</a>
|
||||
<li><a href="#lkmc-directory">33.13.1. lkmc directory</a>
|
||||
<ul class="sectlevel4">
|
||||
<li><a href="#userland-objects-vs-header-only">33.12.1.1. Userland objects vs header-only</a></li>
|
||||
<li><a href="#userland-objects-vs-header-only">33.13.1.1. Userland objects vs header-only</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#buildroot_packages-directory">33.12.2. buildroot_packages directory</a>
|
||||
<li><a href="#buildroot_packages-directory">33.13.2. buildroot_packages directory</a>
|
||||
<ul class="sectlevel4">
|
||||
<li><a href="#kernel_modules-buildroot-package">33.12.2.1. kernel_modules buildroot package</a></li>
|
||||
<li><a href="#kernel_modules-buildroot-package">33.13.2.1. kernel_modules buildroot package</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#patches-directory">33.12.3. patches directory</a>
|
||||
<li><a href="#patches-directory">33.13.3. patches directory</a>
|
||||
<ul class="sectlevel4">
|
||||
<li><a href="#patches-global-directory">33.12.3.1. patches/global directory</a></li>
|
||||
<li><a href="#patches-manual-directory">33.12.3.2. patches/manual directory</a></li>
|
||||
<li><a href="#patches-global-directory">33.13.3.1. patches/global directory</a></li>
|
||||
<li><a href="#patches-manual-directory">33.13.3.2. patches/manual directory</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#rootfs_overlay">33.12.4. rootfs_overlay</a>
|
||||
<li><a href="#rootfs_overlay">33.13.4. rootfs_overlay</a>
|
||||
<ul class="sectlevel4">
|
||||
<li><a href="#out_rootfs_overlay_dir">33.12.4.1. out_rootfs_overlay_dir</a></li>
|
||||
<li><a href="#out_rootfs_overlay_dir">33.13.4.1. out_rootfs_overlay_dir</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#lkmc-c">33.12.5. lkmc.c</a></li>
|
||||
<li><a href="#rand_check-out">33.12.6. rand_check.out</a></li>
|
||||
<li><a href="#lkmc_home">33.12.7. lkmc_home</a></li>
|
||||
<li><a href="#lkmc-c">33.13.5. lkmc.c</a></li>
|
||||
<li><a href="#rand_check-out">33.13.6. rand_check.out</a></li>
|
||||
<li><a href="#lkmc_home">33.13.7. lkmc_home</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#test-this-repo">33.13. Test this repo</a>
|
||||
<li><a href="#test-this-repo">33.14. Test this repo</a>
|
||||
<ul class="sectlevel3">
|
||||
<li><a href="#automated-tests">33.13.1. Automated tests</a>
|
||||
<li><a href="#automated-tests">33.14.1. Automated tests</a>
|
||||
<ul class="sectlevel4">
|
||||
<li><a href="#test-arch-and-emulator-selection">33.13.1.1. Test arch and emulator selection</a></li>
|
||||
<li><a href="#quit-on-fail">33.13.1.2. Quit on fail</a></li>
|
||||
<li><a href="#test-userland-in-full-system">33.13.1.3. Test userland in full system</a></li>
|
||||
<li><a href="#gdb-tests">33.13.1.4. GDB tests</a></li>
|
||||
<li><a href="#magic-failure-string">33.13.1.5. Magic failure string</a></li>
|
||||
<li><a href="#test-arch-and-emulator-selection">33.14.1.1. Test arch and emulator selection</a></li>
|
||||
<li><a href="#quit-on-fail">33.14.1.2. Quit on fail</a></li>
|
||||
<li><a href="#test-userland-in-full-system">33.14.1.3. Test userland in full system</a></li>
|
||||
<li><a href="#gdb-tests">33.14.1.4. GDB tests</a></li>
|
||||
<li><a href="#magic-failure-string">33.14.1.5. Magic failure string</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#non-automated-tests">33.13.2. Non-automated tests</a>
|
||||
<li><a href="#non-automated-tests">33.14.2. Non-automated tests</a>
|
||||
<ul class="sectlevel4">
|
||||
<li><a href="#test-gdb-linux-kernel">33.13.2.1. Test GDB Linux kernel</a></li>
|
||||
<li><a href="#test-the-internet">33.13.2.2. Test the Internet</a></li>
|
||||
<li><a href="#cli-script-tests">33.13.2.3. CLI script tests</a></li>
|
||||
<li><a href="#test-gdb-linux-kernel">33.14.2.1. Test GDB Linux kernel</a></li>
|
||||
<li><a href="#test-the-internet">33.14.2.2. Test the Internet</a></li>
|
||||
<li><a href="#cli-script-tests">33.14.2.3. CLI script tests</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#bisection">33.14. Bisection</a></li>
|
||||
<li><a href="#path-properties">33.15. path_properties</a></li>
|
||||
<li><a href="#update-a-forked-submodule">33.16. Update a forked submodule</a></li>
|
||||
<li><a href="#release">33.17. Release</a>
|
||||
<li><a href="#bisection">33.15. Bisection</a></li>
|
||||
<li><a href="#path-properties">33.16. path_properties</a></li>
|
||||
<li><a href="#update-a-forked-submodule">33.17. Update a forked submodule</a></li>
|
||||
<li><a href="#release">33.18. Release</a>
|
||||
<ul class="sectlevel3">
|
||||
<li><a href="#release-procedure">33.17.1. Release procedure</a></li>
|
||||
<li><a href="#release-zip">33.17.2. release-zip</a></li>
|
||||
<li><a href="#release-upload">33.17.3. release-upload</a></li>
|
||||
<li><a href="#release-procedure">33.18.1. Release procedure</a></li>
|
||||
<li><a href="#release-zip">33.18.2. release-zip</a></li>
|
||||
<li><a href="#release-upload">33.18.3. release-upload</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#design-rationale">33.18. Design rationale</a>
|
||||
<li><a href="#design-rationale">33.19. Design rationale</a>
|
||||
<ul class="sectlevel3">
|
||||
<li><a href="#design-goals">33.18.1. Design goals</a></li>
|
||||
<li><a href="#setup-trade-offs">33.18.2. Setup trade-offs</a></li>
|
||||
<li><a href="#resource-tradeoff-guidelines">33.18.3. Resource tradeoff guidelines</a></li>
|
||||
<li><a href="#linux-distro-choice">33.18.4. Linux distro choice</a></li>
|
||||
<li><a href="#design-goals">33.19.1. Design goals</a></li>
|
||||
<li><a href="#setup-trade-offs">33.19.2. Setup trade-offs</a></li>
|
||||
<li><a href="#resource-tradeoff-guidelines">33.19.3. Resource tradeoff guidelines</a></li>
|
||||
<li><a href="#linux-distro-choice">33.19.4. Linux distro choice</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#soft-topics">33.19. Soft topics</a>
|
||||
<li><a href="#soft-topics">33.20. Soft topics</a>
|
||||
<ul class="sectlevel3">
|
||||
<li><a href="#fairy-tale">33.19.1. Fairy tale</a></li>
|
||||
<li><a href="#should-you-waste-your-life-with-systems-programming">33.19.2. Should you waste your life with systems programming?</a></li>
|
||||
<li><a href="#fairy-tale">33.20.1. Fairy tale</a></li>
|
||||
<li><a href="#should-you-waste-your-life-with-systems-programming">33.20.2. Should you waste your life with systems programming?</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#bibliography">33.20. Bibliography</a></li>
|
||||
<li><a href="#bibliography">33.21. Bibliography</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -1993,7 +1994,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
|
||||
<p>If you don’t know which one to go for, start with <a href="#qemu-buildroot-setup-getting-started">QEMU Buildroot setup getting started</a>.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Design goals of this project are documented at: <a href="#design-goals">Section 33.18.1, “Design goals”</a>.</p>
|
||||
<p>Design goals of this project are documented at: <a href="#design-goals">Section 33.19.1, “Design goals”</a>.</p>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="qemu-buildroot-setup"><a class="anchor" href="#qemu-buildroot-setup"></a><a class="link" href="#qemu-buildroot-setup">1.1. QEMU Buildroot setup</a></h3>
|
||||
@@ -2404,7 +2405,7 @@ hello /root/.profile
|
||||
<p>If you really want to develop semiconductors, your only choice is to join an university or a semiconductor company that has the EDA licenses.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>See also: <a href="#should-you-waste-your-life-with-systems-programming">Section 33.19.2, “Should you waste your life with systems programming?”</a>.</p>
|
||||
<p>See also: <a href="#should-you-waste-your-life-with-systems-programming">Section 33.20.2, “Should you waste your life with systems programming?”</a>.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>While hacking QEMU, you will likely want to GDB step its source. That is trivial since QEMU is just another userland program like any other, but our setup has a shortcut to make it even more convenient, see: <a href="#debug-the-emulator">Section 18.7, “Debug the emulator”</a>.</p>
|
||||
@@ -2842,6 +2843,14 @@ j = 0</pre>
|
||||
<p>Remember that the gem5 boot is <a href="#benchmark-linux-kernel-boot">considerably slower</a> than QEMU since the simulation is more detailed.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>gem5 moves a bit slowly, and if your host compiler is very new, the build might be broken for it, e.g. this was the case for Ubuntu 19.10 with GCC 9 and gem5 62d75e7105fe172eb906d4f80f360ff8591d4178 from Dec 2019. You can work around that by <a href="https://askubuntu.com/questions/466651/how-do-i-use-the-latest-gcc-on-ubuntu/1163021#1163021">installing an older compiler</a> and using it with something like:</p>
|
||||
</div>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>./build-gem5 -- CC=gcc-8 CXX=g++-8</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>To get a terminal, either open a new shell and run:</p>
|
||||
</div>
|
||||
<div class="literalblock">
|
||||
@@ -7380,7 +7389,7 @@ qw er</pre>
|
||||
<p>The gem5 tests require building statically with build id <code>static</code>, see also: <a href="#gem5-syscall-emulation-mode">Section 10.7, “gem5 syscall emulation mode”</a>. TODO automate this better.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>See: <a href="#test-this-repo">Section 33.13, “Test this repo”</a> for more useful testing tips.</p>
|
||||
<p>See: <a href="#test-this-repo">Section 33.14, “Test this repo”</a> for more useful testing tips.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
@@ -8018,7 +8027,7 @@ hello
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p>modules built with Buildroot, see: <a href="#kernel_modules-buildroot-package">Section 33.12.2.1, “kernel_modules buildroot package”</a></p>
|
||||
<p>modules built with Buildroot, see: <a href="#kernel_modules-buildroot-package">Section 33.13.2.1, “kernel_modules buildroot package”</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>modules built from the kernel tree itself, see: <a href="#dummy-irq">Section 15.12.2, “dummy-irq”</a></p>
|
||||
@@ -8925,7 +8934,7 @@ xeyes</pre>
|
||||
<div class="sect2">
|
||||
<h3 id="enable-networking"><a class="anchor" href="#enable-networking"></a><a class="link" href="#enable-networking">14.1. Enable networking</a></h3>
|
||||
<div class="paragraph">
|
||||
<p>We disable networking by default because it starts an userland process, and we want to keep the number of userland processes to a minimum to make the system more understandable as explained at: <a href="#resource-tradeoff-guidelines">Section 33.18.3, “Resource tradeoff guidelines”</a></p>
|
||||
<p>We disable networking by default because it starts an userland process, and we want to keep the number of userland processes to a minimum to make the system more understandable as explained at: <a href="#resource-tradeoff-guidelines">Section 33.19.3, “Resource tradeoff guidelines”</a></p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>To enable networking on Buildroot, simply run:</p>
|
||||
@@ -9774,15 +9783,15 @@ git log | grep -E ' Linux [0-9]+\.' | head</pre>
|
||||
<p>This also makes this repo the perfect setup to develop the Linux kernel.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>In case something breaks while updating the Linux kernel, you can try to bisect it to understand the root cause, see: <a href="#bisection">Section 33.14, “Bisection”</a>.</p>
|
||||
<p>In case something breaks while updating the Linux kernel, you can try to bisect it to understand the root cause, see: <a href="#bisection">Section 33.15, “Bisection”</a>.</p>
|
||||
</div>
|
||||
<div class="sect4">
|
||||
<h5 id="update-the-linux-kernel-lkmc-procedure"><a class="anchor" href="#update-the-linux-kernel-lkmc-procedure"></a><a class="link" href="#update-the-linux-kernel-lkmc-procedure">15.2.2.1. Update the Linux kernel LKMC procedure</a></h5>
|
||||
<div class="paragraph">
|
||||
<p>First, use use the branching procedure described at: <a href="#update-a-forked-submodule">Section 33.16, “Update a forked submodule”</a></p>
|
||||
<p>First, use use the branching procedure described at: <a href="#update-a-forked-submodule">Section 33.17, “Update a forked submodule”</a></p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Because the kernel is so central to this repository, almost all tests must be re-run, so basically just follow the full testing procedure described at: <a href="#test-this-repo">Section 33.13, “Test this repo”</a>. The only tests that can be skipped are essentially the <a href="#baremetal">Baremetal</a> tests.</p>
|
||||
<p>Because the kernel is so central to this repository, almost all tests must be re-run, so basically just follow the full testing procedure described at: <a href="#test-this-repo">Section 33.14, “Test this repo”</a>. The only tests that can be skipped are essentially the <a href="#baremetal">Baremetal</a> tests.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Before comitting, don’t forget to update:</p>
|
||||
@@ -21925,7 +21934,7 @@ make menuconfig</pre>
|
||||
<p>If none of those methods are flexible enough for you, you can just fork or hack up <a href="https://github.com/cirosantilli/linux-kernel-module-cheat/blob/master/buildroot_packages/sample_package">buildroot_packages/sample_package</a> the sample package to do what you want.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>For how to use that package, see: <a href="#buildroot_packages-directory">Section 33.12.2, “buildroot_packages directory”</a>.</p>
|
||||
<p>For how to use that package, see: <a href="#buildroot_packages-directory">Section 33.13.2, “buildroot_packages directory”</a>.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Then iterate trying to do what you want and reading the manual until it works: <a href="https://buildroot.org/downloads/manual/manual.html" class="bare">https://buildroot.org/downloads/manual/manual.html</a></p>
|
||||
@@ -22110,7 +22119,7 @@ git -C "$(./getvar qemu_source_dir)" checkout -
|
||||
<p>Then, you will also want to do a <a href="#bisection">Bisection</a> to pinpoint the exact commit to blame, and CC that developer.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Finally, give the images you used save upstream developers' time as shown at: <a href="#release-zip">Section 33.17.2, “release-zip”</a>.</p>
|
||||
<p>Finally, give the images you used save upstream developers' time as shown at: <a href="#release-zip">Section 33.18.2, “release-zip”</a>.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>For Buildroot problems, you should wither provide the config you have:</p>
|
||||
@@ -31780,7 +31789,7 @@ ISB</pre>
|
||||
<p>In baremetal, we detect if tests failed by parsing logs for the <a href="#magic-failure-string">Magic failure string</a>.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>See: <a href="#test-this-repo">Section 33.13, “Test this repo”</a> for more useful testing tips.</p>
|
||||
<p>See: <a href="#test-this-repo">Section 33.14, “Test this repo”</a> for more useful testing tips.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -33766,7 +33775,22 @@ ls "$(./getvar buildroot_build_dir)"</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="ccache"><a class="anchor" href="#ccache"></a><a class="link" href="#ccache">33.8. ccache</a></h3>
|
||||
<h3 id="custom-build-directory"><a class="anchor" href="#custom-build-directory"></a><a class="link" href="#custom-build-directory">33.8. Custom build directory</a></h3>
|
||||
<div class="paragraph">
|
||||
<p>For now there is no way to change the build directory from <code>out/</code> (resp. <code>out.docker</code> for <<docker>.) to something else.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>However, if you just want to place the build storage in your hard drive and the source in your SSD, which is a good configuration if you are doing lots of builds, just create a symlink as:</p>
|
||||
</div>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>mkdir -p /mnt/hd/linux-kernel-module-cheat-out
|
||||
ln -s out /mnt/hd/linux-kernel-module-cheat-out</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="ccache"><a class="anchor" href="#ccache"></a><a class="link" href="#ccache">33.9. ccache</a></h3>
|
||||
<div class="paragraph">
|
||||
<p><a href="https://en.wikipedia.org/wiki/Ccache">ccache</a> <a href="#benchmark-builds">might</a> save you a lot of re-build when you decide to <a href="#clean-the-build">Clean the build</a> or create a new <a href="#build-variants">build variant</a>.</p>
|
||||
</div>
|
||||
@@ -33835,7 +33859,7 @@ export CCACHE_MAXSIZE="20G"</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="rebuild-buildroot-while-running"><a class="anchor" href="#rebuild-buildroot-while-running"></a><a class="link" href="#rebuild-buildroot-while-running">33.9. Rebuild Buildroot while running</a></h3>
|
||||
<h3 id="rebuild-buildroot-while-running"><a class="anchor" href="#rebuild-buildroot-while-running"></a><a class="link" href="#rebuild-buildroot-while-running">33.10. Rebuild Buildroot while running</a></h3>
|
||||
<div class="paragraph">
|
||||
<p>It is not possible to rebuild the root filesystem while running QEMU because QEMU holds the file qcow2 file:</p>
|
||||
</div>
|
||||
@@ -33846,7 +33870,7 @@ export CCACHE_MAXSIZE="20G"</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="simultaneous-runs"><a class="anchor" href="#simultaneous-runs"></a><a class="link" href="#simultaneous-runs">33.10. Simultaneous runs</a></h3>
|
||||
<h3 id="simultaneous-runs"><a class="anchor" href="#simultaneous-runs"></a><a class="link" href="#simultaneous-runs">33.11. Simultaneous runs</a></h3>
|
||||
<div class="paragraph">
|
||||
<p>When doing long simulations sweeping across multiple system parameters, it becomes fundamental to do multiple simulations in parallel.</p>
|
||||
</div>
|
||||
@@ -33942,7 +33966,7 @@ less "$(./getvar --arch aarch64 --emulator gem5 --run-id 1 termout_file)"</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>To run multiple gem5 checkouts, see: <a href="#gem5-worktree">Section 33.11.3.1, “gem5 worktree”</a>.</p>
|
||||
<p>To run multiple gem5 checkouts, see: <a href="#gem5-worktree">Section 33.12.3.1, “gem5 worktree”</a>.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Implementation note: we create multiple namespaces for two things:</p>
|
||||
@@ -33981,7 +34005,7 @@ less "$(./getvar --arch aarch64 --emulator gem5 --run-id 1 termout_file)"</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="build-variants"><a class="anchor" href="#build-variants"></a><a class="link" href="#build-variants">33.11. Build variants</a></h3>
|
||||
<h3 id="build-variants"><a class="anchor" href="#build-variants"></a><a class="link" href="#build-variants">33.12. Build variants</a></h3>
|
||||
<div class="paragraph">
|
||||
<p>It often happens that you are comparing two versions of the build, a good and a bad one, and trying to figure out why the bad one is bad.</p>
|
||||
</div>
|
||||
@@ -33989,7 +34013,7 @@ less "$(./getvar --arch aarch64 --emulator gem5 --run-id 1 termout_file)"</pre>
|
||||
<p>Our build variants system allows you to keep multiple built versions of all major components, so that you can easily switching between running one or the other.</p>
|
||||
</div>
|
||||
<div class="sect3">
|
||||
<h4 id="linux-kernel-build-variants"><a class="anchor" href="#linux-kernel-build-variants"></a><a class="link" href="#linux-kernel-build-variants">33.11.1. Linux kernel build variants</a></h4>
|
||||
<h4 id="linux-kernel-build-variants"><a class="anchor" href="#linux-kernel-build-variants"></a><a class="link" href="#linux-kernel-build-variants">33.12.1. Linux kernel build variants</a></h4>
|
||||
<div class="paragraph">
|
||||
<p>If you want to keep two builds around, one for the latest Linux version, and the other for Linux <code>v4.16</code>:</p>
|
||||
</div>
|
||||
@@ -34025,11 +34049,11 @@ git -C "$(./getvar linux_source_dir)" checkout -
|
||||
</div>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>To run both kernels simultaneously, one on each QEMU instance, see: <a href="#simultaneous-runs">Section 33.10, “Simultaneous runs”</a>.</p>
|
||||
<p>To run both kernels simultaneously, one on each QEMU instance, see: <a href="#simultaneous-runs">Section 33.11, “Simultaneous runs”</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect3">
|
||||
<h4 id="qemu-build-variants"><a class="anchor" href="#qemu-build-variants"></a><a class="link" href="#qemu-build-variants">33.11.2. QEMU build variants</a></h4>
|
||||
<h4 id="qemu-build-variants"><a class="anchor" href="#qemu-build-variants"></a><a class="link" href="#qemu-build-variants">33.12.2. QEMU build variants</a></h4>
|
||||
<div class="paragraph">
|
||||
<p>Analogous to the <a href="#linux-kernel-build-variants">Linux kernel build variants</a> but with the <code>--qemu-build-id</code> option instead:</p>
|
||||
</div>
|
||||
@@ -34045,7 +34069,7 @@ git -C "$(./getvar qemu_source_dir)" checkout -
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect3">
|
||||
<h4 id="gem5-build-variants"><a class="anchor" href="#gem5-build-variants"></a><a class="link" href="#gem5-build-variants">33.11.3. gem5 build variants</a></h4>
|
||||
<h4 id="gem5-build-variants"><a class="anchor" href="#gem5-build-variants"></a><a class="link" href="#gem5-build-variants">33.12.3. gem5 build variants</a></h4>
|
||||
<div class="paragraph">
|
||||
<p>Analogous to the <a href="#linux-kernel-build-variants">Linux kernel build variants</a> but with the <code>--gem5-build-id</code> option instead:</p>
|
||||
</div>
|
||||
@@ -34076,7 +34100,7 @@ git -C "$(./getvar gem5_source_dir)" checkout some-branch
|
||||
<p>Therefore, you can’t forget to checkout to the sources to that of the corresponding build before running, unless you explicitly tell gem5 to use a non-default source tree with <a href="#gem5-worktree">gem5 worktree</a>. This becomes inevitable when you want to launch multiple simultaneous runs at different checkouts.</p>
|
||||
</div>
|
||||
<div class="sect4">
|
||||
<h5 id="gem5-worktree"><a class="anchor" href="#gem5-worktree"></a><a class="link" href="#gem5-worktree">33.11.3.1. gem5 worktree</a></h5>
|
||||
<h5 id="gem5-worktree"><a class="anchor" href="#gem5-worktree"></a><a class="link" href="#gem5-worktree">33.12.3.1. gem5 worktree</a></h5>
|
||||
<div class="paragraph">
|
||||
<p><a href="#gem5-build-variants"><code>--gem5-build-id</code></a> goes a long way, but if you want to seamlessly switch between two gem5 tress without checking out multiple times, then <code>--gem5-worktree</code> is for you.</p>
|
||||
</div>
|
||||
@@ -34129,7 +34153,7 @@ cd -
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect4">
|
||||
<h5 id="gem5-private-source-trees"><a class="anchor" href="#gem5-private-source-trees"></a><a class="link" href="#gem5-private-source-trees">33.11.3.2. gem5 private source trees</a></h5>
|
||||
<h5 id="gem5-private-source-trees"><a class="anchor" href="#gem5-private-source-trees"></a><a class="link" href="#gem5-private-source-trees">33.12.3.2. gem5 private source trees</a></h5>
|
||||
<div class="paragraph">
|
||||
<p>Suppose that you are working on a private fork of gem5, but you want to use this repository to develop it as well.</p>
|
||||
</div>
|
||||
@@ -34173,7 +34197,7 @@ gem5_internal="$(pwd)/gem5-internal"</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect3">
|
||||
<h4 id="buildroot-build-variants"><a class="anchor" href="#buildroot-build-variants"></a><a class="link" href="#buildroot-build-variants">33.11.4. Buildroot build variants</a></h4>
|
||||
<h4 id="buildroot-build-variants"><a class="anchor" href="#buildroot-build-variants"></a><a class="link" href="#buildroot-build-variants">33.12.4. Buildroot build variants</a></h4>
|
||||
<div class="paragraph">
|
||||
<p>Allows you to have multiple versions of the GCC toolchain or root filesystem.</p>
|
||||
</div>
|
||||
@@ -34193,9 +34217,9 @@ git -C "$(./getvar buildroot_source_dir)" checkout -
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="directory-structure"><a class="anchor" href="#directory-structure"></a><a class="link" href="#directory-structure">33.12. Directory structure</a></h3>
|
||||
<h3 id="directory-structure"><a class="anchor" href="#directory-structure"></a><a class="link" href="#directory-structure">33.13. Directory structure</a></h3>
|
||||
<div class="sect3">
|
||||
<h4 id="lkmc-directory"><a class="anchor" href="#lkmc-directory"></a><a class="link" href="#lkmc-directory">33.12.1. lkmc directory</a></h4>
|
||||
<h4 id="lkmc-directory"><a class="anchor" href="#lkmc-directory"></a><a class="link" href="#lkmc-directory">33.13.1. lkmc directory</a></h4>
|
||||
<div class="paragraph">
|
||||
<p><a href="https://github.com/cirosantilli/linux-kernel-module-cheat/blob/master/lkmc/">lkmc/</a> contains sources and headers that are shared across kernel modules, userland and baremetal examples.</p>
|
||||
</div>
|
||||
@@ -34206,7 +34230,7 @@ git -C "$(./getvar buildroot_source_dir)" checkout -
|
||||
<p>Another option would have been to name it as <code>includes/lkmc</code>, but that would make paths longer, and we might want to store source code in that directory as well in the future.</p>
|
||||
</div>
|
||||
<div class="sect4">
|
||||
<h5 id="userland-objects-vs-header-only"><a class="anchor" href="#userland-objects-vs-header-only"></a><a class="link" href="#userland-objects-vs-header-only">33.12.1.1. Userland objects vs header-only</a></h5>
|
||||
<h5 id="userland-objects-vs-header-only"><a class="anchor" href="#userland-objects-vs-header-only"></a><a class="link" href="#userland-objects-vs-header-only">33.13.1.1. Userland objects vs header-only</a></h5>
|
||||
<div class="paragraph">
|
||||
<p>When factoring out functionality across userland examples, there are two main options:</p>
|
||||
</div>
|
||||
@@ -34265,7 +34289,7 @@ git -C "$(./getvar buildroot_source_dir)" checkout -
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect3">
|
||||
<h4 id="buildroot_packages-directory"><a class="anchor" href="#buildroot_packages-directory"></a><a class="link" href="#buildroot_packages-directory">33.12.2. buildroot_packages directory</a></h4>
|
||||
<h4 id="buildroot_packages-directory"><a class="anchor" href="#buildroot_packages-directory"></a><a class="link" href="#buildroot_packages-directory">33.13.2. buildroot_packages directory</a></h4>
|
||||
<div class="paragraph">
|
||||
<p>Source: <a href="https://github.com/cirosantilli/linux-kernel-module-cheat/blob/master/buildroot_packages/">buildroot_packages/</a>.</p>
|
||||
</div>
|
||||
@@ -34314,7 +34338,7 @@ git -C "$(./getvar buildroot_source_dir)" checkout -
|
||||
<p>A custom build script can give you more flexibility: e.g. the package can be made work with other root filesystems more easily, have better <a href="#9p">9P</a> support, and rebuild faster as it evades some Buildroot boilerplate.</p>
|
||||
</div>
|
||||
<div class="sect4">
|
||||
<h5 id="kernel_modules-buildroot-package"><a class="anchor" href="#kernel_modules-buildroot-package"></a><a class="link" href="#kernel_modules-buildroot-package">33.12.2.1. kernel_modules buildroot package</a></h5>
|
||||
<h5 id="kernel_modules-buildroot-package"><a class="anchor" href="#kernel_modules-buildroot-package"></a><a class="link" href="#kernel_modules-buildroot-package">33.13.2.1. kernel_modules buildroot package</a></h5>
|
||||
<div class="paragraph">
|
||||
<p>Source: <a href="https://github.com/cirosantilli/linux-kernel-module-cheat/blob/master/buildroot_packages/kernel_modules/">buildroot_packages/kernel_modules/</a></p>
|
||||
</div>
|
||||
@@ -34361,9 +34385,9 @@ git -C "$(./getvar buildroot_source_dir)" checkout -
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect3">
|
||||
<h4 id="patches-directory"><a class="anchor" href="#patches-directory"></a><a class="link" href="#patches-directory">33.12.3. patches directory</a></h4>
|
||||
<h4 id="patches-directory"><a class="anchor" href="#patches-directory"></a><a class="link" href="#patches-directory">33.13.3. patches directory</a></h4>
|
||||
<div class="sect4">
|
||||
<h5 id="patches-global-directory"><a class="anchor" href="#patches-global-directory"></a><a class="link" href="#patches-global-directory">33.12.3.1. patches/global directory</a></h5>
|
||||
<h5 id="patches-global-directory"><a class="anchor" href="#patches-global-directory"></a><a class="link" href="#patches-global-directory">33.13.3.1. patches/global directory</a></h5>
|
||||
<div class="paragraph">
|
||||
<p>Has the following structure:</p>
|
||||
</div>
|
||||
@@ -34380,7 +34404,7 @@ git -C "$(./getvar buildroot_source_dir)" checkout -
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect4">
|
||||
<h5 id="patches-manual-directory"><a class="anchor" href="#patches-manual-directory"></a><a class="link" href="#patches-manual-directory">33.12.3.2. patches/manual directory</a></h5>
|
||||
<h5 id="patches-manual-directory"><a class="anchor" href="#patches-manual-directory"></a><a class="link" href="#patches-manual-directory">33.13.3.2. patches/manual directory</a></h5>
|
||||
<div class="paragraph">
|
||||
<p>Patches in this directory are never applied automatically: it is up to users to manually apply them before usage following the instructions in this documentation.</p>
|
||||
</div>
|
||||
@@ -34390,7 +34414,7 @@ git -C "$(./getvar buildroot_source_dir)" checkout -
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect3">
|
||||
<h4 id="rootfs_overlay"><a class="anchor" href="#rootfs_overlay"></a><a class="link" href="#rootfs_overlay">33.12.4. rootfs_overlay</a></h4>
|
||||
<h4 id="rootfs_overlay"><a class="anchor" href="#rootfs_overlay"></a><a class="link" href="#rootfs_overlay">33.13.4. rootfs_overlay</a></h4>
|
||||
<div class="paragraph">
|
||||
<p>Source: <a href="https://github.com/cirosantilli/linux-kernel-module-cheat/blob/master/rootfs_overlay">rootfs_overlay</a>.</p>
|
||||
</div>
|
||||
@@ -34437,7 +34461,7 @@ git -C "$(./getvar buildroot_source_dir)" checkout -
|
||||
<p>This way you can just hack away the scripts and try them out immediately without any further operations.</p>
|
||||
</div>
|
||||
<div class="sect4">
|
||||
<h5 id="out_rootfs_overlay_dir"><a class="anchor" href="#out_rootfs_overlay_dir"></a><a class="link" href="#out_rootfs_overlay_dir">33.12.4.1. out_rootfs_overlay_dir</a></h5>
|
||||
<h5 id="out_rootfs_overlay_dir"><a class="anchor" href="#out_rootfs_overlay_dir"></a><a class="link" href="#out_rootfs_overlay_dir">33.13.4.1. out_rootfs_overlay_dir</a></h5>
|
||||
<div class="paragraph">
|
||||
<p>This path can be found with:</p>
|
||||
</div>
|
||||
@@ -34471,7 +34495,7 @@ git -C "$(./getvar buildroot_source_dir)" checkout -
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect3">
|
||||
<h4 id="lkmc-c"><a class="anchor" href="#lkmc-c"></a><a class="link" href="#lkmc-c">33.12.5. lkmc.c</a></h4>
|
||||
<h4 id="lkmc-c"><a class="anchor" href="#lkmc-c"></a><a class="link" href="#lkmc-c">33.13.5. lkmc.c</a></h4>
|
||||
<div class="paragraph">
|
||||
<p>The files:</p>
|
||||
</div>
|
||||
@@ -34501,7 +34525,7 @@ git -C "$(./getvar buildroot_source_dir)" checkout -
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect3">
|
||||
<h4 id="rand_check-out"><a class="anchor" href="#rand_check-out"></a><a class="link" href="#rand_check-out">33.12.6. rand_check.out</a></h4>
|
||||
<h4 id="rand_check-out"><a class="anchor" href="#rand_check-out"></a><a class="link" href="#rand_check-out">33.13.6. rand_check.out</a></h4>
|
||||
<div class="paragraph">
|
||||
<p>Print out several parameters that normally change randomly from boot to boot:</p>
|
||||
</div>
|
||||
@@ -34528,7 +34552,7 @@ git -C "$(./getvar buildroot_source_dir)" checkout -
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect3">
|
||||
<h4 id="lkmc_home"><a class="anchor" href="#lkmc_home"></a><a class="link" href="#lkmc_home">33.12.7. lkmc_home</a></h4>
|
||||
<h4 id="lkmc_home"><a class="anchor" href="#lkmc_home"></a><a class="link" href="#lkmc_home">33.13.7. lkmc_home</a></h4>
|
||||
<div class="paragraph">
|
||||
<p><code>lkmc_home</code> refers to the target base directory in which we put all our custom built stuff, such as <a href="#userland-setup">userland executables</a> and <a href="#your-first-kernel-module-hack">kernel modules</a>.</p>
|
||||
</div>
|
||||
@@ -34562,9 +34586,9 @@ git -C "$(./getvar buildroot_source_dir)" checkout -
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="test-this-repo"><a class="anchor" href="#test-this-repo"></a><a class="link" href="#test-this-repo">33.13. Test this repo</a></h3>
|
||||
<h3 id="test-this-repo"><a class="anchor" href="#test-this-repo"></a><a class="link" href="#test-this-repo">33.14. Test this repo</a></h3>
|
||||
<div class="sect3">
|
||||
<h4 id="automated-tests"><a class="anchor" href="#automated-tests"></a><a class="link" href="#automated-tests">33.13.1. Automated tests</a></h4>
|
||||
<h4 id="automated-tests"><a class="anchor" href="#automated-tests"></a><a class="link" href="#automated-tests">33.14.1. Automated tests</a></h4>
|
||||
<div class="paragraph">
|
||||
<p>Run almost all tests:</p>
|
||||
</div>
|
||||
@@ -34620,7 +34644,7 @@ echo $?</pre>
|
||||
<p><a href="https://github.com/cirosantilli/linux-kernel-module-cheat/blob/master/test">test</a> does not all possible tests, because there are too many possible variations and that would take forever. The rationale is the same as for <code>./build all</code> and is explained in <code>./build --help</code>.</p>
|
||||
</div>
|
||||
<div class="sect4">
|
||||
<h5 id="test-arch-and-emulator-selection"><a class="anchor" href="#test-arch-and-emulator-selection"></a><a class="link" href="#test-arch-and-emulator-selection">33.13.1.1. Test arch and emulator selection</a></h5>
|
||||
<h5 id="test-arch-and-emulator-selection"><a class="anchor" href="#test-arch-and-emulator-selection"></a><a class="link" href="#test-arch-and-emulator-selection">33.14.1.1. Test arch and emulator selection</a></h5>
|
||||
<div class="paragraph">
|
||||
<p>You can select multiple archs and emulators of interest, as for an other command, with:</p>
|
||||
</div>
|
||||
@@ -34653,7 +34677,7 @@ echo $?</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect4">
|
||||
<h5 id="quit-on-fail"><a class="anchor" href="#quit-on-fail"></a><a class="link" href="#quit-on-fail">33.13.1.2. Quit on fail</a></h5>
|
||||
<h5 id="quit-on-fail"><a class="anchor" href="#quit-on-fail"></a><a class="link" href="#quit-on-fail">33.14.1.2. Quit on fail</a></h5>
|
||||
<div class="paragraph">
|
||||
<p>By default, continue running even after the first failure happens, and they show a summary at the end.</p>
|
||||
</div>
|
||||
@@ -34667,7 +34691,7 @@ echo $?</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect4">
|
||||
<h5 id="test-userland-in-full-system"><a class="anchor" href="#test-userland-in-full-system"></a><a class="link" href="#test-userland-in-full-system">33.13.1.3. Test userland in full system</a></h5>
|
||||
<h5 id="test-userland-in-full-system"><a class="anchor" href="#test-userland-in-full-system"></a><a class="link" href="#test-userland-in-full-system">33.14.1.3. Test userland in full system</a></h5>
|
||||
<div class="paragraph">
|
||||
<p>TODO: we really need a mechanism to automatically generate the test list automatically e.g. based on <a href="#path-properties">path_properties</a>, currently there are many tests missing, and we have to add everything manually which is very annoying.</p>
|
||||
</div>
|
||||
@@ -34696,7 +34720,7 @@ echo $?</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect4">
|
||||
<h5 id="gdb-tests"><a class="anchor" href="#gdb-tests"></a><a class="link" href="#gdb-tests">33.13.1.4. GDB tests</a></h5>
|
||||
<h5 id="gdb-tests"><a class="anchor" href="#gdb-tests"></a><a class="link" href="#gdb-tests">33.14.1.4. GDB tests</a></h5>
|
||||
<div class="paragraph">
|
||||
<p>We have some <a href="https://github.com/pexpect/pexpect">pexpect</a> automated tests for GDB for both userland and baremetal programs!</p>
|
||||
</div>
|
||||
@@ -34769,7 +34793,7 @@ echo $?</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect4">
|
||||
<h5 id="magic-failure-string"><a class="anchor" href="#magic-failure-string"></a><a class="link" href="#magic-failure-string">33.13.1.5. Magic failure string</a></h5>
|
||||
<h5 id="magic-failure-string"><a class="anchor" href="#magic-failure-string"></a><a class="link" href="#magic-failure-string">33.14.1.5. Magic failure string</a></h5>
|
||||
<div class="paragraph">
|
||||
<p>We do not know of any way to set the emulator exit status in QEMU arm full system.</p>
|
||||
</div>
|
||||
@@ -34872,9 +34896,9 @@ echo $?</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect3">
|
||||
<h4 id="non-automated-tests"><a class="anchor" href="#non-automated-tests"></a><a class="link" href="#non-automated-tests">33.13.2. Non-automated tests</a></h4>
|
||||
<h4 id="non-automated-tests"><a class="anchor" href="#non-automated-tests"></a><a class="link" href="#non-automated-tests">33.14.2. Non-automated tests</a></h4>
|
||||
<div class="sect4">
|
||||
<h5 id="test-gdb-linux-kernel"><a class="anchor" href="#test-gdb-linux-kernel"></a><a class="link" href="#test-gdb-linux-kernel">33.13.2.1. Test GDB Linux kernel</a></h5>
|
||||
<h5 id="test-gdb-linux-kernel"><a class="anchor" href="#test-gdb-linux-kernel"></a><a class="link" href="#test-gdb-linux-kernel">33.14.2.1. Test GDB Linux kernel</a></h5>
|
||||
<div class="paragraph">
|
||||
<p>For the Linux kernel, do the following manual tests for now.</p>
|
||||
</div>
|
||||
@@ -34912,7 +34936,7 @@ echo $?</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect4">
|
||||
<h5 id="test-the-internet"><a class="anchor" href="#test-the-internet"></a><a class="link" href="#test-the-internet">33.13.2.2. Test the Internet</a></h5>
|
||||
<h5 id="test-the-internet"><a class="anchor" href="#test-the-internet"></a><a class="link" href="#test-the-internet">33.14.2.2. Test the Internet</a></h5>
|
||||
<div class="paragraph">
|
||||
<p>You should also test that the Internet works:</p>
|
||||
</div>
|
||||
@@ -34923,7 +34947,7 @@ echo $?</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect4">
|
||||
<h5 id="cli-script-tests"><a class="anchor" href="#cli-script-tests"></a><a class="link" href="#cli-script-tests">33.13.2.3. CLI script tests</a></h5>
|
||||
<h5 id="cli-script-tests"><a class="anchor" href="#cli-script-tests"></a><a class="link" href="#cli-script-tests">33.14.2.3. CLI script tests</a></h5>
|
||||
<div class="paragraph">
|
||||
<p><code>build-userland</code> and <code>test-executables</code> have a wide variety of target selection modes, and it was hard to keep them all working without some tests:</p>
|
||||
</div>
|
||||
@@ -34941,7 +34965,7 @@ echo $?</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="bisection"><a class="anchor" href="#bisection"></a><a class="link" href="#bisection">33.14. Bisection</a></h3>
|
||||
<h3 id="bisection"><a class="anchor" href="#bisection"></a><a class="link" href="#bisection">33.15. Bisection</a></h3>
|
||||
<div class="paragraph">
|
||||
<p>When updating the Linux kernel, QEMU and gem5, things sometimes break.</p>
|
||||
</div>
|
||||
@@ -34997,7 +35021,7 @@ git submodule update
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="path-properties"><a class="anchor" href="#path-properties"></a><a class="link" href="#path-properties">33.15. path_properties</a></h3>
|
||||
<h3 id="path-properties"><a class="anchor" href="#path-properties"></a><a class="link" href="#path-properties">33.16. path_properties</a></h3>
|
||||
<div class="paragraph">
|
||||
<p>In order to build and run each userland and <a href="#baremetal-setup">baremetal</a> example properly, we need per-file metadata such as compiler flags and required number of cores.</p>
|
||||
</div>
|
||||
@@ -35060,7 +35084,7 @@ baremetal=True</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="update-a-forked-submodule"><a class="anchor" href="#update-a-forked-submodule"></a><a class="link" href="#update-a-forked-submodule">33.16. Update a forked submodule</a></h3>
|
||||
<h3 id="update-a-forked-submodule"><a class="anchor" href="#update-a-forked-submodule"></a><a class="link" href="#update-a-forked-submodule">33.17. Update a forked submodule</a></h3>
|
||||
<div class="paragraph">
|
||||
<p>This is a template update procedure for submodules for which we have some patches on on top of mainline.</p>
|
||||
</div>
|
||||
@@ -35089,9 +35113,9 @@ git commit -m "linux: update to ${next_mainline_revision}"</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="release"><a class="anchor" href="#release"></a><a class="link" href="#release">33.17. Release</a></h3>
|
||||
<h3 id="release"><a class="anchor" href="#release"></a><a class="link" href="#release">33.18. Release</a></h3>
|
||||
<div class="sect3">
|
||||
<h4 id="release-procedure"><a class="anchor" href="#release-procedure"></a><a class="link" href="#release-procedure">33.17.1. Release procedure</a></h4>
|
||||
<h4 id="release-procedure"><a class="anchor" href="#release-procedure"></a><a class="link" href="#release-procedure">33.18.1. Release procedure</a></h4>
|
||||
<div class="paragraph">
|
||||
<p>Ensure that the <a href="#automated-tests">Automated tests</a> are passing on a clean build:</p>
|
||||
</div>
|
||||
@@ -35102,7 +35126,7 @@ git commit -m "linux: update to ${next_mainline_revision}"</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>The <code>./build-test</code> command builds a superset of what will be downloaded which also tests other things we would like to be working on the release. For the minimal build to generate the files to be uploaded, see: <a href="#release-zip">Section 33.17.2, “release-zip”</a></p>
|
||||
<p>The <code>./build-test</code> command builds a superset of what will be downloaded which also tests other things we would like to be working on the release. For the minimal build to generate the files to be uploaded, see: <a href="#release-zip">Section 33.18.2, “release-zip”</a></p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>The clean build is necessary as it generates clean images since <a href="#remove-buildroot-packages">it is not possible to remove Buildroot packages</a></p>
|
||||
@@ -35172,7 +35196,7 @@ git push --follow-tags
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect3">
|
||||
<h4 id="release-zip"><a class="anchor" href="#release-zip"></a><a class="link" href="#release-zip">33.17.2. release-zip</a></h4>
|
||||
<h4 id="release-zip"><a class="anchor" href="#release-zip"></a><a class="link" href="#release-zip">33.18.2. release-zip</a></h4>
|
||||
<div class="paragraph">
|
||||
<p>Create a zip containing all files required for <a href="#prebuilt">Prebuilt setup</a>:</p>
|
||||
</div>
|
||||
@@ -35197,7 +35221,7 @@ git push --follow-tags
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect3">
|
||||
<h4 id="release-upload"><a class="anchor" href="#release-upload"></a><a class="link" href="#release-upload">33.17.3. release-upload</a></h4>
|
||||
<h4 id="release-upload"><a class="anchor" href="#release-upload"></a><a class="link" href="#release-upload">33.18.3. release-upload</a></h4>
|
||||
<div class="paragraph">
|
||||
<p>After:</p>
|
||||
</div>
|
||||
@@ -35245,9 +35269,9 @@ git push --follow-tags
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="design-rationale"><a class="anchor" href="#design-rationale"></a><a class="link" href="#design-rationale">33.18. Design rationale</a></h3>
|
||||
<h3 id="design-rationale"><a class="anchor" href="#design-rationale"></a><a class="link" href="#design-rationale">33.19. Design rationale</a></h3>
|
||||
<div class="sect3">
|
||||
<h4 id="design-goals"><a class="anchor" href="#design-goals"></a><a class="link" href="#design-goals">33.18.1. Design goals</a></h4>
|
||||
<h4 id="design-goals"><a class="anchor" href="#design-goals"></a><a class="link" href="#design-goals">33.19.1. Design goals</a></h4>
|
||||
<div class="paragraph">
|
||||
<p>This project was created to help me understand, modify and test low level system components by using system simulators.</p>
|
||||
</div>
|
||||
@@ -35323,7 +35347,7 @@ git push --follow-tags
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect3">
|
||||
<h4 id="setup-trade-offs"><a class="anchor" href="#setup-trade-offs"></a><a class="link" href="#setup-trade-offs">33.18.2. Setup trade-offs</a></h4>
|
||||
<h4 id="setup-trade-offs"><a class="anchor" href="#setup-trade-offs"></a><a class="link" href="#setup-trade-offs">33.19.2. Setup trade-offs</a></h4>
|
||||
<div class="paragraph">
|
||||
<p>The trade-offs between the different <a href="#getting-started">setups</a> are basically a balance between:</p>
|
||||
</div>
|
||||
@@ -35348,13 +35372,13 @@ git push --follow-tags
|
||||
<p>compatibility: how likely is is that all the components will work well together: emulator, compiler, kernel, standard library, …​</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>guest software availability: how wide is your choice of easily installed guest software packages? See also: <a href="#linux-distro-choice">Section 33.18.4, “Linux distro choice”</a></p>
|
||||
<p>guest software availability: how wide is your choice of easily installed guest software packages? See also: <a href="#linux-distro-choice">Section 33.19.4, “Linux distro choice”</a></p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect3">
|
||||
<h4 id="resource-tradeoff-guidelines"><a class="anchor" href="#resource-tradeoff-guidelines"></a><a class="link" href="#resource-tradeoff-guidelines">33.18.3. Resource tradeoff guidelines</a></h4>
|
||||
<h4 id="resource-tradeoff-guidelines"><a class="anchor" href="#resource-tradeoff-guidelines"></a><a class="link" href="#resource-tradeoff-guidelines">33.19.3. Resource tradeoff guidelines</a></h4>
|
||||
<div class="paragraph">
|
||||
<p>Choosing which features go into our default builds means making tradeoffs, here are our guidelines:</p>
|
||||
</div>
|
||||
@@ -35399,7 +35423,7 @@ git push --follow-tags
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect3">
|
||||
<h4 id="linux-distro-choice"><a class="anchor" href="#linux-distro-choice"></a><a class="link" href="#linux-distro-choice">33.18.4. Linux distro choice</a></h4>
|
||||
<h4 id="linux-distro-choice"><a class="anchor" href="#linux-distro-choice"></a><a class="link" href="#linux-distro-choice">33.19.4. Linux distro choice</a></h4>
|
||||
<div class="paragraph">
|
||||
<p>We haven’t found the ultimate distro yet, here is a summary table of trade-offs that we care about: <a href="#table-lkmc-linux-distro-comparison">Table 8, “Comparison of Linux distros for usage in this repository”</a>.</p>
|
||||
</div>
|
||||
@@ -35502,9 +35526,9 @@ git push --follow-tags
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="soft-topics"><a class="anchor" href="#soft-topics"></a><a class="link" href="#soft-topics">33.19. Soft topics</a></h3>
|
||||
<h3 id="soft-topics"><a class="anchor" href="#soft-topics"></a><a class="link" href="#soft-topics">33.20. Soft topics</a></h3>
|
||||
<div class="sect3">
|
||||
<h4 id="fairy-tale"><a class="anchor" href="#fairy-tale"></a><a class="link" href="#fairy-tale">33.19.1. Fairy tale</a></h4>
|
||||
<h4 id="fairy-tale"><a class="anchor" href="#fairy-tale"></a><a class="link" href="#fairy-tale">33.20.1. Fairy tale</a></h4>
|
||||
<div class="quoteblock">
|
||||
<blockquote>
|
||||
<div class="paragraph">
|
||||
@@ -35541,7 +35565,7 @@ git push --follow-tags
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect3">
|
||||
<h4 id="should-you-waste-your-life-with-systems-programming"><a class="anchor" href="#should-you-waste-your-life-with-systems-programming"></a><a class="link" href="#should-you-waste-your-life-with-systems-programming">33.19.2. Should you waste your life with systems programming?</a></h4>
|
||||
<h4 id="should-you-waste-your-life-with-systems-programming"><a class="anchor" href="#should-you-waste-your-life-with-systems-programming"></a><a class="link" href="#should-you-waste-your-life-with-systems-programming">33.20.2. Should you waste your life with systems programming?</a></h4>
|
||||
<div class="paragraph">
|
||||
<p>Being the hardcore person who fully understands an important complex system such as a computer, it does have a nice ring to it doesn’t it?</p>
|
||||
</div>
|
||||
@@ -35626,7 +35650,7 @@ git push --follow-tags
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="bibliography"><a class="anchor" href="#bibliography"></a><a class="link" href="#bibliography">33.20. Bibliography</a></h3>
|
||||
<h3 id="bibliography"><a class="anchor" href="#bibliography"></a><a class="link" href="#bibliography">33.21. Bibliography</a></h3>
|
||||
<div class="paragraph">
|
||||
<p>Runnable stuff:</p>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user