Robert Marko 8a28ddafe7 ls-ddr-phy: select by default for layerscape/armv8_64b
Currently, ls-ddr-phy package is being included in the individual
profile DEVICE_PACKAGES but using the feature that allows skipping their
inclusion in the end image package list if prefixed with a tilde(~) which
was added in:
377b66990b97 ("build: introduce support to declare skip package")

But it not added to Image Builder so currently trying to build layerscape
device images in Image Builder will fail with:
ERROR: '~ls-ddr-phy' is not a valid world dependency, format is name(@tag)([<>~=]version)

So, instead of having to rely on support for skipping package installation
and declaring the ls-ddr-phy package in DEVICE_PACKAGES lets select it when
layerscape/armv8_64b target is selected.

Fixes: #18412
Link: https://github.com/openwrt/openwrt/pull/18462
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-13 11:25:14 +02:00

55 lines
1.4 KiB
Makefile

# SPDX-License-Identifier: GPL-2.0-or-later
#
# Copyright 2020 NXP
#
include $(TOPDIR)/rules.mk
PKG_NAME:=ls-ddr-phy
PKG_VERSION:=6.6.3.1.0.0
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/NXP/ddr-phy-binary.git
PKG_SOURCE_VERSION:=lf-6.6.3-1.0.0
PKG_MIRROR_HASH:=7a1a35b3060adba875c507be3a5c800fa0c461103aaeb8eb0eab11f1f4b8139f
PKG_BUILD_DEPENDS:=tfa-layerscape/host
PKG_LICENSE:=EULA
PKG_LICENSE_FILES:=NXP-Binary-EULA.txt
PKG_FLAGS:=nonshared
include $(INCLUDE_DIR)/package.mk
define Package/layerscape-ddr-phy
SECTION:=firmware
CATEGORY:=Firmware
TITLE:=NXP Layerscape DDR PHY firmware
DEPENDS:=@TARGET_layerscape
DEFAULT:=y if TARGET_layerscape_armv8_64b
HIDDEN:=1
endef
define Build/Compile
cd $(PKG_BUILD_DIR)/lx2160a/ && \
fiptool-layerscape create \
--ddr-immem-udimm-1d ddr4_pmu_train_imem.bin \
--ddr-immem-udimm-2d ddr4_2d_pmu_train_imem.bin \
--ddr-dmmem-udimm-1d ddr4_pmu_train_dmem.bin \
--ddr-dmmem-udimm-2d ddr4_2d_pmu_train_dmem.bin \
--ddr-immem-rdimm-1d ddr4_rdimm_pmu_train_imem.bin \
--ddr-immem-rdimm-2d ddr4_rdimm2d_pmu_train_imem.bin \
--ddr-dmmem-rdimm-1d ddr4_rdimm_pmu_train_dmem.bin \
--ddr-dmmem-rdimm-2d ddr4_rdimm2d_pmu_train_dmem.bin \
fip_ddr_all.bin
endef
define Build/InstallDev
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
$(CP) $(PKG_BUILD_DIR)/lx2160a/fip_ddr_all.bin \
$(STAGING_DIR_IMAGE)/fsl_lx2160a-rdb-fip_ddr_all.bin
endef
$(eval $(call BuildPackage,layerscape-ddr-phy))