55,56c55
< # to generate them automatically. This assumes that the script is
< # executed from the gem5 root.
---
> # to generate them automatically.
60a60,63
> import os
> util_dir = os.path.dirname(os.path.realpath(__file__))
> proto_dir = os.path.join(os.path.dirname(util_dir), 'src', 'proto')
> proto_file = os.path.join(proto_dir, 'packet.proto')
62,63c65,66
< error = call(['protoc', '--python_out=util', '--proto_path=src/proto',
< 'src/proto/packet.proto'])
---
> error = call(['protoc', '--python_out=' + util_dir,
> '--proto_path=' + proto_dir, proto_file])