mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-28 04:24:26 +01:00
Create the cli.gitignore mechanism to pass extra default cli options
Document that X11 mouse is not moving. Convert x='' to x= on all scripts, and also fix case ;; indentations. Add dummy value to QEMU's -trace enable= to prevent warning. Expand built-in package choice rationale.
This commit is contained in:
92
README.adoc
92
README.adoc
@@ -110,6 +110,22 @@ Not all packages have an alias, when they don't, just use the form:
|
|||||||
./build -- <pkg>-reconfigure
|
./build -- <pkg>-reconfigure
|
||||||
....
|
....
|
||||||
|
|
||||||
|
=== Don't retype arguments all the time
|
||||||
|
|
||||||
|
It gets annoying to retype `-a aarch64` for every single command, or to remember `./build -B` setups.
|
||||||
|
|
||||||
|
So simplify that, do:
|
||||||
|
|
||||||
|
....
|
||||||
|
cp cli.gitignore.example cli.gitignore
|
||||||
|
....
|
||||||
|
|
||||||
|
and then edit the `cli.gitignore` file to your needs.
|
||||||
|
|
||||||
|
That file is used to pass extra command line arguments to most of our utilities.
|
||||||
|
|
||||||
|
Of course, you could get by with the shell history, or your own aliases, but we've felt that it was worth introducing a common mechanism for that.
|
||||||
|
|
||||||
=== Clean the build
|
=== Clean the build
|
||||||
|
|
||||||
You did something crazy, and nothing seems to work anymore?
|
You did something crazy, and nothing seems to work anymore?
|
||||||
@@ -1231,12 +1247,52 @@ Inside QEMU:
|
|||||||
startx
|
startx
|
||||||
....
|
....
|
||||||
|
|
||||||
|
And then from the GUI you can start exciting graphical programs such as:
|
||||||
|
|
||||||
|
....
|
||||||
|
xcalc
|
||||||
|
xeyes
|
||||||
|
....
|
||||||
|
|
||||||
image:x11.png[image]
|
image:x11.png[image]
|
||||||
|
|
||||||
More details: https://unix.stackexchange.com/questions/70931/how-to-install-x11-on-my-own-linux-buildroot-system/306116#306116
|
More details: https://unix.stackexchange.com/questions/70931/how-to-install-x11-on-my-own-linux-buildroot-system/306116#306116
|
||||||
|
|
||||||
Not sure how well that graphics stack represents real systems, but if it does it would be a good way to understand how it works.
|
Not sure how well that graphics stack represents real systems, but if it does it would be a good way to understand how it works.
|
||||||
|
|
||||||
|
=== X11 mouse not moving
|
||||||
|
|
||||||
|
TODO 9076c1d9bcc13b6efdb8ef502274f846d8d4e6a1 I'm 100% sure that it was working before, but I didn't run it forever, and it stopped working at some point. Needs bisection, on whatever commit last touched x11 stuff.
|
||||||
|
|
||||||
|
* https://askubuntu.com/questions/730891/how-can-i-get-a-mouse-cursor-in-qemu
|
||||||
|
* https://stackoverflow.com/questions/19665412/mouse-and-keyboard-not-working-in-qemu-emulator
|
||||||
|
|
||||||
|
`-show-cursor` did not help, I just get to see the host cursor, but the guest cursor still does not move.
|
||||||
|
|
||||||
|
Doing:
|
||||||
|
|
||||||
|
....
|
||||||
|
watch -n 1 grep i8042 /proc/interrupts
|
||||||
|
....
|
||||||
|
|
||||||
|
shows that interrupts do happen when mouse and keyboard presses are done, so I expect that it is some wrong either with:
|
||||||
|
|
||||||
|
* QEMU. Same behaviour if I try the host's QEMU 2.10.1 however.
|
||||||
|
* X11 configuration. We do have `BR2_PACKAGE_XDRIVER_XF86_INPUT_MOUSE=y`.
|
||||||
|
|
||||||
|
`/var/log/Xorg.0.log` contains the following interesting lines:
|
||||||
|
|
||||||
|
....
|
||||||
|
[ 27.549] (II) LoadModule: "mouse"
|
||||||
|
[ 27.549] (II) Loading /usr/lib/xorg/modules/input/mouse_drv.so
|
||||||
|
[ 27.590] (EE) <default pointer>: Cannot find which device to use.
|
||||||
|
[ 27.590] (EE) <default pointer>: cannot open input device
|
||||||
|
[ 27.590] (EE) PreInit returned 2 for "<default pointer>"
|
||||||
|
[ 27.590] (II) UnloadModule: "mouse"
|
||||||
|
....
|
||||||
|
|
||||||
|
The file `/dev/inputs/mice` does not exist.
|
||||||
|
|
||||||
=== X11 ARM
|
=== X11 ARM
|
||||||
|
|
||||||
On ARM, `startx` hangs at a message:
|
On ARM, `startx` hangs at a message:
|
||||||
@@ -2621,9 +2677,10 @@ External open source benchmarks. We will try to create Buildroot packages for th
|
|||||||
Buildroot supports it, which makes everything just trivial:
|
Buildroot supports it, which makes everything just trivial:
|
||||||
|
|
||||||
....
|
....
|
||||||
printf 'BR2_PACKAGE_OPENBLAS=y\n' >> br2.gitignore
|
./build \
|
||||||
printf 'BR2_TARGET_ROOTFS_EXT2_SIZE="128M"\n' >> br2.gitignore
|
-a arm \
|
||||||
./build -a arm -g -b br2.gitignore -- kernel_module-reconfigure
|
-B 'BR2_PACKAGE_OPENBLAS=y' \
|
||||||
|
;
|
||||||
....
|
....
|
||||||
|
|
||||||
and then inside the guest run our test program:
|
and then inside the guest run our test program:
|
||||||
@@ -2635,7 +2692,7 @@ and then inside the guest run our test program:
|
|||||||
For x86, you also need:
|
For x86, you also need:
|
||||||
|
|
||||||
....
|
....
|
||||||
printf 'BR2_PACKAGE_OPENBLAS_TARGET="NEHALEM"\n' >> br2.gitignore
|
-B 'BR2_PACKAGE_OPENBLAS_TARGET="NEHALEM"'
|
||||||
....
|
....
|
||||||
|
|
||||||
to overcome this bug: https://bugs.busybox.net/show_bug.cgi?id=10856
|
to overcome this bug: https://bugs.busybox.net/show_bug.cgi?id=10856
|
||||||
@@ -2741,7 +2798,7 @@ If you still want to run this, try it out with:
|
|||||||
|
|
||||||
....
|
....
|
||||||
./build \
|
./build \
|
||||||
-a arm \
|
-a aarch64 \
|
||||||
-B 'BR2_PACKAGE_PARSEC_BENCHMARK=y' \
|
-B 'BR2_PACKAGE_PARSEC_BENCHMARK=y' \
|
||||||
-B 'BR2_PACKAGE_PARSEC_BENCHMARK_PARSECMGMT=y' \
|
-B 'BR2_PACKAGE_PARSEC_BENCHMARK_PARSECMGMT=y' \
|
||||||
-B 'BR2_TARGET_ROOTFS_EXT2_SIZE="3G"' \
|
-B 'BR2_TARGET_ROOTFS_EXT2_SIZE="3G"' \
|
||||||
@@ -3398,12 +3455,7 @@ dmesg
|
|||||||
|
|
||||||
We provide the following mechanisms:
|
We provide the following mechanisms:
|
||||||
|
|
||||||
* `./build -b br2.gitignore`: append the file `br2.gitignore` to a single build. Must be passed every time you run `./build`. A good template is provided by:
|
* `./build -b mybr2.gitignore`: append the file `mybr2.gitignore` to a single build. Must be passed every time you run `./build`. A good template is provided by:
|
||||||
+
|
|
||||||
....
|
|
||||||
cp br2.gitignore.example br2.gitignore
|
|
||||||
....
|
|
||||||
+
|
|
||||||
* `./build -B 'BR2_SOM_OPTION="myval"'`: append a single option to a single build.
|
* `./build -B 'BR2_SOM_OPTION="myval"'`: append a single option to a single build.
|
||||||
|
|
||||||
=== Find Buildroot options with make menuconfig
|
=== Find Buildroot options with make menuconfig
|
||||||
@@ -3563,8 +3615,22 @@ Our philosophy is:
|
|||||||
|
|
||||||
* if something adds little to the build time, build it in by default
|
* if something adds little to the build time, build it in by default
|
||||||
* otherwise, make it optional
|
* otherwise, make it optional
|
||||||
|
* try to keep the toolchain (GCC, Binutils) unchanged, otherwise a full rebuild is required.
|
||||||
The build biggest time hog is always GCC, and it does not look like we can use a precompiled one: https://stackoverflow.com/questions/10833672/buildroot-environment-with-host-toolchain
|
+
|
||||||
|
So we generally just enable all toolchain options by defaut, even though this adds a bit of time to the build.
|
||||||
|
+
|
||||||
|
The biggest build time hog is always GCC, and it does not look like we can use a precompiled one: https://stackoverflow.com/questions/10833672/buildroot-environment-with-host-toolchain
|
||||||
|
* if something is very vaulable, we just add it by default even if it increases the Build time, notably GDB and QEMU
|
||||||
|
* runtime is sacred.
|
||||||
|
+
|
||||||
|
We do our best to reduce the instruction and feature count to the bare minimum needed, to make the system:
|
||||||
|
+
|
||||||
|
--
|
||||||
|
** easier to understand
|
||||||
|
** run faster, specially for <<gem5>>
|
||||||
|
--
|
||||||
|
+
|
||||||
|
One possibility we could play with is to build loadable modules instead of built-in modules to reduce runtime, but make it easier to get started with the modules.
|
||||||
|
|
||||||
=== Benchmark machines
|
=== Benchmark machines
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
#BR2_TARGET_ROOTFS_EXT2_SIZE="512M"
|
|
||||||
|
|
||||||
#BR2_PACKAGE_OPENSSH=y
|
|
||||||
|
|
||||||
#BR2_PACKAGE_OPENBLAS=y
|
|
||||||
#BR2_PACKAGE_OPENBLAS_TARGET="NEHALEM"
|
|
||||||
|
|
||||||
#BR2_PACKAGE_PARSEC_BENCHMARK=y
|
|
||||||
#BR2_PACKAGE_PARSEC_BENCHMARK_BUILD_LIST="all"
|
|
||||||
#BR2_PACKAGE_PARSEC_BENCHMARK_INPUT_SIZE="test"
|
|
||||||
46
build
46
build
@@ -1,83 +1,87 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eu
|
set -eu
|
||||||
. common
|
. common
|
||||||
|
set -- ${cli_build:-} "$@"
|
||||||
arch=x86_64
|
arch=x86_64
|
||||||
rm -f br2_cli.gitignore
|
rm -f br2_cli.gitignore
|
||||||
touch br2_cli.gitignore
|
touch br2_cli.gitignore
|
||||||
configure=true
|
configure=true
|
||||||
config_fragments='br2'
|
config_fragments='br2'
|
||||||
extra_make_args=''
|
extra_make_args=
|
||||||
gem5=false
|
gem5=false
|
||||||
j="$(($(nproc) - 2))"
|
j="$(($(nproc) - 2))"
|
||||||
linux_reconfigure=false
|
linux_reconfigure=false
|
||||||
linux_kernel_custom_config_file=''
|
linux_kernel_custom_config_file=
|
||||||
post_script_args=''
|
post_script_args=
|
||||||
qemu_sdl='--enable-sdl --with-sdlabi=2.0'
|
qemu_sdl='--enable-sdl --with-sdlabi=2.0'
|
||||||
v=0
|
v=0
|
||||||
while getopts 'a:B:b:CGgj:hIiK:klp:qSv' OPT; do
|
while getopts 'a:B:b:CGgj:hIiK:klp:qSv' OPT; do
|
||||||
case "$OPT" in
|
case "$OPT" in
|
||||||
a)
|
a)
|
||||||
arch="$OPTARG"
|
arch="$OPTARG"
|
||||||
;;
|
;;
|
||||||
b)
|
b)
|
||||||
config_fragments="$config_fragments $OPTARG"
|
config_fragments="$config_fragments $OPTARG"
|
||||||
;;
|
;;
|
||||||
B)
|
B)
|
||||||
echo "$OPTARG" >> br2_cli.gitignore
|
echo "$OPTARG" >> br2_cli.gitignore
|
||||||
;;
|
;;
|
||||||
C)
|
C)
|
||||||
configure=false
|
configure=false
|
||||||
;;
|
;;
|
||||||
G)
|
G)
|
||||||
extra_make_args="$extra_make_args gem5-reconfigure"
|
extra_make_args="$extra_make_args gem5-reconfigure"
|
||||||
gem5=true
|
gem5=true
|
||||||
;;
|
;;
|
||||||
g)
|
g)
|
||||||
gem5=true
|
gem5=true
|
||||||
;;
|
;;
|
||||||
h)
|
h)
|
||||||
cat build-usage.adoc 1>&2
|
cat build-usage.adoc 1>&2
|
||||||
exit
|
exit
|
||||||
;;
|
;;
|
||||||
I)
|
I)
|
||||||
echo "
|
echo "
|
||||||
BR2_TARGET_ROOTFS_CPIO=n
|
BR2_TARGET_ROOTFS_CPIO=n
|
||||||
BR2_TARGET_ROOTFS_EXT2=n
|
BR2_TARGET_ROOTFS_EXT2=n
|
||||||
BR2_TARGET_ROOTFS_INITRAMFS=y
|
BR2_TARGET_ROOTFS_INITRAMFS=y
|
||||||
" >> br2_cli.gitignore
|
" >> br2_cli.gitignore
|
||||||
;;
|
;;
|
||||||
i)
|
i)
|
||||||
echo "
|
echo "
|
||||||
BR2_TARGET_ROOTFS_CPIO=y
|
BR2_TARGET_ROOTFS_CPIO=y
|
||||||
BR2_TARGET_ROOTFS_EXT2=n
|
BR2_TARGET_ROOTFS_EXT2=n
|
||||||
BR2_TARGET_ROOTFS_INITRAMFS=n
|
BR2_TARGET_ROOTFS_INITRAMFS=n
|
||||||
" >> br2_cli.gitignore
|
" >> br2_cli.gitignore
|
||||||
;;
|
;;
|
||||||
j)
|
j)
|
||||||
echo "$OPTARG" >> br2_cli.gitignore
|
echo "$OPTARG" >> br2_cli.gitignore
|
||||||
;;
|
;;
|
||||||
K)
|
K)
|
||||||
linux_kernel_custom_config_file="$OPTARG"
|
linux_kernel_custom_config_file="$OPTARG"
|
||||||
;;
|
;;
|
||||||
k)
|
k)
|
||||||
extra_make_args="$extra_make_args kernel_module-reconfigure"
|
extra_make_args="$extra_make_args kernel_module-reconfigure"
|
||||||
;;
|
;;
|
||||||
l)
|
l)
|
||||||
linux_reconfigure=true
|
linux_reconfigure=true
|
||||||
extra_make_args="$extra_make_args linux-reconfigure"
|
extra_make_args="$extra_make_args linux-reconfigure"
|
||||||
;;
|
;;
|
||||||
p)
|
p)
|
||||||
post_script_args="$OPTARG"
|
post_script_args="$OPTARG"
|
||||||
;;
|
;;
|
||||||
q)
|
q)
|
||||||
extra_make_args="$extra_make_args host-qemu-reconfigure"
|
extra_make_args="$extra_make_args host-qemu-reconfigure"
|
||||||
;;
|
;;
|
||||||
S)
|
S)
|
||||||
qemu_sdl=''
|
qemu_sdl=
|
||||||
;;
|
;;
|
||||||
v)
|
v)
|
||||||
v=1
|
v=1
|
||||||
;;
|
;;
|
||||||
|
?)
|
||||||
|
exit 2
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
shift $(($OPTIND - 1))
|
shift $(($OPTIND - 1))
|
||||||
|
|||||||
14
cli.gitignore.example
Normal file
14
cli.gitignore.example
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
arch=x86_64
|
||||||
|
gem5=
|
||||||
|
#gem5=-g
|
||||||
|
printf '
|
||||||
|
#BR2_TARGET_ROOTFS_EXT2_SIZE="1024M"
|
||||||
|
' > br2.gitignore
|
||||||
|
cli_build="-a ${arch} -b br2.gitignore -b br2_x11 ${gem5}"
|
||||||
|
cli_run="-a ${arch} ${gem5}"
|
||||||
|
cli_rungdb="-a ${arch} ${gem5}"
|
||||||
|
cli_rungdbserver="-a ${arch} ${gem5}"
|
||||||
|
cli_rungdb_user="-a ${arch} ${gem5}"
|
||||||
|
cli_trace_boot="-a ${arch}"
|
||||||
|
cli_trace2line="-a ${arch}"
|
||||||
4
common
4
common
@@ -17,3 +17,7 @@ set_common_vars() {
|
|||||||
qemu_out_dir="${out_arch_dir}/qemu"
|
qemu_out_dir="${out_arch_dir}/qemu"
|
||||||
common_dir="${out_dir}/common"
|
common_dir="${out_dir}/common"
|
||||||
}
|
}
|
||||||
|
f=cli.gitignore
|
||||||
|
if [ -f "$f" ]; then
|
||||||
|
. "$f"
|
||||||
|
fi
|
||||||
|
|||||||
4
configure
vendored
4
configure
vendored
@@ -4,7 +4,7 @@ interactive_pkgs=libsdl2-dev
|
|||||||
gem5=false
|
gem5=false
|
||||||
qemu=true
|
qemu=true
|
||||||
submodules='buildroot linux'
|
submodules='buildroot linux'
|
||||||
y=''
|
y=
|
||||||
while getopts gpqt OPT; do
|
while getopts gpqt OPT; do
|
||||||
case "$OPT" in
|
case "$OPT" in
|
||||||
g)
|
g)
|
||||||
@@ -17,7 +17,7 @@ while getopts gpqt OPT; do
|
|||||||
qemu=false
|
qemu=false
|
||||||
;;
|
;;
|
||||||
t)
|
t)
|
||||||
interactive_pkgs=''
|
interactive_pkgs=
|
||||||
y='-y'
|
y='-y'
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
#/usr/bin/env bash
|
#/usr/bin/env bash
|
||||||
set -eu
|
set -eu
|
||||||
arch=x86_64
|
arch=x86_64
|
||||||
cross_compile=''
|
cross_compile=
|
||||||
j=''
|
j=
|
||||||
while getopts a:c:j: OPT; do
|
while getopts a:c:j: OPT; do
|
||||||
case "$OPT" in
|
case "$OPT" in
|
||||||
a)
|
a)
|
||||||
|
|||||||
@@ -28,6 +28,8 @@ config BR2_PACKAGE_PARSEC_BENCHMARK_PARSECMGMT
|
|||||||
The other option would be to patch Parsec to use /bin/sh and be POSIX compliant.
|
The other option would be to patch Parsec to use /bin/sh and be POSIX compliant.
|
||||||
But let's take the path of smallest resistance for now.
|
But let's take the path of smallest resistance for now.
|
||||||
|
|
||||||
|
if !BR2_PACKAGE_PARSEC_BENCHMARK_PARSECMGMT
|
||||||
|
|
||||||
config BR2_PACKAGE_PARSEC_BENCHMARK_INPUT_SIZE
|
config BR2_PACKAGE_PARSEC_BENCHMARK_INPUT_SIZE
|
||||||
string "input_size"
|
string "input_size"
|
||||||
default test
|
default test
|
||||||
@@ -35,3 +37,5 @@ config BR2_PACKAGE_PARSEC_BENCHMARK_INPUT_SIZE
|
|||||||
Which input size to generate on the host for the guest.
|
Which input size to generate on the host for the guest.
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
endif
|
||||||
|
|||||||
24
run
24
run
@@ -1,11 +1,12 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eu
|
set -eu
|
||||||
. common
|
. common
|
||||||
|
set -- ${cli_run:-} "$@"
|
||||||
|
|
||||||
# CLI handling.
|
# CLI handling.
|
||||||
arch=x86_64
|
arch=x86_64
|
||||||
cpus=1
|
cpus=1
|
||||||
debug_vm=''
|
debug_vm=
|
||||||
debug=false
|
debug=false
|
||||||
kgdb=false
|
kgdb=false
|
||||||
kvm=false
|
kvm=false
|
||||||
@@ -14,18 +15,20 @@ kvm=false
|
|||||||
# nokaslr: https://unix.stackexchange.com/questions/397939/turning-off-kaslr-to-debug-linux-kernel-using-qemu-and-gdb
|
# nokaslr: https://unix.stackexchange.com/questions/397939/turning-off-kaslr-to-debug-linux-kernel-using-qemu-and-gdb
|
||||||
# Turned on by default since v4.12
|
# Turned on by default since v4.12
|
||||||
extra_append='nokaslr norandmaps printk.devkmsg=on printk.time=y'
|
extra_append='nokaslr norandmaps printk.devkmsg=on printk.time=y'
|
||||||
extra_append_after_dash=''
|
extra_append_after_dash=
|
||||||
extra_flags=''
|
extra_flags=
|
||||||
extra_flags_qemu=''
|
extra_flags_qemu=
|
||||||
gem5=false
|
gem5=false
|
||||||
gem5opts=''
|
gem5opts=
|
||||||
lkmc_eval=''
|
lkmc_eval=
|
||||||
initrd=false
|
initrd=false
|
||||||
initramfs=false
|
initramfs=false
|
||||||
memory=256M
|
memory=256M
|
||||||
nographic=true
|
nographic=true
|
||||||
root=''
|
root=
|
||||||
trace_enable=''
|
# A dummy value that is already turned on by default and does not produce large output,
|
||||||
|
# just to prevent QEMU from emitting a warning that '' is not valid.
|
||||||
|
trace_enable=pr_manager_run
|
||||||
while getopts a:c:DdE:e:f:G:ghIiKkm:T:x OPT; do
|
while getopts a:c:DdE:e:f:G:ghIiKkm:T:x OPT; do
|
||||||
case "$OPT" in
|
case "$OPT" in
|
||||||
a)
|
a)
|
||||||
@@ -59,7 +62,7 @@ while getopts a:c:DdE:e:f:G:ghIiKkm:T:x OPT; do
|
|||||||
h)
|
h)
|
||||||
cat build-usage.adoc 1>&2
|
cat build-usage.adoc 1>&2
|
||||||
exit
|
exit
|
||||||
;;
|
;;
|
||||||
I)
|
I)
|
||||||
initramfs=true
|
initramfs=true
|
||||||
;;
|
;;
|
||||||
@@ -85,6 +88,9 @@ while getopts a:c:DdE:e:f:G:ghIiKkm:T:x OPT; do
|
|||||||
x)
|
x)
|
||||||
nographic=false
|
nographic=false
|
||||||
;;
|
;;
|
||||||
|
?)
|
||||||
|
exit 2
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
shift "$(($OPTIND - 1))"
|
shift "$(($OPTIND - 1))"
|
||||||
|
|||||||
18
rungdb
18
rungdb
@@ -1,20 +1,21 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eu
|
set -eu
|
||||||
. common
|
. common
|
||||||
after=''
|
set -- ${cli_rungdb:-} "$@"
|
||||||
|
after=
|
||||||
arch='x86_64'
|
arch='x86_64'
|
||||||
before=''
|
before=
|
||||||
gem5=false
|
gem5=false
|
||||||
lx_symbols="-ex 'lx-symbols ../kernel_module-1.0/'"
|
lx_symbols="-ex 'lx-symbols ../kernel_module-1.0/'"
|
||||||
kgdb=false
|
kgdb=false
|
||||||
while getopts A:a:b:gkL OPT; do
|
while getopts A:a:b:gkL OPT; do
|
||||||
case "$OPT" in
|
case "$OPT" in
|
||||||
a)
|
|
||||||
arch="$OPTARG"
|
|
||||||
;;
|
|
||||||
A)
|
A)
|
||||||
after="$OPTARG"
|
after="$OPTARG"
|
||||||
;;
|
;;
|
||||||
|
a)
|
||||||
|
arch="$OPTARG"
|
||||||
|
;;
|
||||||
b)
|
b)
|
||||||
before="$OPTARG"
|
before="$OPTARG"
|
||||||
;;
|
;;
|
||||||
@@ -25,7 +26,10 @@ while getopts A:a:b:gkL OPT; do
|
|||||||
kgdb=true
|
kgdb=true
|
||||||
;;
|
;;
|
||||||
L)
|
L)
|
||||||
lx_symbols=''
|
lx_symbols=
|
||||||
|
;;
|
||||||
|
?)
|
||||||
|
exit 2
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
@@ -34,7 +38,7 @@ if [ "$#" -gt 0 ]; then
|
|||||||
brk="-ex 'break ${1}'"
|
brk="-ex 'break ${1}'"
|
||||||
shift
|
shift
|
||||||
else
|
else
|
||||||
brk=''
|
brk=
|
||||||
fi
|
fi
|
||||||
if "$gem5"; then
|
if "$gem5"; then
|
||||||
port=7000
|
port=7000
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eu
|
set -eu
|
||||||
. common
|
. common
|
||||||
|
set -- ${cli_rungdb_user:-} "$@"
|
||||||
usage="$0 <exec-relative-path> [<brk-symbol>]"
|
usage="$0 <exec-relative-path> [<brk-symbol>]"
|
||||||
arch='x86_64'
|
arch='x86_64'
|
||||||
gem5=false
|
gem5=false
|
||||||
gem5_opt=''
|
gem5_opt=
|
||||||
while getopts a:gh OPT; do
|
while getopts a:gh OPT; do
|
||||||
case "$OPT" in
|
case "$OPT" in
|
||||||
a)
|
a)
|
||||||
@@ -18,6 +19,9 @@ while getopts a:gh OPT; do
|
|||||||
echo "$usage"
|
echo "$usage"
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
?)
|
||||||
|
exit 2
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
shift "$(($OPTIND - 1))"
|
shift "$(($OPTIND - 1))"
|
||||||
@@ -27,7 +31,7 @@ if [ "$#" -gt 0 ]; then
|
|||||||
brk="'$1'"
|
brk="'$1'"
|
||||||
shift
|
shift
|
||||||
else
|
else
|
||||||
brk=''
|
brk=
|
||||||
fi
|
fi
|
||||||
set_common_vars "$arch" "$gem5"
|
set_common_vars "$arch" "$gem5"
|
||||||
executable="${build_dir}/${executable_rel}"
|
executable="${build_dir}/${executable_rel}"
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eu
|
set -eu
|
||||||
. common
|
. common
|
||||||
|
set -- ${cli_rungdbserver:-} "$@"
|
||||||
arch='x86_64'
|
arch='x86_64'
|
||||||
gem5=false
|
gem5=false
|
||||||
while getopts a:g OPT; do
|
while getopts a:g OPT; do
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eu
|
set -eu
|
||||||
. common
|
. common
|
||||||
|
set -- ${cli_trace_boot:-} "$@"
|
||||||
arch=x86_64
|
arch=x86_64
|
||||||
while getopts a: OPT; do
|
while getopts a: OPT; do
|
||||||
case "$OPT" in
|
case "$OPT" in
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eu
|
set -eu
|
||||||
. common
|
. common
|
||||||
|
set -- ${cli_trace2line:-} "$@"
|
||||||
arch=x86_64
|
arch=x86_64
|
||||||
while getopts a: OPT; do
|
while getopts a: OPT; do
|
||||||
case "$OPT" in
|
case "$OPT" in
|
||||||
|
|||||||
Reference in New Issue
Block a user