|
14 | 14 |
|
15 | 15 | # gem5-bridge exit signifying that after_boot.sh is running
|
16 | 16 | printf "In after_boot.sh...\n"
|
17 |
| -gem5-bridge exit # TODO: Make this a specialized event. |
| 17 | +echo 0 > /dev/gem5/exit # TODO: Make this a specialized event. |
18 | 18 |
|
19 | 19 | # Read /proc/cmdline and parse options
|
20 | 20 |
|
|
28 | 28 | printf "Interactive mode: $interactive\n"
|
29 | 29 |
|
30 | 30 | if [[ $interactive == true ]]; then
|
31 |
| - printf "Interactive mode enabled, dropping to shell." |
| 31 | + printf "Interactive mode enabled, dropping to shell.\n" |
32 | 32 | /bin/bash
|
33 | 33 | else
|
34 | 34 | # Try to read the file from the host when running with gem5
|
35 | 35 | if ! [ -z $IGNORE_M5 ]; then
|
36 | 36 | printf "Starting gem5 init... trying to read run script file via readfile.\n"
|
37 |
| - if ! gem5-bridge readfile > /tmp/script; then |
| 37 | + if ! cat /dev/gem5/readfile > /tmp/script; then |
38 | 38 | printf "Failed to run gem5-bridge readfile, exiting!\n"
|
39 | 39 | rm -f /tmp/script
|
40 | 40 | # If we can't read the script exit the simulation. If we cannot exit the
|
41 | 41 | # simulation, this probably means that we are running in QEMU. So, ignore
|
42 | 42 | # future calls to gem5-bridge.
|
43 |
| - if ! gem5-bridge exit; then |
| 43 | + if ! echo 0 > /dev/gem5/exit; then |
44 | 44 | # Useful for booting the disk image in (e.g.,) qemu for debugging
|
45 | 45 | printf "gem5-bridge exit failed, dropping to shell.\n"
|
46 | 46 | IGNORE_M5=1 /bin/bash
|
|
51 | 51 | /tmp/script
|
52 | 52 | printf "Done running script from gem5-bridge, exiting.\n"
|
53 | 53 | rm -f /tmp/script
|
54 |
| - gem5-bridge exit |
| 54 | + echo 0 > /dev/gem5/exit |
55 | 55 | fi
|
56 | 56 | fi
|
57 | 57 | fi
|
0 commit comments