diff options
author | Zoltan HERPAI <wigyori@uid0.hu> | 2023-05-28 15:14:02 +0200 |
---|---|---|
committer | Zoltan HERPAI <wigyori@uid0.hu> | 2024-03-10 18:21:46 +0100 |
commit | 4070e2a64c524b1de38573700ba1c4fcc79de1bf (patch) | |
tree | b98776aacec6a7af3d424c3842e363658cd12de5 /target/linux/starfive/image/Makefile | |
parent | db0d7cf6a19f909a3cce958c5a8457511c1179e8 (diff) | |
download | openwrt-4070e2a64c524b1de38573700ba1c4fcc79de1bf.tar.gz openwrt-4070e2a64c524b1de38573700ba1c4fcc79de1bf.tar.bz2 openwrt-4070e2a64c524b1de38573700ba1c4fcc79de1bf.zip |
starfive: add new target for StarFive JH7100/7110 SoC
This target adds support for the StarFive JH7100 and JH7110 SoCs, based on
6.1, as well as a couple boards equipped with these.
Specifications:
SoCs:
JH7100:
- StarFive JH7100 dual-core RISC-V (U74, RC64GC)
- additional monitoring (S7) and control (E24) cores
- 2Mb L2 cache
JH7110:
- StarFive JH7110 quad-core RISC-V (U74, RV64GC)
- additional monitoring (S7) and control (E24) cores
- 2Mb L2 cache
Boards:
VisionFive1:
- JH7100 @ 1GHz
- Memory: 8Gb LPDDR4
- 4x USB3.0
- 1x GBit ethernet
- AMPak 6236 wifi / bluetooth
- audio
- powered via USB-C
VisionFive2:
- JH7110 @ 1.5GHz
- Memory: 2/4/8Gb DDR4
- 2x Gbit ethernet
- 2x USB3.0 / 2x USB2.0
- eMMC / SDIO
- various multimedia input/outputs (MIPI CSI, HDMI, audio)
- M.2 key M slot
- PoE support
- powered via USB-C
Installation:
Standard SD-card installation via dd-ing the generated image to
an SD-card of at least 256Mb.
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
Diffstat (limited to 'target/linux/starfive/image/Makefile')
-rw-r--r-- | target/linux/starfive/image/Makefile | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/target/linux/starfive/image/Makefile b/target/linux/starfive/image/Makefile new file mode 100644 index 0000000000..51bc9c3cc6 --- /dev/null +++ b/target/linux/starfive/image/Makefile @@ -0,0 +1,85 @@ +# SPDX-License-Identifier: GPL-2.0-only +# +# Copyright (C) 2023 Toco Technologies <info@toco.ae> +# +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/image.mk + +FAT32_BLOCK_SIZE=1024 +FAT32_BLOCKS=$(shell echo $$(($(CONFIG_STARFIVE_SD_BOOT_PARTSIZE)*1024*1024/$(FAT32_BLOCK_SIZE)))) + +define Build/boot-scr-jh7110 + rm -f $@-boot.scr + mkimage -A riscv -O linux -T script -C none -a 0 -e 0 -d mmc.bootscript.jh7110 $@-boot.scr +endef + +define Build/boot-scr-jh7100 + rm -f $@-boot.scr + mkimage -A riscv -O linux -T script -C none -a 0 -e 0 -d mmc.bootscript.jh7100 $@-boot.scr +endef + +define Build/riscv-sdcard + rm -f $@.boot #$(KDIR_TMP)/$(IMG_PREFIX)-$(PROFILE)-boot.img + mkfs.fat $@.boot -C $(FAT32_BLOCKS) + mcopy -i $@.boot $(LINUX_DIR)/arch/riscv/boot/dts/$(DEVICE_DTS).dtb ::dtb + mcopy -i $@.boot $@-boot.scr ::boot.scr.uimg + mcopy -i $@.boot $(IMAGE_KERNEL) ::Image + ./gen_starfive_sdcard_img.sh \ + $@ \ + $@.boot \ + $(IMAGE_ROOTFS) \ + $(CONFIG_STARFIVE_SD_BOOT_PARTSIZE) \ + $(CONFIG_TARGET_ROOTFS_PARTSIZE) +endef + +define Device/Default + PROFILES := Default + KERNEL_NAME := Image + KERNEL := kernel-bin + IMAGES := sdcard.img.gz + IMAGE/sdcard.img.gz := boot-scr-jh7110 | riscv-sdcard | append-metadata | gzip +endef + +define Device/JH7100 + PROFILES := Default + KERNEL_NAME := Image + KERNEL := kernel-bin + IMAGES := sdcard.img.gz + IMAGE/sdcard.img.gz := boot-scr-jh7100 | riscv-sdcard | append-metadata | gzip +endef + +define Device/visionfive2-v1.2a + DEVICE_VENDOR := StarFive + DEVICE_MODEL := VisionFive2 v1.2a + DEVICE_DTS := starfive/jh7110-starfive-visionfive-2-v1.2a + DEVICE_PACKAGES := kmod-eeprom-at24 kmod-pcie-starfive kmod-usb3 kmod-usb-cdns3-starfive +endef +TARGET_DEVICES += visionfive2-v1.2a + +define Device/visionfive2-v1.3b + DEVICE_VENDOR := StarFive + DEVICE_MODEL := VisionFive2 v1.3b + DEVICE_DTS := starfive/jh7110-starfive-visionfive-2-v1.3b + DEVICE_PACKAGES := kmod-eeprom-at24 kmod-pcie-starfive kmod-usb3 kmod-usb-cdns3-starfive +endef +TARGET_DEVICES += visionfive2-v1.3b + +define Device/beaglev-starlight + $(call Device/JH7100) + DEVICE_VENDOR := BeagleV + DEVICE_MODEL := Starlight + DEVICE_DTS := starfive/jh7100-beaglev-starlight +endef +TARGET_DEVICES += beaglev-starlight + +define Device/visionfive-v1 + $(call Device/JH7100) + DEVICE_VENDOR := StarFive + DEVICE_MODEL := VisionFive v1 + DEVICE_DTS := starfive/jh7100-starfive-visionfive-v1 + DEVICE_PACKAGES := kmod-eeprom-at24 kmod-brcmfmac cypress-firmware-43430-sdio wpad-basic-mbedtls \ + kmod-usb3 kmod-usb-cdns3-starfive +endef +TARGET_DEVICES += visionfive-v1 + +$(eval $(call BuildImage)) |