mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2025-01-02 20:32:22 +00:00
ebed523ee8
The Ubiquiti Networks UniFi 6 LR access point comes with a total of 512 MB RAM provided by 2x 8-bit DDR3 SDRAM. This combination lead to problems with the DDR calibration on boot resulting in occasional hang on boot. Use updated calibration binary provided by MediaTek to make boot on that device more reliable. The binary has also been tested on the BananaPi BPi-R64 board and that also works just fine with the new binary. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
105 lines
2.5 KiB
Makefile
105 lines
2.5 KiB
Makefile
#
|
|
# Copyright (C) 2017 Hauke Mehrtens
|
|
# Copyright (C) 2021 Daniel Golle
|
|
#
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
# See /LICENSE for more information.
|
|
#
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=arm-trusted-firmware-mediatek
|
|
PKG_RELEASE:=$(AUTORELEASE)
|
|
|
|
PKG_SOURCE_PROTO:=git
|
|
PKG_SOURCE_URL=https://github.com/mtk-openwrt/arm-trusted-firmware.git
|
|
PKG_SOURCE_DATE:=2021-04-28
|
|
PKG_SOURCE_VERSION:=a63914612904642ed974390fff620f7003ebc20a
|
|
PKG_MIRROR_HASH:=6396a36406ceecf667470d0d673552751573de65497bf97d1e2af3505fe79366
|
|
|
|
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
|
|
|
|
include $(INCLUDE_DIR)/trusted-firmware-a.mk
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
define Trusted-Firmware-A/Default
|
|
BUILD_TARGET:=mediatek
|
|
BUILD_SUBTARGET:=mt7622
|
|
PLAT:=mt7622
|
|
TFA_IMAGE:=bl2.img bl31.bin
|
|
BOOT_DEVICE:=
|
|
DDR3_FLYBY:=
|
|
endef
|
|
|
|
define Trusted-Firmware-A/mt7622-nor-1ddr
|
|
NAME:=MediaTek MT7622 (SPI-NOR, 1x DDR3)
|
|
BOOT_DEVICE:=nor
|
|
endef
|
|
|
|
define Trusted-Firmware-A/mt7622-nor-2ddr
|
|
NAME:=MediaTek MT7622 (SPI-NOR, 2x DDR3)
|
|
BOOT_DEVICE:=nor
|
|
DDR3_FLYBY:=1
|
|
endef
|
|
|
|
define Trusted-Firmware-A/mt7622-snand-1ddr
|
|
NAME:=MediaTek MT7622 (SPI-NAND, 1x DDR3)
|
|
BOOT_DEVICE:=snand
|
|
endef
|
|
|
|
define Trusted-Firmware-A/mt7622-snand-2ddr
|
|
NAME:=MediaTek MT7622 (SPI-NAND, 2x DDR3)
|
|
BOOT_DEVICE:=snand
|
|
DDR3_FLYBY:=1
|
|
endef
|
|
|
|
define Trusted-Firmware-A/mt7622-emmc-1ddr
|
|
NAME:=MediaTek MT7622 (eMMC, 1x DDR3)
|
|
BOOT_DEVICE:=emmc
|
|
endef
|
|
|
|
define Trusted-Firmware-A/mt7622-emmc-2ddr
|
|
NAME:=MediaTek MT7622 (eMMC, 2x DDR3)
|
|
BOOT_DEVICE:=emmc
|
|
DDR3_FLYBY:=1
|
|
endef
|
|
|
|
define Trusted-Firmware-A/mt7622-sdmmc-1ddr
|
|
NAME:=MediaTek MT7622 (SDcard, 1x DDR3)
|
|
BOOT_DEVICE:=sdmmc
|
|
endef
|
|
|
|
define Trusted-Firmware-A/mt7622-sdmmc-2ddr
|
|
NAME:=MediaTek MT7622 (SDcard, 2x DDR3)
|
|
BOOT_DEVICE:=sdmmc
|
|
DDR3_FLYBY:=1
|
|
endef
|
|
|
|
TFA_TARGETS:= \
|
|
mt7622-nor-1ddr \
|
|
mt7622-nor-2ddr \
|
|
mt7622-snand-1ddr \
|
|
mt7622-snand-2ddr \
|
|
mt7622-emmc-1ddr \
|
|
mt7622-emmc-2ddr \
|
|
mt7622-sdmmc-1ddr \
|
|
mt7622-sdmmc-2ddr
|
|
|
|
TFA_MAKE_FLAGS += \
|
|
BOOT_DEVICE=$(BOOT_DEVICE) \
|
|
USE_MKIMAGE=1 MKIMAGE=$(STAGING_DIR_HOST)/bin/mkimage \
|
|
$(if $(DDR3_FLYBY),DDR3_FLYBY=1) \
|
|
all
|
|
|
|
define Build/Configure
|
|
$(call Build/Configure/Default)
|
|
endef
|
|
|
|
define Package/trusted-firmware-a/install
|
|
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
|
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/build/mt7622/release/bl2.img $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-bl2.img
|
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/build/mt7622/release/bl31.bin $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-bl31.bin
|
|
endef
|
|
|
|
$(eval $(call BuildPackage/Trusted-Firmware-A))
|