uboot-mediatek: add support for Bananapi BPi-R3
The Bananapi BPi-R3 board can boot from eMMC, SD card, SPI-NAND and SPI-NOR, depending on the position of switches controlling the BOOTSEL bootstrap pins as we as hard-wired chip-select lines. The position of the chip-select switch SW6 decides whether either SD card or eMMC can be accessed, SW5 selects either SPI-NAND or SPI-NOR. Generate U-Boot for all 4 boot options. The SD card version allows installation to SPI-NAND and SPI-NOR (eMMC cannot be accessed simultanously with the SD card), the SPI-NAND version allows installation to eMMC. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
parent
e504fdae4e
commit
c2bc1bd99a
|
@ -180,7 +180,60 @@ define U-Boot/mt7986_rfb
|
|||
BUILD_SUBTARGET:=filogic
|
||||
BUILD_DEVICES:=mediatek_mt7986-rfb
|
||||
UBOOT_CONFIG:=mt7986_rfb
|
||||
UBOOT_IMAGE:=u-boot.bin
|
||||
UBOOT_IMAGE:=u-boot.fip
|
||||
BL2_BOOTDEV:=sdmmc
|
||||
BL2_SOC:=mt7986
|
||||
BL2_DDRTYPE:=ddr4
|
||||
DEPENDS:=+trusted-firmware-a-mt7986-sdmmc-ddr4
|
||||
endef
|
||||
|
||||
define U-Boot/mt7986_bananapi_bpi-r3-emmc
|
||||
NAME:=BananaPi BPi-R3
|
||||
BUILD_SUBTARGET:=filogic
|
||||
BUILD_DEVICES:=bananapi_bpi-r3
|
||||
UBOOT_CONFIG:=mt7986a_bpi-r3-emmc
|
||||
UBOOT_IMAGE:=u-boot.fip
|
||||
BL2_BOOTDEV:=emmc
|
||||
BL2_SOC:=mt7986
|
||||
BL2_DDRTYPE:=ddr4
|
||||
DEPENDS:=+trusted-firmware-a-mt7986-emmc-ddr4
|
||||
endef
|
||||
|
||||
define U-Boot/mt7986_bananapi_bpi-r3-sdmmc
|
||||
NAME:=BananaPi BPi-R3
|
||||
BUILD_SUBTARGET:=filogic
|
||||
BUILD_DEVICES:=bananapi_bpi-r3
|
||||
UBOOT_CONFIG:=mt7986a_bpi-r3-sd
|
||||
UBOOT_IMAGE:=u-boot.fip
|
||||
BL2_BOOTDEV:=sdmmc
|
||||
BL2_SOC:=mt7986
|
||||
BL2_DDRTYPE:=ddr4
|
||||
DEPENDS:=+trusted-firmware-a-mt7986-sdmmc-ddr4
|
||||
endef
|
||||
|
||||
define U-Boot/mt7986_bananapi_bpi-r3-snand
|
||||
NAME:=BananaPi BPi-R3
|
||||
BUILD_SUBTARGET:=filogic
|
||||
BUILD_DEVICES:=bananapi_bpi-r3
|
||||
UBOOT_CONFIG:=mt7986a_bpi-r3-snand
|
||||
UBOOT_IMAGE:=u-boot.fip
|
||||
BL2_BOOTDEV:=spim-nand
|
||||
BL2_SOC:=mt7986
|
||||
BL2_DDRTYPE:=ddr4
|
||||
DEPENDS:=+trusted-firmware-a-mt7986-spim-nand-ddr4
|
||||
endef
|
||||
|
||||
define U-Boot/mt7986_bananapi_bpi-r3-nor
|
||||
NAME:=BananaPi BPi-R3
|
||||
BUILD_SUBTARGET:=filogic
|
||||
BUILD_DEVICES:=bananapi_bpi-r3
|
||||
UBOOT_CONFIG:=mt7986a_bpi-r3-nor
|
||||
UBOOT_IMAGE:=u-boot.fip
|
||||
BL2_BOOTDEV:=nor
|
||||
BL2_SOC:=mt7986
|
||||
BL2_DDRTYPE:=ddr4
|
||||
DEPENDS:=+trusted-firmware-a-mt7986-nor-ddr4
|
||||
FIP_COMPRESS:=1
|
||||
endef
|
||||
|
||||
UBOOT_TARGETS := \
|
||||
|
@ -199,6 +252,10 @@ UBOOT_TARGETS := \
|
|||
mt7628_rfb \
|
||||
ravpower_rp-wd009 \
|
||||
mt7629_rfb \
|
||||
mt7986_bananapi_bpi-r3-emmc \
|
||||
mt7986_bananapi_bpi-r3-sdmmc \
|
||||
mt7986_bananapi_bpi-r3-snand \
|
||||
mt7986_bananapi_bpi-r3-nor \
|
||||
mt7986_rfb
|
||||
|
||||
ifdef CONFIG_TARGET_mediatek
|
||||
|
@ -207,11 +264,11 @@ endif
|
|||
|
||||
define Build/fip-image
|
||||
$(if $(FIP_COMPRESS),\
|
||||
xz -f -e -k -9 -C crc32 $(STAGING_DIR_IMAGE)/$(BUILD_SUBTARGET)-$(BL2_BOOTDEV)-$(BL2_DDRBLOB)ddr-bl31.bin ;\
|
||||
xz -f -e -k -9 -C crc32 $(STAGING_DIR_IMAGE)/$(if $(BL2_SOC),$(BL2_SOC),$(BUILD_SUBTARGET))-$(BL2_BOOTDEV)-$(if $(BL2_DDRTYPE),$(BL2_DDRTYPE)-)$(if $(BL2_DDRBLOB),$(BL2_DDRBLOB)ddr-)bl31.bin ;\
|
||||
xz -f -e -k -9 -C crc32 $(PKG_BUILD_DIR)/u-boot.bin \
|
||||
)
|
||||
$(STAGING_DIR_HOST)/bin/fiptool create \
|
||||
--soc-fw $(STAGING_DIR_IMAGE)/$(BUILD_SUBTARGET)-$(BL2_BOOTDEV)-$(BL2_DDRBLOB)ddr-bl31.bin$(if $(FIP_COMPRESS),.xz) \
|
||||
--soc-fw $(STAGING_DIR_IMAGE)/$(if $(BL2_SOC),$(BL2_SOC),$(BUILD_SUBTARGET))-$(BL2_BOOTDEV)-$(if $(BL2_DDRTYPE),$(BL2_DDRTYPE)-)$(if $(BL2_DDRBLOB),$(BL2_DDRBLOB)ddr-)bl31.bin$(if $(FIP_COMPRESS),.xz) \
|
||||
--nt-fw $(PKG_BUILD_DIR)/u-boot.bin$(if $(FIP_COMPRESS),.xz) \
|
||||
$(PKG_BUILD_DIR)/u-boot.fip
|
||||
endef
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue