From ff2b468ccd00fe75762394e8cd61df535c9dc178 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Mon, 1 Apr 2024 18:25:58 +0200 Subject: starfive-visionfive2: add basic support --- target/riscv64/Makefile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'target/riscv64/Makefile') diff --git a/target/riscv64/Makefile b/target/riscv64/Makefile index b46a7c6e6..55134d24e 100644 --- a/target/riscv64/Makefile +++ b/target/riscv64/Makefile @@ -55,6 +55,12 @@ ifeq ($(ADK_TARGET_SYSTEM_SIPEED_MAIX_BIT),y) @echo 'sudo python3 scripts/kflash.py -p /dev/ttyUSB0 -b 1500000 -t $(FW_DIR)/$(TARGET_KERNEL)' endif endif +ifeq ($(ADK_TARGET_FS),genimage) +targethelp: + @echo "The disk image is: $(FW_DIR)/sdcard.img" + @echo "Use following command to install it on SD card:" + @echo 'sudo dd if=$(FW_DIR)/sdcard.img of=/dev/sdX bs=2048k' +endif ifeq ($(ADK_TARGET_FS),nfsroot) targethelp: @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}' @@ -67,6 +73,13 @@ kernel-strip: kernel-install: kernel-strip @cp $(BUILD_DIR)/$(TARGET_KERNEL) $(FW_DIR)/$(TARGET_KERNEL) +dtb-install: + ${KERNEL_MAKE} dtbs + for x in $(LINUX_DIR)/arch/riscv/boot/dts/*/*.dtb; do \ + [[ -e "$$x" ]] && cp $(LINUX_DIR)/arch/riscv/boot/dts/*/*.dtb $(FW_DIR); \ + break; \ + done + # filesystem specific targets ifeq ($(ADK_TARGET_FS),archive) imageinstall: kernel-install $(FW_DIR)/$(ROOTFSTARBALL) targethelp @@ -80,6 +93,9 @@ endif ifeq ($(ADK_TARGET_FS),initramfspiggyback) imageinstall: createinitramfs targethelp endif +ifeq ($(ADK_TARGET_FS),genimage) +imageinstall: dtb-install $(FW_DIR)/$(GENIMAGE) targethelp +endif ifeq ($(ADK_TARGET_FS),nfsroot) imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp endif -- cgit v1.2.3