Disable networking at runtime with lkmc_nonet cli instead of build

This is necessary because qemu and gem5 now use the same build folder.

Separate ./run -e and -f for kernel options before and after the ' - '.
This was already the better thing to do when -E was introduced,
but lkmc_nonet prompted me to do it nicer now.

Use the common script to find the out_dir on every toplevel script.

Include usage man pages on README.
This commit is contained in:
Ciro Santilli
2018-03-22 02:39:37 +00:00
parent 60b9e56038
commit 29908dffb2
13 changed files with 160 additions and 84 deletions

View File

@@ -1017,10 +1017,10 @@ but why not just use your super simple and effective `/poweroff.out` and be done
=== Run command at the end of BusyBox init
If you rely on something that BusyBox' init set up for you like networking, you caould do:
If you rely on something that BusyBox' init set up for you like networking, you could do:
....
./run -e '- lkmc_eval="insmod /hello.ko;wget -S google.com;poweroff.out;"'
./run -f 'lkmc_eval="insmod /hello.ko;wget -S google.com;poweroff.out;"'
....
The `lkmc_eval` option gets evaled by our default `S98` startup script if present.
@@ -1073,16 +1073,10 @@ Finally, the docs are lying, arguments with dots that come after `-` are still t
The default BusyBox init scripts enable networking, and there is a 15 second timeout in case your network is down or if your kernel / emulator setup does not support it.
To disable networking, use:
We have hacked it up so that you can disable networking with:
....
./build -p -n
....
To restore it, run:
....
./build -- initscripts-reconfigure
./run -f 'lkmc_nonet=y'
....
== KVM
@@ -2951,7 +2945,7 @@ which is very close to the end of the boot. Increasing the memory from 256M to 5
=== gem5 limitations
* networking not working. We currently just disable it from `inittab` by default to prevent waiting at startup
* `gdbserver`: https://stackoverflow.com/questions/48941494/how-to-do-port-forwarding-from-guest-to-host-in-gem5
* could not do port forwarding from host to guest, and therefore use `gdbserver`: https://stackoverflow.com/questions/48941494/how-to-do-port-forwarding-from-guest-to-host-in-gem5
==== gem5 x86_64 limitations
@@ -2962,7 +2956,6 @@ which is very close to the end of the boot. Increasing the memory from 256M to 5
[ 0.000000] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645519600211568 ns
....
== Insane action
=== Run on host
@@ -3309,6 +3302,16 @@ include::rootfs_overlay/README.adoc[]
:leveloffset: -3
=== Script man pages
:leveloffset: +3
include::build-usage.adoc[]
include::run-usage.adoc[]
:leveloffset: -3
:leveloffset: +2
include::CONTRIBUTING.adoc[]