Fix CVA6 `.gitignore` warning
Background Work
- [X] Yes, I searched the mailing list
- [X] Yes, I searched the documentation
Feature Description
This isn't a priority but when you run git within the repo you see an error like: warning: unable to access 'behav/BramDwc/.gitignore': Too many levels of symbolic links. This is due to the Verilog submodule in CVA6.
Motivating Example
Remove the warning listed above.
[Going through old issues.] Hm, unable to reproduce this in generators/cva6 or chipyard running git, git status, git branch -v, so probably stale / was fixed? Feel free to reopen if needed!
My bad, I was wrong. Am able to replicate.. Oops. :p Not sure why it doesn't always show up tho.
chipyard $ git status
warning: unable to access 'synth/BramDwc/.gitignore': Too many levels of symbolic links
warning: unable to access 'behav/BramDwc/.gitignore': Too many levels of symbolic links
[Train of consciousness debug..]
Looks like this is a Git dev decision and non-zero people are upset about it:
TL;DR ".gitignore can no longer be a symlink on version 2.32+."
Git 2.32 Release Note, Backward compatibility notes
".gitattributes", ".gitignore", and ".mailmap" files that are symbolic links are ignored.
I do see that the .gitignore hierarchy in cva6 is interesting:
generators/cva6/.gitignoregenerators/cva6/src/main/resources/cva6/vsrc/.gitignoregenerators/cva6/src/main/resources/cva6/vsrc/cva6/.gitignoregenerators/cva6/src/main/resources/cva6/vsrc/cva6/openpiton/bootrom/baremetal/.gitignore/generators/cva6/src/main/resources/cva6/vsrc/cva6/openpiton/bootrom/linux/.gitignore..
It looks like there's only two repos though:
- https://github.com/openhwgroup/cva6.git
- https://github.com/ucb-bar/cva6-wrapper.git
The command find . -type l ! -exec test -e {} \; -print should find all broken symlinks:
./src/main/resources/cva6/vsrc/cva6/openpiton/bootrom/linux/ariane.dts
./src/main/resources/cva6/vsrc/cva6/openpiton/bootrom/linux/info.h
./src/main/resources/cva6/vsrc/cva6/openpiton/bootrom/baremetal/ariane.dts
Sure enough, ls -l seems to confirm these are bad.
find . -type l -ls shows all the symlinks:
[redacted] ./src/main/resources/cva6/vsrc/cva6/openpiton/bootrom/linux/ariane.dts -> ../ariane.dts
[redacted] ./src/main/resources/cva6/vsrc/cva6/openpiton/bootrom/linux/info.h -> ../info.h
[redacted]./src/main/resources/cva6/vsrc/cva6/openpiton/bootrom/linux/gen_rom.py -> ../../../bootrom/gen_rom.py
[redacted]./src/main/resources/cva6/vsrc/cva6/openpiton/bootrom/baremetal/ariane.dts -> ../ariane.dts
[redacted]./src/main/resources/cva6/vsrc/cva6/openpiton/bootrom/baremetal/bootrom.S -> ../../../bootrom/bootrom.S
[redacted]./src/main/resources/cva6/vsrc/cva6/openpiton/bootrom/baremetal/linker.ld -> ../../../bootrom/linker.ld
[redacted]./src/main/resources/cva6/vsrc/cva6/openpiton/bootrom/baremetal/gen_rom.py -> ../../../bootrom/gen_rom.py
[redacted]./src/main/resources/cva6/vsrc/cva6/openpiton/bootrom/baremetal/Makefile -> ../../../bootrom/Makefile
[redacted]./src/main/resources/cva6/vsrc/cva6/fpga/src/bootrom/gen_rom.py -> ../../../bootrom/gen_rom.py
[redacted]./src/main/resources/cva6/vsrc/cva6/tb/riscv-isa-sim/riscv/bootrom.h -> ../../../bootrom/bootrom.h
[redacted] ./src/main/resources/cva6/vsrc/cva6/tb/dpi/bootrom.h -> ../../bootrom/bootrom.h
[redacted] ./src/main/resources/cva6/vsrc/cva6/src/fpga-support/synth/BramDwc/deps/BramDwc.sv -> ../../../rtl/BramDwc.sv
[redacted]./src/main/resources/cva6/vsrc/cva6/src/fpga-support/synth/BramDwc/deps/BramPort.sv -> ../../../rtl/BramPort.sv
[redacted]./src/main/resources/cva6/vsrc/cva6/src/fpga-support/synth/BramDwc/scripts -> ../common/scripts
[redacted] ./src/main/resources/cva6/vsrc/cva6/src/fpga-support/synth/BramDwc/.gitignore -> ../common/gitignore
[redacted] ./src/main/resources/cva6/vsrc/cva6/src/fpga-support/synth/BramDwc/Makefile -> ../common/Makefile
[redacted] ./src/main/resources/cva6/vsrc/cva6/src/fpga-support/behav/BramDwc/.gitignore -> ../common/gitignore
[redacted]./src/main/resources/cva6/vsrc/cva6/src/fpga-support/behav/BramDwc/Makefile -> ../common/Makefile
Seems that the particular problematic ones are:
./src/main/resources/cva6/vsrc/cva6/src/fpga-support/behav/BramDwc/.gitignore -> ../common/gitignore
./src/main/resources/cva6/vsrc/cva6/src/fpga-support/synth/BramDwc/.gitignore -> ../common/gitignore
I think the proper solution would be for someone with write access to cva6 to remove those symlinks.
...or someone could add those symlinks to the cva6 .gitignore - /generators/cva6/.gitignore file?...
Supposedly might work.. (But I don't have access and that's my excuse not to test it.)