From 2c3c1048746a4622d8c89a29670120dc8fab93c4 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 20:49:45 +0200 Subject: Adding upstream version 6.1.76. Signed-off-by: Daniel Baumann --- .../selftests/rcutorture/doc/rcu-test-image.txt | 67 ++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 tools/testing/selftests/rcutorture/doc/rcu-test-image.txt (limited to 'tools/testing/selftests/rcutorture/doc/rcu-test-image.txt') diff --git a/tools/testing/selftests/rcutorture/doc/rcu-test-image.txt b/tools/testing/selftests/rcutorture/doc/rcu-test-image.txt new file mode 100644 index 000000000..b2fc24797 --- /dev/null +++ b/tools/testing/selftests/rcutorture/doc/rcu-test-image.txt @@ -0,0 +1,67 @@ +Normally, a minimal initrd is created automatically by the rcutorture +scripting. But minimal really does mean "minimal", namely just a single +root directory with a single statically linked executable named "init": + +$ size tools/testing/selftests/rcutorture/initrd/init + text data bss dec hex filename + 328 0 8 336 150 tools/testing/selftests/rcutorture/initrd/init + +Suppose you need to run some scripts, perhaps to monitor or control +some aspect of the rcutorture testing. This will require a more fully +filled-out userspace, perhaps containing libraries, executables for +the shell and other utilities, and soforth. In that case, place your +desired filesystem here: + + tools/testing/selftests/rcutorture/initrd + +For example, your tools/testing/selftests/rcutorture/initrd/init might +be a script that does any needed mount operations and starts whatever +scripts need starting to properly monitor or control your testing. +The next rcutorture build will then incorporate this filesystem into +the kernel image that is passed to qemu. + +Or maybe you need a real root filesystem for some reason, in which case +please read on! + +The remainder of this document describes one way to create the +rcu-test-image file that contains the filesystem used by the guest-OS +kernel. There are probably much better ways of doing this, and this +filesystem could no doubt be smaller. It is probably also possible to +simply download an appropriate image from any number of places. + +That said, here are the commands: + +------------------------------------------------------------------------ +dd if=/dev/zero of=rcu-test-image bs=400M count=1 +mkfs.ext3 ./rcu-test-image +sudo mount -o loop ./rcu-test-image /mnt + +# Replace "precise" below with your favorite Ubuntu release. +# Empirical evidence says this image will work for 64-bit, but... +# Note that debootstrap does take a few minutes to run. Or longer. +sudo debootstrap --verbose --arch i386 precise /mnt http://archive.ubuntu.com/ubuntu +cat << '___EOF___' | sudo dd of=/mnt/etc/fstab +# UNCONFIGURED FSTAB FOR BASE SYSTEM +# +/dev/vda / ext3 defaults 1 1 +dev /dev tmpfs rw 0 0 +tmpfs /dev/shm tmpfs defaults 0 0 +devpts /dev/pts devpts gid=5,mode=620 0 0 +sysfs /sys sysfs defaults 0 0 +proc /proc proc defaults 0 0 +___EOF___ +sudo umount /mnt +------------------------------------------------------------------------ + + +References: + + http://sripathikodi.blogspot.com/2010/02/creating-kvm-bootable-fedora-system.html + https://help.ubuntu.com/community/KVM/CreateGuests + https://help.ubuntu.com/community/JeOSVMBuilder + http://wiki.libvirt.org/page/UbuntuKVMWalkthrough + http://www.moe.co.uk/2011/01/07/pci_add_option_rom-failed-to-find-romfile-pxe-rtl8139-bin/ -- "apt-get install kvm-pxe" + https://www.landley.net/writing/rootfs-howto.html + https://en.wikipedia.org/wiki/Initrd + https://en.wikipedia.org/wiki/Cpio + http://wiki.libvirt.org/page/UbuntuKVMWalkthrough -- cgit v1.2.3