mirror of
				https://github.com/openhwgroup/cvw
				synced 2025-02-11 06:05:49 +00:00 
			
		
		
		
	Ok this is much better. Thanks Jacob for the tip about vmlinux always being generated.
This commit is contained in:
		
							parent
							
								
									a7f3517981
								
							
						
					
					
						commit
						69126298a4
					
				| @ -1,5 +1,6 @@ | ||||
| RISCV := /opt/riscv | ||||
| BUILDROOT := ${RISCV}/buildroot | ||||
| #BUILDROOT := ${RISCV}/buildroot-test
 | ||||
| BUILDROOT := buildroot | ||||
| IMAGES := ${BUILDROOT}/output/images | ||||
| WALLY := $(shell dirname $(shell pwd)) | ||||
| WALLYLINUX := $(shell pwd) | ||||
| @ -29,13 +30,17 @@ OBJDUMPS := $(foreach name, $(OBJDUMPS), $(DIS)/$(name).objdump) | ||||
| 
 | ||||
| .PHONY: all generate disassemble install clean cleanDTB cleanDriver test | ||||
| 
 | ||||
| all: | ||||
| 	$(MAKE) install | ||||
| all: download Image disassemble install | ||||
| 
 | ||||
| Image: | ||||
| 	make -C $(BUILDROOT) --jobs | ||||
| 	$(MAKE) generate | ||||
| 	# TODO: Need to find a way to set the PATH for child processes. | ||||
| 	# source ../setup.sh; $(MAKE) disassemble | ||||
| 
 | ||||
| install: | ||||
| 	sudo cp -r $(BUILDROOT) $(RISCV)/$(BUILDROOT) | ||||
| 
 | ||||
| # Temp rule for debugging
 | ||||
| test: | ||||
| 	echo $(shell find $(BUILDROOT)/output/build -maxdepth 2 -type d -regex ".*/linux-[0-9]+\.[0-9]+\.[0-9]+$$") | ||||
| @ -55,23 +60,12 @@ $(RISCV): | ||||
| 
 | ||||
| # Disassembly rules ---------------------------------------------------
 | ||||
| 
 | ||||
| vmlinux: | ||||
| 	sed 's/BR2_LINUX_KERNEL_IMAGE=y/\# BR2_LINUX_KERNEL_IMAGE is not set/g' ${BR2023}/main.config > ${BR2023}/main-vmlinux.config | ||||
| 	sed -i 's/\# BR2_LINUX_KERNEL_VMLINUX is not set/BR2_LINUX_KERNEL_VMLINUX=y/g' ${BR2023}/main-vmlinux.config | ||||
| 	sed -i 's/\# BR2_TARGET_OPENSBI_LINUX_PAYLOAD is not set//g' ${BR2023}/main-vmlinux.config | ||||
| 	cp $(BR2023)/main-vmlinux.config $(WALLYBOARD)/main.config | ||||
| 	cp $(BR2023)/main-vmlinux.config $(BUILDROOT)/.config | ||||
| 	make -C $(BUILDROOT) --jobs | ||||
| 
 | ||||
| disassemble: | ||||
| 	cp $(BUILDROOT)/output/build/linux*/vmlinux $(BUILDROOT)/output/images/vmlinux | ||||
| 	mkdir -p $(DIS) | ||||
| 	make -j $(OBJDUMPS) | ||||
| 
 | ||||
| Image: | ||||
| 	cp $(BR2023)/main.config $(WALLYBOARD)/main.config | ||||
| 	cp $(BR2023)/main.config $(BUILDROOT)/.config | ||||
| 	make -C $(BUILDROOT) --jobs | ||||
| 
 | ||||
| $(DIS)/%.objdump: $(IMAGES)/%.elf | ||||
| 	riscv64-unknown-elf-objdump -DS $< >> $@ | ||||
| 
 | ||||
| @ -89,7 +83,7 @@ $(IMAGES)/busybox: | ||||
| # Generating new Buildroot directories --------------------------------
 | ||||
| 
 | ||||
| # This directive should be run as: make install BUILDROOT=path/to/buildroot
 | ||||
| install: $(BUILDROOT)/package/fpga-axi-sdc $(WALLYBOARD) | ||||
| download: $(BUILDROOT)/package/fpga-axi-sdc $(WALLYBOARD) | ||||
| 	cp $(WALLYBOARD)/main.config $(BUILDROOT)/.config | ||||
| 
 | ||||
| # CONFIG DEPENDENCIES 2023.05.1 ---------------------------------------
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user