Skip to content

Commit b46b152

Browse files
committed
resources: Move to gem5 bridge devices in x86 disk files
1 parent d59ce64 commit b46b152

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/x86-ubuntu/files/after_boot.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
# gem5-bridge exit signifying that after_boot.sh is running
1616
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.
1818

1919
# Read /proc/cmdline and parse options
2020

@@ -28,19 +28,19 @@ fi
2828
printf "Interactive mode: $interactive\n"
2929

3030
if [[ $interactive == true ]]; then
31-
printf "Interactive mode enabled, dropping to shell."
31+
printf "Interactive mode enabled, dropping to shell.\n"
3232
/bin/bash
3333
else
3434
# Try to read the file from the host when running with gem5
3535
if ! [ -z $IGNORE_M5 ]; then
3636
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
3838
printf "Failed to run gem5-bridge readfile, exiting!\n"
3939
rm -f /tmp/script
4040
# If we can't read the script exit the simulation. If we cannot exit the
4141
# simulation, this probably means that we are running in QEMU. So, ignore
4242
# future calls to gem5-bridge.
43-
if ! gem5-bridge exit; then
43+
if ! echo 0 > /dev/gem5/exit; then
4444
# Useful for booting the disk image in (e.g.,) qemu for debugging
4545
printf "gem5-bridge exit failed, dropping to shell.\n"
4646
IGNORE_M5=1 /bin/bash
@@ -51,7 +51,7 @@ else
5151
/tmp/script
5252
printf "Done running script from gem5-bridge, exiting.\n"
5353
rm -f /tmp/script
54-
gem5-bridge exit
54+
echo 0 > /dev/gem5/exit
5555
fi
5656
fi
5757
fi

src/x86-ubuntu/files/exit.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
# Copyright (c) 2020 The Regents of the University of California.
44
# SPDX-License-Identifier: BSD 3-Clause
55

6-
m5 exit
6+
echo 0 > /dev/gem5/exit

src/x86-ubuntu/files/gem5_init.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ modprobe gem5_bridge || insmod /lib/modules/$(uname -r)/gem5/gem5_bridge.ko
2222
# This will cause the simulation to exit. Note that this will
2323
# cause qemu to fail.
2424
printf "Kernel booted, In gem5 init...\n"
25-
gem5-bridge exit # TODO: Make this a specialized event.
25+
echo 0 > /dev/gem5/exit # TODO: Make this a specialized event.
2626

2727
if [[ $cmdline == *"no_systemd"* ]]; then
2828
no_systemd=true

0 commit comments

Comments
 (0)