forked from Openwrt/openwrt
095efad4fe
Upgrade the OpenSBI firmware used by RISC-V CPUs to 1.4. Runtime-tested: - d1 (Lichee RV) - sifiveu (SiFive Unleashed) Updates since last release: 1.4: Synopsys DesignWare APB GPIO driver Zicntr and Zihpm support Console print improvements Smepmp support Simple FDT based syscon regmap driver Syscon based reboot and poweroff driver Non-contiguous hpm counters Smcntrpmf support Full sparse hartid support IPI improvements RFENCE improvements Zkr support Andes custom PMU support 1.3.1: ACLINT driver fix for disabled CPUs SBI PMU fix for out-of-bound access Designware GPIO driver 1.3: Allow platform to influence cold boot HART selection Starfive JH7110 platform support Split RX and RW firmware regions Advertise non-retentive suspend for allwinner D1 platform Byteorder/endianness conversion macros SBI debug console extension (Experimental) Configure the PMA regions for RZ/Five platform SBI system suspend extension (Experimental) SBI PMU platform firmware events (Experimental) SBI CPPC extension (Experimental) Optimized remote TLB flushes Simple heap for boot time memory allocations Bring back no-map DT property for reserved memory nodes Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
64 lines
1.5 KiB
Makefile
64 lines
1.5 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0-only
|
|
#
|
|
# Copyright (C) 2022 OpenWrt.org
|
|
#
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=opensbi
|
|
PKG_RELEASE:=1.4
|
|
|
|
PKG_SOURCE_PROTO:=git
|
|
PKG_SOURCE_URL=https://github.com/riscv/opensbi
|
|
PKG_SOURCE_DATE:=2023-12-24
|
|
PKG_SOURCE_VERSION:=a2b255b88918715173942f2c5e1f97ac9e90c877
|
|
PKG_MIRROR_HASH:=a81d7b3622feba80b2a45fe0d38600be73cfbee64a0426be82a71545c10c54d3
|
|
|
|
PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
|
|
|
|
PKG_TARGETS:=bin
|
|
PKG_FLAGS:=nonshared
|
|
PKG_LICENSE:=BSD-2-Clause
|
|
PKG_LICENSE_FILES:=COPYING.BSD
|
|
PKG_BUILD_PARALLEL:=1
|
|
|
|
PKG_MAINTAINER:=Zoltan HERPAI <wigyori@uid0.hu>
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
define Package/opensbi
|
|
SECTION:=boot
|
|
CATEGORY:=Boot Loaders
|
|
DEPENDS:=@(TARGET_sifiveu||TARGET_d1)
|
|
URL:=https://github.com/riscv/opensbi/blob/master/README.md
|
|
VARIANT:=$(subst _,/,$(subst opensbi_,,$(1)))
|
|
TITLE:=OpenSBI generic
|
|
OPENSBI_IMAGE:=
|
|
PLAT:=
|
|
endef
|
|
|
|
define Package/opensbi_generic
|
|
$(Package/opensbi)
|
|
TITLE:=OpenSBI generic
|
|
OPENSBI_IMAGE:=fw_dynamic.bin
|
|
PLAT:=generic
|
|
endef
|
|
|
|
export GCC_HONOUR_COPTS=s
|
|
|
|
MAKE_VARS = \
|
|
CROSS_COMPILE="$(TARGET_CROSS)"
|
|
|
|
define Build/Compile
|
|
$(eval $(Package/opensbi_$(BUILD_VARIANT))) \
|
|
+$(MAKE_VARS) $(MAKE) -C $(PKG_BUILD_DIR) \
|
|
PLATFORM=$(PLAT)
|
|
endef
|
|
|
|
define Build/InstallDev
|
|
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
|
|
$(CP) $(PKG_BUILD_DIR)/build/platform/$(PLAT)/firmware/fw_dynamic.bin $(STAGING_DIR_IMAGE)/fw_dynamic-${BUILD_VARIANT}.bin
|
|
endef
|
|
|
|
$(eval $(call BuildPackage,opensbi_generic))
|