aboutgitcode
Commit message (Collapse)AuthorAgeFilesLines
* mbuto: misc cleanupSevinj Aghayeva2022-04-081-2/+2
| | | | | | Redirect modprobe to /dev/null to avoid verbose output. Remove unnecessary "/". Signed-off-by: Sevinj Aghayeva <sevinj.aghayeva@gmail.com>
* mbuto: handle adding built-in modulesSevinj Aghayeva2022-04-081-15/+20
| | | | | | | | We first assign the output of modprobe to a string and check if it is a built-in module and add its node if so. Otherwise, we process every token in modprobe output and try to see if it is a module. Signed-off-by: Sevinj Aghayeva <sevinj.aghayeva@gmail.com>
* mbuto: handle tokens that start with --Sevinj Aghayeva2022-04-081-3/+3
| | | | | | | | | Since we are going over the output of modprobe and trying to figure out if the token is a module name, sometimes we get strings like "--install", which breaks basename and modprobe commands. To fix this problem, we append "--" to these commands. Signed-off-by: Sevinj Aghayeva <sevinj.aghayeva@gmail.com>
* mbuto: add the -d switch back, but remove it from the variableSevinj Aghayeva2022-04-081-4/+4
| | | | | | | | | When specify -d as part of __d_opt variable, it is passed as a single string to modprobe, like "-d /foo/bar", and modprobe fails to figure out the directory name correctly. With this patch, we pass it as two different strings, like "-d" "/foo/bar", and modprobe works correctly. Signed-off-by: Sevinj Aghayeva <sevinj.aghayeva@gmail.com>
* mbuto: remove redundant -d switchSevinj Aghayeva2022-04-081-2/+2
| | | | | | with two -d switches no modprobe produces wrong output. Signed-off-by: Sevinj Aghayeva <sevinj.aghayeva@gmail.com>
* web: Add demo script and READMEStefano Brivio2022-04-072-0/+146
| | | | | | Just base and kselftests profile demos so far. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
* mbuto: Discard stdout and stderr from selftests installStefano Brivio2022-04-071-18/+18
| | | | | | ...we don't want any of that in the output. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
* mbuto: Make sure kselftests are "installed" before building imageStefano Brivio2022-04-061-0/+3
| | | | | | | | | We need to make sure test programs are built and everything is included in tools/testing/selftests/kselftest_install before we can include that in the guest image. Reported-by: Sevinj Aghayeva <sevinj.aghayeva@gmail.com> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
* mbuto: Fix binary size calculation for librariesStefano Brivio2022-04-061-2/+2
| | | | | | | If modules are installed in subdirectories of lib/modules, we need to pass a matching wildcard to du(1). Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
* mbuto: Add IFS-setting wrapper for libs_copy()Stefano Brivio2022-04-061-11/+11
| | | | | | | This avoids the need to set IFS and reset it around libs_copy() calls. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
* mbuto: Create working directory before profiles are sourcedStefano Brivio2022-04-061-3/+4
| | | | | | | This offers some flexibility to source things from profile definitions themselves. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
* mbuto: Use which(1) instead of 'command -v' to look for program pathsStefano Brivio2022-04-061-3/+2
| | | | | | | The output of 'command -v' varies widely across shells, which(1) output looks relatively consistent. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
* mbuto: Fix up some issues from profile restructuringStefano Brivio2022-04-061-7/+5
| | | | | | | Make indentation of FIXUP definitions consistent. Add /usr/local/bin to PATH, and drop device nodes the 'passt' profile doesn't need. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
* mbuto: Add draft support to run Linux kernel selftestsStefano Brivio2022-04-061-11/+134
| | | | | | | | | | This can be used to run kselftests from a kernel tree without having to install kernel and modules onto a distribution image, for example: kvm -m 8192 -cpu host -smp 2 -kernel arch/x86/boot/bzImage -initrd $(mbuto -p kselftests) -nographic -nodefaults -serial stdio -append "console=ttyS0" Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
* mbuto: Make NODES and LINKS simple listsStefano Brivio2022-04-061-36/+17
| | | | | | | | | | | | | Instead of having one device node per line, use commas to separate attributes, if given. Take links as pairs of tokens, instead of requiring one line for each. This makes command-line overrides actually usable without the need to resort to printf(1) tricks. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
* mbuto: Parse options before fakeroot checkStefano Brivio2022-04-061-9/+10
| | | | | | | | ...so that we can display the help message even if fakeroot is not available. Suggested-by: Wainer dos Santos Moschetta <wmoschet@redhat.com> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
* mbuto: Default to 'none' for compressionStefano Brivio2022-04-051-3/+3
| | | | | | | It's typically faster also to boot, and we don't want to take seconds when running in a subshell on qemu's command line. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
* mbuto: Fix lz4 command lineStefano Brivio2022-04-051-2/+5
| | | | | | lz4 needs an explicit output file if we're not compressing to stdout. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
* mbuto: Make it independent from Kata ContainersStefano Brivio2022-04-051-84/+123
| | | | | | | | | | | | | It already serves other purposes. Make 'kata' and 'kata_debug' explicit profiles, create a base one, and drop the 'pbench' profile which wasn't really used. Output templates are also defined by profiles. This allows convenient usage in a subshell, e.g.: kvm -kernel ... -initrd $(mbuto) Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
* mbuto: Add support for additional libraries typically loaded via dlopen(3)Stefano Brivio2022-03-141-0/+28
| | | | | | | | | | | Example: glibc needs, for basic tasks such as domain resolution, libnss_files and libnss_dns, which in turn links to libresolv. Add a LIBS_DLOPEN variable to hold pairs of libraries typically doing this and additional libraries to copy -- not a complete list, just what's strictly needed for basic functionality. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
* mbuto: Use named fs_spec fields (device names) for virtual filesystems tooStefano Brivio2022-01-261-7/+7
| | | | | | | ...instead of '-'. This shouldn't be needed in theory, but using '-' as a name confuses mountpoint parsing in recent builds of kata-agent. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
* mbuto: Pass kernel version to depmodStefano Brivio2021-10-201-1/+1
| | | | | | | ...otherwise, it will fail for a kernel version which is not the currently running one. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
* mbuto: Add 'seq' and 'bc' to passt profileStefano Brivio2021-09-271-1/+1
| | | | Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
* mbuto: Add some more tools for passt profileStefano Brivio2021-09-181-3/+7
| | | | Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
* mbuto: Add profile for passt testsStefano Brivio2021-08-301-0/+20
| | | | Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
* mbuto: Fix typo in strip command failure handlingStefano Brivio2021-08-281-1/+1
| | | | Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
* mbuto: Initial importStefano Brivio2020-09-021-0/+878
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>