From e51bc00dc7a79c09042179be589a3d724c0493fa Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Mon, 16 Sep 2024 09:50:44 -0700 Subject: [PATCH] misc: revert riscvmatched-fs.py due to a bug - link to issue https://github.com/gem5/gem5/issues/1554 Change-Id: Ic9cf6e5166eeee2226b6022e6f7c971d4e7caaeb --- .../example/gem5_library/riscvmatched-fs.py | 26 ++----------------- 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/configs/example/gem5_library/riscvmatched-fs.py b/configs/example/gem5_library/riscvmatched-fs.py index c3faf0357b..041de00bb5 100644 --- a/configs/example/gem5_library/riscvmatched-fs.py +++ b/configs/example/gem5_library/riscvmatched-fs.py @@ -43,7 +43,6 @@ import argparse from gem5.isas import ISA from gem5.prebuilt.riscvmatched.riscvmatched_board import RISCVMatchedBoard from gem5.resources.resource import obtain_resource -from gem5.simulate.exit_event import ExitEvent from gem5.simulate.simulator import Simulator from gem5.utils.requires import requires @@ -77,33 +76,12 @@ board = RISCVMatchedBoard( # In the case where the `-i` flag is passed, we add the kernel argument # `init=/root/exit.sh`. This means the simulation will exit after the Linux # Kernel has booted. -workload = obtain_resource("riscv-ubuntu-24.04-boot", resource_version="1.0.0") +workload = obtain_resource("riscv-ubuntu-20.04-boot", resource_version="3.0.0") kernel_args = board.get_default_kernel_args() if args.to_init: kernel_args.append("init=/root/exit.sh") workload.set_parameter("kernel_args", kernel_args) board.set_workload(workload) - -def exit_event_handler(): - print("First exit: kernel booted") - yield False # gem5 is now executing systemd startup - print("Second exit: Started `after_boot.sh` script") - # The after_boot.sh script is executed after the kernel and systemd have - # booted. - yield False # gem5 is now executing the `after_boot.sh` script - print("Third exit: Finished `after_boot.sh` script") - # The after_boot.sh script will run a script if it is passed via - # m5 readfile. This is the last exit event before the simulation exits. - yield True - - -simulator = Simulator( - board=board, - on_exit_event={ - # Here we want override the default behavior for the first m5 exit - # exit event. - ExitEvent.EXIT: exit_event_handler() - }, -) +simulator = Simulator(board=board) simulator.run()