firesim setup - building target sw

302 views
Skip to first unread message

Varun Gandhi

unread,
Oct 13, 2020, 2:57:55 PM10/13/20
to FireSim
Hi,
I'm trying to build the default linux distro as described in the firesim setup instructions by invoking:

./marshal -v build br-base.json

Error log

  /home/centos/firesim/target-design/chipyard/software/firemarshal/boards/firechip/base-workloads/br-base/host-init.sh

Applying host-init: /home/centos/firesim/target-design/chipyard/software/firemarshal/boards/firechip/base-workloads/br-base/host-init.sh                                                                                                                               

Running: "/home/centos/firesim/target-design/chipyard/software/firemarshal/boards/firechip/base-workloads/br-base/host-init.sh" in /home/centos/firesim/target-design/chipyard/software/firemarshal/boards/firechip/base-workloads/br-base                 

make: Entering directory `/home/centos/firesim/target-design/chipyard/software/firemarshal/boards/firechip/base-workloads/br-base/trigger'   

make: Nothing to be done for `all'.

make: Leaving directory `/home/centos/firesim/target-design/chipyard/software/firemarshal/boards/firechip/base-workloads/br-base/trigger'

./home/centos/firesim/target-design/chipyard/software/firemarshal/wlutil/br/buildroot/output/images/rootfs.ext2

TaskFailed - taskid:/home/centos/firesim/target-design/chipyard/software/firemarshal/wlutil/br/buildroot/output/images/rootfs.ext2

Marshal submodule "/home/centos/firesim/target-design/chipyard/software/firemarshal/wlutil/br/buildroot" not initialized. Please run ./init-submodules.sh."

Failed to build workload br-base.json

Log available at: /home/centos/firesim/target-design/chipyard/software/firemarshal/logs/br-base-build-2020-10-13--18-43-02-16D27NXMWTG1 

BSAP.log 

Would appreciate some guidance.

-Varun

nat...@berkeley.edu

unread,
Oct 14, 2020, 12:24:08 PM10/14/20
to FireSim
As suggested in the error message, I recommend running "./init-submodules.sh" in the firemarshal directory.

FireMarshal doesn't initialize submodules eagerly since they can be quite large and slow to checkout and aren't needed for bare-metal workloads.

Varun Gandhi

unread,
Oct 16, 2020, 1:41:32 AM10/16/20
to fir...@googlegroups.com
Thanks for pointer. However, my build is still failing…

TaskError - taskid:/home/centos/firesim/target-design/chipyard/software/firemarshal/images/br-base-bin                               
PythonAction Error                                                                                                                     
Traceback (most recent call last):                                                                                                     
  File "/usr/local/lib/python3.6/site-packages/doit/action.py", line 437, in execute                                                   
    returned_value = self.py_callable(*self.args, **kwargs)                                                                            
  File "/home/centos/firesim/target-design/chipyard/software/firemarshal/wlutil/build.py", line 376, in makeBin                        
    run(['make'] + getOpt('linux-make-args') + ['vmlinux', getOpt('jlevel')], cwd=config['linux-src'])                                 
  File "/home/centos/firesim/target-design/chipyard/software/firemarshal/wlutil/wlutil.py", line 439, in run                           
    raise sp.CalledProcessError(p.returncode, prettyCmd)                                                                               
subprocess.CalledProcessError: Command 'make ARCH=riscv CROSS_COMPILE=riscv64-unknown-linux-gnu- vmlinux -j' returned non-zero exit status 2. 

Failed to build workload br-base.json

-Varun                                                   

-- 
You received this message because you are subscribed to a topic in the Google Groups "FireSim" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/firesim/OaOjX2hnxws/unsubscribe.
To unsubscribe from this group and all its topics, send an email to firesim+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firesim/9c5d8d7a-eb7d-4a3d-96a8-8e75e08a0209n%40googlegroups.com.

nat...@berkeley.edu

unread,
Oct 16, 2020, 12:14:39 PM10/16/20
to FireSim
Later in the output there should be a reference to a more complete log. Could you post that here? It should contain the full output of the linux build. The Linux source is at boards/firechip/linux, you might double check that everything looks OK in there and run "make mrproper" (Linux's confusingly named clean command), just to be sure. You may also try "git status" and "git submodule status" to make sure everything looks OK with submodules, git is a dark and mysterious magic that can get itself into weird states sometimes.

Varun Gandhi

unread,
Oct 16, 2020, 5:23:30 PM10/16/20
to fir...@googlegroups.com
Here’s the complete log

Also,

1. git status  — shows a few changes; presumably from the last failed build

1.1  target-design/chipyad  (modified content)
1.2  sim/firesim-lib/src/main/cc/lib/elfutils (modified content)
1.3  sim/firesim-lib/src/main/cc/lib/libdwarf (untracked content)

2. git submodule status — up to date

The Linux source is at boards/firechip/linux, you might double check that everything looks OK in there and run "make mrproper" (Linux's confusingly na clean command), just to be sure.

I don’t see a boards/firechip/linux; instead there is a '/firesim/target-design/chipyard/software/firemarshal/boards/firechip/base-workloads/br-base’. Is this the directory you’re referring to?

Best,
Varun

br-base-build-2020-10-16--04-56-39-6G535D2MP8CLCJTQ.log

nat...@berkeley.edu

unread,
Oct 16, 2020, 6:04:10 PM10/16/20
to FireSim
There should be 
/firesim/target-design/chipyard/software/firemarshal/boards/firechip/linux
it is a symlink to 
/firesim/target-design/chipyard/software/firemarshal/boards/default/linux

If those aren't there, something is wrong with your git repo and you may just have to reclone or something. The log output would imply that marshal is finding the linux source so I would expect those directories to exist.

Looking at the log I see a bunch of errors saying "resource unavailable" and "no child processes". I'm not sure what that means but something sounds wrong in your environment. This may just be a "turn it off and on again" sort of situation (reboot and reclone?). Let us know if you can reproduce on a fresh clone.

Varun Gandhi

unread,
Oct 16, 2020, 8:44:39 PM10/16/20
to fir...@googlegroups.com
Recloned the firesim repo 

Ran 
1. ./build-setup.sh fast in firesim
2. Init-submodules.sh in firemarshal

but still don’t see

/firesim/target-design/chipyard/software/firemarshal/boards/firechip/linux

And 

/firesim/target-design/chipyard/software/firemarshal/boards/default/linux

I’ve followed the setup documentation to the letter and tried rebooting my aws manager instance too.

-Varun


-- 
You received this message because you are subscribed to a topic in the Google Groups "FireSim" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/firesim/OaOjX2hnxws/unsubscribe.
To unsubscribe from this group and all its topics, send an email to firesim+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages