mirror of
				https://github.com/openhwgroup/cvw
				synced 2025-02-11 06:05:49 +00:00 
			
		
		
		
	Since writing an SD card image generation script, the bootloader needed to be altered to access individual binaries from specific partitions. A new file, gpt.c with it's header gpt.h, have been added to the bootloader to facilitate this. The SDC has been added to the device tree for the VCU108 board. Additionally the SDC interrupt signal was added to the PLIC node in the device tree. The PLIC itself was modified to accept the SDC interrupt signal.
		
			
				
	
	
		
			46 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Makefile
		
	
	
	
	
	
			
		
		
	
	
			46 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Makefile
		
	
	
	
	
	
BUILDROOT := ${RISCV}/buildroot
 | 
						|
IMAGES := ${BUILDROOT}/output/images
 | 
						|
DIS := ${IMAGES}/disassembly
 | 
						|
 | 
						|
all:
 | 
						|
	make disassemble
 | 
						|
	make generate
 | 
						|
 | 
						|
generate:
 | 
						|
	# generating device tree binary
 | 
						|
	dtc -I dts -O dtb ../devicetree/wally-virt.dts > ${IMAGES}/wally-virt.dtb
 | 
						|
	dtc -I dts -O dtb ../devicetree/wally-vcu108.dts > ${IMAGES}/wally-vcu108.dtb
 | 
						|
 | 
						|
disassemble:
 | 
						|
	mkdir -p ${DIS}
 | 
						|
	# disassemblies
 | 
						|
	make -j ${DIS}/fw_jump.objdump ${DIS}/vmlinux.objdump ${DIS}/busybox.objdump ${DIS}/vmlinux.objdump.addr
 | 
						|
	# filesystem
 | 
						|
	make ${DIS}/rootfs/bin/busybox
 | 
						|
	# mkdir -p ${DIS}/rootfs
 | 
						|
	# -cd ${DIS}/rootfs; cpio -id --nonmatching 'dev/console' < ../../rootfs.cpio
 | 
						|
 | 
						|
${DIS}/fw_jump.objdump: ${IMAGES}/fw_jump.elf
 | 
						|
	riscv64-unknown-elf-objdump -S ${IMAGES}/fw_jump.elf >> ${DIS}/fw_jump.objdump
 | 
						|
 | 
						|
${IMAGES}/vmlinux: ${BUILDROOT}/output/build/linux-5.10.7/vmlinux
 | 
						|
	cp ${BUILDROOT}/output/build/linux-5.10.7/vmlinux ${IMAGES}/vmlinux
 | 
						|
 | 
						|
${DIS}/vmlinux.objdump: ${IMAGES}/vmlinux
 | 
						|
	riscv64-unknown-elf-objdump -S ${IMAGES}/vmlinux >> ${DIS}/vmlinux.objdump
 | 
						|
 | 
						|
${DIS}/vmlinux.objdump.addr: ${DIS}/vmlinux.objdump
 | 
						|
	-cd ${DIS}; extractFunctionRadix.sh vmlinux.objdump
 | 
						|
 | 
						|
${DIS}/busybox.objdump: ${DIS}/rootfs/bin/busybox
 | 
						|
	riscv64-unknown-elf-objdump -S ${DIS}/rootfs/bin/busybox >> ${DIS}/busybox.objdump
 | 
						|
 | 
						|
${DIS}/rootfs/bin/busybox:
 | 
						|
	mkdir -p ${DIS}/rootfs
 | 
						|
	-cd ${DIS}/rootfs; cpio -id --nonmatching 'dev/console' < ../../rootfs.cpio
 | 
						|
 | 
						|
 | 
						|
clean:
 | 
						|
	rm -f ${IMAGES}/wally-virt.dtb
 | 
						|
	rm -rf ${DIS}
 |