diff --git a/README.md b/README.md index eb23aa4..10aba85 100644 --- a/README.md +++ b/README.md @@ -120,6 +120,19 @@ TODO: Ctrl + C kills the emulator, it is not sent to guest processes. See: - - +## Automatic startup commands + +When debugging a module, it becomes tedious to wait for build and re-type: + + root + /mymod.sh + +Instead, you can add your test commands to: + + rootfs_overlay/etc/init.d/S99 + +and they will be run automatically before the login prompt. + ## Debugging To GDB the Linux kernel, first run: diff --git a/rootfs_overlay/etc/init.d/S99 b/rootfs_overlay/etc/init.d/S99 new file mode 100755 index 0000000..28ee2ab --- /dev/null +++ b/rootfs_overlay/etc/init.d/S99 @@ -0,0 +1,4 @@ +#!/bin/sh +echo 'S99' +# insmod /hello.ko +exit 0