mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-28 09:39:00 +00:00
73da0f6334
No need to pass the option no-warn-rwx-segments. Since v2.12, TF-A automatically selects it if needed. A patch is added to revert commit 03a581e2 ("feat(stm32mp1-fdts): remove RTC clock configuration"). This commit removed RTC clock configuration, as it assumed that it was done correctly by OPTEE. But it is not the case. Without this patch the RTC is in a bad state, consequently the wifi module cannot be initialized. stm32_rtc 5c004000.rtc: rtc_ck is slow stm32_rtc 5c004000.rtc: Can't enter in init mode. Prescaler config failed. stm32_rtc: probe of 5c004000.rtc failed with error -110 sdio mmc1:0001:1: Direct firmware load for brcm/brcmfmac43430-sdio.st,stm32mp135f-dk.bin failed with error -2 brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50 Tested on STM32MP135F-DK. Signed-off-by: Thomas Richard <thomas.richard@bootlin.com> Link: https://github.com/openwrt/openwrt/pull/17243 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
67 lines
1.9 KiB
Makefile
67 lines
1.9 KiB
Makefile
#
|
|
# Copyright (C) 2024 Bootlin
|
|
#
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
# See /LICENSE for more information.
|
|
#
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_VERSION:=2.12
|
|
PKG_RELEASE:=1
|
|
|
|
PKG_SOURCE_PROTO:=git
|
|
PKG_SOURCE_URL:=https://github.com/ARM-software/arm-trusted-firmware.git
|
|
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
|
|
PKG_MIRROR_HASH:=51b2022baa25df7fd8f2e6d2709c9351c14b17447cda64759a8a1d432f9d1c11
|
|
PKG_MAINTAINER:=Thomas Richard <thomas.richard@bootlin.com>
|
|
|
|
include $(INCLUDE_DIR)/kernel.mk
|
|
include $(INCLUDE_DIR)/trusted-firmware-a.mk
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
define Trusted-Firmware-A/Default
|
|
BUILD_TARGET:=stm32
|
|
BUILD_DEVICES:=$(1)
|
|
DEPENDS:=+u-boot-$(1) +optee-os-$(1)
|
|
endef
|
|
|
|
define Trusted-Firmware-A/stm32mp1
|
|
BUILD_SUBTARGET:=stm32mp1
|
|
PLAT:=stm32mp1
|
|
MAKE_ARGS += BL32_EXTRA2=$(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-tee-pageable_v2.bin \
|
|
STM32MP_USB_PROGRAMMER=1 \
|
|
STM32MP1_OPTEE_IN_SYSRAM=1 \
|
|
ARM_ARCH_MAJOR=7
|
|
endef
|
|
|
|
define Trusted-Firmware-A/stm32mp135f-dk
|
|
$(call Trusted-Firmware-A/stm32mp1)
|
|
NAME:=STM32MP135F-DK
|
|
DTB_FILE_NAME=stm32mp135f-dk.dtb
|
|
endef
|
|
|
|
TFA_TARGETS := stm32mp135f-dk
|
|
|
|
TFA_MAKE_FLAGS += \
|
|
ARCH=aarch32 AARCH32_SP=optee \
|
|
BL32=$(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-tee-header_v2.bin \
|
|
BL32_EXTRA1=$(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-tee-pager_v2.bin \
|
|
BL33=$(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-u-boot.bin \
|
|
BL33_CFG=$(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-u-boot.dtb \
|
|
DTB_FILE_NAME=$(DTB_FILE_NAME) \
|
|
STM32MP_SDMMC=1 \
|
|
TARGET_BOARD="" \
|
|
$(MAKE_ARGS) \
|
|
all fip
|
|
|
|
define Package/trusted-firmware-a/install
|
|
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
|
|
$(CP) $(PKG_BUILD_DIR)/build/$(PLAT)/release/tf-a-$(BUILD_VARIANT).stm32 \
|
|
$(STAGING_DIR_IMAGE)/tf-a-$(BUILD_VARIANT).stm32
|
|
$(CP) $(PKG_BUILD_DIR)/build/$(PLAT)/release/fip.bin \
|
|
$(STAGING_DIR_IMAGE)/fip-$(BUILD_VARIANT).bin
|
|
endef
|
|
|
|
$(eval $(call BuildPackage/Trusted-Firmware-A))
|