From 9b30ac217ff519bc822626a3175d25be72517846 Mon Sep 17 00:00:00 2001 From: Ciro Santilli Date: Thu, 23 Aug 2018 09:25:21 +0100 Subject: [PATCH] common: convert scripts to python --- .gitignore | 4 + README.adoc | 11 --- common | 204 -------------------------------------------------- common.py | 210 ++++++++++++++++++++++++++++++++++++++++++++++++++++ getvar | 24 ++---- run | 8 +- 6 files changed, 226 insertions(+), 235 deletions(-) delete mode 100644 common create mode 100644 common.py diff --git a/.gitignore b/.gitignore index 3e05d6e..ea666c7 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,7 @@ gitignore* /images-*.zip /out /out.* + +# Python trash. +*.pyc +__pycache__ diff --git a/README.adoc b/README.adoc index 52db887..df021e0 100644 --- a/README.adoc +++ b/README.adoc @@ -9553,22 +9553,15 @@ Otherwise, it becomes very difficult to keep everything working across path refa Mnemonic: `fast`. |`-g` | |Enable gem5 build or force its rebuild. |`-h` | |Show this help message. -|`-L` |`VARIANT` |Linux kernel build variant. |`-I` | |Enable initramfs for the current build. |`-i` | |Enable initrd for the current build. |`-K` |`KERNEL_CONFIG_FILE` |Use `KERNEL_CONFIG_FILE` as the exact Linux kernel configuration. Ignore the default kernel config fragments, but still add options explicitly passed with `-C` and `-c`. on top of it. -|`-M` |`VARIANT` |gem5 build variant. |`-p` | |Pass extra arguments to the `rootfs_post_build_script`. -|`-Q` |`VARIANT`` |QEMU build variant. |`-S` | |Don't build QEMU with SDL support. Graphics such as X11 won't work, only the terminal. -|`-s` | |Add a custom suffix to the build. - E.g., doing `./build -s mysuf` puts all the build output - into `out/x86_64-mysuf`. This allows keep multiple builds around - when you checkout between branches. |`-v` | |Do a verbose build. |=== @@ -9595,7 +9588,6 @@ Otherwise, it becomes very difficult to keep everything working across path refa [options="header"] |=== |Name |Argument name |Description -|`-a` |`ARCH` |Run architecture `ARCH`. |`-c` |`NCPUS` |Emulate `NCPUS` guest CPUs. |`-D` | |Run GDB on the emulator itself. |`-d` | |Wait for GDB to connect before starting execution. @@ -9618,7 +9610,6 @@ Otherwise, it becomes very difficult to keep everything working across path refa |`-G` | |Pass extra options to the gem5 executable. Do not confuse with the arguments passed to config scripts, like `fs.py`. Example: `./run -G '--debug-flags=Exec --debug' -g` -|`-g` | |Use gem5 instead of QEMU. |`-h` | |Show this help message. |`-I` | |Run with initramfs. |`-i` | |Run with initrd. @@ -9632,8 +9623,6 @@ Otherwise, it becomes very difficult to keep everything working across path refa The default is the minimum amount that boots all archs without extra options added. Anything lower will lead some arch to fail to boot. Any -|`-N` |`VARIANT` |gem5 source input variant. -|`-n` | |Run ID. |`-R` | |Replay a QEMU run record deterministically. |`-r` | |Record a QEMU run record for later replay with `-R`. |`-P` | |Run the downloaded prebuilt images. diff --git a/common b/common deleted file mode 100644 index b9dcd05..0000000 --- a/common +++ /dev/null @@ -1,204 +0,0 @@ -#!/usr/bin/env bash - -set -eu - -common_abspath() ( - echo "$(cd "$(dirname "$1")"; pwd)/$(basename "$1")" -) - -# Benchmark a command. -# -# $1: command to benchmark -# $2: where to append write results to. Default: /dev/null. -# -# Result format: -# -# cmd -# time