mirror of
				https://github.com/openhwgroup/cvw
				synced 2025-02-11 06:05:49 +00:00 
			
		
		
		
	replace sudo's with suggestions in genRecording.sh
This commit is contained in:
		
							parent
							
								
									3e4ce15ea4
								
							
						
					
					
						commit
						8720604bfc
					
				| @ -8,26 +8,30 @@ Would you like to proceed? (y/n) " -n 1 -r | |||||||
| echo | echo | ||||||
| if [[ $REPLY =~ ^[Yy]$ ]] | if [[ $REPLY =~ ^[Yy]$ ]] | ||||||
| then | then | ||||||
|     # Create Output Directory |     if [ ! -d "$tvDir" ]; then | ||||||
|     echo "Elevating permissions to create $recordFile" |         echo "Error: linux testvector directory $tvDir not found!">&2 | ||||||
|     sudo mkdir -p $tvDir |         echo "Please create it. For example:">&2 | ||||||
|     sudo chown cad $tvDir |         echo "    sudo mkdir -p $tvDir">&2 | ||||||
|     sudo touch $recordFile  |         exit 1 | ||||||
|     sudo chmod a+rw $recordFile |     fi | ||||||
|  |     test -w $tvDir | ||||||
|  |     if [ ! $? -eq 0 ]; then | ||||||
|  |         echo "Error: insuffcient write privileges for linux testvector directory $tvDir !">&2 | ||||||
|  |         echo "Please chmod it. For example:">&2 | ||||||
|  |         echo "    sudo chmod -R a+rw $tvDir">&2 | ||||||
|  |         exit 1 | ||||||
|  |     fi | ||||||
| 
 | 
 | ||||||
|     # Compile Devicetree from Source |     echo "Launching QEMU in record mode!" | ||||||
|     dtc -I dts -O dtb ../devicetree/wally-virt.dts > ../devicetree/wally-virt.dtb |  | ||||||
| 
 |  | ||||||
|     # QEMU Simulation |  | ||||||
|     echo "Launching QEMU!" |  | ||||||
|     qemu-system-riscv64 \ |     qemu-system-riscv64 \ | ||||||
|     -M virt -dtb ../devicetree/wally-virt.dtb \ |     -M virt -dtb $imageDir/wally-virt.dtb \ | ||||||
|     -nographic \ |     -nographic \ | ||||||
|     -bios $imageDir/fw_jump.elf -kernel $imageDir/Image -append "root=/dev/vda ro" -initrd $imageDir/rootfs.cpio \ |     -bios $imageDir/fw_jump.elf -kernel $imageDir/Image -append "root=/dev/vda ro" -initrd $imageDir/rootfs.cpio \ | ||||||
|     -singlestep -rtc clock=vm -icount shift=0,align=off,sleep=on,rr=record,rrfile=$recordFile |     -singlestep -rtc clock=vm -icount shift=0,align=off,sleep=on,rr=record,rrfile=$recordFile | ||||||
| 
 | 
 | ||||||
|     # Cleanup |     echo "genRecording.sh completed!" | ||||||
|     echo "Elevating permissions to restrict write access to $recordFile" |     echo "You may want to restrict write access to $tvDir now and give cad ownership of it." | ||||||
|     sudo chown cad $recordFile |     echo "Run the following:" | ||||||
|     sudo chmod o-w $recordFile |     echo "    sudo chown -R cad:cad $tvDir" | ||||||
|  |     echo "    sudo chmod -R go-w $tvDir" | ||||||
| fi | fi | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user