m5: clean before build to not break across archs

build-buildroot: fix exception...
This commit is contained in:
Ciro Santilli 六四事件 法轮功
2018-10-28 00:00:02 +00:00
parent 11fedc6045
commit f9eb0b72de
3 changed files with 8 additions and 2 deletions

View File

@@ -24,11 +24,13 @@ class M5Component(common.Component):
def do_build(self, args):
os.makedirs(common.gem5_m5_build_dir, exist_ok=True)
# We must clean first or else the build outputs of one arch can conflict with the other.
# I should stop being lazy and go actually patch gem5 to support out of tree m5 build...
self.clean(args)
common.run_cmd(
self.get_make_cmd(args),
cwd=common.gem5_m5_src_dir,
)
print(common.out_rootfs_overlay_bin_dir)
os.makedirs(common.out_rootfs_overlay_bin_dir, exist_ok=True)
common.cp(os.path.join(common.gem5_m5_src_dir, 'm5'), common.out_rootfs_overlay_bin_dir)